In Python 3, bytes([12]) and bytearray([12]) translates to the same binary representation, "\x0c", while in Python 2, bytes([12]) is the same as str([12]), which is "[12]", but bytearray([12]) still returns the same construct as in Python 3.
Is there any interest in putting this on the Python Package Index so other libraries can depend upon it?
In Python 3,
bytes([12])
andbytearray([12])
translates to the same binary representation,"\x0c"
, while in Python 2,bytes([12])
is the same asstr([12])
, which is"[12]"
, butbytearray([12])
still returns the same construct as in Python 3.Is there any interest in putting this on the Python Package Index so other libraries can depend upon it?