2010/4/7 Steven D'Aprano st...@pearwood.info
On Tue, 6 Apr 2010 04:25:08 pm Cesare Di Mauro wrote:
It will certainly. There's MUCH that can be optimized to let CPython
squeeze more performance from static analysis (even a gross one) on
locals.
[...]
They are just dummy examples, but
2010/4/6 Antoine Pitrou solip...@pitrou.net
Greg Ewing greg.ewing at canterbury.ac.nz writes:
Maybe it would be better to deprecate globals() and locals()
and replace them with another function called something like
scope().
It is useful to distinguish between globals (i.e.,
Reid Kleckner wrote:
If I remember correctly, the exec statement is going away in py3k, and
calling exec() with one argument can modify the local scope.
I've been kind of wondering what the deal is with exec in py3.
I always thought the reason for making exec a statement was so
that locals
2010/4/6 Greg Ewing greg.ew...@canterbury.ac.nz
Cesare Di Mauro wrote:
It will certainly. There's MUCH that can be optimized to let CPython
squeeze more performance from static analysis (even a gross one) on locals.
But can the existing locals() function be implemented in
the face of
On Tue, Apr 6, 2010 at 11:13 AM, Greg Ewing greg.ew...@canterbury.ac.nzwrote:
Reid Kleckner wrote:
If I remember correctly, the exec statement is going away in py3k, and
calling exec() with one argument can modify the local scope.
I've been kind of wondering what the deal is with exec in
On Tue, 6 Apr 2010 04:25:08 pm Cesare Di Mauro wrote:
It will certainly. There's MUCH that can be optimized to let CPython
squeeze more performance from static analysis (even a gross one) on
locals.
[...]
They are just dummy examples, but can make it clear how far
optimizations can go with
Antoine Pitrou wrote:
Steve Bonner pythonsteve at gmail.com writes:
What do we think of adding a built-in nonlocals() function that would
be similar to globals() and locals()?
These scopes don't have parallel capabilities:
Maybe it would be better to deprecate globals() and locals()
and
On 06/04/2010 00:37, Greg Ewing wrote:
Antoine Pitrou wrote:
Steve Bonner pythonsteve at gmail.com writes:
What do we think of adding a built-in nonlocals() function that would
be similar to globals() and locals()?
These scopes don't have parallel capabilities:
Maybe it would be better to
On Mon, Apr 5, 2010 at 7:35 PM, Antoine Pitrou solip...@pitrou.net wrote:
If you can prove that making locals() (or its replacement) writable doesn't
complicate the interpreter core too much, then why not. Otherwise -1 :-)
I think writable locals would significantly complicate the job of
people