Dan wrote: > Depending on what you want to do, it might be better to use properties > instead: > > class Meta(type): > x = property(lambda klass: 'Called for '+str(klass)) > > class Foo(object): > __metaclass__=Meta
Also worth noting that you can inline the metaclass if you don't need it
anywhere else, e.g.:
class Foo(object):
class __metaclass__(type):
x = property(lambda klass: 'Called for '+str(klass))
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
