Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between python 1 and 2

Tags:

Just out of complete curiosity, did Python 2 add anything major to Python 1? And if so, what?

like image 960
Matt Avatar asked Nov 15 '11 18:11

Matt


2 Answers

Summarised from http://docs.python.org/whatsnew/2.0.html:

  • Unicode objects
  • List comprehensions
  • Augmented assigment
  • Cyclic garbage collection
  • *args and **kwargs argument unpacking
like image 185
Sven Marnach Avatar answered Sep 23 '22 10:09

Sven Marnach


The changes to the codebase were for unicode, list comprehensions, string methods, augmented assignment operators, and garbage collection of cycles. A non code change was that they are using SoucreForge for the development process.

Here is the link for what is new in version 2

like image 37
James Drinkard Avatar answered Sep 20 '22 10:09

James Drinkard