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. jquery ajax 请求中多出现一次OPTIONS请求及其解决办法

    http://www.tangshuang.net/2271.html 在上一篇<服务端php解决jquery ajax跨域请求restful api问题及实践>中,我简单介绍了如何通过服 ...

  2. 客户端怎么查看SVN的代码库

    安装SVN客户端,比如TortoiseSVN,然后将代码库checkout到本地,或者通过客户端的版本库浏览器直接连接SVN服务器查看代码库的目录结构. 如果SVN服务器端安装的时候是和Apache集 ...

  3. [SinGuLaRiTy] NOIP2017 提高组

    [SinGuLaRiTy-1048] Copyright (c) SinGuLaRiTy 2018. All Rights Reserved. NOIP2017过了这么久,现在2018了才找到寒假这么 ...

  4. jQuery 表单

    1.一般输入信息的提示用<span>   属性为text 2.<input>只有设置了 name 属性的表单元素才能在提交表单时传递它们的值. 3.blur 失去焦点 4.$. ...

  5. Hadoop问题:apt-get install docker-engine -> Depends: init-system-helpers (>= 1.18~) but 1.14 is to be installed

    问题描述:$ apt-get install docker-engine -> Depends: init-system-helpers (>= 1.18~) but 1.14 is to ...

  6. requireJs 踩的坑

    <!-- RequireJS --> <script src="assets/js/require.min.js" data-main="assets/ ...

  7. java —— 内部类

    _ 普通内部类 静态内部类 局部内部类 匿名内部类 内部类 内部类是定义在另一个类中的类,定义内部类会起到的作用有以下三点: 1.内部类方法访问该类定义所在的作用域中的数据,包括私有的数据. 2.内部 ...

  8. python_如何进行反向迭代和实现反向迭代?

    案例: 实现一个连续的浮点数发生器,FloatRange,根据给定范围(start, end) 和步进值,产生一些列的浮点数,例如:FloatRange(3,4,0.2),将产生下列序列: 正向:3. ...

  9. 爬虫_url去重策略

    如何对url去重? 将访问url保存到数据库中,效率低,最简单 将url保存到set中,查询速度快,但当url达到1亿多条时候,占用太多内存空间 将url经过md5等方法哈希后保存到set中 用bit ...

  10. Linux指令--mkdir

    本篇博客参照http://www.cnblogs.com/peida/archive/2012/10/25/2738271.html. linux mkdir 命令用来创建指定的名称的目录,要求创建目 ...