Prev: can you say it please
Next: can python do this?
From: Mark Summerfield on 1 Dec 2009 09:03 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/python/python2python3.pdf 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.
From: Daniel Fetchinson on 1 Dec 2009 09:22 > 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. This really looks very useful, thanks a lot! I've been wishing something like this existed for a while, really handy. Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown
From: Gnarlodious on 1 Dec 2009 09:42 On Dec 1, 7:03 am, Mark Summerfield wrote: > "Programming in Python 3 (Second Edition)" ISBN-10: 0321680561. I ordered it... -- Gnarlie http://Gnarlodious.com
From: Mark Dickinson on 1 Dec 2009 12:50 On Dec 1, 2:03 pm, Mark Summerfield <l...(a)qtrac.plus.com> 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. Very nice indeed! My only quibble is with the statement on the first page that the 'String % operator is deprecated'. I'm not sure that's true, for all values of 'deprecated'. There don't appear to be any definite plans for getting rid of it just yet. Mark
From: Lie Ryan on 1 Dec 2009 13:30
On 12/2/2009 1:03 AM, 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/python/python2python3.pdf > > 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. Nice. I suggest changing the lambda example a bit, the current example says: Python 2 Python 3 lambda (a,b): a + b lambda t: t[0] + t[1] lambda a, b: a + b into something like: Python 2 Python 3 lambda (a,b),c: a + b + c lambda t, c: t[0] + t[1] + c lambda a, b, c: a + b + c it is unclear at first sight that it refers to tuple argument unpacking. There should also some mention that tuple argument unpacking for regular function (def) is also gone. Also, I'm not sure what this change is referring to: Python 2 Python 3 L = list(seq) L = sorted(seq) L.sort() L.sort is still available in python, and sorted() have been available since python 2. Both list.sort() and sorted() are for different purpose, and neither will be deprecated. What's the change here? |