Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c4889c49
Commit
c4889c49
authored
Jul 12, 2001
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove now-unnecessary "from __future__ import nested_scopes" stmts.
parent
9a1ae1a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
14 deletions
+7
-14
Lib/__future__.py
Lib/__future__.py
+1
-1
Lib/symtable.py
Lib/symtable.py
+0
-1
Lib/test/test_generators.py
Lib/test/test_generators.py
+0
-2
Lib/test/test_scope.py
Lib/test/test_scope.py
+6
-8
PCbuild/rmpyc.py
PCbuild/rmpyc.py
+0
-2
No files found.
Lib/__future__.py
View file @
c4889c49
...
...
@@ -66,4 +66,4 @@ class _Feature:
return
"Feature("
+
`self.getOptionalRelease()`
+
", "
+
\
`self.getMandatoryRelease()`
+
")"
nested_scopes
=
_Feature
((
2
,
1
,
0
,
"beta"
,
1
),
(
2
,
2
,
0
,
"
final
"
,
0
))
nested_scopes
=
_Feature
((
2
,
1
,
0
,
"beta"
,
1
),
(
2
,
2
,
0
,
"
alpha
"
,
0
))
Lib/symtable.py
View file @
c4889c49
"""Interface to the compiler's internal symbol tables"""
from
__future__
import
nested_scopes
import
_symtable
from
_symtable
import
USE
,
DEF_GLOBAL
,
DEF_LOCAL
,
DEF_PARAM
,
\
...
...
Lib/test/test_generators.py
View file @
c4889c49
from
__future__
import
nested_scopes
tutorial_tests
=
"""
Let's try a simple generator:
...
...
Lib/test/test_scope.py
View file @
c4889c49
from
__future__
import
nested_scopes
from
test.test_support
import
verify
,
TestFailed
,
check_syntax
print
"1. simple nesting"
...
...
@@ -179,7 +177,7 @@ verify(f(6) == 720)
print
"11. unoptimized namespaces"
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def unoptimized_clash1(strip):
def f(s):
from string import *
...
...
@@ -187,7 +185,7 @@ def unoptimized_clash1(strip):
return f
"""
)
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def unoptimized_clash2():
from string import *
def f(s):
...
...
@@ -195,7 +193,7 @@ def unoptimized_clash2():
return f
"""
)
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def unoptimized_clash2():
from string import *
def g():
...
...
@@ -205,7 +203,7 @@ def unoptimized_clash2():
"""
)
# XXX could allow this for exec with const argument, but what's the point
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def error(y):
exec "a = 1"
def f(x):
...
...
@@ -213,14 +211,14 @@ def error(y):
return f
"""
)
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def f(x):
def g():
return x
del x # can't del name
"""
)
check_syntax
(
"""
from __future__ import nested_scopes
check_syntax
(
"""
\
def f():
def g():
from string import *
...
...
PCbuild/rmpyc.py
View file @
c4889c49
# Remove all the .pyc and .pyo files under ../Lib.
from
__future__
import
nested_scopes
def
deltree
(
root
):
import
os
def
rm
(
path
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment