homepage

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日.16:12:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376755943.08.0.713689462343.issue18712@psf.upfronthosting.co.za>
In-reply-to
Content
Sorry, realized that my pure Python algorithm isn't equivalent to _PyType_Lookup() --- it fails the staticmethod example of Serhiy. A closer one would be:
 for t in type(a).__mro__:
 if '__index__' in t.__dict__:
 return t.__dict__['__index__'].__get__(a)()
But it's still not a perfect match. I think right now the only "perfect" answer is given by workarounds like "range(a).stop"...
History
Date User Action Args
2013年08月17日 16:12:23arigosetrecipients: + arigo, mark.dickinson, zach.ware, serhiy.storchaka
2013年08月17日 16:12:23arigosetmessageid: <1376755943.08.0.713689462343.issue18712@psf.upfronthosting.co.za>
2013年08月17日 16:12:23arigolinkissue18712 messages
2013年08月17日 16:12:22arigocreate

AltStyle によって変換されたページ (->オリジナル) /