Python认为一切皆为对象:比如我们初始化一个list时: li = list('abc') 实际上是实例化了内置模块builtins(python2中为__builtin__模块)中的list类: class list(object): def __init__(self, seq=()): # known special case of list.__init__ """ list() -> new empty list list(iterable) ->…
Python认为一切皆为对象:比如我们初始化一个list时: li = list('abc') 实际上是实例化了内置模块builtins(python2中为__builtin__模块)中的list类: class list(object): def __init__(self, seq=()): # known special case of list.__init__ """ list() -> new empty list list(iterable) ->…