Aw: Re: Python 3 how to convert a list of bytes objects to a list of strings?

Karsten Hilbert Karsten.Hilbert at gmx.net
Fri Aug 28 07:50:07 EDT 2020


> > No interpreation requires, since parsing failed. Then you can start
> > dealing with these exceptions. _Do not_ write unparsable messages into
> > an mbox!
> >
> Maybe I shouldn't but Python 2 has been managing to do so for several
> years without any issues.

I am inclined to congratulate you on that sheer amount of luck. I don't
believe there were no issues because everything worked just right under
py2 but rather because py2 cared less than py3 does now.

> Are we saying that Python 3 really can't be made to handle things
> 'tolerantly' like Python 2 used to?

It sure should be possible but it will require *explicit* en/decode()s in
more places than before because AFAICT there's less impliciteness as to
which encoding to apply (regardless of whether it applies).

Karsten





More information about the Python-list mailing list