Changes to use default argument values where possible

This commit is contained in:
Guido van Rossum 1994-05-06 14:28:19 +00:00
parent e4c6131baa
commit 2922c6dabb
4 changed files with 13 additions and 29 deletions

View file

@ -214,15 +214,11 @@ def betavariate(alpha, beta):
# -------------------- test program --------------------
def test(*args):
def test(N = 200):
print 'TWOPI =', TWOPI
print 'LOG4 =', LOG4
print 'NV_MAGICCONST =', NV_MAGICCONST
print 'SG_MAGICCONST =', SG_MAGICCONST
N = 200
if args:
if args[1:]: print 'Excess test() arguments ignored'
N = args[0]
test_generator(N, 'random()')
test_generator(N, 'normalvariate(0.0, 1.0)')
test_generator(N, 'lognormvariate(0.0, 1.0)')