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 dwight.guth
Recipients dwight.guth
Date 2013-05-15.19:00:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368644410.25.0.871302075026.issue17983@psf.upfronthosting.co.za>
In-reply-to
Content
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?)
History
Date User Action Args
2013-05-15 19:00:10dwight.guthsetrecipients: + dwight.guth
2013-05-15 19:00:10dwight.guthsetmessageid: <1368644410.25.0.871302075026.issue17983@psf.upfronthosting.co.za>
2013-05-15 19:00:10dwight.guthlinkissue17983 messages
2013-05-15 19:00:09dwight.guthcreate