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 james.sanders
Recipients james.sanders
Date 2012-08-21.11:52:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345549960.82.0.102703520127.issue15753@psf.upfronthosting.co.za>
In-reply-to
Content
For example:

Python 3.2.2 (default, Feb 10 2012, 09:23:17) 
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
...     def f(*args):
...             print(super().__repr__())
... 
>>> A().f()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in f
SystemError: super(): no arguments

(There is no change in the current development version 3.3.0b2+)

I guess that the problem here is related to the fact that the super call makes sense if we call A().f() but not if we call A.f() (which is allowed by the method signature)?  I understand that not including self in the signature is almost always bad style, but occasionally it is necessary, for example if you want to allow arbitrary keyword arguments as dict.update does.

Also, how come using the no-argument form of super outside a method raises SystemError - isn't that supposed to be for internal errors?
History
Date User Action Args
2012-08-21 11:52:40james.sanderssetrecipients: + james.sanders
2012-08-21 11:52:40james.sanderssetmessageid: <1345549960.82.0.102703520127.issue15753@psf.upfronthosting.co.za>
2012-08-21 11:52:40james.sanderslinkissue15753 messages
2012-08-21 11:52:38james.sanderscreate