[issue29729] UUID bytes constructor has too-tight an assertion

2017-03-05 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue29729] UUID bytes constructor has too-tight an assertion

2017-03-05 Thread Nic Watson
New submission from Nic Watson: The assertion: File "/usr/lib/python3.6/uuid.py", line 150, in __init__ assert isinstance(bytes, bytes_), repr(bytes) is too specific (and IMHO, unpythonic). One may want to pass a bytearray or a memoryview. See int.from_bytes for an example that takes "