◐ Shell
clean mode source ↗

Message 206326 - Python tracker

> Did I mention __index__ is an unfortunate name for the current trend for this method?

Yes, but it's probably too late to change that now.  Also, a fully precise
name would be something like:

  __to_int_exact_iff_object_has_integer_nature__ :)

> When you say "accept __index__" do you mean for use as indices, or for use as
> values in the data structure itself?

The latter, see Lib/test/test_buffer.py:2489 .