properties + types, implementing meta-class desciptors elegantly?

Aahz aahz at
Sun Jul 20 15:39:51 CEST 2003

In article <mailman.1058654317.6488.python-list at>,
Mike C. Fletcher <mcfletch at> wrote:
>    * finally, stores the value
>          o tries to do what would have been done if there were no
>            descriptor (with the new, coerced value)
>          o does *not* create new names in the object's namespace (all
>            names are documented w/ descriptors, there's not a lot of
>            '_' prefixed names cluttering the namespace)
>          o does *not* require a new dictionary/storage-object attribute
>            for the object (the descriptor works like any other
>            descriptor, a *stand-alone* object that replaces a regular
>            attribute)

But this is a recipe for name clashes.  If you follow the first bullet,
it's a normal attribute, but everything else says you want a property.
Properties are themselves objects that are attached to names in an
object.  You can't have the same name bound to two different objects.
Aahz (aahz at           <*>

This is Python.  We don't care much about theory, except where it intersects 
with useful practice.  --Aahz

More information about the Python-list mailing list