bpo-45155: Apply new byteorder default values for int.to/from_bytes (GH-28465)

This commit is contained in:
Raymond Hettinger 2021-09-20 13:22:55 -05:00 committed by GitHub
parent 5846c9b71e
commit 9510e6f3c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 15 deletions

View file

@ -186,7 +186,7 @@ class UUID:
if len(bytes) != 16:
raise ValueError('bytes is not a 16-char string')
assert isinstance(bytes, bytes_), repr(bytes)
int = int_.from_bytes(bytes, byteorder='big')
int = int_.from_bytes(bytes) # big endian
if fields is not None:
if len(fields) != 6:
raise ValueError('fields is not a 6-tuple')
@ -284,7 +284,7 @@ class UUID:
@property
def bytes(self):
return self.int.to_bytes(16, 'big')
return self.int.to_bytes(16) # big endian
@property
def bytes_le(self):