Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4889c4

Browse files
committed
Remove now-unnecessary "from __future__ import nested_scopes" stmts.
1 parent 9a1ae1a commit c4889c4

5 files changed

Lines changed: 7 additions & 14 deletions

File tree

Lib/__future__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ def __repr__(self):
6666
return "Feature(" + `self.getOptionalRelease()` + ", " + \
6767
`self.getMandatoryRelease()` + ")"
6868

69-
nested_scopes = _Feature((2, 1, 0, "beta", 1), (2, 2, 0, "final", 0))
69+
nested_scopes = _Feature((2, 1, 0, "beta", 1), (2, 2, 0, "alpha", 0))

Lib/symtable.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Interface to the compiler's internal symbol tables"""
2-
from __future__ import nested_scopes
32

43
import _symtable
54
from _symtable import USE, DEF_GLOBAL, DEF_LOCAL, DEF_PARAM, \

Lib/test/test_generators.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import nested_scopes
2-
31
tutorial_tests = """
42
Let's try a simple generator:
53

Lib/test/test_scope.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import nested_scopes
2-
31
from test.test_support import verify, TestFailed, check_syntax
42

53
print "1. simple nesting"
@@ -179,23 +177,23 @@ def fact(n):
179177

180178
print "11. unoptimized namespaces"
181179

182-
check_syntax("""from __future__ import nested_scopes
180+
check_syntax("""\
183181
def unoptimized_clash1(strip):
184182
def f(s):
185183
from string import *
186184
return strip(s) # ambiguity: free or local
187185
return f
188186
""")
189187

190-
check_syntax("""from __future__ import nested_scopes
188+
check_syntax("""\
191189
def unoptimized_clash2():
192190
from string import *
193191
def f(s):
194192
return strip(s) # ambiguity: global or local
195193
return f
196194
""")
197195

198-
check_syntax("""from __future__ import nested_scopes
196+
check_syntax("""\
199197
def unoptimized_clash2():
200198
from string import *
201199
def g():
@@ -205,22 +203,22 @@ def f(s):
205203
""")
206204

207205
# XXX could allow this for exec with const argument, but what's the point
208-
check_syntax("""from __future__ import nested_scopes
206+
check_syntax("""\
209207
def error(y):
210208
exec "a = 1"
211209
def f(x):
212210
return x + y
213211
return f
214212
""")
215213

216-
check_syntax("""from __future__ import nested_scopes
214+
check_syntax("""\
217215
def f(x):
218216
def g():
219217
return x
220218
del x # can't del name
221219
""")
222220

223-
check_syntax("""from __future__ import nested_scopes
221+
check_syntax("""\
224222
def f():
225223
def g():
226224
from string import *

PCbuild/rmpyc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Remove all the .pyc and .pyo files under ../Lib.
22

3-
from __future__ import nested_scopes
4-
53
def deltree(root):
64
import os
75
def rm(path):

0 commit comments

Comments
 (0)