Message199740
| 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:32 | ethan.furman | set | recipients: + ethan.furman, arigo, ronaldoussoren, ncoghlan, eli.bendersky, eric.snow |
| 2013-10-13 18:04:32 | ethan.furman | set | messageid: <1381687472.34.0.220044994167.issue16938@psf.upfronthosting.co.za> |
| 2013-10-13 18:04:32 | ethan.furman | link | issue16938 messages |
| 2013-10-13 18:04:32 | ethan.furman | create | |