[issue44018] Bug in random.seed
Eugene Rossokha added the comment: I find the following behaviour very confusing: >>> import random >>> a = bytearray("1234", "utf-8") >>> b = bytearray("1234", "utf-8") >>> a == b True >>> random.seed(a) >
[issue44018] Bug in random.seed
New submission from Eugene Rossokha : https://github.com/python/cpython/blob/master/Lib/random.py#L157 If bytearray is passed as a seed, the function will change it. It either has to be documented, or the implementation should change. -- components: Library (Lib) messages: 392782 nosy