mirror of
https://github.com/python/cpython.git
synced 2025-12-04 16:43:27 +00:00
Fix test for free ref to global. This test should have caught a
recently fixed bug, but it checked for the wrong answer.
This commit is contained in:
parent
ac25a38841
commit
251ef9666e
1 changed files with 1 additions and 1 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue