Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python -- what is NOT in 2.7 that IS in 3.1? So many things have been back-ported, what is NOT?

I've been following the saga of Python 3.x and have watched the 3.x features gradually getting back-ported to the 2.x line.

Most of the libraries I use haven't been ported and some (e.g. Twisted) seem covertly or overtly hostile to 3.x to varying degrees. At any rate, there has been very little movement towards compatible versions of many of them. Expecially the larger ones.

So, my question is, with all the features that have been backported, what is still available in 3.x that's NOT been back-ported? It's pretty easy to find what has been backported, but not what's left.

Right now, porting to 3.x just seems like all pain, and I can't see the gain; maybe an "Only in 3.x" list would let me see the light...

Thanks,

Stu

like image 718
StuFuller Avatar asked Apr 02 '10 17:04

StuFuller


2 Answers

The most important thing is probably unicode throughout. So there is no need anymore to fiddle around with str/unicode. This sounds small but has huge (positive) implications when you think of OS interaction - for example everyone has to try hard to give you 'usable' strings instead of 'a binary thing that might be an error message'.

There's also a lot of stuff in the interpreter itself that was improved. One example is the global interpreter lock (GIL) which did not vanish but it way better in py3k: presentation+slides

like image 127
Felix Schwarz Avatar answered Nov 20 '22 06:11

Felix Schwarz


Speed might be a feature worth mentioning.

The speed imporovements of project "Unladen Swallow" have been approved to be merged into Python. But as far as I know only to Python 3. See PEP 3146 for details.

like image 31
Paidhi Avatar answered Nov 20 '22 08:11

Paidhi