[issue43628] Incorrect argument errors for random.getstate()

2021-03-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here's how to use getstate() and setstate(): >>> import random >>> state = random.getstate() >>> random.choices('ABCDE', k=8) ['E', 'A', 'B', 'B', 'A', 'A', 'E', 'D'] >>> # restore the previous state >>> random.setstate(state) >>> # now, replay the random se

[issue43628] Incorrect argument errors for random.getstate()

2021-03-25 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +mark.dickinson, rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue43628] Incorrect argument errors for random.getstate()

2021-03-25 Thread Yang Feng
New submission from Yang Feng : In documentation of random.getstate(), it says: “random.getstate() Return an object capturing the current internal state of the generator. This object can be passed to setstate() to restore the state.” random.getstate() takes 0 argument and return the current set