This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients rhettinger, serhiy.storchaka
Date 2017-09-15.12:10:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505477439.78.0.0722719619353.issue31482@psf.upfronthosting.co.za>
In-reply-to
Content
The behavior of random.seed() with bytes and version=1 is specially documented. But actually it doesn't work.

>>> import random
>>> random.seed(b'abc', version=1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/serhiy/py/cpython/Lib/random.py", line 113, in seed
    x = ord(a[0]) << 7 if a else 0
TypeError: ord() expected string of length 1, but int found
History
Date User Action Args
2017-09-15 12:10:39serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger
2017-09-15 12:10:39serhiy.storchakasetmessageid: <1505477439.78.0.0722719619353.issue31482@psf.upfronthosting.co.za>
2017-09-15 12:10:39serhiy.storchakalinkissue31482 messages
2017-09-15 12:10:39serhiy.storchakacreate