python2,3区别

 Python2Python3
default charset ascii(can change) utf-8
print 可不加括号 必须加
range 有xrange()生成器 可转换为range  
input raw_input() input
5/2 2自动向下取整 2.5
object 只有新式类有 都是新式类都默认继承object
super() python3,通过super找到父类
多继承问题 新式类,广度,经典类,深度 全都是新式类广度优先,就近原则
metaclass 作为静态属性__metaclass__=MyType class A(metaclass=MyType):
原文地址:https://www.cnblogs.com/Dean0731/p/11661214.html