zoukankan      html  css  js  c++  java
  • Python的一些版本分析

    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上有

  • 相关阅读:
    clickhouse群集模式搭建
    基于Att&ck模型的整体威胁框架方法论
    应急响应Windows各种操作记录备份
    代理总结
    Linux应急响应日志分析
    Web漏洞利用框架
    Suricata策略记录
    应急响应汇总
    IDS&IPSSuricata介绍
    ATT&CKMitreInitial Access(初始化访问)
  • 原文地址:https://www.cnblogs.com/zerozs/p/8075637.html
Copyright © 2011-2022 走看看