mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Changes to use default argument values where possible
This commit is contained in:
parent
e4c6131baa
commit
2922c6dabb
4 changed files with 13 additions and 29 deletions
|
@ -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)')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue