@@ -10,7 +10,7 @@ msgstr ""
1010"Report-Msgid-Bugs-To : \n "
1111"POT-Creation-Date : 2018-06-30 05:56+0900\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
13- "Last-Translator : Jerry Chen <jerrychen9657 @gmail.com>, 2017 \n "
13+ "Last-Translator : cissoid <yangtukun1412 @gmail.com>, 2018 \n "
1414"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
1515"MIME-Version : 1.0\n "
1616"Content-Type : text/plain; charset=UTF-8\n "
@@ -20,11 +20,11 @@ msgstr ""
2020
2121#: ../../library/abc.rst:2
2222msgid ":mod:`abc` --- Abstract Base Classes"
23- msgstr ""
23+ msgstr ":mod:`abc` —— 抽象类 "
2424
2525#: ../../library/abc.rst:11
2626msgid "**Source code:** :source:`Lib/abc.py`"
27- msgstr ""
27+ msgstr "**源代码:** :source:`Lib/abc.py` "
2828
2929#: ../../library/abc.rst:15
3030msgid ""
@@ -34,6 +34,9 @@ msgid ""
3434" :mod:`numbers` module regarding a type hierarchy for numbers based on "
3535"ABCs.)"
3636msgstr ""
37+ "该模块提供了在 Python 中定义 :term:`抽象类 <abstract base class>`(ABC)的组件,在 :pep:`3119` "
38+ "中已有概述。查看 PEP 文档了解为什么需要在 Python 增加这个模块。(也可查看 :pep:`3141` 以及 :mod:`numbers` "
39+ "模块了解基于 ABC 的数字类型继承关系。)"
3740
3841#: ../../library/abc.rst:20
3942msgid ""
@@ -43,19 +46,25 @@ msgid ""
4346"whether a class or instance provides a particular interface, for example, is"
4447" it hashable or a mapping."
4548msgstr ""
49+ ":mod:`collections` 模块定义了一些由抽象类派生出来的具体类,当然这些类可以再次派生。另外 :mod:`collections.abc`"
50+ " 子模块定义了一些抽象类,可以用来检查类或实例是否定义了指定的接口,例如是否可以哈希或是可以映射。"
4651
4752#: ../../library/abc.rst:27
4853msgid ""
4954"This module provides the metaclass :class:`ABCMeta` for defining ABCs and a "
5055"helper class :class:`ABC` to alternatively define ABCs through inheritance:"
5156msgstr ""
57+ "该模块提供了一个元类 :class:`ABCMeta`,可以用来定义抽象类,另外还提供一个工具类 "
58+ ":class:`ABC`,可以用它以继承的方式定义抽象类。"
5259
5360#: ../../library/abc.rst:32
5461msgid ""
5562"A helper class that has :class:`ABCMeta` as its metaclass. With this class,"
5663" an abstract base class can be created by simply deriving from :class:`ABC` "
5764"avoiding sometimes confusing metaclass usage, for example::"
5865msgstr ""
66+ "一个使用 :class:`ABCMeta` 作为元类的工具类。抽象类可以通过简单地从 :class:`ABC` "
67+ "派生来创建,这就避免了在某些情况下会令人混淆的元类使用,例如:"
5968
6069#: ../../library/abc.rst:41
6170msgid ""
@@ -65,10 +74,12 @@ msgid ""
6574"One may also define an abstract base class by passing the metaclass keyword "
6675"and using :class:`ABCMeta` directly, for example::"
6776msgstr ""
77+ "注意 :class:`ABC` 的类型仍然是 :class:`ABCMeta`,因此继承 :class:`ABC` "
78+ "仍然需要关注元类使用中的注意事项,比如多重继承可能会导致元类冲突。当然你也可以直接使用 :class:`ABCMeta` 作为元类来定义抽象类,例如:"
6879
6980#: ../../library/abc.rst:57
7081msgid "Metaclass for defining Abstract Base Classes (ABCs)."
71- msgstr ""
82+ msgstr "定义抽象类(ABC)时的元类。 "
7283
7384#: ../../library/abc.rst:59
7485msgid ""
0 commit comments