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. Sqoop介绍

    Sqoop介绍 http://sqoop.apache.org http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html   1.什么是Sqoop? ...

  2. vue2.0集成百度UE编辑器,上传图片报错!!!

    我这边配置进去之后,界面加载,文本输入都没有问题,就是上传图片会有问题 这张图, 左边红色框框 就是目录结构咯, 右边红色框框 就是各种网上教程给出的第一个路径配置对吧, 下面的就是绿色 服务器接口配 ...

  3. mysql修改表和列

    mysql修改列 mysql增加列,修改列名.列属性,删除列语句   mysql修改表名,列名,列类型,添加表列,删除表列     alter table test rename test1; --修 ...

  4. Linuxc - C语言下return 0的意义

    两条指令同时执行,前提是第一条指令返回0.否则不执行第二条指令. root@jiqing-virtual-machine:~/cspace/les3# gcc main.c -o main.out & ...

  5. CDN页面刷新接口定义[高升]

    一 . 任务 分发 工作流程步骤 1. 合作方按照高升定义的 json 数据格式向高升分发接口 post 任务,高升分发接口会根据接收情况即时反馈接收成功还是失败的结果.二 . 高升 分发 接口 定义 ...

  6. 爬取知名社区技术文章_article_3

    爬虫主逻辑处理,获取字段,获取主url和子url #!/usr/bin/python3 # -*- coding: utf-8 -*- import scrapy from scrapy.http i ...

  7. js/j'query相互转换操作指南

    // jquery对象转js对象 $('#search')[0].checked=true; // js对象转jquery对象 var obj = document.getElementById('s ...

  8. 网页窗口logo图标设置

    网站上的logo实际上是一个“**.ico”图片,比如说favicon.ico.实现步骤:第一步:制作favicon.ico,大小一般为16*16毫米(ico图片制作网址http://www.ico. ...

  9. 文件无法删除java.io.IOException: Unable to delete

    疑问:1.为什么调用file.delete()方法时,返回值为false. 2.为什么调用Guava工具jar包中的Files.move(from,to) ,报异常:java.io.IOExcepti ...

  10. 32位系统装4G以上的内存

    1.操作系统在32位平台上最大寻址空间是4GB,如果要使用4GB以上的内存,就必须使用intel的PAE(物理地址扩展)模式,在windows NT平台实现PAE只需对boot.ini加上/pae即可 ...