In summary : Python 2.x is legacy, Python 3.x is the present and future of the language

Python 3.0 was released in 2008. The final 2.x version 2.7 release came out in mid-2010, with a statement of extended support for this end-of-life release.

The 2.x branch will see no new major releases after that. 3.x is under active development and has already seen over five years of stable releases, including version 3.3 in 2012,

3.4 in 2014, and 3.5 in 2015. This means that all recent standard library improvements, for example, are only available by default in Python 3.x.

Guido van Rossum (the original creator of the Python language) decided to clean up Python 2.x properly, with less regard for backwards compatibility than is the case for new releases in the 2.x range.

The most drastic improvement is the better Unicode support (with all text strings being Unicode by default) as well as saner bytes/Unicode separation.

Besides, several aspects of the core language (such as print and exec being statements, integers using floor division) have been adjusted to be easier for newcomers to learn and to be more consistent with the rest of the language, and old cruft has been removed (for example, all classes are now new-style, "range()" returns a memory efficient iterable, not a list as in 2.x).

Python 3.0于2008年发布。最终的2.x版本2.7发布于2010年年中,发布了对这个报废发布的扩展支持声明。之后,2.x分支将不会看到新的主要版本。 3.x正处于积极的发展阶段,并且已经有了超过五年的稳定版本,包括2012年的3.3版本,2014年为3.4,2015年为3.5。

这意味着所有最近的标准库改进都只能在Python 3.x中默认使用。

Guido van Rossum(Python语言的原始创建者)决定正确地清理Python 2.x,而不考虑向后兼容,而不是2.x范围内的新版本。

最大的改进是更好的Unicode支持(所有的文本字符串默认为Unicode)以及更清晰的字节/ Unicode分隔。

此外,核心语言的几个方面(如印刷和可执行性声明,使用地板划分的整数)进行了调整,以使新手更容易学习,并与其他语言更加一致,并且删除了旧版本(例如,所有的类现在都是新的风格,“range()”返回一个有效的可迭代内存,而不是像2.x那样的列表)。

毫无疑问,如果你和我一样刚刚接触Python,选择Python3.x是明智的做法。

[Python Study Notes] 抉择--Python2.x Or Python 3.x的更多相关文章

  1. [Python Study Notes]with的使用

    在 Python 2.5 中, with 关键字被加入.它将常用的 try ... except ... finally ... 模式很方便的被复用.看一个最经典的例子: with open('fil ...

  2. [Notes] Learn Python2.7 From Python Tutorial

    I have planed to learn Python for many times. I have started to learn Python for many times . Howeve ...

  3. [Python Study Notes]匿名函数

    Python 使用 lambda 来创建匿名函数. lambda这个名称来自于LISP,而LISP则是从lambda calculus(一种符号逻辑形式)取这个名称的.在Python中,lambda作 ...

  4. [Python Study Notes]字符串处理技巧(持续更新)

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  5. [Python Study Notes]实现对键盘控制与监控

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  6. [Python Study Notes]实现对鼠标控制

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  7. [Python Study Notes]批量将wold转换为pdf

    本文代码,由原ppt2pdf.py进行改写 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  8. [Python Study Notes]批量将ppt转换为pdf v1.0

    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...

  9. [Python Study Notes]CS架构远程访问获取信息--SERVER端v2.0

    更新内容: 1.增加内存信息获取 2.增加电池信息获取 3.增加磁盘信息获取 4.重新布局窗体 5.增加窗体名称 6.增加连接成功之前,不可按压 ''''''''''''''''''''''''''' ...

随机推荐

  1. Oracle_子查询

    Oracle_子查询 子查询   --如何查得所有比"CLARK"工资高的员工的信息 select ename, sal from emp where ename = 'CLARK ...

  2. Centos6.7安装mysql 5.6简单教程

    今天项目经理让我给服务器配一下mysql,以前配置mysql的时候,感觉好麻烦,前几天也帮朋友配置来着,今天装的时候一直报错,百度也没搞明白,所以打算换种方法装mysql,无意中发现了还有这种操作,容 ...

  3. Map,List,POJO深拷贝(序列化实现)方法与注意事项

    转载请注明出处,谢谢! 方法1: /*jdk >= 1.5*/ @SuppressWarnings("unchecked") public static <T> ...

  4. Uva10129 - Play on Words 欧拉通路 DFS

    题目链接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=105& ...

  5. IOS UI 滚动视图 UIScrollView

    UIScrollView 常用属性 scrollView.maximumZoomScale= 2.0; //  缩放最大比例 scrollView.minimumZoomScale = 0.2;// ...

  6. 使用git bash提交代码到github托管

    1.首先登录到https://github.com注册Github帐号,并且创建一个repository.  或者登录到  https://git.oschina.net/注册账号,并且创建一个rep ...

  7. flask + Python3 实现的的API自动化测试平台---- IAPTest接口测试平台(总结感悟篇)

    前言: 在前进中去发现自己的不足,在学习中去丰富自己的能力,在放弃时想想自己最初的目的,在困难面前想想怎么踏过去.在不断成长中去磨炼自己. 正文: 时间轴 flask + Python3 实现的的AP ...

  8. 2017-07-09(tar who last)

    tar gzip ,bzip2对于文件目录压缩支持有限,所以出现了tar命令 tar [选项]  打包文件名  源文件 -c 打包 -v 显示过程 -f 指定打包文件名 -x 解包 -z 压缩成.ta ...

  9. 2017-06-27(useradd usermod userdel 禁止普通用户登录)

    useradd useradd  -g  组名  用户名  (添加新用户,并将其添加到指定的主用户组) useradd  -g  组名  -G 附属组名  用户名  (添加新用户,并将其添加至指定主用 ...

  10. 译-Web Service剖析: XML, SOAP 和WSDL 用于独立于平台的数据交换

    本文是翻译内容,原文参见: Anatomy of a Web Service: XML, SOAP and WSDL for Platform-independent Data Exchange We ...