Python changes

C

Craig McRoberts

First off, greetings from a newbie!

Here's the deal. I gained a passable knowledge of Python nearly ten years ago. Then I decided a career in the computer sciences wasn't for me, and I let it go. Now I find myself back in the development arena, and I'd like to pick up Python again. How much has it changed in my ten years' absence? I've already resigned myself to starting over from the beginning, but are my books from that time period even worth using now?

Thanks so much.

Craig McRoberts
 
S

Seebs

I've already resigned
myself to starting over from the beginning, but are my books from
that time period even worth using now?

Impression I get is mostly "no". I think you'll find life overall a lot
better now, though. Programming languages tend to improve, with some
very notable exceptions. :p

-s
 
N

Neil Cerutti

First off, greetings from a newbie!

Here's the deal. I gained a passable knowledge of Python nearly
ten years ago. Then I decided a career in the computer sciences
wasn't for me, and I let it go. Now I find myself back in the
development arena, and I'd like to pick up Python again. How
much has it changed in my ten years' absence? I've already
resigned myself to starting over from the beginning, but are my
books from that time period even worth using now?

Thanks so much.

Ten years ago puts around the time of Python 2.1. Your books are
indeed useless.

Python's documentation contains an excellent summary of new
features and changes dating back to Python 2.0.

http://docs.python.org/py3k/whatsnew/index.html
 
C

Craig McRoberts

Thanks for the prompt replies. Sounds like it's time to hit a bookstore.

Craig McRoberts
 
T

Teenan

Thanks for the prompt replies. Sounds like it's time to hit a bookstore.

Craig McRoberts

You could do a lot worse than getting 'Dive into Python' (There's even a
nice new version just for python 3.0)

hmmm bookstore.. those are the things they had before Amazon right? ;)
 
C

Craig McRoberts

Oh, I like to browse brick-and-mortar enough. But it's been forever since I've bought something there.

Craig McRoberts
 
S

Stefan Behnel

Teenan, 28.10.2010 21:16:
You could do a lot worse than getting 'Dive into Python' (There's even a
nice new version just for python 3.0)

Yes, and the thing I like most about the Py3 version is that the XML
chapter has been rewritten completely. It's now based on ElementTree and
even gives lxml.etree an intro.

http://diveintopython3.org/xml.html

That, if nothing else, is enough of a reason to read it instead of the much
older Py2 version of the book.

Stefan
 
S

Steven D'Aprano

First off, greetings from a newbie!

Here's the deal. I gained a passable knowledge of Python nearly ten
years ago. Then I decided a career in the computer sciences wasn't for
me, and I let it go. Now I find myself back in the development arena,
and I'd like to pick up Python again. How much has it changed in my ten
years' absence? I've already resigned myself to starting over from the
beginning, but are my books from that time period even worth using now?

The one sentence summary: if you're on a tight budget, and want to re-
learn Python on the cheap, you can reuse your old books, plus free
resources on the web, but if you're in a hurry it will be easier to buy
some new books.

Longer version:

Ten years ago would have been around version 1.5 or 2.0, give or take. As
a language, Python has been very conservative. The basic syntax of Python
1.5 still works. If you stick to Python 2.6 or 2.7, there have been
virtually no backwards incompatible changes since version 1.5. The only
exceptions I can think of:

* some libraries have been dropped;
* a change in the way hex() and oct() of negative numbers is displayed;
* nested functions behave differently;
* the occasional new keyword has been added (e.g. yield).

Other than that, you can take virtually any example from Python 1.5 and
run it in Python 2.7 and it should still work. It might not be the best
way to solve the problem, but it should do it.

Most of the changes from 1.5 to 2.7 have involved *adding* features,
rather than taking them away. To learn the new features, read the Fine
Manual, especially the What's New that comes out with every new version,
or go out and buy a book covering the latest version.

If you advance to Python 3.1, you can add to the list of backward
incompatibilities:

* minor differences in the way classes work;
* print is now a function, not a statement;
* strings are now Unicode, rather than bytes;
* various functions and methods which used to return lists now return
iterators;

plus others I've forgotten. That makes a jump from 1.5 to 3.1 rather more
problematic, but it can still be done -- the basic language is still
almost identical, the syntax hasn't changed much, but there's a whole lot
of new functionality that will make your life easier.
 
S

Steven D'Aprano

You could do a lot worse than getting 'Dive into Python' (There's even a
nice new version just for python 3.0)

Not everyone is enamored of "Dive into Python". (Personally, I don't have
an option on it.)

http://oppugn.us/posts/1272050135.html

I can, however, recommend "Learning Python" by Mark Lutz, although in
fairness the version I read was way back in the Dark Ages of Python 1.5.

hmmm bookstore.. those are the things they had before Amazon right? ;)

Yeah, back when it was possible to buy things without leaving digital
traces that will be around forever.
 
R

rantingrick

hmmm bookstore.. those are the things they had before Amazon right? ;)

hmm Amazon... Is that the place where you buy tutorials when you could
instead get the same info for free with a little Google fu? ;-)
 
H

Hans-Peter Jansen

Oh, I like to browse brick-and-mortar enough. But it's been forever
since I've bought something there.

If you can get your hands on a copy of Mark Summerfield's Programming in
Python3, check it out. He really raised the accustomed quality levels
of technical writings for me.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top