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

Skip to content

Commit 2671f9f

Browse files
[po] auto sync
1 parent 2148d35 commit 2671f9f

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

c-api/object.po

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ msgstr "计算并返回对象的哈希值 *o*。 失败时返回 ``-1``。这相
439439
msgid ""
440440
"The return type is now Py_hash_t. This is a signed integer the same size as"
441441
" Py_ssize_t."
442-
msgstr ""
442+
msgstr "现在的返回类型是 Py_hash_t。 这是一个带符号整数,与 Py_ssize_t 大小相同。"
443443

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

452454
#: ../../c-api/object.rst:367
453455
msgid ""
454456
"Returns ``1`` if the object *o* is considered to be true, and ``0`` "
455457
"otherwise. This is equivalent to the Python expression ``not not o``. On "
456458
"failure, return ``-1``."
457459
msgstr ""
460+
"如果对象 *o* 被认为是 true,则返回 ``1``,否则返回 ``0``。这相当于 Python 表达式 ``not not o``。 失败则返回"
461+
" ``-1``。"
458462

459463
#: ../../c-api/object.rst:374
460464
msgid ""
461465
"Returns ``0`` if the object *o* is considered to be true, and ``1`` "
462466
"otherwise. This is equivalent to the Python expression ``not o``. On "
463467
"failure, return ``-1``."
464468
msgstr ""
469+
"如果对象 *o* 被认为是 true,则返回 ``1``,否则返回 ``0``。这相当于 Python 表达式 ``not not o``。 失败则返回"
470+
" ``-1``。"
465471

466472
#: ../../c-api/object.rst:383
467473
msgid ""
@@ -487,6 +493,8 @@ msgid ""
487493
"``-1`` is returned. This is the equivalent to the Python expression "
488494
"``len(o)``."
489495
msgstr ""
496+
"返回对象 *o* 的长度。 如果对象 *o* 支持序列和映射协议,则返回序列长度。 出错时返回 ``-1``。这等同于 Python 表达式 "
497+
"``len(o)``。"
490498

491499
#: ../../c-api/object.rst:410
492500
msgid ""
@@ -500,7 +508,7 @@ msgstr ""
500508
msgid ""
501509
"Return element of *o* corresponding to the object *key* or ``NULL`` on "
502510
"failure. This is the equivalent of the Python expression ``o[key]``."
503-
msgstr ""
511+
msgstr "返回对象 *key* 对应的 *o* 元素,或在失败时返回 ``NULL``。这等同于 Python 表达式 ``o[key]``。"
504512

505513
#: ../../c-api/object.rst:426
506514
msgid ""
@@ -513,7 +521,7 @@ msgstr ""
513521
msgid ""
514522
"Remove the mapping for the object *key* from the object *o*. Return ``-1`` "
515523
"on failure. This is equivalent to the Python statement ``del o[key]``."
516-
msgstr ""
524+
msgstr "从对象 *o* 中移除对象 *key* 的映射。失败时返回 ``-1``。 这相当于 Python 语句 ``del o[key]``。"
517525

518526
#: ../../c-api/object.rst:439
519527
msgid ""
@@ -524,6 +532,9 @@ msgid ""
524532
"case, if no execution frame is active then ``NULL`` is returned but "
525533
":c:func:`PyErr_Occurred` will return false."
526534
msgstr ""
535+
"相当于 Python 表达式 ``dir(o)``,返回一个(可能为空)适合对象参数的字符串列表,如果出错则返回 ``NULL``。 如果参数为 "
536+
"``NULL``,类似 Python 的 ``dir()``,则返回当前 locals 的名字;这时如果没有活动的执行框架,则返回 ``NULL``,但"
537+
" :c:func:`PyErr_Occurred` 将返回 false。"
527538

528539
#: ../../c-api/object.rst:448
529540
msgid ""

0 commit comments

Comments
 (0)