77# Jerry Chen <[email protected] >, 201788# cissoid <[email protected] >, 201899# Jarry Shaw <[email protected] >, 201810- # Freesand Leo <[email protected] >, 20181110# wenhui <[email protected] >, 20191211# Meng Du <[email protected] >, 201912+ # Freesand Leo <[email protected] >, 20201313#
1414#, fuzzy
1515msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818"Report-Msgid-Bugs-To : \n "
1919"POT-Creation-Date : 2020-05-31 09:25+0000\n "
2020"PO-Revision-Date : 2017-02-16 17:47+0000\n "
21- "Last-Translator : Meng Du <alphanow@gmail .com>, 2019 \n "
21+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2020 \n "
2222"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2323"MIME-Version : 1.0\n "
2424"Content-Type : text/plain; charset=UTF-8\n "
@@ -182,6 +182,9 @@ msgid ""
182182":attr:`~object.__dict__` (or in that of one of its base classes, accessed "
183183"via the :attr:`~class.__mro__` list) is considered a ``MyIterable`` too."
184184msgstr ""
185+ "这里定义的 :meth:`__subclasshook__` 类方法指明了任何在其 :attr:`~object.__dict__` (或在其通过 "
186+ ":attr:`~class.__mro__` 列表访问的基类) 中具有 :meth:`~iterator.__iter__` 方法的类也都会被视为 "
187+ "``MyIterable``。"
185188
186189#: ../../library/abc.rst:154
187190msgid ""
@@ -191,6 +194,9 @@ msgid ""
191194":meth:`__getitem__`). Note that this will not make ``get_iterator`` "
192195"available as a method of ``Foo``, so it is provided separately."
193196msgstr ""
197+ "最后,末尾行使得 ``Foo`` 成为 ``MyIterable`` 的一个虚子类,即使它没有定义 :meth:`~iterator.__iter__`"
198+ " 方法(它使用了以 :meth:`__len__` 和 :meth:`__getitem__` 术语定义的旧式可迭代对象协议)。 请注意这将不会使 "
199+ "``get_iterator`` 成为 ``Foo`` 的一个可用方法,它是被另外提供的。"
194200
195201#: ../../library/abc.rst:163
196202msgid "The :mod:`abc` module also provides the following decorator:"
@@ -221,13 +227,15 @@ msgid ""
221227" regular inheritance; \" virtual subclasses\" registered with the ABC's "
222228":meth:`register` method are not affected."
223229msgstr ""
230+ "不支持动态添加抽象方法到一个类,或试图在方法或类被创建后修改其抽象状态等操作。 :func:`abstractmethod` "
231+ "只会影响使用常规继承所派生的子类;通过 ABC 的 :meth:`register` 方法注册的“虚子类”不会受到影响。"
224232
225233#: ../../library/abc.rst:182
226234msgid ""
227235"When :func:`abstractmethod` is applied in combination with other method "
228236"descriptors, it should be applied as the innermost decorator, as shown in "
229237"the following usage examples::"
230- msgstr ""
238+ msgstr "当 :func:`abstractmethod` 与其他方法描述符配合应用时,它应当被应用为最内层的装饰器,如以下用法示例所示:: "
231239
232240#: ../../library/abc.rst:216
233241msgid ""
@@ -237,6 +245,9 @@ msgid ""
237245"if any of the methods used to compose the descriptor are abstract. For "
238246"example, Python's built-in :class:`property` does the equivalent of::"
239247msgstr ""
248+ "为了能正确地与抽象基类机制实现互操作,描述符必须使用 :attr:`__isabstractmethod__` 将自身标识为抽象的。 "
249+ "通常,如果被用于组成描述符的任何方法都是抽象的则此属性应当为 ``True``。 例如,Python 的内置 :class:`property` "
250+ "所做的就等价于::"
240251
241252#: ../../library/abc.rst:231
242253msgid ""
@@ -246,78 +257,84 @@ msgid ""
246257"point for a super-call in a framework that uses cooperative multiple-"
247258"inheritance."
248259msgstr ""
260+ "不同于 Java 抽象方法,这些抽象方法可能具有一个实现。 这个实现可在重载它的类上通过 :func:`super` 机制来调用。 "
261+ "这在使用协作多重继承的框架中可以被用作超调用的一个端点。"
249262
250263#: ../../library/abc.rst:239
251264msgid "The :mod:`abc` module also supports the following legacy decorators:"
252- msgstr ""
265+ msgstr ":mod:`abc` 模块还支持下列旧式装饰器: "
253266
254267#: ../../library/abc.rst:244
255268msgid ""
256269"It is now possible to use :class:`classmethod` with :func:`abstractmethod`, "
257270"making this decorator redundant."
258- msgstr ""
271+ msgstr "现在可以让 :class:`classmethod` 配合 :func:`abstractmethod` 使用,使得此装饰器变得冗余。 "
259272
260273#: ../../library/abc.rst:248
261274msgid ""
262275"A subclass of the built-in :func:`classmethod`, indicating an abstract "
263276"classmethod. Otherwise it is similar to :func:`abstractmethod`."
264277msgstr ""
278+ "内置 :func:`classmethod` 的子类,指明一个抽象类方法。 在其他方面它都类似于 :func:`abstractmethod`。"
265279
266280#: ../../library/abc.rst:251
267281msgid ""
268282"This special case is deprecated, as the :func:`classmethod` decorator is now"
269283" correctly identified as abstract when applied to an abstract method::"
270- msgstr ""
284+ msgstr "这个特例已被弃用,因为现在当 :func:`classmethod` 装饰器应用于抽象方法时它会被正确地标识为抽象的:: "
271285
272286#: ../../library/abc.rst:265
273287msgid ""
274288"It is now possible to use :class:`staticmethod` with :func:`abstractmethod`,"
275289" making this decorator redundant."
276- msgstr ""
290+ msgstr "现在可以让 :class:`staticmethod` 配合 :func:`abstractmethod` 使用,使得此装饰器变得冗余。 "
277291
278292#: ../../library/abc.rst:269
279293msgid ""
280294"A subclass of the built-in :func:`staticmethod`, indicating an abstract "
281295"staticmethod. Otherwise it is similar to :func:`abstractmethod`."
282296msgstr ""
297+ "内置 :func:`staticmethod` 的子类,指明一个抽象静态方法。 在其他方面它都类似于 :func:`abstractmethod`。"
283298
284299#: ../../library/abc.rst:272
285300msgid ""
286301"This special case is deprecated, as the :func:`staticmethod` decorator is "
287302"now correctly identified as abstract when applied to an abstract method::"
288- msgstr ""
303+ msgstr "这个特例已被弃用,因为现在当 :func:`staticmethod` 装饰器应用于抽象方法时它会被正确地标识为抽象的:: "
289304
290305#: ../../library/abc.rst:285
291306msgid ""
292307"It is now possible to use :class:`property`, :meth:`property.getter`, "
293308":meth:`property.setter` and :meth:`property.deleter` with "
294309":func:`abstractmethod`, making this decorator redundant."
295310msgstr ""
311+ "现在可以让 :class:`property`, :meth:`property.getter`, :meth:`property.setter` 和 "
312+ ":meth:`property.deleter` 配合 :func:`abstractmethod` 使用,使得此装饰器变得冗余。"
296313
297314#: ../../library/abc.rst:290
298315msgid ""
299316"A subclass of the built-in :func:`property`, indicating an abstract "
300317"property."
301- msgstr ""
318+ msgstr "内置 :func:`property` 的子类,指明一个抽象特性属性。 "
302319
303320#: ../../library/abc.rst:293
304321msgid ""
305322"This special case is deprecated, as the :func:`property` decorator is now "
306323"correctly identified as abstract when applied to an abstract method::"
307- msgstr ""
324+ msgstr "这个特例已被弃用,因为现在当 :func:`property` 装饰器应用于抽象方法时它会被正确地标识为抽象的:: "
308325
309326#: ../../library/abc.rst:303
310327msgid ""
311328"The above example defines a read-only property; you can also define a read-"
312329"write abstract property by appropriately marking one or more of the "
313330"underlying methods as abstract::"
314- msgstr ""
331+ msgstr "上面的例子定义了一个只读特征属性;你也可以通过适当地将一个或多个下层方法标记为抽象的来定义可读写的抽象特征属性:: "
315332
316333#: ../../library/abc.rst:317
317334msgid ""
318335"If only some components are abstract, only those components need to be "
319336"updated to create a concrete property in a subclass::"
320- msgstr ""
337+ msgstr "如果只有某些组件是抽象的,则只需更新那些组件即可在子类中创建具体的特征属性:: "
321338
322339#: ../../library/abc.rst:326
323340msgid "The :mod:`abc` module also provides the following functions:"
0 commit comments