Message168989
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? |
|
Date |
User |
Action |
Args |
2012-08-24 09:01:41 | james.sanders | set | recipients:
+ james.sanders, r.david.murray |
2012-08-24 09:01:41 | james.sanders | set | messageid: <1345798901.04.0.63129716943.issue15753@psf.upfronthosting.co.za> |
2012-08-24 09:01:40 | james.sanders | link | issue15753 messages |
2012-08-24 09:01:40 | james.sanders | create | |
|