Change by Yuval S :
--
pull_requests: +18932
pull_request: https://github.com/python/cpython/pull/19596
___
Python tracker
<https://bugs.python.org/issue40
Yuval S added the comment:
Thank you for the attention and the quick fix. However, the current
documentation for "Notes on Reproducibility" should still address this issue of
hash randomization. Not only `sample` is affected by this, but any code that
combines strings (or bytes o
New submission from Yuval S :
The following code gives different results on each run, even though
"``random.seed()``" is used:
>>> import random
>>> random.seed(6)
>>> x = set(str(i) for i in range(500))
>>> print(random.sample(x, 1))
presumably
Yuval S added the comment:
* It should be python[23] -m x.test, of course.
--
___
Python tracker
<https://bugs.python.org/issue38457>
___
___
Python-bugs-list m
New submission from Yuval S :
In Python 2.7, the __package__ variable isn't set when __init__.py is run,
until an import is done. In Python 3.5, it is set correctly.
e.g.
# mkdir x && echo "print(__package__)" | tee x/__init__.py x/test.py
# python2 x.test
None
x
# python3