On Thu, Jan 10, 2013 at 7:11 AM, Steven D'Aprano <st...@pearwood.info> wrote: > > So, inside the foo() method, do this: > > @classmethod > def foo(cls): > cls.method_list[0].__get__(cls, None)()
That should be cls.method_list[0].__get__(None, cls)() The way you have it binds the method to type(MyClass), which in this case is "type" itself. See cm_descr_get in funcobject.c, CPython 2.7 (line 645): http://hg.python.org/cpython/file/70274d53c1dd/Objects/funcobject.c#l635 Also see the slot wrapper wrap_descr_get for the mapping from None to NULL (line 4671): http://hg.python.org/cpython/file/70274d53c1dd/Objects/typeobject.c#l4660 _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor