Message386052
The documentation https://docs.python.org/3/library/random.html#random.Random says:
> class random.Random([seed])¶
But in reality the parameter is called "x" not "seed" (CPython 3.9):
>>> import random
>>> random.Random(seed=0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: __init__() got an unexpected keyword argument 'seed'
>>> random.Random(x=0)
<random.Random object at 0x20ddc10>
Same goes for random.SystemRandom
It would be better to rename "x" to "seed" but that's not backwards compatible. |
|
Date |
User |
Action |
Args |
2021-02-01 03:01:44 | boris | set | recipients:
+ boris |
2021-02-01 03:01:44 | boris | set | messageid: <1612148504.79.0.846022332701.issue43089@roundup.psfhosted.org> |
2021-02-01 03:01:44 | boris | link | issue43089 messages |
2021-02-01 03:01:44 | boris | create | |
|