码迷,mamicode.com
首页 > 编程语言 > 详细

Python的一些版本分析

时间:2017-12-20 22:05:34      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:rem   例子   aspect   out   turn   nsis   字符   uft   活跃   

Python 2.6 - October 1, 2008
Python 2.6.1 - October 1, 2008
Python 2.6.6 - October 1, 2008
Python 3.0 - December 3, 2008
Python 2.7 - July 3, 2010 #目前业内主流使用的工业版本依然是2.7

print "hello world" #in 2.x
print("hello world") #in 3.x


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

总结: python2.x 是遗产, python3.x是现在和未来的语言

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.

2.x = 默认编码 =ASSIC =不支持
3.x = 默认编码 =UNICODE =默认支持中文

 

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 2 vs 3
1。 默认支持中文
2. 不兼容2.x
3. 核心语法调整,更易学
4. 新特性默认只在3.x上有

Python的一些版本分析

标签:rem   例子   aspect   out   turn   nsis   字符   uft   活跃   

原文地址:http://www.cnblogs.com/zerozs/p/8075637.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!