Ethan Furman added the comment: Nick Couphlan added the comment: > > No, __class__ on a descriptor has *NOTHING* to do with how it was > looked up. It's the class of the *result*.
Which is why in most cases it's discarded as the home class. (I could easily be saying this wrong, which is why I directed you to the tests as better examples of what I am trying to communicate.) > However, setting __objclass__ on Enum members would be a perfectly > reasonable thing to do. I'm glad you think so, but this patch makes that unnecessary. > We should *not* need to have any Enum specific code in the inspect > module, and the current code that tries to find the home class has > Enum specific assumptions. Only in the sense that Enum is currently the only thing making use of the new DynamicClassAttribute descriptor. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16938> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com