Jeremy Hylton
7889107be7
Fix core dump in example from Samuele Pedroni:
...
from __future__ import nested_scopes
x=7
def f():
x=1
def g():
global x
def i():
def h():
return x
return h()
return i()
return g()
print f()
print x
This kind of code didn't work correctly because x was treated as free
in i, leading to an attempt to load x in g to make a closure for i.
Solution is to make global decl apply to nested scopes unless their is
an assignment. Thus, x in h is global.
2001-03-01 06:09:34 +00:00
..
2000-05-02 18:34:30 +00:00
2000-09-01 23:29:29 +00:00
2001-01-19 21:36:19 +00:00
2001-02-16 11:52:31 +00:00
2000-09-26 05:46:01 +00:00
2001-03-01 06:09:34 +00:00
2000-07-22 18:47:25 +00:00
2000-09-04 00:54:56 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-01-19 23:34:06 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-01-10 21:17:27 +00:00
2000-09-01 23:29:29 +00:00
2000-10-05 10:54:45 +00:00
2001-02-28 21:46:24 +00:00
2001-02-28 21:52:10 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-02-28 17:47:12 +00:00
2001-02-12 22:13:26 +00:00
2000-09-05 04:40:39 +00:00
2001-01-18 14:50:11 +00:00
2000-09-01 23:29:29 +00:00
2001-01-18 03:03:16 +00:00
2000-11-03 08:18:37 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-08-24 20:11:32 +00:00
2000-07-31 15:28:04 +00:00
2001-03-01 02:20:01 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2001-01-28 00:27:39 +00:00
2000-09-01 23:29:29 +00:00
2000-09-26 05:46:01 +00:00
2000-09-01 23:29:29 +00:00
2000-07-22 18:47:25 +00:00
2001-01-23 01:46:06 +00:00
2001-02-28 20:58:04 +00:00
2000-09-01 23:29:29 +00:00
2000-07-22 18:47:25 +00:00
2000-09-01 23:29:29 +00:00
2000-07-22 18:47:25 +00:00
2001-01-27 06:20:08 +00:00
2001-02-27 19:07:02 +00:00
2001-01-13 22:06:05 +00:00
2000-09-01 23:29:29 +00:00
2000-11-13 19:45:45 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-10-12 20:58:32 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-09-01 23:29:29 +00:00
2000-10-06 15:48:38 +00:00
2000-09-01 23:29:29 +00:00