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

Skip to content

Commit b527db6

Browse files
[po] auto sync
1 parent e6d999f commit b527db6

4 files changed

Lines changed: 6778 additions & 6773 deletions

File tree

faq/programming.po

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2103,13 +2103,13 @@ msgstr ""
21032103

21042104
#: ../../faq/programming.rst:1742
21052105
msgid "When can I rely on identity tests with the *is* operator?"
2106-
msgstr "什么情况下可以依靠*is*运算符对标识符进行检测? "
2106+
msgstr "什么情况下可以依靠*is*运算符进行对象的身份相等性测试? "
21072107

21082108
#: ../../faq/programming.rst:1744
21092109
msgid ""
21102110
"The ``is`` operator tests for object identity. The test ``a is b`` is "
21112111
"equivalent to ``id(a) == id(b)``."
2112-
msgstr "``is`` 运算符可检测对象的标识号。 检测 ``a is b`` 等价于 ``id(a) == id(b)``。"
2112+
msgstr "``is`` 运算符可用于测试对象的身份相等性。``a is b`` 等价于 ``id(a) == id(b)``。"
21132113

21142114
#: ../../faq/programming.rst:1747
21152115
msgid ""
@@ -2118,38 +2118,37 @@ msgid ""
21182118
" usually faster than equality tests. And unlike equality tests, identity "
21192119
"tests are guaranteed to return a boolean ``True`` or ``False``."
21202120
msgstr ""
2121-
"标识号检测最重要的特性是一个对象自身的标识号总是相同,``a is a`` 总是返回 ``True``。 标识号检测通常比相等性检测更快。 "
2122-
"并且不同于相等性检测,标识号检测会保证返回一个布尔值 ``True````False``。"
2121+
"身份相等性最重要的特性就是对象总是等同于自身,``a is a`` "
2122+
"一定返回``True``。身份相等性测试的速度通常比相等性测试要快。而且与相等性测试不一样,身份相等性测试会确保返回布尔值``True````False``。"
21232123

21242124
#: ../../faq/programming.rst:1752
21252125
msgid ""
21262126
"However, identity tests can *only* be substituted for equality tests when "
21272127
"object identity is assured. Generally, there are three circumstances where "
21282128
"identity is guaranteed:"
2129-
msgstr "但是,标识号检测 *只能* 在确定对象标识的场景下替代相等性检测。 一般来说,在以下三种情况下对象标识是确定的:"
2129+
msgstr "但是,身份相等性测试*只能*在对象身份确定的场景下才可替代相等性测试。一般来说,有以下3种情况对象身份是可以确定的:"
21302130

21312131
#: ../../faq/programming.rst:1756
21322132
msgid ""
21332133
"1) Assignments create new names but do not change object identity. After "
21342134
"the assignment ``new = old``, it is guaranteed that ``new is old``."
2135-
msgstr "1) 赋值创建了新的名称但没有改变对象标识。 在赋值操作 ``new = old`` 之后,可以保证 ``new is old``。"
2135+
msgstr "1) 赋值操作创建了新的名称但没有改变对象身份。在赋值操作``new = old``之后,可以保证``new is old``。"
21362136

21372137
#: ../../faq/programming.rst:1759
21382138
msgid ""
21392139
"2) Putting an object in a container that stores object references does not "
21402140
"change object identity. After the list assignment ``s[0] = x``, it is "
21412141
"guaranteed that ``s[0] is x``."
2142-
msgstr ""
2143-
"2) 将一个对象放入存储对象引用的容器不会改变对象标识。 在列表赋值操作 ``s[0] = x`` 之后,可以保证 ``s[0] is x``。"
2142+
msgstr "2) 将对象置入存放对象引用的容器,对象身份不会改变。在列表赋值操作``s[0] = x``之后,可以保证 ``s[0] is x``。"
21442143

21452144
#: ../../faq/programming.rst:1763
21462145
msgid ""
21472146
"3) If an object is a singleton, it means that only one instance of that "
21482147
"object can exist. After the assignments ``a = None`` and ``b = None``, it "
21492148
"is guaranteed that ``a is b`` because ``None`` is a singleton."
21502149
msgstr ""
2151-
"3) 如果对象是一个单例,意味着该对象只能存在一个实例。 在赋值操作 ``a = None````b = None`` 之后,可以保证 ``a "
2152-
"is b``,因为 ``None`` 是单例对象。"
2150+
"3) 单例对象,也即该对象只能存在一个实例。在赋值操作``a = None````b = None`` 之后,可以保证 ``a is "
2151+
"b``,因为``None``是单例对象。"
21532152

21542153
#: ../../faq/programming.rst:1767
21552154
msgid ""
@@ -2158,18 +2157,18 @@ msgid ""
21582157
"check constants such as :class:`int` and :class:`str` which aren't "
21592158
"guaranteed to be singletons::"
21602159
msgstr ""
2161-
"在其他大多数情况下,都不建议使用标识号检测而应使用相等性检测。 特别地,标识号检测不应被用于检测常量值例如 :class:`int` 和 "
2162-
":class:`str`,因为它们并不保证是单例对象::"
2160+
"其他大多数情况下,都不建议使用身份相等性测试,而应采用相等性测试。尤其是不应将身份相等性测试用于检测常量值,例如 :class:`int` 和 "
2161+
":class:`str`,因为他们并不一定是单例对象:"
21632162

21642163
#: ../../faq/programming.rst:1784
21652164
msgid "Likewise, new instances of mutable containers are never identical::"
2166-
msgstr "同样地,可变容器的新实例标识号一定不会相同::"
2165+
msgstr "同样地,可变容器的新实例,对象身份一定不同:"
21672166

21682167
#: ../../faq/programming.rst:1791
21692168
msgid ""
21702169
"In the standard library code, you will see several common patterns for "
21712170
"correctly using identity tests:"
2172-
msgstr "在标准库代码中,你将看到一些正确使用标识号检测的常见范式:"
2171+
msgstr "在标准库代码中,给出了一些正确使用对象身份测试的常见模式:"
21732172

21742173
#: ../../faq/programming.rst:1794
21752174
msgid ""
@@ -2178,8 +2177,9 @@ msgid ""
21782177
"confusion with other objects that may have boolean values that evaluate to "
21792178
"false."
21802179
msgstr ""
2181-
"1) 如 :pep:`8` 所推荐的,标识号检测是 ``None`` 值检测的推荐方式。 "
2182-
"在代码中这样的写法看起来像是自然的英文并可以避免与其他可能具有会被解析为假值的布尔值的对象相混淆。"
2180+
"1) 正如 :pep:`8` "
2181+
"所推荐的,对象身份测试是``None``值的推荐检测方式。这样的代码读起来就像自然的英文,并可以避免与其他可能为布尔值且计算结果为 False "
2182+
"的对象相混淆。"
21832183

21842184
#: ../../faq/programming.rst:1798
21852185
msgid ""

library/os.po

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ msgid ""
2727
msgstr ""
2828
"Project-Id-Version: Python 3.9\n"
2929
"Report-Msgid-Bugs-To: \n"
30-
"POT-Creation-Date: 2021-05-12 06:19+0000\n"
30+
"POT-Creation-Date: 2021-05-17 06:23+0000\n"
3131
"PO-Revision-Date: 2017-02-16 23:20+0000\n"
3232
"Last-Translator: Freesand Leo <[email protected]>, 2021\n"
3333
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -5479,11 +5479,9 @@ msgstr "返回 PID 为 *pid* 的进程的调度策略。*pid* 为 0 指的是调
54795479

54805480
#: ../../library/os.rst:4392
54815481
msgid ""
5482-
"Set a scheduling parameters for the process with PID *pid*. A *pid* of 0 "
5482+
"Set the scheduling parameters for the process with PID *pid*. A *pid* of 0 "
54835483
"means the calling process. *param* is a :class:`sched_param` instance."
54845484
msgstr ""
5485-
"设置 PID 为 *pid* 的进程的某个调度参数。*pid* 为 0 指的是调用本方法的进程。*param* 是一个 "
5486-
":class:`sched_param` 实例。"
54875485

54885486
#: ../../library/os.rst:4398
54895487
msgid ""

tutorial/classes.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ msgid ""
592592
"from the instance object and the argument list, and the function object is "
593593
"called with this new argument list."
594594
msgstr ""
595-
"如果你仍然无法理解方法的运作原理,那么查看实现细节可能会澄清问题。 当一个实例的非数据属性被引用时,将搜索实例所属的类。 "
595+
"如果你仍然无法理解方法的运作原理,那么查看实现细节可能会弄清楚问题。 当一个实例的非数据属性被引用时,将搜索实例所属的类。 "
596596
"如果被引用的属性名称表示一个有效的类属性中的函数对象,会通过打包(指向)查找到的实例对象和函数对象到一个抽象对象的方式来创建方法对象:这个抽象对象就是方法对象。"
597597
" 当附带参数列表调用方法对象时,将基于实例对象和参数列表构建一个新的参数列表,并使用这个新参数列表调用相应的函数对象。"
598598

@@ -718,7 +718,7 @@ msgid ""
718718
" good reasons why a method would want to reference its own class."
719719
msgstr ""
720720
"方法可以通过与普通函数相同的方式引用全局名称。 与方法相关联的全局作用域就是包含其定义的模块。 (类永远不会被作为全局作用域。) "
721-
"虽然我们很少会有充分的理由在方法中使用全局作用域,但全局作用域存在许多合法的使用场景:举个例子,导入到全局作用域的函数和模块可以被方法所使用,在其中定义的函数和类也一样。"
721+
"虽然我们很少会有充分的理由在方法中使用全局作用域,但全局作用域存在许多合理的使用场景:举个例子,导入到全局作用域的函数和模块可以被方法所使用,在其中定义的函数和类也一样。"
722722
" 通常,包含该方法的类本身是在全局作用域中定义的,而在下一节中我们将会发现为何方法需要引用其所属类的很好的理由。"
723723

724724
#: ../../tutorial/classes.rst:564

0 commit comments

Comments
 (0)