New submission from Serhiy Storchaka: 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 ---------- assignee: rhettinger components: Library (Lib) messages: 302246 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: random.seed() doesn't work with bytes and version=1 type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31482> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com