77# Yinuo Huang <[email protected] >, 201888# ww song <[email protected] >, 201899# tom smith, 2019
10+ # Freesand Leo <[email protected] >, 20191011#
1112#, fuzzy
1213msgid ""
@@ -15,7 +16,7 @@ msgstr ""
1516"Report-Msgid-Bugs-To : \n "
1617"POT-Creation-Date : 2019-01-01 10:14+0900\n "
1718"PO-Revision-Date : 2017-02-16 17:42+0000\n "
18- "Last-Translator : tom smith , 2019\n "
19+ "
Last-Translator :
Freesand Leo <[email protected] > , 2019\n"
1920"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2021"MIME-Version : 1.0\n "
2122"Content-Type : text/plain; charset=UTF-8\n "
@@ -105,7 +106,7 @@ msgid ""
105106"and think it is a bug in Python. It's not. This has little to do with "
106107"Python, and much more to do with how the underlying platform handles "
107108"floating-point numbers."
108- msgstr "并且认为这是一个python中的bug 。其实不是这样。这与Python关系不大 ,而与底层平台如何处理浮点数字关系更大。"
109+ msgstr "并且认为这是 Python中的一个 bug 。其实不是这样。这与 Python 关系不大 ,而与底层平台如何处理浮点数字关系更大。"
109110
110111#: ../../faq/design.rst:63
111112msgid ""
@@ -117,9 +118,9 @@ msgid ""
117118"operations are concerned, Python behaves like many popular languages "
118119"including C and Java."
119120msgstr ""
120- "CPython中的 :class:`f` float`类型使用C语言的``double``类型进行存储。 "
121- ":class:`float` 对象的值是以固定的精度(通常为53位 )存储的二进制浮点数,由于Python使用C操作 ,而后者依赖于处理器中的硬件实现来执行浮点运算。"
122- " 这意味着就浮点运算而言,Python的行为类似于许多流行的语言,包括C和Java 。"
121+ "CPython 中的 :class:`float` 类型使用C语言的 ``double`` 类型进行存储。 :class:`float` "
122+ "对象的值是以固定的精度(通常为 53 位 )存储的二进制浮点数,由于 Python 使用 C 操作 ,而后者依赖于处理器中的硬件实现来执行浮点运算。 "
123+ "这意味着就浮点运算而言,Python 的行为类似于许多流行的语言,包括 C 和 Java 。"
123124
124125#: ../../faq/design.rst:70
125126msgid ""
@@ -132,7 +133,7 @@ msgid ""
132133"the value stored for ``x`` is a (very good) approximation to the decimal "
133134"value ``1.2``, but is not exactly equal to it. On a typical machine, the "
134135"actual stored value is::"
135- msgstr "为``x``存储的值是与十进制值的``1.2``( 非常接近) 的近似值,但不完全等于它。在典型的机器上,实际存储的值是:"
136+ msgstr "为 ``x`` 存储的值是与十进制值的 ``1.2`` ( 非常接近) 的近似值,但不完全等于它。 在典型的机器上,实际存储的值是:"
136137
137138#: ../../faq/design.rst:81
138139msgid "which is exactly::"
@@ -142,15 +143,13 @@ msgstr "确切地说::"
142143msgid ""
143144"The typical precision of 53 bits provides Python floats with 15--16 decimal "
144145"digits of accuracy."
145- msgstr "典型的53位精度为Python浮点数提供了15-16位小数的精度 。"
146+ msgstr "典型的 53 位精度为 Python 浮点数提供了 15-16 位小数的精度 。"
146147
147148#: ../../faq/design.rst:88
148149msgid ""
149150"For a fuller explanation, please see the :ref:`floating point arithmetic "
150151"<tut-fp-issues>` chapter in the Python tutorial."
151- msgstr ""
152- "要获得更完整的解释,请参阅Python教程中的 :ref:`floating point arithmetic <tut-fp-issues>` "
153- "一章。"
152+ msgstr "要获得更完整的解释,请参阅 Python 教程中的 :ref:`浮点算术 <tut-fp-issues>` 一章。"
154153
155154#: ../../faq/design.rst:93
156155msgid "Why are Python strings immutable?"
@@ -175,7 +174,8 @@ msgid ""
175174" and in Python, no amount of activity will change the string \" eight\" to "
176175"anything else."
177176msgstr ""
178- "另一个优点是,Python中的字符串被视为数字的“元素”。任何数量的活动都不会将值8更改为其他值,在Python中,任何数量的活动都不会将字符串“8”更改为其他值。"
177+ "另一个优点是,Python 中的字符串被视为与数字一样“基本”。 任何动作都不会将值 8 更改为其他值,在 Python 中,任何动作都不会将字符串 "
178+ "\" 8\" 更改为其他值。"
179179
180180#: ../../faq/design.rst:110
181181msgid "Why must 'self' be used explicitly in method definitions and calls?"
@@ -185,7 +185,7 @@ msgstr "为什么必须在方法定义和调用中显式使用“self”?"
185185msgid ""
186186"The idea was borrowed from Modula-3. It turns out to be very useful, for a "
187187"variety of reasons."
188- msgstr "这个想法借鉴了模块-3。由于各种原因,这是非常有用的 。"
188+ msgstr "这个想法借鉴了 Modula-3 语言。 出于多种原因它被证明是非常有用的 。"
189189
190190#: ../../faq/design.rst:115
191191msgid ""
@@ -199,9 +199,9 @@ msgid ""
199199"Some C++ and Java coding standards call for instance attributes to have an "
200200"``m_`` prefix, so this explicitness is still useful in those languages, too."
201201msgstr ""
202- "首先,更明显的显示出,使用的是方法或实例属性而不是局部变量。阅读 ``self.x``或 "
203- "``self.meth()``` 可以清楚地表明,即使您不知道类的定义,也会使用实例变量或方法。在C++ 中,可以通过缺少局部变量声明来判断(假设全局变量很少见或容易识别)"
204- " - 但是在Python,没有局部变量声明, 所以必须查找类定义才能确定。一些C ++和Java编码标准要求实例属性具有 ``m_`` "
202+ "首先,更明显的显示出,使用的是方法或实例属性而不是局部变量。 阅读 ``self.x`` 或 ``self.meth()`` "
203+ "可以清楚地表明,即使您不知道类的定义,也会使用实例变量或方法。在 C++ 中,可以通过缺少局部变量声明来判断(假设全局变量很少见或容易识别) —— "
204+ "但是在 Python 中没有局部变量声明, 所以必须查找类定义才能确定。 一些 C++ 和 Java 编码标准要求实例属性具有 ``m_`` "
205205"前缀,因此这种显式性在这些语言中仍然有用。"
206206
207207#: ../../faq/design.rst:125
@@ -215,6 +215,9 @@ msgid ""
215215" class method wants to extend the base class method of the same name and "
216216"thus has to call the base class method somehow."
217217msgstr ""
218+ "其次,这意味着如果要显式引用或从特定类调用该方法,不需要特殊语法。 在 C++ 中,如果你想使用在派生类中重写基类中的方法,你必须使用 ``::`` "
219+ "运算符 -- 在 Python 中你可以编写 ``baseclass.methodname(self, <argument list>)``。 这对于 "
220+ ":meth:`__init__` 方法特别有用,通常在其中派生类方法想要扩展同名的基类方法,而必须以某种方式调用基类方法时。"
218221
219222#: ../../faq/design.rst:134
220223msgid ""
@@ -233,6 +236,11 @@ msgid ""
233236"instance variables live in two different namespaces, and you need to tell "
234237"Python which namespace to use."
235238msgstr ""
239+ "最后,它解决了变量赋值的语法问题:为了 Python "
240+ "中的局部变量(根据定义!)在函数体中赋值的那些变量(并且没有明确声明为全局)赋值,就必须以某种方式告诉解释器一个赋值是为了分配一个实例变量而不是一个局部变量,它最好是通过语法实现的(出于效率原因)。"
241+ " C++ 通过声明来做到这一点,但是 Python 没有声明,仅仅为了这个目的而引入它们会很可惜。 使用显式的 ``self.var`` "
242+ "很好地解决了这个问题。 类似地,对于使用实例变量,必须编写 ``self.var`` 意味着对方法内部的非限定名称的引用不必搜索实例的目录。 "
243+ "换句话说,局部变量和实例变量存在于两个不同的命名空间中,您需要告诉 Python 使用哪个命名空间。"
236244
237245#: ../../faq/design.rst:150
238246msgid "Why can't I use an assignment in an expression?"
0 commit comments