Message291773
Several thoughts:
* AFAICT, in entire the history of this module, no user has ever reported this as being a source of confusion, so I don't think there is a real documentation issue here.
* Regarding, "after fork, the parent and the child produce the same "random" number sequence", this is the expected behavior of a PRNG. If it did something thing different, THAT would be a bug.
* There random module is likely the wrong place for a note. It is more properly a topic about forking itself. Perhaps there is room for a FAQ entry about forking elaborating on the broad range of state that is shared across forks (lock and file descriptors, etc).
* For those who need it, the API already supports reseeding and a way to make new instances of Random. Both of those are the standard ways of doing it for people who need independent generators in different threads. |
|
Date |
User |
Action |
Args |
2017-04-17 02:04:36 | rhettinger | set | recipients:
+ rhettinger, pitrou, vstinner, docs@python, serhiy.storchaka |
2017-04-17 02:04:36 | rhettinger | set | messageid: <1492394676.93.0.154269220331.issue30051@psf.upfronthosting.co.za> |
2017-04-17 02:04:36 | rhettinger | link | issue30051 messages |
2017-04-17 02:04:35 | rhettinger | create | |
|