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

Skip to content

Commit 562ddc1

Browse files
[po] auto sync
1 parent a3c8ccc commit 562ddc1

3 files changed

Lines changed: 21 additions & 10 deletions

File tree

faq/programming.po

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Siyuan Xu <[email protected]>, 2019
1212
# Meng Du <[email protected]>, 2019
1313
# ppcfish <[email protected]>, 2019
14-
# Freesand Leo <[email protected]>, 2020
14+
# Freesand Leo <[email protected]>, 2021
1515
#
1616
#, fuzzy
1717
msgid ""
@@ -20,7 +20,7 @@ msgstr ""
2020
"Report-Msgid-Bugs-To: \n"
2121
"POT-Creation-Date: 2021-04-04 05:56+0000\n"
2222
"PO-Revision-Date: 2017-02-16 17:43+0000\n"
23-
"Last-Translator: Freesand Leo <[email protected]>, 2020\n"
23+
"Last-Translator: Freesand Leo <[email protected]>, 2021\n"
2424
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2525
"MIME-Version: 1.0\n"
2626
"Content-Type: text/plain; charset=UTF-8\n"
@@ -2085,13 +2085,13 @@ msgstr ""
20852085

20862086
#: ../../faq/programming.rst:1706
20872087
msgid "When can I rely on identity tests with the *is* operator?"
2088-
msgstr ""
2088+
msgstr "我可以在在何时通过 *is* 运算符进行标识号检测?"
20892089

20902090
#: ../../faq/programming.rst:1708
20912091
msgid ""
20922092
"The ``is`` operator tests for object identity. The test ``a is b`` is "
20932093
"equivalent to ``id(a) == id(b)``."
2094-
msgstr ""
2094+
msgstr "``is`` 运算符可检测对象的标识号。 检测 ``a is b`` 等价于 ``id(a) == id(b)``。"
20952095

20962096
#: ../../faq/programming.rst:1711
20972097
msgid ""
@@ -2100,33 +2100,38 @@ msgid ""
21002100
" usually faster than equality tests. And unlike equality tests, identity "
21012101
"tests are guaranteed to return a boolean ``True`` or ``False``."
21022102
msgstr ""
2103+
"标识号检测最重要的特性是一个对象自身的标识号总是相同,``a is a`` 总是返回 ``True``。 标识号检测通常比相等性检测更快。 "
2104+
"并且不同于相等性检测,标识号检测会保证返回一个布尔值 ``True`` 或 ``False``。"
21032105

21042106
#: ../../faq/programming.rst:1716
21052107
msgid ""
21062108
"However, identity tests can *only* be substituted for equality tests when "
21072109
"object identity is assured. Generally, there are three circumstances where "
21082110
"identity is guaranteed:"
2109-
msgstr ""
2111+
msgstr "但是,标识号检测 *只能* 在确定对象标识的场景下替代相等性检测。 一般来说,在以下三种情况下对象标识是确定的:"
21102112

21112113
#: ../../faq/programming.rst:1720
21122114
msgid ""
21132115
"1) Assignments create new names but do not change object identity. After "
21142116
"the assignment ``new = old``, it is guaranteed that ``new is old``."
2115-
msgstr ""
2117+
msgstr "1) 赋值创建了新的名称但没有改变对象标识。 在赋值操作 ``new = old`` 之后,可以保证 ``new is old``。"
21162118

21172119
#: ../../faq/programming.rst:1723
21182120
msgid ""
21192121
"2) Putting an object in a container that stores object references does not "
21202122
"change object identity. After the list assignment ``s[0] = x``, it is "
21212123
"guaranteed that ``s[0] is x``."
21222124
msgstr ""
2125+
"2) 将一个对象放入存储对象引用的容器不会改变对象标识。 在列表赋值操作 ``s[0] = x`` 之后,可以保证 ``s[0] is x``。"
21232126

21242127
#: ../../faq/programming.rst:1727
21252128
msgid ""
21262129
"3) If an object is a singleton, it means that only one instance of that "
21272130
"object can exist. After the assignments ``a = None`` and ``b = None``, it "
21282131
"is guaranteed that ``a is b`` because ``None`` is a singleton."
21292132
msgstr ""
2133+
"3) 如果对象是一个单例,意味着该对象只能存在一个实例。 在赋值操作 ``a = None`` 和 ``b = None`` 之后,可以保证 ``a "
2134+
"is b``,因为 ``None`` 是单例对象。"
21302135

21312136
#: ../../faq/programming.rst:1731
21322137
msgid ""
@@ -2135,16 +2140,18 @@ msgid ""
21352140
"check constants such as :class:`int` and :class:`str` which aren't "
21362141
"guaranteed to be singletons::"
21372142
msgstr ""
2143+
"在其他大多数情况下,都不建议使用标识号检测而应使用相等性检测。 特别地,标识号检测不应被用于检测常量值例如 :class:`int` 和 "
2144+
":class:`str`,因为它们并不保证是单例对象::"
21382145

21392146
#: ../../faq/programming.rst:1748
21402147
msgid "Likewise, new instances of mutable containers are never identical::"
2141-
msgstr ""
2148+
msgstr "同样地,可变容器的新实例标识号一定不会相同::"
21422149

21432150
#: ../../faq/programming.rst:1755
21442151
msgid ""
21452152
"In the standard library code, you will see several common patterns for "
21462153
"correctly using identity tests:"
2147-
msgstr ""
2154+
msgstr "在标准库代码中,你将看到一些正确使用标识号检测的常见范式:"
21482155

21492156
#: ../../faq/programming.rst:1758
21502157
msgid ""
@@ -2153,6 +2160,8 @@ msgid ""
21532160
"confusion with other objects that may have boolean values that evaluate to "
21542161
"false."
21552162
msgstr ""
2163+
"1) 如 :pep:`8` 所推荐的,标识号检测是 ``None`` 值检测的推荐方式。 "
2164+
"在代码中这样的写法看起来像是自然的英文并可以避免与其他可能具有会被解析为假值的布尔值的对象相混淆。"
21562165

21572166
#: ../../faq/programming.rst:1762
21582167
msgid ""

howto/descriptor.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ msgstr "现在,新类会记录对 *name* 和 *age* 二者的访问:"
256256

257257
#: ../../howto/descriptor.rst:284
258258
msgid "The two *Person* instances contain only the private names:"
259-
msgstr ""
259+
msgstr "这两个 *Person* 实例仅包含私有名称:"
260260

261261
#: ../../howto/descriptor.rst:295
262262
msgid "Closing thoughts"
@@ -928,7 +928,7 @@ msgstr "如果你曾好奇常规方法中的 *self* 或类方法中的 *cls* 是
928928

929929
#: ../../howto/descriptor.rst:1167
930930
msgid "Kinds of methods"
931-
msgstr ""
931+
msgstr "方法的种类"
932932

933933
#: ../../howto/descriptor.rst:1169
934934
msgid ""

tutorial/datastructures.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,8 @@ msgid ""
572572
" whether two objects are really the same object. All comparison operators "
573573
"have the same priority, which is lower than that of all numerical operators."
574574
msgstr ""
575+
"比较运算符 ``in`` 和 ``not in`` 校验一个值是否在(或不在)一个序列里。 运算符 ``is`` 和 ``is not`` "
576+
"比较两个对象是否确定为同一个对象。 所有比较运算符都有相同的优先级,此优先级低于所有数值运算符。"
575577

576578
#: ../../tutorial/datastructures.rst:667
577579
msgid ""

0 commit comments

Comments
 (0)