Kaydet (Commit) 251ef966 authored tarafından Jeremy Hylton's avatar Jeremy Hylton

Fix test for free ref to global. This test should have caught a

recently fixed bug, but it checked for the wrong answer.
üst ac25a388
...@@ -86,7 +86,7 @@ def make_adder6(x): ...@@ -86,7 +86,7 @@ def make_adder6(x):
inc = make_adder6(1) inc = make_adder6(1)
plus10 = make_adder6(10) plus10 = make_adder6(10)
verify(inc(1) == 2) verify(inc(1) == 11) # there's only one global
verify(plus10(-2) == 8) verify(plus10(-2) == 8)
print "7. nearest enclosing scope" print "7. nearest enclosing scope"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment