数据类型
********

本章节描述的模块提供了一系列专门的数据类型例如日期与实践，固定类型的数
组，堆队列，同步队列与集合。

Python 同样提供一些内置的数据类型，特别的， "dict" ， "list" ， "set"
与 "fromzenset" 以及 "tuple" 。 "str" 类通常指 Unicode 字符串，并且
"bytes" 通常指二进制数据。

本章记录以下模块：

* "datetime" --- 基础 日期 和 时间 数据类型

  * 有效的类型

  * "timedelta" 类对象

  * "date" 对象

  * "datetime" 对象

  * "time" Objects

  * "tzinfo" 对象

  * "timezone" Objects

  * "strftime()" and "strptime()" Behavior

* "calendar" --- General calendar-related functions

* "collections" --- 容器数据类型

  * "ChainMap" 对象

    * "ChainMap" 例子和方法

  * "Counter" 对象

  * "deque" 对象

    * "deque" 用法

  * "defaultdict" 对象

    * "defaultdict" 例子

  * "namedtuple()" 命名元组的工厂函数

  * "OrderedDict" 对象

    * "OrderedDict" 例子和用法

  * "UserDict" 对象

  * "UserList" 对象

  * "UserString" 对象

* "collections.abc" --- 容器的抽象基类

  * Collections Abstract Base Classes

* "heapq" --- 堆队列算法

  * 基本示例

  * Priority Queue Implementation Notes

  * Theory

* "bisect" --- Array bisection algorithm

  * Searching Sorted Lists

  * Other Examples

* "array" --- Efficient arrays of numeric values

* "weakref" --- 弱引用

  * 弱引用对象

  * 示例

  * Finalizer Objects

  * Comparing finalizers with "__del__()" methods

* "types" --- Dynamic type creation and names for built-in types

  * Dynamic Type Creation

  * Standard Interpreter Types

  * Additional Utility Classes and Functions

  * Coroutine Utility Functions

* "copy" --- 浅层 (shallow) 和深层 (deep) 复制操作

* "pprint" --- 数据美化输出

  * PrettyPrinter Objects

  * 示例

* "reprlib" --- Alternate "repr()" implementation

  * Repr Objects

  * Subclassing Repr Objects

* "enum" --- Support for enumerations

  * 模块内容

  * Creating an Enum

  * Programmatic access to enumeration members and their attributes

  * Duplicating enum members and values

  * Ensuring unique enumeration values

  * Using automatic values

  * Iteration

  * 比较

  * Allowed members and attributes of enumerations

  * Restricted Enum subclassing

  * Pickling

  * Functional API

  * Derived Enumerations

    * IntEnum

    * IntFlag

    * 标志

    * Others

  * When to use "__new__()" vs. "__init__()"

  * Interesting examples

    * Omitting values

      * Using "auto"

      * Using "object"

      * Using a descriptive string

      * Using a custom "__new__()"

    * OrderedEnum

    * DuplicateFreeEnum

    * Planet

    * TimePeriod

  * How are Enums different?

    * Enum Classes

    * Enum Members (aka instances)

    * Finer Points

      * Supported "__dunder__" names

      * Supported "_sunder_" names

      * "Enum" member type

      * Boolean value of "Enum" classes and members

      * "Enum" classes with methods

      * Combining members of "Flag"
