[Python Study Notes] 抉择--Python2.x Or Python 3.x
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的更多相关文章
- [Python Study Notes]with的使用
在 Python 2.5 中, with 关键字被加入.它将常用的 try ... except ... finally ... 模式很方便的被复用.看一个最经典的例子: with open('fil ...
- [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 ...
- [Python Study Notes]匿名函数
Python 使用 lambda 来创建匿名函数. lambda这个名称来自于LISP,而LISP则是从lambda calculus(一种符号逻辑形式)取这个名称的.在Python中,lambda作 ...
- [Python Study Notes]字符串处理技巧(持续更新)
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...
- [Python Study Notes]实现对键盘控制与监控
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...
- [Python Study Notes]实现对鼠标控制
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...
- [Python Study Notes]批量将wold转换为pdf
本文代码,由原ppt2pdf.py进行改写 '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...
- [Python Study Notes]批量将ppt转换为pdf v1.0
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ...
- [Python Study Notes]CS架构远程访问获取信息--SERVER端v2.0
更新内容: 1.增加内存信息获取 2.增加电池信息获取 3.增加磁盘信息获取 4.重新布局窗体 5.增加窗体名称 6.增加连接成功之前,不可按压 ''''''''''''''''''''''''''' ...
随机推荐
- hbase完全分布式安装
hbase完全分布式安装 http://hbase.apache.org/book.html#standalone_dist master ...
- for循环去重排序
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- FSFS和VDFS存储方式的区别
简单来说这个是VisualSVN基于FSFS文件系统格式扩展的.也就是说,分布式版本管理DVCS兴起之后,大家发现多个仓库的好处了,开始给SVN增加这个功能. 至于FSFS本身是SVN在2004年开始 ...
- cnzz友盟怎么安装网站统计代码监控网站流量
做网站的都知道cnzz统计,它是用来统计网站流量的,可以分析网站数据,进行更好的对网站优化,下面我教大家怎么添加统计代码 工具/原料 cnzz 方法/步骤 打开百度搜索"cnzz友盟&quo ...
- Maven打包时去掉项目版本号
Maven打包后,jar或war文件名里带有版本号信息,如projectname0.0.1-SNAPSHOT.jar等,怎么去掉呢? 解决办法: 打开项目pom.xml文件,在<build> ...
- 给外行或者刚入门普及一下关于C#,.NET Framework(.NET框架),.Net,CLR,ASP,ASP.Net, VS,以及.NET Core的概念
一.概念 1. C# :C#是微软公司发布的一种面向对象的.运行于.NET Framework之上的高级程序设计语言. 2..NET Framework(.NET框架):.NET framework ...
- apple watch 与 iphone 之间的通信方式
apple watch 与 iphone 之间的通信方式:通过watchkit WatchKit应用扩展都提供一个名为WKInterfaceController的子类来管理相应的界面. 启动watch ...
- Python调用外部程序——os.system()和subprocess.call
通过os.system函数调用其他程序 预备知识:cmd中打开和关闭程序 cmd中打开程序 a.打开系统自带程序 系统自带的程序的路径一般都已加入环境变量之中,只需在cmd窗口中直接输入程序名称即可. ...
- 2017-07-06(grep man apropos )
grep 格式 grep [选项] 字符串 文件名 选项 -i 忽略大小写 -v 排除指定字符串 作用 在文件中查找字符串 例子 grep "size" anaconda- ...
- arduino与DS1302时钟调试失败的分析
前两天测试了时钟模块,但是,一直失败,能读取时间,但是设置不了时间,所以.这次我查了很多资料,发现好像是信号线的问题,线太长,数据收到干扰, 资料如下http://www.51hei.com/bbs/ ...