Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 43f0d81

Browse files
[po] auto sync
1 parent 72c0408 commit 43f0d81

2 files changed

Lines changed: 55 additions & 22 deletions

File tree

c-api/slice.po

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ msgstr "切片对象"
3030
msgid ""
3131
"The type object for slice objects. This is the same as :class:`slice` in "
3232
"the Python layer."
33-
msgstr "slice 对象的类型对象。 它与 Python 层面的 :class:`slice` 是相同的对象。"
33+
msgstr "切片对象的类型对象。 它与 Python 层面的 :class:`slice` 是相同的对象。"
3434

3535
#: ../../c-api/slice.rst:17
3636
msgid "Return true if *ob* is a slice object; *ob* must not be ``NULL``."
37-
msgstr "如果 *ob* 是一个 slice 对象则返回真值;*ob* 必须不为 ``NULL``。"
37+
msgstr "如果 *ob* 是一个切片对象则返回真值;*ob* 必须不为 ``NULL``。"
3838

3939
#: ../../c-api/slice.rst:22
4040
msgid ""
@@ -44,7 +44,7 @@ msgid ""
4444
"``None`` will be used for the corresponding attribute. Return ``NULL`` if "
4545
"the new object could not be allocated."
4646
msgstr ""
47-
"返回一个具有给定值的新 slice 对象。 *start*, *stop* 和 *step* 形参会被用作 slice 对象相应名称的属性的值。 "
47+
"返回一个具有给定值的新切片对象。 *start*, *stop* 和 *step* 形参会被用作 slice 对象相应名称的属性的值。 "
4848
"这些值中的任何一个都可以为 ``NULL``,在这种情况下将使用 ``None`` 作为对应属性的值。 如果新对象无法被分配则返回 ``NULL``。"
4949

5050
#: ../../c-api/slice.rst:31
@@ -53,7 +53,7 @@ msgid ""
5353
"assuming a sequence of length *length*. Treats indices greater than *length*"
5454
" as errors."
5555
msgstr ""
56-
"从 slice 对象 *slice* 提取 start, stop 和 step 索引号,将序列长度视为 *length*。 大于 *length* "
56+
"从切片对象 *slice* 提取 start, stop 和 step 索引号,将序列长度视为 *length*。 大于 *length* "
5757
"的序列号将被当作错误。"
5858

5959
#: ../../c-api/slice.rst:35
@@ -82,21 +82,25 @@ msgid ""
8282
" bounds indices are clipped in a manner consistent with the handling of "
8383
"normal slices."
8484
msgstr ""
85+
":c:func:`PySlice_GetIndices` 的可用替代。 从切片对象 *slice* 提取 start, stop 和 step "
86+
"索引号,将序列长度视为 *length*,并将切片的长度保存在 *slicelength* 中,超出范围的索引号会以与普通切片一致的方式进行剪切。"
8587

8688
#: ../../c-api/slice.rst:54
8789
msgid "Returns ``0`` on success and ``-1`` on error with exception set."
88-
msgstr ""
90+
msgstr "成功时返回 ``0``,出错时返回 ``-1`` 并且不设置异常。"
8991

9092
#: ../../c-api/slice.rst:57
9193
msgid ""
9294
"This function is considered not safe for resizable sequences. Its invocation"
9395
" should be replaced by a combination of :c:func:`PySlice_Unpack` and "
9496
":c:func:`PySlice_AdjustIndices` where ::"
9597
msgstr ""
98+
"此函数对于可变大小序列来说是不安全的。 对它的调用应被替换为 :c:func:`PySlice_Unpack` 和 "
99+
":c:func:`PySlice_AdjustIndices` 的组合,其中 ::"
96100

97101
#: ../../c-api/slice.rst:65
98102
msgid "is replaced by ::"
99-
msgstr ""
103+
msgstr "会被替换为 ::"
100104

101105
#: ../../c-api/slice.rst:76
102106
msgid ""
@@ -106,13 +110,19 @@ msgid ""
106110
":c:func:`!PySlice_Unpack` and :c:func:`!PySlice_AdjustIndices`. Arguments "
107111
"*start*, *stop* and *step* are evaluated more than once."
108112
msgstr ""
113+
"如果 ``Py_LIMITED_API`` 未设置或设置为 ``0x03050400`` 与 ``0x03060000`` 之间的值(不包括边界)或 "
114+
"``0x03060100`` 或更大则 :c:func:`!PySlice_GetIndicesEx` 会被实现为一个使用 "
115+
":c:func:`!PySlice_Unpack` 和 :c:func:`!PySlice_AdjustIndices` 的宏。 参数 *start*,"
116+
" *stop* 和 *step* 会被多被求值。"
109117

110118
#: ../../c-api/slice.rst:83
111119
msgid ""
112120
"If ``Py_LIMITED_API`` is set to the value less than ``0x03050400`` or "
113121
"between ``0x03060000`` and ``0x03060100`` (not including) "
114122
":c:func:`!PySlice_GetIndicesEx` is a deprecated function."
115123
msgstr ""
124+
"如果 ``Py_LIMITED_API`` 设置为小于 ``0x03050400`` 或 ``0x03060000`` 与 ``0x03060100``"
125+
" 之间的值(不包括边界)则 :c:func:`!PySlice_GetIndicesEx` 为已弃用的函数。"
116126

117127
#: ../../c-api/slice.rst:91
118128
msgid ""
@@ -122,31 +132,37 @@ msgid ""
122132
"``PY_SSIZE_T_MIN`` to ``PY_SSIZE_T_MIN``, and silently boost the step values"
123133
" less than ``-PY_SSIZE_T_MAX`` to ``-PY_SSIZE_T_MAX``."
124134
msgstr ""
135+
"从切片对象中将 start, stop 和 step 数据成员提取为 C 整数。 会静默地将大于 ``PY_SSIZE_T_MAX`` 的值减小为 "
136+
"``PY_SSIZE_T_MAX``,静默地将小于 ``PY_SSIZE_T_MIN`` 的 start 和 stop 值增大为 "
137+
"``PY_SSIZE_T_MIN``,并静默地将小于 ``-PY_SSIZE_T_MAX`` 的 step 值增大为 "
138+
"``-PY_SSIZE_T_MAX``。"
125139

126140
#: ../../c-api/slice.rst:97
127141
msgid "Return ``-1`` on error, ``0`` on success."
128-
msgstr ""
142+
msgstr "出错时返回 ``-1``,成功时返回 ``0``。"
129143

130144
#: ../../c-api/slice.rst:104
131145
msgid ""
132146
"Adjust start/end slice indices assuming a sequence of the specified length. "
133147
"Out of bounds indices are clipped in a manner consistent with the handling "
134148
"of normal slices."
135-
msgstr ""
149+
msgstr "将 start/end 切片索引号根据指定的序列长度进行调整。 超出范围的索引号会以与普通切片一致的方式进行剪切。"
136150

137151
#: ../../c-api/slice.rst:108
138152
msgid ""
139153
"Return the length of the slice. Always successful. Doesn't call Python "
140154
"code."
141-
msgstr ""
155+
msgstr "返回切片的长度。 此操作总是会成功。 不会调用 Python 代码。"
142156

143157
#: ../../c-api/slice.rst:115
144158
msgid "Ellipsis Object"
145-
msgstr ""
159+
msgstr "Ellipsis 对象"
146160

147161
#: ../../c-api/slice.rst:120
148162
msgid ""
149163
"The Python ``Ellipsis`` object. This object has no methods. It needs to be"
150164
" treated just like any other object with respect to reference counts. Like "
151165
":c:data:`Py_None` it is a singleton object."
152166
msgstr ""
167+
"Python 的 ``Ellipsis`` 对象。 该对象没有任何方法。 它必须以与任何其他对象一样的方式遵循引用计数。 它与 "
168+
":c:data:`Py_None` 一样属于单例对象。"

library/abc.po

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# Jerry Chen <[email protected]>, 2017
88
# cissoid <[email protected]>, 2018
99
# Jarry Shaw <[email protected]>, 2018
10-
# Freesand Leo <[email protected]>, 2018
1110
# wenhui <[email protected]>, 2019
1211
# Meng Du <[email protected]>, 2019
12+
# Freesand Leo <[email protected]>, 2020
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -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."
184184
msgstr ""
185+
"这里定义的 :meth:`__subclasshook__` 类方法指明了任何在其 :attr:`~object.__dict__` (或在其通过 "
186+
":attr:`~class.__mro__` 列表访问的基类) 中具有 :meth:`~iterator.__iter__` 方法的类也都会被视为 "
187+
"``MyIterable``。"
185188

186189
#: ../../library/abc.rst:154
187190
msgid ""
@@ -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."
193196
msgstr ""
197+
"最后,末尾行使得 ``Foo`` 成为 ``MyIterable`` 的一个虚子类,即使它没有定义 :meth:`~iterator.__iter__`"
198+
" 方法(它使用了以 :meth:`__len__` 和 :meth:`__getitem__` 术语定义的旧式可迭代对象协议)。 请注意这将不会使 "
199+
"``get_iterator`` 成为 ``Foo`` 的一个可用方法,它是被另外提供的。"
194200

195201
#: ../../library/abc.rst:163
196202
msgid "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."
223229
msgstr ""
230+
"不支持动态添加抽象方法到一个类,或试图在方法或类被创建后修改其抽象状态等操作。 :func:`abstractmethod` "
231+
"只会影响使用常规继承所派生的子类;通过 ABC 的 :meth:`register` 方法注册的“虚子类”不会受到影响。"
224232

225233
#: ../../library/abc.rst:182
226234
msgid ""
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
233241
msgid ""
@@ -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::"
239247
msgstr ""
248+
"为了能正确地与抽象基类机制实现互操作,描述符必须使用 :attr:`__isabstractmethod__` 将自身标识为抽象的。 "
249+
"通常,如果被用于组成描述符的任何方法都是抽象的则此属性应当为 ``True``。 例如,Python 的内置 :class:`property` "
250+
"所做的就等价于::"
240251

241252
#: ../../library/abc.rst:231
242253
msgid ""
@@ -246,78 +257,84 @@ msgid ""
246257
"point for a super-call in a framework that uses cooperative multiple-"
247258
"inheritance."
248259
msgstr ""
260+
"不同于 Java 抽象方法,这些抽象方法可能具有一个实现。 这个实现可在重载它的类上通过 :func:`super` 机制来调用。 "
261+
"这在使用协作多重继承的框架中可以被用作超调用的一个端点。"
249262

250263
#: ../../library/abc.rst:239
251264
msgid "The :mod:`abc` module also supports the following legacy decorators:"
252-
msgstr ""
265+
msgstr ":mod:`abc` 模块还支持下列旧式装饰器:"
253266

254267
#: ../../library/abc.rst:244
255268
msgid ""
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
261274
msgid ""
262275
"A subclass of the built-in :func:`classmethod`, indicating an abstract "
263276
"classmethod. Otherwise it is similar to :func:`abstractmethod`."
264277
msgstr ""
278+
"内置 :func:`classmethod` 的子类,指明一个抽象类方法。 在其他方面它都类似于 :func:`abstractmethod`。"
265279

266280
#: ../../library/abc.rst:251
267281
msgid ""
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
273287
msgid ""
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
279293
msgid ""
280294
"A subclass of the built-in :func:`staticmethod`, indicating an abstract "
281295
"staticmethod. Otherwise it is similar to :func:`abstractmethod`."
282296
msgstr ""
297+
"内置 :func:`staticmethod` 的子类,指明一个抽象静态方法。 在其他方面它都类似于 :func:`abstractmethod`。"
283298

284299
#: ../../library/abc.rst:272
285300
msgid ""
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
291306
msgid ""
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."
295310
msgstr ""
311+
"现在可以让 :class:`property`, :meth:`property.getter`, :meth:`property.setter` 和 "
312+
":meth:`property.deleter` 配合 :func:`abstractmethod` 使用,使得此装饰器变得冗余。"
296313

297314
#: ../../library/abc.rst:290
298315
msgid ""
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
304321
msgid ""
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
310327
msgid ""
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
317334
msgid ""
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
323340
msgid "The :mod:`abc` module also provides the following functions:"

0 commit comments

Comments
 (0)