
On 9/9/21 8:53 AM, Christopher Barker wrote:
On 9/9/21 7:25 AM, Ethan Furman wrote:
I'm starting to think the name should be `bytes.bchr` -- it avoids any confusion with the `int.to_bytes` and `int.from_bytes` methods,
are they so different? :-)
Yes, they are. Conceptually, one is working with integers, the other with bytestrings (which is either entirely ASCII encoded strings, or a mixture of the two).
and is an appropriate name for the target domain (where bytes are treated as characters).
Is that the target domain?
Yes. PEP 467*, and PEP 461 before it, are targeting the wire format protocol domain. -- ~Ethan~ * The `fromint/bchr` portion for sure, and the other changes certainly help there although they may have wider uses. PEP 461: https://www.python.org/dev/peps/pep-0461/