There's some subtle behaviour going on here that I don't really follow. Class methods apparently aren't classmethods.
>>> class Parrot(object): ... def method(self, *args): ... return self, args ... @classmethod ... def cmethod(cls, *args): ... return cls, args ... >>> type(parrot.method) # as expected <type 'instancemethod'> >>> type(parrot.cmethod) # I don't expect this result <type 'instancemethod'> >>> type(classmethod(parrot.method)) <type 'classmethod'> >>> >>> parrot.cm = classmethod(parrot.method) >>> type(parrot.cm) # I expect this <type 'classmethod'> >>> >>> Parrot.CM = classmethod(parrot.method) >>> type(Parrot.CM) # but not this <type 'instancemethod'> Can anyone explain why class methods bound to a class are instancemethods rather than classmethods? -- Steven. -- http://mail.python.org/mailman/listinfo/python-list