What is your experience porting Python 2.7.x scripts to Python 3.x?

Tim Chase python.list at tim.thechases.com
Thu Jan 24 14:33:28 EST 2019


On 2019-01-22 19:20, Grant Edwards wrote:
> > For anyone who has moved a substantial bunch of Python 2 to Python
> > 3, can you please reply with your experience?  
> 
> If you used bytes (or raw binary strings) at all (e.g. for doing
> things like network or serial protocols) you're in for a lot of
> pain.

This was my biggest pain point, but it was a good pain.  At $DAYJOB we
had files coming from customers and telecom providers where the
encoding had never been specified.  By going through the conversion
process, we were able to formalize the encoding of various files
meaning fewer crashes when some unexpected character would slip in
and fail to convert.

A painful process, but the end result was better in a multitude of
ways.

-tkc





More information about the Python-list mailing list