Message199721
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. |
|
Date |
User |
Action |
Args |
2013-10-13 15:14:47 | ethan.furman | set | recipients:
+ ethan.furman, arigo, ronaldoussoren, ncoghlan, eli.bendersky, eric.snow |
2013-10-13 15:14:47 | ethan.furman | set | messageid: <1381677287.09.0.629070192508.issue16938@psf.upfronthosting.co.za> |
2013-10-13 15:14:47 | ethan.furman | link | issue16938 messages |
2013-10-13 15:14:46 | ethan.furman | create | |
|