Message392786
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)
>>> a == b
False
>>> a
bytearray(b'1234\xd4\x04U\x9f`.\xabo\xd6\x02\xacv\x80\xda\xcb\xfa\xad\xd1603^\x95\x1f\tz\xf3\x90\x0e\x9d\xe1v\xb6\xdb(Q/.\x00\x0b\x9d\x04\xfb\xa5\x13>\x8b\x1cn\x8d\xf5\x9d\xb3\xa8\xab\x9d`\xbeK\x97\xcc\x9e\x81\xdb')
>>> b
bytearray(b'1234')
The function doesn't document it will change the input argument |
|
Date |
User |
Action |
Args |
2021-05-03 10:00:53 | arjaz | set | recipients:
+ arjaz, rhettinger, mark.dickinson |
2021-05-03 10:00:53 | arjaz | set | messageid: <1620036053.59.0.196322384535.issue44018@roundup.psfhosted.org> |
2021-05-03 10:00:53 | arjaz | link | issue44018 messages |
2021-05-03 10:00:53 | arjaz | create | |
|