9
9
msgstr ""
10
10
"Project-Id-Version :Python 3.12\n "
11
11
"Report-Msgid-Bugs-To :\n "
12
- "POT-Creation-Date :2022-10 -1604:24+0800 \n "
12
+ "POT-Creation-Date :2023-12 -1600:03+0000 \n "
13
13
"PO-Revision-Date :2022-11-16 04:57+0800\n "
14
14
"Last-Translator :Matt Wang <mattwang44@gmail.com>\n "
15
15
"Language-Team :Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
@@ -30,11 +30,12 @@ msgid "**Source code:** :source:`Lib/numbers.py`"
30
30
msgstr "**原始碼:**\\ :source:`Lib/numbers.py`"
31
31
32
32
#: ../../library/numbers.rst:11
33
+ #, fuzzy
33
34
msgid ""
34
- "The :mod:`numbers` module (:pep:`3141`) defines a hierarchy of numeric:term :"
35
- "`abstract base classes <abstract base class>` which progressively define "
36
- "more operations. None of the types defined in this module are intended to "
37
- "be instantiated."
35
+ "The :mod:`! numbers` module (:pep:`3141`) defines a hierarchy of numeric :"
36
+ "term: `abstract base classes <abstract base class>` which progressively "
37
+ "define more operations. None of the types defined in this module are "
38
+ "intended to be instantiated."
38
39
msgstr ""
39
40
":mod:`numbers` 模組 (:pep:`3141`) 定義了數值\\ :term:`抽象基底類別 <abstract "
40
41
"base class>` 的階層結構,其中逐一定義了更多操作。此模組中定義的型別都不可被實"
@@ -80,8 +81,9 @@ msgid ""
80
81
msgstr "為抽象的。回傳共軛複數,例如 ``(1+3j).conjugate() == (1-3j)``。"
81
82
82
83
#: ../../library/numbers.rst:48
84
+ #, fuzzy
83
85
msgid ""
84
- "To :class:`Complex`, :class:`Real` adds the operations that work on real "
86
+ "To :class:`Complex`, :class:`! Real` adds the operations that work on real "
85
87
"numbers."
86
88
msgstr "相對於 :class:`Complex`,:class:`Real` 加入了只有實數才能進行的操作。"
87
89
@@ -174,20 +176,21 @@ msgid "Implementing the arithmetic operations"
174
176
msgstr "實作算術操作"
175
177
176
178
#: ../../library/numbers.rst:125
179
+ #, fuzzy
177
180
msgid ""
178
181
"We want to implement the arithmetic operations so that mixed-mode operations "
179
182
"either call an implementation whose author knew about the types of both "
180
183
"arguments, or convert both to the nearest built in type and do the operation "
181
- "there. For subtypes of :class:`Integral`, this means that :meth:`__add__` "
182
- "and :meth:`__radd__` should be defined as::"
184
+ "there. For subtypes of :class:`Integral`, this means that :meth:`~object. "
185
+ "__add__` and :meth:`~object. __radd__` should be defined as::"
183
186
msgstr ""
184
187
"我們想要實作算術操作,來使得混合模式操作要麼呼叫一個作者知道兩個引數之型別的"
185
188
"實作,要麼將其轉換成最接近的內建型別並執行這個操作。對於 :class:`Integral` 的"
186
189
"子型別,這意味著 :meth:`__add__` 和 :meth:`__radd__` 必須用如下方式定義:\n"
187
190
"\n"
188
191
"::"
189
192
190
- #: ../../library/numbers.rst:156
193
+ #: ../../library/numbers.rst:157
191
194
msgid ""
192
195
"There are 5 different cases for a mixed-type operation on subclasses of :"
193
196
"class:`Complex`. I'll refer to all of the above code that doesn't refer to "
@@ -200,38 +203,42 @@ msgstr ""
200
203
"(boilerplate)」。``a`` 是 :class:`Complex` 之子型別 ``A`` 的實例 (``a : A <: "
201
204
"Complex``),同時 ``b : B <: Complex``。我將要計算 ``a + b``:"
202
205
203
- #: ../../library/numbers.rst:163
204
- msgid "If ``A`` defines an :meth:`__add__` which accepts ``b``, all is well."
206
+ #: ../../library/numbers.rst:164
207
+ #, fuzzy
208
+ msgid ""
209
+ "If ``A`` defines an :meth:`~object.__add__` which accepts ``b``, all is well."
205
210
msgstr "如果 ``A`` 有定義成一個接受 ``b`` 的 :meth:`__add__`,不會發生問題。"
206
211
207
- #: ../../library/numbers.rst:165
212
+ #: ../../library/numbers.rst:166
213
+ #, fuzzy
208
214
msgid ""
209
215
"If ``A`` falls back to the boilerplate code, and it were to return a value "
210
- "from :meth:`__add__`, we'd miss the possibility that ``B`` defines a more "
211
- "intelligent :meth:`__radd__`, so the boilerplate should return:const :"
212
- "`NotImplemented` from :meth:`__add__`. (Or ``A`` may not implement:meth :"
213
- "` __add__` at all.)"
216
+ "from :meth:`~object. __add__`, we'd miss the possibility that ``B`` defines a "
217
+ "more intelligent :meth:`~object. __radd__`, so the boilerplate should return :"
218
+ "const: `NotImplemented` from :meth:`! __add__`. (Or ``A`` may not implement :"
219
+ "meth:`! __add__` at all.)"
214
220
msgstr ""
215
221
"如果 ``A`` 回退成模板程式碼,它將回傳一個來自 :meth:`__add__` 的值,並喪失讓 "
216
222
"``B`` 定義一個更完善的 :meth:`__radd__` 的機會,因此模板需要回傳一個來自 :"
217
223
"meth:`__add__` 的 :const:`NotImplemented`。(或者 ``A`` 可能完全不實作 :meth:"
218
224
"`__add__`。)"
219
225
220
- #: ../../library/numbers.rst:171
226
+ #: ../../library/numbers.rst:172
227
+ #, fuzzy
221
228
msgid ""
222
- "Then ``B``'s :meth:`__radd__` gets a chance. If it accepts ``a``, all is "
223
- "well."
229
+ "Then ``B``'s :meth:`~object. __radd__` gets a chance. If it accepts ``a``, "
230
+ "all is well."
224
231
msgstr "接著看 ``B`` 的 :meth:`__radd__`。如果它接受 ``a`` ,不會發生問題。"
225
232
226
- #: ../../library/numbers.rst:173
233
+ #: ../../library/numbers.rst:174
227
234
msgid ""
228
235
"If it falls back to the boilerplate, there are no more possible methods to "
229
236
"try, so this is where the default implementation should live."
230
237
msgstr ""
231
238
"如果沒有成功回退到模板,就沒有更多的方法可以去嘗試,因此這裡將使用預設的實"
232
239
"作。"
233
240
234
- #: ../../library/numbers.rst:176
241
+ #: ../../library/numbers.rst:177
235
242
msgid ""
236
243
"If ``B <: A``, Python tries ``B.__radd__`` before ``A.__add__``. This is ok, "
237
244
"because it was implemented with knowledge of ``A``, so it can handle those "
@@ -241,17 +248,19 @@ msgstr ""
241
248
"的,因為它是透過對 ``A`` 的理解而實作的,所以這可以在交給 :class:`Complex` 之"
242
249
"前處理好這些實例。"
243
250
244
- #: ../../library/numbers.rst:181
251
+ #: ../../library/numbers.rst:182
252
+ #, fuzzy
245
253
msgid ""
246
254
"If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge, "
247
255
"then the appropriate shared operation is the one involving the built in :"
248
- "class:`complex`, and both :meth:`__radd__` s land there, so ``a+b == b+a``."
256
+ "class:`complex`, and both :meth:`~object.__radd__` s land there, so ``a+b == "
257
+ "b+a``."
249
258
msgstr ""
250
259
"如果 ``A <: Complex`` 和 ``B <: Real`` 且沒有共享任何其他型別上的理解,那麼適"
251
260
"當的共享操作會涉及內建的 :class:`complex`,並且分別用到 :meth:`__radd__`,因"
252
261
"此 ``a+b == b+a``。"
253
262
254
- #: ../../library/numbers.rst:186
263
+ #: ../../library/numbers.rst:187
255
264
msgid ""
256
265
"Because most of the operations on any given type will be very similar, it "
257
266
"can be useful to define a helper function which generates the forward and "