Steven Bethard wrote:
> I don't run into this often, but when I do, I usually go Jack
> Diederich's route::
>
> class A(object):
> class __metaclass__(type):
> def __init__(cls, name, bases, classdict):
> cls.sum = sum(xrange(10))
I think you should call the superclass __init__ as well:
class __metaclass__(type):
def __init__(cls, name, bases, classdict):
super(__metaclass__, cls).__init__(name, bases, classdict)
cls.sum = sum(xrange(10))
Kent
--
http://mail.python.org/mailman/listinfo/python-list