• [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是明智的做法。

    最有用的语言,除了English,其次可能是Python
  • 相关阅读:
    TypeScript学习笔记
    Spring基础知识
    Filter基础知识
    如何开发自定义标签
    会话和会话状态
    Servlet转发到JSP页面的路径问题
    JDBC相关知识
    gimp 很强大, 可是不会用
    python 启动文件
    minidnla policy
  • 原文地址:https://www.cnblogs.com/liu66blog/p/8151247.html
Copyright © 2020-2023  润新知