Metaclass v.s. Property function.

Dustan DustanGroups at gmail.com
Sat Aug 11 17:11:45 EDT 2007


On Aug 11, 7:33 am, Jens Thiede <jensthi... at gmail.com> wrote:
> I don't like the property function, usable in the new-style classes,
> because having to remember to manage a list of "foo = property(...)"
> assignments just plain sucks, so I wrote a metaclass that does things
> a little differently. Please have a look and tell me whether this is
> useful or impractical. The metaclass is here:http://pastebin.com/m5b06b571
> and some simple testcode is here:http://pastebin.com/m382f2ae9.
> Notice the first line though.

Are you overusing property, by any chance? In your example, bar seems
to be an unneeded property; it could just be a normal attribute.




More information about the Python-list mailing list