开发者

python 2.7 vs python 3.1

Some python 3 features and m开发者_如何学运维odules having been backported to python 2.7 what are the notable differences between python 3.1 and python 2.7?


I think these resources might help you:

  • A introduction to Python "3000" from Guido van Rossum
  • Porting your code to Python 3
  • and of course the documentation of changes in Python 3.0

And as you said

Some python 3 features and modules having been backported to python 2.7

... I would invert that sentence and say only few packages yet have been ported from Python 2.x to 3.x. Great libraries like PyGTK still only work in Python 2. Migration can take a while in many projects so before you decide to use Python 3 you may rather think about writing your own projects in Python 2, while ensuring compatibility by testing with 2to3 regularly.


If you want to use any of the python 3 function in python 2.7 then you can import future module at the beginning and then you can use it in your code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜