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 eric.snow
Recipients arigo, eric.snow, mark.dickinson, serhiy.storchaka, zach.ware
Date 2013年08月17日.19:49:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376768949.7.0.758056043899.issue18712@psf.upfronthosting.co.za>
In-reply-to
Content
Couldn't you make use of inspect.getattr_static()?
 getattr_static(obj.__class__, '__index__').__get__(obj)()
getattr_static() does some extra work to get do the right lookup. I haven't verified that it matches _PyType_Lookup() exactly, but it should be pretty close at least.
Also, pickle (unfortunately) also does lookup on instances rather than classes for the special methods (issue #16251).
History
Date User Action Args
2013年08月17日 19:49:09eric.snowsetrecipients: + eric.snow, arigo, mark.dickinson, zach.ware, serhiy.storchaka
2013年08月17日 19:49:09eric.snowsetmessageid: <1376768949.7.0.758056043899.issue18712@psf.upfronthosting.co.za>
2013年08月17日 19:49:09eric.snowlinkissue18712 messages
2013年08月17日 19:49:09eric.snowcreate

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