The modules described in this chapter provide a variety of specialized data types such as dates and times, fixed-type arrays, heap queues, synchronized queues, and sets.
Python 还提供一些内置数据类型,尤其,
dict
,
list
,
set
(which along with
frozenset
, replaces the deprecated
sets
module), and
tuple
。
str
class can be used to handle binary data and 8-bit text, and the
unicode
class to handle Unicode text.
本章文档化了以下模块:
datetime
— 基本日期和时间类型
calendar
— 一般日历相关函数
collections
— 高性能容器数据类型
heapq
— 堆队列算法
bisect
— 数组二分算法
array
— 高效数值数组
sets
— 唯一元素的无序集合
sched
— 事件调度器
mutex
— 相互排斥支持
Queue
— 同步队列类
weakref
— 弱引用
UserDict
— 字典对象的类包裹器
UserList
— 列表对象的类包裹器
UserString
— 字符串对象的类包裹器
types
— 内置类型的名称
new
— 创建运行时内部对象
copy
— 浅拷贝和深拷贝操作
pprint
— 数据美化打印机
repr
— 替代
repr()
实现