[Python-Dev] Re: PEP 246: LiskovViolation as a name

Phillip J. Eby pje at telecommunity.com
Thu Jan 13 15:36:38 CET 2005


At 09:00 AM 1/13/05 +0100, Alex Martelli wrote:
>Incidentally, "get this specialmethod from the type (with specialcasing 
>for classic classes &c)" is a primitive that PEP 246 needs as much as, 
>say, copy.py needs it.  In the light of the recent discussions of how to 
>fix copy.py etc, I'm unsure about what to assume there, in a rewrite of 
>PEP 246: that getattr(obj, '__aspecial__', None) always does the right 
>thing via special descriptors, that I must spell everything out, or, what 
>else...?

I think you can make it a condition that metaclasses with __conform__ or 
__adapt__ must use a data descriptor like my "metamethod" decorator.  Then, 
there is no metaconfusion since metaconfusion requires a metaclass to 
exist, and you're requiring that in that case, they must use a descriptor 
to avoid the problem.



More information about the Python-Dev mailing list