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 ethan.furman
Recipients arigo, eli.bendersky, eric.snow, ethan.furman, ncoghlan, ronaldoussoren
Date 2013年10月13日.18:04:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381687472.34.0.220044994167.issue16938@psf.upfronthosting.co.za>
In-reply-to
Content
That portion of classify_class_attrs now reads:
 else:
 homecls = getattr(get_obj, "__objclass__", None)
 if homecls not in possible_bases:
 # if the resulting object does not live somewhere in the
 # mro, drop it and go with the dict_obj version only
 homecls = None
 get_obj = sentinel
An example for why the if clause is still there:
 class Life:
 @property
 def answer(self):
 return 42
Without the if clause the home class for answer would be int when it should be Life.
Attached patch is refactored for simplicity as well.
History
Date User Action Args
2013年10月13日 18:04:32ethan.furmansetrecipients: + ethan.furman, arigo, ronaldoussoren, ncoghlan, eli.bendersky, eric.snow
2013年10月13日 18:04:32ethan.furmansetmessageid: <1381687472.34.0.220044994167.issue16938@psf.upfronthosting.co.za>
2013年10月13日 18:04:32ethan.furmanlinkissue16938 messages
2013年10月13日 18:04:32ethan.furmancreate

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