Message9995
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);
|
|
Date |
User |
Action |
Args |
2007-08-23 14:00:09 | admin | link | issue535444 messages |
2007-08-23 14:00:09 | admin | create | |
|