[issue44691] bug in interactions between argparse and random

2021-07-20 Thread Steven D'Aprano
Steven D'Aprano added the comment: args.seed if args.seed else SEED is not doing what you think it is doing. SEED is an *int* but args.seed is a *str*: >>> random.seed(6385845682483836956) >>> random.randint(10, 500) 92 >>> random.seed('6385845682483836956') >>> random.randint(10, 500) 347 -

[issue44691] bug in interactions between argparse and random

2021-07-20 Thread pierpaolo paolucci
New submission from pierpaolo paolucci : Python 3.9.6 (default, Jun 28 2021, 11:30:47) [GCC 10.3.0] on linux I tried to run the first time a prg and successively reproduce eventals error see the attachment -- components: Library (Lib) files: testRandom.py messages: 397918 nosy: peebl