[New-bugs-announce] [issue12530] cpython 3.3, __class__ missing.

Campbell Barton report at bugs.python.org
Mon Jul 11 06:47:56 CEST 2011


New submission from Campbell Barton <ideasman42 at gmail.com>:

In python 3.2 this works and prints <class '__main__.Test'>,
in cpython hg: 71296:ab162f925761 it fails with:
 NameError: global name '__class__' is not defined

Since this change is not documented I assume its a bug.

--- snip ---
class Test:
  def __init__(self): print(__class__)

----------
components: Interpreter Core
messages: 140099
nosy: ideasman42
priority: normal
severity: normal
status: open
title: cpython 3.3, __class__ missing.
type: behavior
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12530>
_______________________________________


More information about the New-bugs-announce mailing list