[Python-ideas] Stop displaying elements of bytes objects as printable ASCII characters in CPython 3
M.-A. Lemburg
mal at egenix.com
Wed Sep 10 09:36:32 CEST 2014
On 10.09.2014 09:04, Chris Lasher wrote:
> Why did the CPython core developers decide to force the display of
> ASCII characters in the printable representation of bytes objects in
> CPython 3?
This wasn't forced. It's a simple consequence of turning the Python 2
8-bit string type into the Python 3 bytes type while keeping breakage
to a pain level which doesn't have Python users skip Python 3 entirely ;-)
Seriously, it doesn't help being purist over concepts that are used
in a very pragmatic way in every day (programmer's) life.
Even when being binary data, most such binary strings do contain
encoded text characters and being able to quickly identify those
as such helps in debugging, working with the data and writing it
down in form of literals.
A definite -1 from me on making repr(b"Hello World") harder to read
than necessary.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Sep 10 2014)
>>> Python Projects, Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2014-09-19: PyCon UK 2014, Coventry, UK ... 9 days to go
2014-09-27: PyDDF Sprint 2014 ... 17 days to go
2014-09-30: Python Meeting Duesseldorf ... 20 days to go
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-ideas
mailing list