properties + types, implementing meta-class desciptors elegantly?

Bengt Richter bokr at
Tue Jul 22 04:06:25 CEST 2003

On Mon, 21 Jul 2003 18:33:27 -0400, "Mike C. Fletcher" <mcfletch at> wrote:
>Michael Hudson wrote:
[ ... evil code ... ;-) ]
>But really, I don't think either of us will deploy that particular 
>pattern in a production system.  Still, fun proposal, thanks for 
>playing, we have lots of marvelous parting gifts for you :) .
>BTW: You know this, but in case others are wondering why it's not usable 
>in real life: it's possible to have threads get/set the value without 
>triggering the descriptor if they happen to ask for it during the period 
>when the descriptor is deleted.
Did you have a chance to look at my post (posted ~12+ hours before Michael's,
if you are looking by date/time ;-) (It is threaded as a reply to Aahz in this
thread -- I probably should have split out the section for you ;-/).

It factors property-making and installing in customized classes in a couple ways.
It uses metaclasses, but I'm not sure any of it qualifies as evil ;-)

I guess I should just wait quietly, but I am curious to get your reaction ;-)

Bengt Richter

More information about the Python-list mailing list