Message189293
The following python program causes cpython to crash:
class A:
global __class__
def a(self):
super()
I get the following output on the console:
bug.py:2: SyntaxWarning: name '__class__' is assigned to before global declaration
global __class__
lookup '__class__' in � a sequ 2 -1
freevars of A: ('__class__',)
Fatal Python error: compiler_make_closure()
Current thread 0x00007fc712192700:
Aborted (core dumped)
This probably happens because __class__ is handled specially by the scoping rules and isn't expected to be anything other than a member of co_cellvars. It should probably throw an exception instead (SystemError?) |
|
Date |
User |
Action |
Args |
2013-05-15 19:00:10 | dwight.guth | set | recipients:
+ dwight.guth |
2013-05-15 19:00:10 | dwight.guth | set | messageid: <1368644410.25.0.871302075026.issue17983@psf.upfronthosting.co.za> |
2013-05-15 19:00:10 | dwight.guth | link | issue17983 messages |
2013-05-15 19:00:09 | dwight.guth | create | |
|