New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
classmethod(classmethod(foo)) -> SystemError #38845
Comments
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" A more realistic example (derived from the code that >>> 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 |
Logged In: YES This was fixed in revision 2.63 on Jun 18, 2003 |
Logged In: YES Re-opening, assigning to myself to remind me to do the backport. |
Logged In: YES Backported. Thanks for the pointer! Checking in Objects/funcobject.c; |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: