🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](datetime.xhtml "datetime --- 基础日期/时间数据类型") | - [上一页](codecs.xhtml "codecs --- Codec registry and base classes") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | # 数据类型 本章节描述的模块提供了一系列专门的数据类型例如日期与实践,固定类型的数组,堆队列,同步队列与集合。 Python 同样提供一些内置的数据类型,特别的, [`dict`](stdtypes.xhtml#dict "dict") , [`list`](stdtypes.xhtml#list "list") , [`set`](stdtypes.xhtml#set "set") 与 `fromzenset` 以及 [`tuple`](stdtypes.xhtml#tuple "tuple") 。 [`str`](stdtypes.xhtml#str "str") 类通常指 Unicode 字符串,并且 [`bytes`](stdtypes.xhtml#bytes "bytes") 通常指二进制数据。 本章记录以下模块: - [`datetime` --- 基础日期/时间数据类型](datetime.xhtml) - [Available Types](datetime.xhtml#available-types) - [`timedelta` Objects](datetime.xhtml#timedelta-objects) - [`date` Objects](datetime.xhtml#date-objects) - [`datetime` Objects](datetime.xhtml#datetime-objects) - [`time` Objects](datetime.xhtml#time-objects) - [`tzinfo` 对象](datetime.xhtml#tzinfo-objects) - [`timezone` Objects](datetime.xhtml#timezone-objects) - [`strftime()` and `strptime()` Behavior](datetime.xhtml#strftime-and-strptime-behavior) - [`calendar` --- General calendar-related functions](calendar.xhtml) - [`collections` --- 容器数据类型](collections.xhtml) - [`ChainMap` 对象](collections.xhtml#chainmap-objects) - [`ChainMap` 例子和方法](collections.xhtml#chainmap-examples-and-recipes) - [`Counter` 对象](collections.xhtml#counter-objects) - [`deque` 对象](collections.xhtml#deque-objects) - [`deque` 用法](collections.xhtml#deque-recipes) - [`defaultdict` 对象](collections.xhtml#defaultdict-objects) - [`defaultdict` 例子](collections.xhtml#defaultdict-examples) - [`namedtuple()` 命名元组的工厂函数](collections.xhtml#namedtuple-factory-function-for-tuples-with-named-fields) - [`OrderedDict` 对象](collections.xhtml#ordereddict-objects) - [`OrderedDict` 例子和用法](collections.xhtml#ordereddict-examples-and-recipes) - [`UserDict` 对象](collections.xhtml#userdict-objects) - [`UserList` 对象](collections.xhtml#userlist-objects) - [`UserString` 对象](collections.xhtml#userstring-objects) - [`collections.abc` --- 容器的抽象基类](collections.abc.xhtml) - [Collections Abstract Base Classes](collections.abc.xhtml#collections-abstract-base-classes) - [`heapq` --- 堆队列算法](heapq.xhtml) - [基本示例](heapq.xhtml#basic-examples) - [Priority Queue Implementation Notes](heapq.xhtml#priority-queue-implementation-notes) - [Theory](heapq.xhtml#theory) - [`bisect` --- Array bisection algorithm](bisect.xhtml) - [Searching Sorted Lists](bisect.xhtml#searching-sorted-lists) - [Other Examples](bisect.xhtml#other-examples) - [`array` --- Efficient arrays of numeric values](array.xhtml) - [`weakref` --- 弱引用](weakref.xhtml) - [弱引用对象](weakref.xhtml#weak-reference-objects) - [示例](weakref.xhtml#example) - [Finalizer Objects](weakref.xhtml#finalizer-objects) - [Comparing finalizers with `__del__()` methods](weakref.xhtml#comparing-finalizers-with-del-methods) - [`types` --- Dynamic type creation and names for built-in types](types.xhtml) - [Dynamic Type Creation](types.xhtml#dynamic-type-creation) - [Standard Interpreter Types](types.xhtml#standard-interpreter-types) - [Additional Utility Classes and Functions](types.xhtml#additional-utility-classes-and-functions) - [Coroutine Utility Functions](types.xhtml#coroutine-utility-functions) - [`copy` --- 浅层 (shallow) 和深层 (deep) 复制操作](copy.xhtml) - [`pprint` --- 数据美化输出](pprint.xhtml) - [PrettyPrinter Objects](pprint.xhtml#prettyprinter-objects) - [示例](pprint.xhtml#example) - [`reprlib` --- Alternate `repr()` implementation](reprlib.xhtml) - [Repr Objects](reprlib.xhtml#repr-objects) - [Subclassing Repr Objects](reprlib.xhtml#subclassing-repr-objects) - [`enum` --- Support for enumerations](enum.xhtml) - [模块内容](enum.xhtml#module-contents) - [Creating an Enum](enum.xhtml#creating-an-enum) - [Programmatic access to enumeration members and their attributes](enum.xhtml#programmatic-access-to-enumeration-members-and-their-attributes) - [Duplicating enum members and values](enum.xhtml#duplicating-enum-members-and-values) - [Ensuring unique enumeration values](enum.xhtml#ensuring-unique-enumeration-values) - [Using automatic values](enum.xhtml#using-automatic-values) - [Iteration](enum.xhtml#iteration) - [比较](enum.xhtml#comparisons) - [Allowed members and attributes of enumerations](enum.xhtml#allowed-members-and-attributes-of-enumerations) - [Restricted Enum subclassing](enum.xhtml#restricted-enum-subclassing) - [Pickling](enum.xhtml#pickling) - [Functional API](enum.xhtml#functional-api) - [Derived Enumerations](enum.xhtml#derived-enumerations) - [IntEnum](enum.xhtml#intenum) - [IntFlag](enum.xhtml#intflag) - [标志](enum.xhtml#flag) - [Others](enum.xhtml#others) - [Interesting examples](enum.xhtml#interesting-examples) - [Omitting values](enum.xhtml#omitting-values) - [Using `auto`](enum.xhtml#using-auto) - [Using `object`](enum.xhtml#using-object) - [Using a descriptive string](enum.xhtml#using-a-descriptive-string) - [Using a custom `__new__()`](enum.xhtml#using-a-custom-new) - [OrderedEnum](enum.xhtml#orderedenum) - [DuplicateFreeEnum](enum.xhtml#duplicatefreeenum) - [Planet](enum.xhtml#planet) - [TimePeriod](enum.xhtml#timeperiod) - [How are Enums different?](enum.xhtml#how-are-enums-different) - [Enum Classes](enum.xhtml#enum-classes) - [Enum Members (aka instances)](enum.xhtml#enum-members-aka-instances) - [Finer Points](enum.xhtml#finer-points) - [Supported `__dunder__` names](enum.xhtml#supported-dunder-names) - [Supported `_sunder_` names](enum.xhtml#supported-sunder-names) - [`Enum` member type](enum.xhtml#enum-member-type) - [Boolean value of `Enum` classes and members](enum.xhtml#boolean-value-of-enum-classes-and-members) - [`Enum` classes with methods](enum.xhtml#enum-classes-with-methods) - [Combining members of `Flag`](enum.xhtml#combining-members-of-flag) ### 导航 - [索引](../genindex.xhtml "总目录") - [模块](../py-modindex.xhtml "Python 模块索引") | - [下一页](datetime.xhtml "datetime --- 基础日期/时间数据类型") | - [上一页](codecs.xhtml "codecs --- Codec registry and base classes") | - ![](https://box.kancloud.cn/a721fc7ec672275e257bbbfde49a4d4e_16x16.png) - [Python](https://www.python.org/) » - zh\_CN 3.7.3 [文档](../index.xhtml) » - [Python 标准库](index.xhtml) » - $('.inline-search').show(0); | © [版权所有](../copyright.xhtml) 2001-2019, Python Software Foundation. Python 软件基金会是一个非盈利组织。 [请捐助。](https://www.python.org/psf/donations/) 最后更新于 5月 21, 2019. [发现了问题](../bugs.xhtml)? 使用[Sphinx](http://sphinx.pocoo.org/)1.8.4 创建。