[issue29023] Results of random.seed() call with integer argument should be claimed deterministic.
New submission from Jakub Mateusz Kowalski: In https://docs.python.org/2/library/random.html#random.seed I can find that "If a hashable object is given, deterministic results are only assured when PYTHONHASHSEED is disabled." Both int and long are hashable. However, tests on the random module as well as C source code of random_seed (as indicated in http://stackoverflow.com/a/41228062/4879688) suggest that behaviour of the module is deterministic when seeded with an integer. ---------- assignee: docs@python components: Documentation messages: 283686 nosy: Jakub.Mateusz.Kowalski, docs@python priority: normal severity: normal status: open title: Results of random.seed() call with integer argument should be claimed deterministic. versions: Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Raymond Hettinger added the comment: The wording can perhaps be made more precise. However, this needs to be the end of this series of tracker items which are turning into time wasters. ---------- assignee: docs@python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Changes by Raymond Hettinger <raymond.hettinger@gmail.com>: ---------- Removed message: http://bugs.python.org/msg284677 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Changes by Raymond Hettinger <raymond.hettinger@gmail.com>: ---------- keywords: +patch Added file: http://bugs.python.org/file46155/random_docs.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Raymond Hettinger added the comment: Attached patch simplifies, improves, and syncs the main docs with the docstrings. ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Roundup Robot added the comment: New changeset 7d6ebd206cd6 by Raymond Hettinger in branch '2.7': Issue #29023: Clarify that ints and longs are always deterministic seeds for random. https://hg.python.org/cpython/rev/7d6ebd206cd6 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
Changes by Raymond Hettinger <raymond.hettinger@gmail.com>: ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue29023> _______________________________________
participants (3)
-
Jakub Mateusz Kowalski
-
Raymond Hettinger
-
Roundup Robot