New submission from Jakub Mateusz Kowalski:
File /tmp/2147483648zeros is 2^31 (2GiB) zero-bytes ('\0').
Readline method works fine:
>>> fh = open('/tmp/2147483648zeros', 'rb')
>>> line = fh.readline()
>>> len(line)
2147483648
However
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 ran
New submission from Jakub Mateusz Kowalski:
2.7 (https://docs.python.org/2/library/random.html#random.seed)
- warning about PYTHONHASHSEED (environmental variable) voiding determinism
- no warning on -R interpreter switch
- relation to hash() function omitted
2.6 (https://docs.python.org/2.6
Jakub Mateusz Kowalski added the comment:
Python 2.7
I think note to the docs is enough.
Python 3.5+
I have a doubt. Isn't .seed(a, version=1) still coupled with PYTHONHASHSEED?
The manual says version 1 is "reproducing random sequences from older versions
of Python", and for 3
New submission from Jakub Mateusz Kowalski:
The error occurs when there was a warning before the call to filterwarnings():
$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" f