This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author arigo
Recipients arigo, mark.dickinson, serhiy.storchaka, zach.ware
Date 2013-08-17.07:55:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Just mentioning it here again, but "type(a).__index__(a)" is still not perfectly correct.  Attached is a case where it differs.

I think you get always the correct answer by evaluating "range(a).stop".  It's admittedly obscure...  For example:

    class A:
        def __index__(self):
            return -42**100

    a = A()
Date User Action Args
2013-08-17 07:55:01arigosetrecipients: + arigo, mark.dickinson, zach.ware, serhiy.storchaka
2013-08-17 07:55:01arigosetmessageid: <>
2013-08-17 07:55:01arigolinkissue18712 messages
2013-08-17 07:55:01arigocreate