Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans)
* everything from stropmodule except for maketrans() which is still used
diff --git a/Lib/test/test_scope.py b/Lib/test/test_scope.py
index 5fe1bc7..f52ab91 100644
--- a/Lib/test/test_scope.py
+++ b/Lib/test/test_scope.py
@@ -187,25 +187,25 @@
check_syntax_error(self, """\
def unoptimized_clash1(strip):
def f(s):
- from string import *
- return strip(s) # ambiguity: free or local
+ from sys import *
+ return getrefcount(s) # ambiguity: free or local
return f
""")
check_syntax_error(self, """\
def unoptimized_clash2():
- from string import *
+ from sys import *
def f(s):
- return strip(s) # ambiguity: global or local
+ return getrefcount(s) # ambiguity: global or local
return f
""")
check_syntax_error(self, """\
def unoptimized_clash2():
- from string import *
+ from sys import *
def g():
def f(s):
- return strip(s) # ambiguity: global or local
+ return getrefcount(s) # ambiguity: global or local
return f
""")
@@ -219,24 +219,24 @@
check_syntax_error(self, """\
def f():
def g():
- from string import *
- return strip # global or local?
+ from sys import *
+ return getrefcount # global or local?
""")
# and verify a few cases that should work
exec("""
def noproblem1():
- from string import *
+ from sys import *
f = lambda x:x
def noproblem2():
- from string import *
+ from sys import *
def f(x):
return x + 1
def noproblem3():
- from string import *
+ from sys import *
def f(x):
global y
y = x