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/
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/U4HOIBFOSQGUGKFI3GGFGBFPNPIQSIH7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to