Over in bpo-45155 and this PR there is a discussion about adding default arguments to
int.from_bytes() in order to make the former easier to use to create single byte
>>> (65).to_bytes() b'A'
The shedding centers around what the default value should be for the
byteorder argument. Any choice is arbirtrary. Do you follow the example of struct module and choose “native” byte order (i.e.
sys.byteorder)? Do you choose “network” (i.e. big-endian) by default? Or do you choose little-endian because it’s an itsy-bit faster?
The choice doesn’t matter for the use case that originated this topic; IOW byte order doesn’t matter when the byte length is 1.
Here’s your chance to weigh in.
int.to_bytes()default value for