Message17045
Using 2.2.3 or current release22-maint:
>>> classmethod(classmethod(None)).__get__(1)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: Objects/classobject.c:2022: bad argument
to internal function
(thanks to Steve Alexander for the one-line example)
This produces the error "classmethod is not callable"
in 2.3,
but no systemerror - dunno if 2.3 could provide a
better error message here.
A more realistic example (derived from the code that
originally tripped me up):
>>> class a:
... def foo(self):
... print "self is", self, type(self)
... foo=classmethod(foo)
... foo=classmethod(foo)
...
>>> b=a()
>>> b.foo()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: Objects/classobject.c:2022: bad argument
to internal function
|
|
Date |
User |
Action |
Args |
2007-08-23 14:14:51 | admin | link | issue770465 messages |
2007-08-23 14:14:51 | admin | create | |
|