Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Benjamin Peterson
2012/5/20 Calvin Spealman : > On Sun, May 20, 2012 at 4:28 PM, Benjamin Peterson > wrote: >> 2012/5/20 Nick Coghlan : >>> PEP 3135 defines the new zero-argument form of super() as implicitly >>> equivalent to super(__class__, ), and up until 3.2 has >>> behaved accordingly: if you accessed __clas

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Calvin Spealman
On Sun, May 20, 2012 at 4:28 PM, Benjamin Peterson wrote: > 2012/5/20 Nick Coghlan : >> PEP 3135 defines the new zero-argument form of super() as implicitly >> equivalent to super(__class__, ), and up until 3.2 has >> behaved accordingly: if you accessed __class__ from inside a method, >> you woul

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Benjamin Peterson
2012/5/20 Nick Coghlan : > PEP 3135 defines the new zero-argument form of super() as implicitly > equivalent to super(__class__, ), and up until 3.2 has > behaved accordingly: if you accessed __class__ from inside a method, > you would receive a reference to the lexically containing class. I don't

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Nick Coghlan
On Sun, May 20, 2012 at 11:03 PM, Antoine Pitrou wrote: > On Sun, 20 May 2012 18:51:27 +1000 > Nick Coghlan wrote: >> PEP 3135 defines the new zero-argument form of super() as implicitly >> equivalent to super(__class__, ), and up until 3.2 has >> behaved accordingly: if you accessed __class__ fr

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Antoine Pitrou
On Sun, 20 May 2012 18:51:27 +1000 Nick Coghlan wrote: > PEP 3135 defines the new zero-argument form of super() as implicitly > equivalent to super(__class__, ), and up until 3.2 has > behaved accordingly: if you accessed __class__ from inside a method, > you would receive a reference to the lexic

Re: [Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Nick Coghlan
On Sun, May 20, 2012 at 6:51 PM, Nick Coghlan wrote: > What I plan to do: > 1. Revert the previous fix for #12370 > 2. Add tests for direct access to __class__ from methods > 3. Create a *new* fix for #12370 that only affects the class scope, > not the method bodies (this will be harder than the p

[Python-Dev] PEP 3135 (new super()) __class__ references broken in 3.3

2012-05-20 Thread Nick Coghlan
PEP 3135 defines the new zero-argument form of super() as implicitly equivalent to super(__class__, ), and up until 3.2 has behaved accordingly: if you accessed __class__ from inside a method, you would receive a reference to the lexically containing class. In 3.3, that currently doesn't work: you