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

Skip to content

Commit 51bf182

Browse files
[po] auto sync
1 parent 30a7633 commit 51bf182

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "89.31%", "updated_at": "2023-08-05T15:57:03Z"}
1+
{"translation": "89.31%", "updated_at": "2023-08-05T16:57:04Z"}

reference/datamodel.po

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,6 +2281,9 @@ msgid ""
22812281
":meth:`!__len__` nor :meth:`!__bool__`, all its instances are considered "
22822282
"true."
22832283
msgstr ""
2284+
"调用此方法以实现真值检测以及内置的 ``bool()`` 操作;应该返回 ``False`` 或 ``True``。 当未定义此方法时,则在定义了 "
2285+
":meth:`~object.__len__` 的情况下将调用它,如果其结果不为零则该对象将被视为具有真值。 如果一个类的 "
2286+
":meth:`!__len__` 或 :meth:`!__bool__` 均未定义,则其所有实例都将被视为具有真值。"
22842287

22852288
#: ../../reference/datamodel.rst:1606
22862289
msgid "Customizing attribute access"
@@ -3536,6 +3539,8 @@ msgid ""
35363539
"define a :meth:`~object.__bool__` method and whose :meth:`!__len__` method "
35373540
"returns zero is considered to be false in a Boolean context."
35383541
msgstr ""
3542+
"调用此方法以实现内置函数 :func:`len`。 应该返回对象的长度,以一个 ``>=`` 0 的整数表示。 此外,如果一个对象未定义 "
3543+
":meth:`~object.__bool__` 方法而其 :meth:`!__len__` 方法返回值为零则它在布尔运算中将被视为具有假值。"
35393544

35403545
#: ../../reference/datamodel.rst:2502
35413546
msgid ""
@@ -3545,6 +3550,9 @@ msgid ""
35453550
":exc:`!OverflowError` by truth value testing, an object must define a "
35463551
":meth:`~object.__bool__` method."
35473552
msgstr ""
3553+
"在 CPython 中,要求长度最大只能为 :data:`sys.maxsize`。 如果长度大于 :data:`!sys.maxsize` 则某些特性"
3554+
" (如 :func:`len`) 可能会引发 :exc:`OverflowError`。 要防止真值测试引发 "
3555+
":exc:`!OverflowError`,对象必须定义 :meth:`~object.__bool__` 方法。"
35483556

35493557
#: ../../reference/datamodel.rst:2511
35503558
msgid ""

0 commit comments

Comments
 (0)