This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pje
Recipients
Date 2002-03-26.22:13:29
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Using super() in a classmethod breaks in Python 2.2. 
Apparently, when super looks up an attribute from the
__mro__ sequence, it calls the found descriptor's
__get__ with the descriptor itself as the 'type'
argument, which breaks horribly with class methods
(which always binds to the type argument).

Presumably, the fix is to pass a NULL type argument,
which should work with the recent fixes to the
classmethod's __get__ logic.  In other words, this code
in the super_getattro function Objects/typeobject.c:

tmp = f(res, su->obj, res);

should probably actually read:

tmp = f(res, su->obj, NULL);

History
Date User Action Args
2007-08-23 14:00:09adminlinkissue535444 messages
2007-08-23 14:00:09admincreate