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 <>
That portion of classify_class_attrs now reads:

        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:
        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.
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: <>
2013-10-13 18:04:32ethan.furmanlinkissue16938 messages
2013-10-13 18:04:32ethan.furmancreate