[New-bugs-announce] [issue14857] Direct access to lexically scoped __class__ is broken in 3.3

Nick Coghlan report at bugs.python.org
Sat May 19 16:52:10 CEST 2012

New submission from Nick Coghlan <ncoghlan at gmail.com>:

Currently, __class__ references from methods in 3.3 aren't being mapped correctly to the class currently being defined.

This goes against the documented behaviour of PEP 3135, which states explicitly that the new zero-argument form is equivalent to super(__class__, <firstarg>), where __class__ is the closure reference.

This breakage is almost certainly due to the fix for #12370

The fact the test suite didn't break is a sign we also have a gap in our test coverage.

Given that a workaround is documented in #12370, but there's no workaround for this breakage, reverting the fix for that issue may prove necessary (unlike that current breakage, at least that wouldn't be a regression from 3.2).

keywords: 3.2regression
messages: 161126
nosy: ncoghlan
priority: release blocker
severity: normal
stage: test needed
status: open
title: Direct access to lexically scoped __class__ is broken in 3.3
type: behavior
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list