Moving from Python 2 to Python 3: A 4 page "cheat sheet"

Mark Summerfield list at qtrac.plus.com
Wed Dec 2 03:13:07 EST 2009


On 1 Dec, 21:55, Terry Reedy <tjre... at udel.edu> wrote:
> Mark Summerfield wrote:
> > I've produced a 4 page document that provides a very concise summary
> > of Python 2<->3 differences plus the most commonly used new Python 3
> > features. It is aimed at existing Python 2 programmers who want to
> > start writing Python 3 programs and want to use Python 3 idioms rather
> > than those from Python 2 where the idioms differ.
>
> > It uses Python 3.1 syntax since that looks like being the standard for
> > a few years in view of the language moratorium.
>
> > The document is U.S. Letter size but will also print fine on A4
> > printers.
>
> > It is available as a free PDF download (no registration or anything)
> > from InformIT's website. Here's the direct link:
> >http://ptgmedia.pearsoncmg.com/imprint_downloads/informit/promotions/...
>
> > And of course, if you want more on Python 3, there's always the
> > documentation---or my book:-)
> > "Programming in Python 3 (Second Edition)" ISBN-10: 0321680561.
>
> What might be even *more* helpful, with contributions from others
> perhaps, would be an indication of which changes are handled
> automatically by 2to3.py and which must be done by hand.
>
> tjr

No, that's exactly what I did not want to cover and the document says
so up front. It is aimed at people who want Python 3 to come from
their own brains and fingers!

Also, the kind of info you're talking about is covered elsewhere, for
example:
http://diveintopython3.org/porting-code-to-python-3-with-2to3.html



More information about the Python-list mailing list