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, r.david.murray
Date 2012-08-24.09:01:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1345798901.04.0.63129716943.issue15753@psf.upfronthosting.co.za>
In-reply-to
Content
It turns out I don't really understand how frame objects work.  My patch can crash python if you do this:

>>> class A:
...     def f(*args):
...             args = 1
...             print(super())
... 
>>> A().f()
python: Objects/typeobject.c:6516: super_init: Assertion `((((((PyObject*)(obj))->ob_type))->tp_flags & ((1L<<26))) != 0)' failed.
Aborted

Is there a way of checking if the first argument has been overwritten, or do you just have to assume that if it is still a tuple, it hasn't been?  Should the super documentation mention that assigning to self (or args in this case) can make the no-argument version work incorrectly?
History
Date User Action Args
2012-08-24 09:01:41james.sanderssetrecipients: + james.sanders, r.david.murray
2012-08-24 09:01:41james.sanderssetmessageid: <1345798901.04.0.63129716943.issue15753@psf.upfronthosting.co.za>
2012-08-24 09:01:40james.sanderslinkissue15753 messages
2012-08-24 09:01:40james.sanderscreate