Re: [Python-Dev] Tightening up the specification for locals()

2013-05-13 Thread Fábio Santos
> Like it or not, people rely on this behavior. I don't think CPython > (or PyPy) can actually afford to change it. If so, documenting it > sounds like a better idea than leaving it undocumented only known to > the "inner shrine" > +1. I am relying on this.

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-13 Thread Maciej Fijalkowski
On Sun, May 12, 2013 at 2:01 PM, Antoine Pitrou wrote: > On Fri, 03 May 2013 12:43:41 +1000 > Steven D'Aprano wrote: >> On 03/05/13 11:29, Nick Coghlan wrote: >> > An exchange in one of the enum threads prompted me to write down >> > something I've occasionally thought about regarding locals(): i

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-12 Thread Nick Coghlan
On Sun, May 12, 2013 at 11:28 PM, Antoine Pitrou wrote: > On Sun, 12 May 2013 23:22:39 +1000 > Nick Coghlan wrote: >> The exec case >> corresponds to those two instances, depending on whether the single >> namespace or dual namespace version is performed. > > I don't get the point. exec() *passes

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-12 Thread Antoine Pitrou
On Sun, 12 May 2013 23:22:39 +1000 Nick Coghlan wrote: > The exec case > corresponds to those two instances, depending on whether the single > namespace or dual namespace version is performed. I don't get the point. exec() *passes* a locals dictionary, but the compiled code itself isn't expected

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-12 Thread Nick Coghlan
On Sun, May 12, 2013 at 10:01 PM, Antoine Pitrou wrote: > On Fri, 03 May 2013 12:43:41 +1000 > Steven D'Aprano wrote: >> On 03/05/13 11:29, Nick Coghlan wrote: >> > An exchange in one of the enum threads prompted me to write down >> > something I've occasionally thought about regarding locals():

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-12 Thread Antoine Pitrou
On Fri, 03 May 2013 12:43:41 +1000 Steven D'Aprano wrote: > On 03/05/13 11:29, Nick Coghlan wrote: > > An exchange in one of the enum threads prompted me to write down > > something I've occasionally thought about regarding locals(): it is > > currently severely underspecified, and I'd like to mak

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-02 Thread Terry Jan Reedy
On 5/2/2013 9:29 PM, Nick Coghlan wrote: An exchange in one of the enum threads prompted me to write down something I've occasionally thought about regarding locals(): it is currently severely underspecified, and I'd like to make the current CPython behaviour part of the language/library specific

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-02 Thread Steven D'Aprano
On 03/05/13 11:29, Nick Coghlan wrote: An exchange in one of the enum threads prompted me to write down something I've occasionally thought about regarding locals(): it is currently severely underspecified, and I'd like to make the current CPython behaviour part of the language/library specificat

Re: [Python-Dev] Tightening up the specification for locals()

2013-05-02 Thread Benjamin Peterson
2013/5/2 Nick Coghlan : > An exchange in one of the enum threads prompted me to write down > something I've occasionally thought about regarding locals(): it is > currently severely underspecified, and I'd like to make the current > CPython behaviour part of the language/library specification. (We

[Python-Dev] Tightening up the specification for locals()

2013-05-02 Thread Nick Coghlan
An exchange in one of the enum threads prompted me to write down something I've occasionally thought about regarding locals(): it is currently severely underspecified, and I'd like to make the current CPython behaviour part of the language/library specification. (We recently found a bug in the inte