getting special from type, not instance (was Re: [Python-Dev] copy confusion) (original) (raw)

Phillip J. Eby pje at telecommunity.com
Thu Jan 13 18:38:46 CET 2005


At 09:02 AM 1/13/05 -0800, Guido van Rossum wrote:

[Armin] > I guess that a name-based hack in typenew() to turn all *() methods into > data descriptors would be even more obscure?

To the contary, I just realized in this would in fact be the right approach. In particular, any descriptor named * would be considered a "data descriptor". Non-descriptors with such names can still be overridden in the instance dict (I believe this is used by Zope).

It should check that the *-named thing isn't already an override descriptor, though.



More information about the Python-Dev mailing list