Python 2.0 =默认编码=ASSIC=不支持中文

Python 3.0 =默认编码=UNICODE=默认支持中文

 

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

总结:Python 2.x是遗产,Python 3.x 是现在和未来的语言。

Python 3.0 was released 发布  in 2008. The final  最终的  2.x version 2.7 release  发布  came out in mid-2010,

with a statement  声明  ofextended  延长 support  支持  for this end-of-life release.

The 2.x branch will see no new major releases after that. 3.x isunder 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 2 VS Python 3

1、默认支持中文

2、不兼容 2.0

3、核心语法调整易学

4、新特性默认只在3.x上有

Python2.0 与 3.0 的区别的更多相关文章

  1. bootstrap2.0与3.0的区别

    在阅读这篇bootstrap2.0与3.0的区别的文章之前,大家一定要先了解什么是响应式网站设计?推荐大家看看这篇"教你快速了解响应式网站设计" . 我觉得bootstrap的可视 ...

  2. Byte,TBytes,array of Byte, array[0..9] of byte的区别

    Byte前面已经说是存放bit的单元,是电脑内存的基本单位,byte表示0-255中的256个数字 下面为Byte的用法: var B: Byte; // 表示0-255的数字 begin B := ...

  3. HTTP1.0与HTTP1.1的区别

    HTTP/1.1与HTTP/1.0的区别 下面主要从几个不同的方面介绍HTTP/1.0与HTTP/1.1之间的差别,当然,更多的内容是放在解释这种差异背后的机制上. 1 可扩展性 可扩展性的一个重要原 ...

  4. EF4.0和EF5.0增删改查的写法区别及执行Sql的方法

    EF4.0和EF5.0增删改查的写法区别 public T AddEntity(T entity) { //EF4.0的写法 添加实体 //db.CreateObjectSet<T>(). ...

  5. SATA1.0,2.0,3.0区别

    外观没区别,接口都一样,线也一样,就是传输速率不一样,控制芯片不一样SATA1.0理论传输速度为1.5Gbit/s SATA2.0理论传输速度为3Gbit/sSATA2.0理论传输速度为6Gbit/s ...

  6. 相比于python2.6,python3.0的新特性。

    这篇文章主要介绍了相比于python2.6,python3.0的新特性.更详细的介绍请参见python3.0的文档. Common Stumbling Blocks 本段简单的列出容易使人出错的变动. ...

  7. vue1.0和vue2.0的区别(二)

    这篇我们继续之前的vue1.0和vue2.0的区别(一)继续说 四.循环 学过vue的同学应该知道vue1.0是不能添加重复数据的,否则它会报错,想让它重复添加也不是不可以,不过需要定义别的东西 而v ...

  8. ip地址0.0.0.0与127.0.0.1的区别(转载)

    原文链接:http://blog.csdn.net/ttx_laughing/article/details/58586907 最近在项目开发中发现一个奇怪的问题,当服务器与客户端在同一台机器上时,用 ...

  9. GLSL ES 3.0 和 2.0 的区别

    GLSL ES 3.0 和 2.0 的区别 语法区别 attribute和varying. 取而代之的是 in和out 头文件多了个#version 300 es 纹理 texture2D 和 tex ...

  10. vue1.0与vue2.0对于v-for的使用的区别

    vue1.0与vue2.0对于v-for的使用的区别: 1,vue1.0中有$index,而vue2.0将$index移除. 2,vue1.0中(index,item) in list 而vue2.变 ...

随机推荐

  1. 软考自查:UML建模

    UML建模 内容提要 用例图 类图与对象图 顺序图 活动图 状态图 通信图 构件图 用例图 包含关系 扩展关系 泛化关系     类图与对象图 填类名,方法名,属性名 填多重度 填关系     1: ...

  2. js备战春招の四のDOM

    通过js查找html元素的三种方法: 1.通过id找到html元素. 2.通过标签名找到html元素. 3.通过类名找到html元素. DOM HTML document.write(); 直接写入h ...

  3. Docker Swarm Mode 学习笔记(聊聊 replicas)

    在 Swarm 集群中, 创建服务时可以通过设置 --replicas 参数来指定此服务在工作节点上运行的任务数. 示例 这里我们来创建一个 nginx 服务作为示例: version: '3' se ...

  4. vim中文乱码问题

    问题如下: 修改 /etc/vimrc 文件 添加: ,ucs-bom,gb18030,gbk,gb2312,cp936 把/etc/vimrc复制到你自己的根目录下面:复制为.vimrc(前面有个点 ...

  5. laravel文件上传

    一.视图文件代码 <td> <input type="file" name="brand_logo" id="logo" ...

  6. Python3.6 运行提示 ImportError: cannot import name 'CONFIG_FILE'

    如下代码: import os from utils.file_reader import YamlReader BASE_PATH = os.path.split(os.path.dirname(o ...

  7. 关于python中loc和iloc方法

    pandas以类似字典的方式来获取某一列的值 import pandas as pd import numpy as np table = pd.DataFrame(np.zeros((4,2)), ...

  8. shell脚本中gsub的应用

    (1)文件filename的内容 cat awk_file 1 2 3 $1,200.00 1 2 3 $2,300.00 1 2 3 $4,000.00 (2)去掉第四列的$和,并汇总第四列的和 a ...

  9. mysql、nginx、php-fpm的启动与关闭

    mysql 一.启动方式 1.使用 service 启动:service mysqld start 2.使用 mysqld 脚本启动:/etc/inint.d/mysqld start 3.使用 sa ...

  10. time 与 datetime 模块的常用方法

    时间格式 一个名词: UTC(Coordinated Universal Time):格林威治天文时,世界标准时间.中国为东八区 UTC+8 在编程的世界中,一定要了解的几种时间格式: 1.时间戳 从 ...