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.15:14:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1381677287.09.0.629070192508.issue16938@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-10-13 15:14:47ethan.furmansetrecipients: + ethan.furman, arigo, ronaldoussoren, ncoghlan, eli.bendersky, eric.snow
2013-10-13 15:14:47ethan.furmansetmessageid: <1381677287.09.0.629070192508.issue16938@psf.upfronthosting.co.za>
2013-10-13 15:14:47ethan.furmanlinkissue16938 messages
2013-10-13 15:14:46ethan.furmancreate