diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:48:32 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-04-17 08:48:32 (GMT) |
commit | 9d72bb452bced3a100f07f8a9e30c4495a9ec41a (patch) | |
tree | c39762a764fcc16f2cfc42e2504e58ff31e159e6 /Lib/test/test_scope.py | |
parent | ff11334927ee616d765b54a3851016b76a20bcec (diff) | |
download | cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.zip cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.gz cpython-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.bz2 |
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
Diffstat (limited to 'Lib/test/test_scope.py')
-rw-r--r-- | Lib/test/test_scope.py | 22 |
1 files changed, 11 insertions, 11 deletions
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 @@ class ScopeTests(unittest.TestCase): 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 @@ def f(x): 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 |