> class Foo(type): > def __new__(cls, name, bases, dict): > > for k,v in [(k, v) for k,v in dict.items() if callable(v)]: > cls.wrap(k,v,cls.get_directives(v), dict) > > return super(Foo, self).__new__(self, name, bases, dict)
There is a confusion of self and cls above - rename self with cls. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list