• 导航 (返回顶部)

    • 1. Python版本

      • 1.1 python --version
      • 1.2 Python 2 vs 3 comparison
      • 1.3 python 2 to 3 converter
    • 2. Python 手册
      • 2.1 最新官方中文手册
      • 2.2 learn python
      • 2.3 Python 风格指南 - 内容目录
    • 3. Python软件
      • 3.1 Python软件清单
      • 3.2 Python开发环境
      • 3.3 Python IDE对比
    • 4. see also
1. Python版本1.1 python --version1.2 Python 2 vs 3 comparison1.3 python 2 to 3 converter
2. Python 手册2.1 最新官方中文手册2.2 learn python2.3 Python 风格指南 - 内容目录
3. Python软件3.1 Python软件清单3.2 Python开发环境3.3 Python IDE对比
4. see also

1. Python版本

1.1 python --version

$ python --version
Python 3.8.2
https://en.wikipedia.org/wiki/History_of_Python#Table_of_versions

1.2 Python 2 vs 3 comparison

Comparison Python 3 Python 2
最早发行版本 V3.0 2008 V2.0 2000
最新发行版 V3.8.2 2020 V2.7 2010, 2020已停止更新
print print (“hello”) print “hello”
整数除法 Division 得到浮点数 总是整数
Unicode 支持 字符串默认Unicode 要存储Unicode字符串,需使用”u”定义
语法 Syntax 语法简单易懂 语法相对难以理解
排序比较规则 简化了排序比较规则 非常复杂
迭代 Iteration 新的range()函数来执行迭代 xrange()用于迭代
例外情况 应将其括在括号中 包含在符号中
变量泄漏 变量的值永远不变 在for循环中使用全局变量时,其值会更改。
兼容 Compatibility 将python 2移植到python 3并不难,不过不太可靠 Python版本3与Python 2向后不兼容。
库 Library 越来越多... 很多已经不再更新,淘汰中...
不等运算符 != != 和 <>
True, False True, False 变为2个关键字。
不允许重新赋值。修正了版本2的缺陷
True, False是2个全局变量,数值对应0,1;
变量可以指向其他对象: True = False
nonlocal 新增关键字 nonlcoal,使得非局部变量成为可能。  
Comparison Python 3 Python 2 备注
编码 >>> import sys
>>> sys.getdefaultencoding()
'utf-8'
# 默认使用 utf-8, 所以如下是合法的
>>> 中国 = 'china'
>>>print(中国)
china
>>> import sys
>>> sys.getdefaultencoding()
'ascii'
# 默认ascii, 代码顶部包含 # coding=utf-8
>>> str = u"中国"
>>> str
u'\u4e2d\u56fd'
>>> import sys
>>> sys.getdefaultencoding()
'ascii'
>>> reload(sys)
<module 'sys' (built-in)>
>>> sys.setdefaultencoding("utf-8")
>>> sys.getdefaultencoding()
'utf-8'
字符串 str, 字符串;byte, 字节序列。
任何需要写入文本或者网络传输的数据都只接收字节序列,这就从源头上阻止了编码错误的问题。
unicode, 文本字符串;srt, 字节序列。
不过两者并没有明显的界限
=转换= ; =作用=
=字节= byte str encode ; 存储, 传输
=字符= str unicode decode ; 展示

reference:
https://www.guru99.com/python-2-vs-python-3.html#7

Python2.x与3​​.x版本区别:
https://www.runoob.com/python/python-2x-3x.html
Python的3​​.0版本,常被称为Python 3000,或简称Py3k。相对于Python的早期版本,这是一个较大的升级。为了不带入过多的累赘,Python 3.0在设计的时候没有考虑向下相容。

Python 2 和 Python 3 有哪些主要区别?
https://www.zhihu.com/question/19698598

1.3 python 2 to 3 converter

2to3 - Automated Python 2 to 3 code translation
https://docs.python.org/2/library/2to3.html

2to3 - 自动将 Python 2 代码转为 Python 3 代码
https://docs.python.org/zh-cn/3/library/2to3.html

https://www.pythonconverter.com/

2. Python 手册

2.1 最新官方中文手册

https://docs.python.org/zh-cn/3/tutorial/classes.html v3.8.2 (2020)

历史版本:
https://www.runoob.com/python3/python3-tutorial.html v3.3.2 (2013)
https://www.runoob.com/manual/pythontutorial3/docs/html/ v3.6.3 (2017)
https://www.runoob.com/python/python-tutorial.html v2.7 (2010)

2.2 learn python

https://www.learnpython.org/
https://www.techbeamers.com/python-tutorial-step-by-step/

2.3 Python 风格指南 - 内容目录

https://zh-google-styleguide.readthedocs.io/en/latest/google-python-styleguide/contents/
https://github.com/zh-google-styleguide/zh-google-styleguide/tree/master/google-python-styleguide
https://github.com/google/styleguide
https://google.github.io/styleguide/pyguide.html

3. Python软件

3.1 Python软件清单

https://en.wikipedia.org/wiki/List_of_Python_software

3.2 Python开发环境

https://en.wikipedia.org/wiki/Python_(programming_language)#Development_environments
https://zh.wikipedia.org/wiki/Python#开发环境

3.3 Python IDE对比

https://en.wikipedia.org/wiki/Comparison_of_integrated_development_environments#Python

IDE 跨平台 Written in 小部件工具包 License Python2x支持 Python3x支持 Debugger GUI生成器 集成工具链 探查器 代码覆盖率 自动完成 静态程序分析 基于GUI的设计 类浏览器 代码重构 版本控制系统支持 Web框架支持
IDLE Python Tkinter PSFL Yes Yes Yes Yes Unknown No No Yes No Yes Yes Unknown No No
eric Python PyQt GPLv3 "or later" Yes Yes Yes Yes: Qt Unknown Yes Yes Yes Pylint via Yes Yes Yes Git, Mercurial, SVN Django plug-in
PyCharm Java Swing Apache License 2.0 Yes Yes Yes Unknown Yes Yes . Yes . Yes Yes . Yes Yes Yes Yes Yes
PyDev / LiClipse Unknown SWT EPL Yes Yes Yes Unknown Unknown Unknown Unknown Yes Yes Unknown Yes Yes Yes Unknown
Visual Studio Code JavaScript HTML MIT License Yes Yes Yes No Unknown Yes Unknown Yes Unknown Unknown Unknown Unknown Yes Yes
Spyder Python PyQt, PySide MIT License Yes 2.7 Yes Yes No Yes Yes No Yes Yes Unknown Beta Planned Partial No
Thonny Python Tkinter MIT License No Yes Yes No No No No Yes Yes Unknown Yes No No Flask
Wing Python Qt5 with PyQt Proprietary Yes Yes Yes . No Yes No No Yes Yes Yes Yes Yes Yes Yes
KDevelop C, C++ Qt GPL Unknown Yes Yes Unknown Unknown Unknown Unknown Yes Unknown Unknown Yes Yes Git, Mercurial, SVN
Bazaar, CVS
Unknown
Geany C GTK+ GPL Unknown Yes No Unknown Unknown Unknown Unknown Yes Unknown Unknown Unknown Unknown Unknown Unknown

4. see also

https://wiki.archlinux.org/index.php/Python
https://wiki.gentoo.org/wiki/Python
https://wiki.postgresql.org/wiki/Python

Python-Version相关推荐

  1. python version 2.7 required,which was not found

    python version 2.7 required,which was not found.是因为两种原因,一种是没有配置python的环境变量,他真的不在注册表里面,另一种这是因为,python ...

  2. python version 3.4 required_Python version 3.3 required, which was not found in the registry

    在windows下安装numpy的时候, 出现了"Python version 3.3 required, which was not found in the registry" ...

  3. 成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry

    成功解决 安装pywin32时出现python version 3.6-32 required, which was not found in the registry 目录 解决问题 解决方法 解决 ...

  4. 成功解决​​​​​​​安装pywin32时出现python version 3.6 required, which was not found in the registry

    成功解决安装pywin32时出现python version 3.6 required, which was not found in the registry 目录 解决问题 解决方法 第一步,打开 ...

  5. python修复不了_修复 Python version 2.6 required, which was not found in the registry.

    如下: Portable Python是可移植的Python开发环境,它允许同一个系统环境下并存多个版本且相互独立的Python开发环境,也适合放在移动存储设备中作为一个完备的的.便携的开发环境,这两 ...

  6. Python version 2.7 required, which was not found in the registry

    安装setuptools的时候,不能再注册表中识别出来python2.7 在网上找了方法,仅作笔记,供下次使用 方法: 新建一个register.py 文件,把一下代码贴进去,保存(G盘) # # s ...

  7. 转python version 2.7 required,which was not found in the registry

    安装PIL-1.1.7.win32-py2.7的时候,不能再注册表中识别出来python2.7 方法:新建一个register.py 文件,把一下代码贴进去,保存 # # script to regi ...

  8. python --version没输出_如何在Linux上安装Python

    有关在Linux上安装最新的Python而不是较旧版本的分步说明. Python现在是最流行,最常用的编程语言.Python的简单语法和较低的学习曲线使其成为初学者和专业开发人员的最终选择.Pytho ...

  9. Python:PyCharm提示“Python version 2.7 does not support a ‘F‘ prefix”

    Python:PyCharm提示"Python version 2.7 does not support a 'F' prefix" 明明解释器已经设置了python3.8.6的版 ...

  10. CMake配置OpenCV时,显示错误:find_host_package(PythonInterp 2.7)' found wrong Python version

    CMake配置OpenCV时,显示错误:find_host_package(PythonInterp 2.7)' found wrong Python version 问题描述: CMake配置Ope ...

最新文章

  1. 将简历挂到云服务器网站上记
  2. 3.playbook基础
  3. iPad Pro变生产力工具,你还缺这个轻量级浏览器端代码编辑器
  4. html自动get,HTML Get
  5. oracle 自增1,oracle自增无法从1开始
  6. numpy 辨异(三)—— hstack/column_stack,linalg.eig/linalg.eigh
  7. [css] 给一个图片设置透明有哪些方式呢?
  8. stm32 工业按键检测_基于STM32芯片的能谱仪设计
  9. 集五福开奖啦!六年累计7亿人参加 今年你中了多少?
  10. 最严谨的校验email地址的正则表达式
  11. 用极大化思想解决最大子矩形问题
  12. 2021年终总结模板.pptx(附下载链接)
  13. TrustedInstaller.exe in Windows Vista consumes 100% CPU
  14. 图像局部特征(六)--斑点检测之SIFT算法原理总结补充
  15. 使用 data URI scheme 在网页中内嵌图片[转]
  16. 实践项目:图书馆管理系统
  17. JAVA类加载机制详解
  18. mac电脑出现“XXX” is damaged and can’t be opened. You should move it to the Trash
  19. http://bbs.pediy.com/showthread.php?p=1365122
  20. CCNA学习笔记#01

热门文章

  1. 中国专利申请量高居榜首,申请量两倍于美国,科技创新力领先日本
  2. qt creator release编译无错误,输出crashed解决方法
  3. matlab怎么看格式,mat文件(mat文件怎么查看)
  4. c语言中错误c2228,出现异常信息:ERROR C2228,请帮忙看上,多谢
  5. C++编程(二):CURL错误码及含义
  6. JWT和Session的区别
  7. SQL数据库基础语法总结
  8. 顺舟智能智慧灯杆解决方案
  9. 基于STM32的阿里云智能路灯照明控制系统
  10. 一张非常强大的OSI七层模型图解