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

Skip to content

Commit 1a6fb50

Browse files
[po] auto sync
1 parent d436456 commit 1a6fb50

1 file changed

Lines changed: 20 additions & 6 deletions

File tree

c-api/object.po

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# Translators:
77
# 汪心禾 <[email protected]>, 2021
8-
# Dai Xu <[email protected]>, 2021
98
# Freesand Leo <[email protected]>, 2021
9+
# Dai Xu <[email protected]>, 2021
1010
#
1111
#, fuzzy
1212
msgid ""
@@ -15,7 +15,7 @@ msgstr ""
1515
"Report-Msgid-Bugs-To: \n"
1616
"POT-Creation-Date: 2021-06-29 12:56+0000\n"
1717
"PO-Revision-Date: 2021-06-28 00:49+0000\n"
18-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2021\n"
18+
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2021\n"
1919
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2020
"MIME-Version: 1.0\n"
2121
"Content-Type: text/plain; charset=UTF-8\n"
@@ -277,51 +277,59 @@ msgid ""
277277
"*derived* is a subclass of *cls* if it is a direct or indirect subclass, "
278278
"i.e. contained in ``cls.__mro__``."
279279
msgstr ""
280+
"正如 :pep:`3119` 所述,如果 *cls* 带有 :meth:`~class.__subclasscheck__` "
281+
"方法,将会被调用以确定子类的状态。 否则,如果 *derived* 是个直接或间接子类,即包含在 ``cls.__mro__`` 中,那么它就是 "
282+
"*cls* 的一个子类。"
280283

281284
#: ../../c-api/object.rst:225
282285
msgid ""
283286
"Normally only class objects, i.e. instances of :class:`type` or a derived "
284287
"class, are considered classes. However, objects can override this by having"
285288
" a :attr:`__bases__` attribute (which must be a tuple of base classes)."
286289
msgstr ""
290+
"通常只有类对象才会被视为类,即 :class:`type` 或派生类的实例。然而,对象可以通过拥有 :attr:`__bases__` "
291+
"属性(必须是基类的元组)来覆盖这一点。"
287292

288293
#: ../../c-api/object.rst:232
289294
msgid ""
290295
"Return ``1`` if *inst* is an instance of the class *cls* or a subclass of "
291296
"*cls*, or ``0`` if not. On error, returns ``-1`` and sets an exception."
292297
msgstr ""
298+
"如果 *inst* 是 *cls* 类或其子类的实例,则返回 ``1``,如果不是则返回``0``。 如果出错则返回 ``-1`` 并设置一个异常。"
293299

294300
#: ../../c-api/object.rst:239
295301
msgid ""
296302
"If *cls* has a :meth:`~class.__instancecheck__` method, it will be called to"
297303
" determine the subclass status as described in :pep:`3119`. Otherwise, "
298304
"*inst* is an instance of *cls* if its class is a subclass of *cls*."
299305
msgstr ""
306+
"正如 :pep:`3119` 所述,如果 *cls* 带有 :meth:`~class.__subclasscheck__` "
307+
"方法,将会被调用以确定子类的状态。 否则,如果 *derived* 是 *cls* 的子类,那么它就是 *cls* 的一个实例。"
300308

301309
#: ../../c-api/object.rst:243
302310
msgid ""
303311
"An instance *inst* can override what is considered its class by having a "
304312
":attr:`__class__` attribute."
305-
msgstr ""
313+
msgstr "实例 *inst* 可以通过 :attr:`__class__` 属性来覆盖其所属类。"
306314

307315
#: ../../c-api/object.rst:246
308316
msgid ""
309317
"An object *cls* can override if it is considered a class, and what its base "
310318
"classes are, by having a :attr:`__bases__` attribute (which must be a tuple "
311319
"of base classes)."
312-
msgstr ""
320+
msgstr "对象 *cls* 是否被认作类,以及基类是什么,均可通过 :attr:`__bases__` 属性(必须是基类的元组)进行覆盖。"
313321

314322
#: ../../c-api/object.rst:255
315323
msgid ""
316324
"Compute and return the hash value of an object *o*. On failure, return "
317325
"``-1``. This is the equivalent of the Python expression ``hash(o)``."
318-
msgstr ""
326+
msgstr "计算并返回对象的哈希值 *o*。 失败时返回 ``-1``。这相当于 Python 表达式 ``hash(o)``。"
319327

320328
#: ../../c-api/object.rst:258
321329
msgid ""
322330
"The return type is now Py_hash_t. This is a signed integer the same size as"
323331
" Py_ssize_t."
324-
msgstr ""
332+
msgstr "现在的返回类型是 Py_hash_t。 这是一个带符号整数,与 Py_ssize_t 大小相同。"
325333

326334
#: ../../c-api/object.rst:265
327335
msgid ""
@@ -330,20 +338,26 @@ msgid ""
330338
"``tp_hash`` slot, allowing a type to explicitly indicate to the interpreter "
331339
"that it is not hashable."
332340
msgstr ""
341+
"设置一个 :exc:`TypeError` 表示 ``type(o)`` 是不可哈希的,并返回 ``-1`` 。该函数保存在 ``tp_hash`` "
342+
"槽中时会受到特别对待,允许某个类型向解释器显式表明它不可散列。"
333343

334344
#: ../../c-api/object.rst:273
335345
msgid ""
336346
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
337347
"otherwise. This is equivalent to the Python expression ``not not o``. On "
338348
"failure, return ``-1``."
339349
msgstr ""
350+
"如果对象 *o* 被认为是 true,则返回 ``1``,否则返回 ``0``。这相当于 Python 表达式 ``not not o``。 失败则返回"
351+
" ``-1``。"
340352

341353
#: ../../c-api/object.rst:280
342354
msgid ""
343355
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
344356
"otherwise. This is equivalent to the Python expression ``not o``. On "
345357
"failure, return ``-1``."
346358
msgstr ""
359+
"如果对象 *o* 被认为是 true,则返回 ``1``,否则返回 ``0``。这相当于 Python 表达式 ``not not o``。 失败则返回"
360+
" ``-1``。"
347361

348362
#: ../../c-api/object.rst:289
349363
msgid ""

0 commit comments

Comments
 (0)