内置数据类型
- None类型
- None
- 数值类型
- bool
- int
- float
- complex
- 序列类型
- list
- str
- 映射类型
- ditc
- 集合类型
- set
- frozenset
内置结构类型
- 可调用类型
- types.BuiltinFunctionType 内置函数或方法
- type 内置类型和类类型
- object
- types.FunctionType 自定义函数
- types.MehodType 类方法
- 模块
- types.ModuleType
- 类
- object
- 类型
- type
解释器内部使用的内置类型
- types.CodeType
- compile()函数返回代码对象
- types.FrameType
- 帧对象
- types.GeneratorType
- 生成器对象
- types.TracebackType
- 出现异常时创建异常栈跟踪对象
- slice
- slice()函数可创建切片对象
- Ellipsis
- 用于表示索引查找[ ]中的省略号(...)。
-
1 class EllipsisDemo(object): 2 def __getitem__(self, item): 3 print(item) 4 5 e = EllipsisDemo() 6 e[3, ..., 4]