[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

On Wed, Jan 23, 2019 at 6:10 PM dieter <dieter at handshake.de> wrote:
> >  Did 2to3 do its job well
> I have not used "2to3" -- because I doubt, that it can handle
> important cases, i.e. when a Python 2 "str" must become a Python 3 bytes
> or when a "dict.{keys, values, items}" must be listified.

Have you tried? It errs on the side of safety. Your code should be
functional, and then if you decide that they _don't_ need to be
listified, you can remove the list() call.