11# SOME DESCRIPTIVE TITLE.
2- # Copyright (C) 2001-2022 , Python Software Foundation
2+ # Copyright (C) 2001-2023 , Python Software Foundation
33# This file is distributed under the same license as the Python package.
44# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55#
66# Translators:
7- # Freesand Leo <[email protected] >, 20218- 7+ # Rafael Fontenelle <[email protected] >, 202398#
109#, fuzzy
1110msgid ""
1211msgstr ""
13- "Project-Id-Version : Python 3.10 \n "
12+ "Project-Id-Version : Python 3.11 \n "
1413"Report-Msgid-Bugs-To : \n "
15- "POT-Creation-Date : 2022-11-04 14:28 +0000\n "
16- "PO-Revision-Date : 2021-06-28 01:10 +0000\n "
17- "Last-Translator : 心韵 方 <fxy9905 @gmail.com>, 2021 \n "
18- "Language-Team : Chinese (China) (https://www .transifex.com/python-doc/teams/5390/zh_CN/)\n "
14+ "POT-Creation-Date : 2023-12-22 16:37 +0000\n "
15+ "PO-Revision-Date : 2023-05-24 02:18 +0000\n "
16+ "Last-Translator : Rafael Fontenelle <rffontenelle @gmail.com>, 2023 \n "
17+ "Language-Team : Chinese (China) (https://app .transifex.com/python-doc/teams/5390/zh_CN/)\n "
1918"MIME-Version : 1.0\n "
2019"Content-Type : text/plain; charset=UTF-8\n "
2120"Content-Transfer-Encoding : 8bit\n "
@@ -32,13 +31,11 @@ msgstr "**源代码:** :source:`Lib/numbers.py`"
3231
3332#: ../../library/numbers.rst:11
3433msgid ""
35- "The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric "
34+ "The :mod:`! numbers` module (:pep:`3141`) defines a hierarchy of numeric "
3635":term:`abstract base classes <abstract base class>` which progressively "
3736"define more operations. None of the types defined in this module are "
3837"intended to be instantiated."
3938msgstr ""
40- ":mod:`numbers` 模块 (:pep:`3141`) 定义了数字 :term:`抽象基类 <abstract base class>` "
41- "的层级结构,其中逐级定义了更多操作。 此模块中定义的类型都不可被实例化。"
4239
4340#: ../../library/numbers.rst:18
4441msgid ""
@@ -79,9 +76,9 @@ msgstr "抽象的。返回共轭复数。例如 ``(1+3j).conjugate() == (1-3j)``
7976
8077#: ../../library/numbers.rst:48
8178msgid ""
82- "To :class:`Complex`, :class:`Real` adds the operations that work on real "
79+ "To :class:`Complex`, :class:`! Real` adds the operations that work on real "
8380"numbers."
84- msgstr "相对于 :class:`Complex`,:class:`Real` 加入了只有实数才能进行的操作。 "
81+ msgstr ""
8582
8683#: ../../library/numbers.rst:51
8784msgid ""
@@ -107,13 +104,17 @@ msgid ""
107104":attr:`~Rational.denominator` properties. It also provides a default for "
108105":func:`float`."
109106msgstr ""
107+ "子类型 :class:`Real` 并加入 :attr:`~Rational.numerator` 和 "
108+ ":attr:`~Rational.denominator` 两种特征属性。 它还为 :func:`float` 提供了默认值。"
110109
111110#: ../../library/numbers.rst:65
112111msgid ""
113112"The :attr:`~Rational.numerator` and :attr:`~Rational.denominator` values "
114113"should be instances of :class:`Integral` and should be in lowest terms with "
115114":attr:`~Rational.denominator` positive."
116115msgstr ""
116+ ":attr:`~Rational.numerator` 和 :attr:`~Rational.denominator` 值应为 "
117+ ":class:`Integral` 的实例并且应当是具有 :attr:`~Rational.denominator` 正值的最低项。"
117118
118119#: ../../library/numbers.rst:71 ../../library/numbers.rst:75
119120msgid "Abstract."
@@ -168,13 +169,11 @@ msgid ""
168169"We want to implement the arithmetic operations so that mixed-mode operations"
169170" either call an implementation whose author knew about the types of both "
170171"arguments, or convert both to the nearest built in type and do the operation"
171- " there. For subtypes of :class:`Integral`, this means that :meth:`__add__` "
172- "and :meth:`__radd__` should be defined as::"
172+ " there. For subtypes of :class:`Integral`, this means that "
173+ ":meth:`~object.__add__` and :meth:`~object. __radd__` should be defined as::"
173174msgstr ""
174- "我们希望实现计算,因此,混合模式操作要么调用一个作者知道参数类型的实现,要么转变成为最接近的内置类型并对这个执行操作。对于子类 "
175- ":class:`Integral`,这意味着 :meth:`__add__` 和 :meth:`__radd__` 必须用如下方式定义:"
176175
177- #: ../../library/numbers.rst:156
176+ #: ../../library/numbers.rst:157
178177msgid ""
179178"There are 5 different cases for a mixed-type operation on subclasses of "
180179":class:`Complex`. I'll refer to all of the above code that doesn't refer to "
@@ -186,35 +185,34 @@ msgstr ""
186185"``OtherTypeIKnowAbout``。 ``a`` 是 :class:`Complex` 的子类型 ``A`` 的实例 (``a : A "
187186"<: Complex``),同时 ``b : B <: Complex``。 我将要计算 ``a + b``:"
188187
189- #: ../../library/numbers.rst:163
190- msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well."
191- msgstr "如果 ``A`` 被定义成一个承认 ``b`` 的 :meth:`__add__`,一切都没有问题。"
188+ #: ../../library/numbers.rst:164
189+ msgid ""
190+ "If ``A`` defines an :meth:`~object.__add__` which accepts ``b``, all is "
191+ "well."
192+ msgstr ""
192193
193- #: ../../library/numbers.rst:165
194+ #: ../../library/numbers.rst:166
194195msgid ""
195196"If ``A`` falls back to the boilerplate code, and it were to return a value "
196- "from :meth:`__add__`, we'd miss the possibility that ``B`` defines a more "
197- "intelligent :meth:`__radd__`, so the boilerplate should return "
198- ":const:`NotImplemented` from :meth:`__add__`. (Or ``A`` may not implement "
199- ":meth:`__add__` at all.)"
197+ "from :meth:`~object. __add__`, we'd miss the possibility that ``B`` defines a"
198+ " more intelligent :meth:`~object. __radd__`, so the boilerplate should return"
199+ " :const:`NotImplemented` from :meth:`! __add__`. (Or ``A`` may not implement "
200+ ":meth:`! __add__` at all.)"
200201msgstr ""
201- "如果 ``A`` 转回成“模板”失败,它将返回一个属于 :meth:`__add__` 的值,我们需要避免 ``B`` 定义了一个更加智能的 "
202- ":meth:`__radd__`,因此模板需要返回一个属于 :meth:`__add__` 的 :const:`NotImplemented` 。(或者"
203- " ``A`` 可能完全不实现 :meth:`__add__` 。)"
204202
205- #: ../../library/numbers.rst:171
203+ #: ../../library/numbers.rst:172
206204msgid ""
207- "Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
208- "well."
209- msgstr "接着看 ``B`` 的 :meth:`__radd__` 。如果它承认 ``a`` ,一切都没有问题。 "
205+ "Then ``B``'s :meth:`~object. __radd__` gets a chance. If it accepts ``a``, "
206+ "all is well."
207+ msgstr ""
210208
211- #: ../../library/numbers.rst:173
209+ #: ../../library/numbers.rst:174
212210msgid ""
213211"If it falls back to the boilerplate, there are no more possible methods to "
214212"try, so this is where the default implementation should live."
215213msgstr "如果没有成功回退到模板,就没有更多的方法可以去尝试,因此这里将使用默认的实现。"
216214
217- #: ../../library/numbers.rst:176
215+ #: ../../library/numbers.rst:177
218216msgid ""
219217"If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok,"
220218" because it was implemented with knowledge of ``A``, so it can handle those "
@@ -223,16 +221,15 @@ msgstr ""
223221"如果 ``B <: A`` , Python 在 ``A.__add__`` 之前尝试 ``B.__radd__`` 。 这是可行的,是通过对 "
224222"``A`` 的认识实现的,因此这可以在交给 :class:`Complex` 处理之前处理这些实例。"
225223
226- #: ../../library/numbers.rst:181
224+ #: ../../library/numbers.rst:182
227225msgid ""
228226"If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, "
229227"then the appropriate shared operation is the one involving the built in "
230- ":class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``."
228+ ":class:`complex`, and both :meth:`~object.__radd__` s land there, so ``a+b "
229+ "== b+a``."
231230msgstr ""
232- "如果 ``A <: Complex`` 和 ``B <: Real`` 没有共享任何资源,那么适当的共享操作涉及内置的 :class:`complex`"
233- " ,并且分别获得 :meth:`__radd__` ,因此 ``a+b == b+a``。"
234231
235- #: ../../library/numbers.rst:186
232+ #: ../../library/numbers.rst:187
236233msgid ""
237234"Because most of the operations on any given type will be very similar, it "
238235"can be useful to define a helper function which generates the forward and "
0 commit comments