python 2 to 3 conversion

Chris Angelico rosuav at gmail.com
Mon Jun 17 08:53:30 EDT 2019


On Mon, Jun 17, 2019 at 10:50 PM Thomas Jollans <tjol at tjol.eu> wrote:
>
> On 17/06/2019 15.14, Igor Korot wrote:
> > Hi,
> > Is there a place where there is a full list of incompatibilities between
> > python 2 and python 3 is available and how to fix them?
>
> ‘What’s new in Python 3.0’ is a good starting point
>
> https://docs.python.org/3/whatsnew/3.0.html
>
> It doesn’t list all standard library changes, but it has the most
> important ones. Obviously it can't include anything that third-party
> modules do.
>
> The main incompatibility is obviously strings, and there various modules
> have adopted different strategies for the transition.

Unfortunately starting there means ignoring all the compatibilities
that were implemented in more recent versions. Notably, Python 3.3
introduced u"..." literals, and 3.5 allows you to use percent
interpolation with bytes as well as text. So those kinds of
differences are no longer significant.

ChrisA



More information about the Python-list mailing list