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 anthonybaxter
Recipients
Date 2003-07-13.08:54:09
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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

History
Date User Action Args
2007-08-23 14:14:51adminlinkissue770465 messages
2007-08-23 14:14:51admincreate