Author arjaz
Recipients arjaz, mark.dickinson, rhettinger
Date 2021-05-03.10:00:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1620036053.59.0.196322384535.issue44018@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-05-03 10:00:53arjazsetrecipients: + arjaz, rhettinger, mark.dickinson
2021-05-03 10:00:53arjazsetmessageid: <1620036053.59.0.196322384535.issue44018@roundup.psfhosted.org>
2021-05-03 10:00:53arjazlinkissue44018 messages
2021-05-03 10:00:53arjazcreate