Message199721
| 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. |
|