JShoe
JShoe

Reputation: 3428

Python version differences

I got a book for python 2.5 but up until now I've been using 2.7. Will there be any huge barriers to overcome?

Upvotes: 3

Views: 2570

Answers (3)

user395760
user395760

Reputation:

The 2.x versions are (generally - if 2.x had a bug somewhere and some fool writes code that takes this incorrect behaviour for granted, upgrade to 2.(x+1) will of course change the behaviour) backwards-compatible. So the examples written for 2.5 should run fine for 2.7.

Note though that you're missing out several cool features added in 2.6 and 2.7, including with statements for easy resource management and more, new string formatting, new kinds of integer literals, dictionary and set comprehensions. Also countless improved and new modules.

Upvotes: 4

Rob Alarcon
Rob Alarcon

Reputation: 1450

No, the big differences came from python 2.x to python 3

Upvotes: 0

mipadi
mipadi

Reputation: 410542

No, Python 2.7 is compatible with 2.5. There were a few features that were added, but everything you learned from 2.5 should work in 2.7.

Python 3, on the other hand, makes some big changes that are not compatible with 2.5.

Upvotes: 5

Related Questions