I see in the PEP:
"the bchr builtin is to recreate the ord/chr/unichr trio from Python 2 under a different naming scheme"
Why recreate that trio? Shouldn't we be moving away from the bytes-is-a-string concept here?
A byte is not a character -- why would the function that creates a byte from an integer value be called bchr()? (short for "byte character", presumably)
There are fewer and fewer people having to translate their code (or their brains) from py2 to py3.
bytes.fromint() is just fine.
-CHB
BTW -- I really love the rest of the PEP -- it's been too awkward to work with bytes for too long.
Christopher Barker, PhD (Chris)
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython