Whitespace normalization.

This commit is contained in:
Tim Peters 2001-02-15 23:56:39 +00:00
parent b61ff2982a
commit 0e6d213177
4 changed files with 6 additions and 7 deletions

View File

@ -81,7 +81,7 @@ __all__ = ["Random","seed","random","uniform","randint","choice",
"cunifvariate","expovariate","vonmisesvariate","gammavariate",
"stdgamma","gauss","betavariate","paretovariate","weibullvariate",
"getstate","setstate","jumpahead","whseed"]
def _verify(name, expected):
computed = eval(name)
if abs(computed - expected) > 1e-7:

View File

@ -201,7 +201,7 @@ class URLopener(urllib.FancyURLopener):
self.errcode = 200
self.tries = 0
self.maxtries = 10
def http_error_default(self, url, fp, errcode, errmsg, headers):
self.errcode = errcode
return urllib.FancyURLopener.http_error_default(self, url, fp, errcode,

View File

@ -207,7 +207,7 @@ check_syntax("""def unoptimized_clash2():
return f
""")
# XXX could allow this for exec with const argument, but what's the point
# XXX could allow this for exec with const argument, but what's the point
check_syntax("""def error(y):
exec "a = 1"
def f(x):
@ -225,7 +225,7 @@ check_syntax("""def f():
def g():
from string import *
return strip # global or local?
""")
""")
# and verify a few cases that should work
@ -302,9 +302,9 @@ def makeReturner(*lst):
def returner():
return lst
return returner
verify(makeReturner(1,2,3)() == (1,2,3))
def makeReturner2(**kwargs):
def returner():
return kwargs

View File

@ -6,4 +6,3 @@ symbols = _symtable.symtable("def f(x): return x", "?", "exec")
verify(symbols[0].name == "global")
verify(len([ste for ste in symbols.values() if ste.name == "f"]) == 1)