From 850bf01f06a761d5629b5a72835c9c3b6700d445 Mon Sep 17 00:00:00 2001 From: "Matt.Wang" Date: Thu, 9 Dec 2021 23:35:41 +0800 Subject: [PATCH] feat: translate `library/operator.po` --- library/operator.po | 196 ++++++++++++++++++++++++++++---------------- 1 file changed, 126 insertions(+), 70 deletions(-) diff --git a/library/operator.po b/library/operator.po index ffc9250370..5916b379cb 100644 --- a/library/operator.po +++ b/library/operator.po @@ -3,13 +3,15 @@ # This file is distributed under the same license as the Python package. # # Translators: +# Adrian Liaw , 2018 +# Matt Wang , 2021 msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2018-05-23 16:06+0000\n" -"Last-Translator: Adrian Liaw \n" +"PO-Revision-Date: 2021-12-09 23:32+0800\n" +"Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -17,10 +19,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 3.0\n" #: ../../library/operator.rst:2 msgid ":mod:`operator` --- Standard operators as functions" -msgstr "" +msgstr ":mod:`operator` --- 標準運算子替代函式" #: ../../library/operator.rst:9 msgid "**Source code:** :source:`Lib/operator.py`" @@ -36,18 +39,23 @@ msgid "" "underscores kept. The variants without the double underscores are preferred " "for clarity." msgstr "" +":mod:`operator` module(模組)提供了一套與 Python 原生運算子對應的高效率函" +"式。例如,\\ ``operator.add(x, y)`` 與表示式 ``x+y`` 相同。許多函式名與特殊方" +"法名相同,只是沒有雙底線。為了向後相容,許多包含雙底線的函式被保留了下來,但" +"為了易於表達,建議使用沒有雙底線的函式。" #: ../../library/operator.rst:25 msgid "" "The functions fall into categories that perform object comparisons, logical " "operations, mathematical operations and sequence operations." -msgstr "" +msgstr "函式種類有物件的比較運算、邏輯運算、數學運算以及序列運算。" #: ../../library/operator.rst:28 msgid "" "The object comparison functions are useful for all objects, and are named " "after the rich comparison operators they support:" msgstr "" +"物件比較函式適用於所有物件,函式根據它們對應的 rich comparison 運算子命名:" #: ../../library/operator.rst:45 msgid "" @@ -59,12 +67,19 @@ msgid "" "which may or may not be interpretable as a Boolean value. See :ref:" "`comparisons` for more information about rich comparisons." msgstr "" +"在 *a* 和 *b* 之間進行 \"rich comparison\"。具體來說,\\ ``lt(a, b)`` 與 ``a " +"< b`` 相同,\\ ``le(a, b)`` 與 ``a <= b`` 相同,\\ ``eq(a, b)`` 與 ``a == " +"b`` 相同,\\ ``ne(a, b)`` 與 ``a != b`` 相同,\\ ``gt(a, b)`` 與 ``a > b`` 相" +"同,\\ ``ge(a, b)`` 與 ``a >= b`` 相同。注意這些函式可以回傳任何值,無論它是否" +"可當作 boolean(布林)值。關於 rich comparison 的更多資訊請參考 :ref:" +"`comparisons`\\ 。" #: ../../library/operator.rst:54 msgid "" "The logical operations are also generally applicable to all objects, and " "support truth tests, identity tests, and boolean operations:" msgstr "" +"邏輯運算通常也適用於所有物件,並且支援真值檢測、標識檢測和 boolean 運算:" #: ../../library/operator.rst:61 msgid "" @@ -73,140 +88,147 @@ msgid "" "this operation. The result is affected by the :meth:`__bool__` and :meth:" "`__len__` methods.)" msgstr "" +"回傳 :keyword:`not` *obj* 的結果。(請注意物件實例並沒有 :meth:`__not__` " +"method(方法);只有直譯器核心定義此操作。結果會受 :meth:`__bool__` 和 :meth:" +"`__len__` method 影響。)" #: ../../library/operator.rst:69 msgid "" "Return :const:`True` if *obj* is true, and :const:`False` otherwise. This " "is equivalent to using the :class:`bool` constructor." msgstr "" +"如果 *obj* 為真值則回傳 :const:`True`,否則回傳 :const:`False`。這等價於使" +"用 :class:`bool` 建構器。" #: ../../library/operator.rst:75 msgid "Return ``a is b``. Tests object identity." -msgstr "" +msgstr "回傳 ``a is b``。檢測物件標識。" #: ../../library/operator.rst:80 msgid "Return ``a is not b``. Tests object identity." -msgstr "" +msgstr "回傳 ``a is not b``。檢測物件標識。" #: ../../library/operator.rst:83 msgid "The mathematical and bitwise operations are the most numerous:" -msgstr "" +msgstr "數學和位元運算的種類是最多的:" #: ../../library/operator.rst:89 msgid "Return the absolute value of *obj*." -msgstr "" +msgstr "回傳 *obj* 的絕對值。" #: ../../library/operator.rst:95 msgid "Return ``a + b``, for *a* and *b* numbers." -msgstr "" +msgstr "對於數字 *a* 和 *b*,回傳 ``a + b``。" #: ../../library/operator.rst:101 msgid "Return the bitwise and of *a* and *b*." -msgstr "" +msgstr "回傳 *x* 和 *y* 位元運算與 (and) 的結果。" #: ../../library/operator.rst:107 msgid "Return ``a // b``." -msgstr "" +msgstr "回傳 ``a // b``。" #: ../../library/operator.rst:113 msgid "Return *a* converted to an integer. Equivalent to ``a.__index__()``." -msgstr "" +msgstr "回傳 *a* 轉換為整數的結果。等價於 ``a.__index__()``。" #: ../../library/operator.rst:115 msgid "" "The result always has exact type :class:`int`. Previously, the result could " "have been an instance of a subclass of ``int``." msgstr "" +"結果總是 :class:`int` 型別。在過去的版本中,結果可能為 ``int`` 子類別的實例。" #: ../../library/operator.rst:125 msgid "" "Return the bitwise inverse of the number *obj*. This is equivalent to " "``~obj``." -msgstr "" +msgstr "回傳數字 *obj* 按位元取反 (inverse) 的結果。這等價於 ``~obj``。" #: ../../library/operator.rst:131 msgid "Return *a* shifted left by *b*." -msgstr "" +msgstr "回傳 *a* 左移 *b* 位的結果。" #: ../../library/operator.rst:137 msgid "Return ``a % b``." -msgstr "" +msgstr "回傳 ``a % b``。" #: ../../library/operator.rst:143 msgid "Return ``a * b``, for *a* and *b* numbers." -msgstr "" +msgstr "對於數字 *a* 和 *b*,回傳 ``a * b``。" #: ../../library/operator.rst:149 msgid "Return ``a @ b``." -msgstr "" +msgstr "回傳 ``a @ b``。" #: ../../library/operator.rst:157 msgid "Return *obj* negated (``-obj``)." -msgstr "" +msgstr "回傳 *obj* 取負值的結果 (\\ ``-obj``\\ )。" #: ../../library/operator.rst:163 msgid "Return the bitwise or of *a* and *b*." -msgstr "" +msgstr "回傳 *a* 和 *b* 按位元或 (or) 的結果。" #: ../../library/operator.rst:169 msgid "Return *obj* positive (``+obj``)." -msgstr "" +msgstr "回傳 *obj* 取正的結果 (\\ ``+obj``\\ )。" #: ../../library/operator.rst:175 msgid "Return ``a ** b``, for *a* and *b* numbers." -msgstr "" +msgstr "對於數字 *a* 和 *b*,回傳 ``a ** b``。" #: ../../library/operator.rst:181 msgid "Return *a* shifted right by *b*." -msgstr "" +msgstr "回傳 *a* 右移 *b* 位的結果。" #: ../../library/operator.rst:187 msgid "Return ``a - b``." -msgstr "" +msgstr "回傳 ``a - b``。" #: ../../library/operator.rst:193 msgid "" "Return ``a / b`` where 2/3 is .66 rather than 0. This is also known as " "\"true\" division." msgstr "" +"回傳 ``a / b``\\ ,例如 2/3 將等於 .66 而不是 0。這也被稱為「真」除法。" #: ../../library/operator.rst:200 msgid "Return the bitwise exclusive or of *a* and *b*." -msgstr "" +msgstr "回傳 *a* 和 *b* 按位元異或 (exclusive or) 的結果。" #: ../../library/operator.rst:203 msgid "" "Operations which work with sequences (some of them with mappings too) " "include:" -msgstr "" +msgstr "適用於序列的操作(其中一些也適用於對映 (mapping)),包括:" #: ../../library/operator.rst:208 msgid "Return ``a + b`` for *a* and *b* sequences." -msgstr "" +msgstr "對於序列 *a* 和 *b*,回傳 ``a + b``。" #: ../../library/operator.rst:214 msgid "Return the outcome of the test ``b in a``. Note the reversed operands." -msgstr "" +msgstr "回傳 ``b in a`` 檢測的結果。請注意運算元是反序的。" #: ../../library/operator.rst:219 msgid "Return the number of occurrences of *b* in *a*." -msgstr "" +msgstr "回傳 *b* 在 *a* 中的出現次數。" #: ../../library/operator.rst:225 msgid "Remove the value of *a* at index *b*." -msgstr "" +msgstr "移除 *a* 中索引為 *b* 的值。" #: ../../library/operator.rst:231 msgid "Return the value of *a* at index *b*." -msgstr "" +msgstr "回傳 *a* 中索引為 *b* 的值。" #: ../../library/operator.rst:236 msgid "Return the index of the first of occurrence of *b* in *a*." -msgstr "" +msgstr "回傳 *b* 在 *a* 中首次出現所在的索引。" #: ../../library/operator.rst:242 msgid "Set the value of *a* at index *b* to *c*." -msgstr "" +msgstr "將 *a* 中索引為 *b* 的值設為 *c*。" #: ../../library/operator.rst:247 msgid "" @@ -214,6 +236,8 @@ msgid "" "actual length, then an estimate using :meth:`object.__length_hint__`, and " "finally return the default value." msgstr "" +"回傳物件 *o* 的估計長度。首先嘗試回傳其實際長度,再使用 :meth:`object." +"__length_hint__` 得出估計值,最後才是回傳預設值。" #: ../../library/operator.rst:253 msgid "" @@ -222,6 +246,9 @@ msgid "" "arguments for :func:`map`, :func:`sorted`, :meth:`itertools.groupby`, or " "other functions that expect a function argument." msgstr "" +":mod:`operator` module 還定義了一些用於常規屬性和條目查詢的工具。這些工具適合" +"用來編寫快速欄位提取器以作為 :func:`map`\\ 、\\ :func:`sorted`\\ 、\\ :meth:" +"`itertools.groupby` 或其他需要函式引數的函式之引數。" #: ../../library/operator.rst:262 msgid "" @@ -229,22 +256,28 @@ msgid "" "one attribute is requested, returns a tuple of attributes. The attribute " "names can also contain dots. For example:" msgstr "" +"回傳一個可從運算元中獲取 *attr* 的可呼叫 (callable) 物件。如果請求了一個以上" +"的屬性,則回傳一個包含屬性的 tupple(元組)。屬性名稱還可包含點號。例如:" #: ../../library/operator.rst:266 msgid "After ``f = attrgetter('name')``, the call ``f(b)`` returns ``b.name``." -msgstr "" +msgstr "在 ``f = attrgetter('name')`` 之後,呼叫 ``f(b)`` 將回傳 ``b.name``。" #: ../../library/operator.rst:268 msgid "" "After ``f = attrgetter('name', 'date')``, the call ``f(b)`` returns ``(b." "name, b.date)``." msgstr "" +"在 ``f = attrgetter('name', 'date')`` 之後,呼叫 ``f(b)`` 將回傳 ``(b.name, " +"b.date)``。" #: ../../library/operator.rst:271 msgid "" "After ``f = attrgetter('name.first', 'name.last')``, the call ``f(b)`` " "returns ``(b.name.first, b.name.last)``." msgstr "" +"在 ``f = attrgetter('name.first', 'name.last')`` 之後,呼叫 ``f(b)`` 將回傳 " +"``(b.name.first, b.name.last)``。" #: ../../library/operator.rst:274 ../../library/operator.rst:306 #: ../../library/operator.rst:354 @@ -260,16 +293,20 @@ msgid "" "operand's :meth:`__getitem__` method. If multiple items are specified, " "returns a tuple of lookup values. For example:" msgstr "" +"回傳一個使用運算元的 :meth:`__getitem__` 方法從運算元中獲取 *item* 的可呼叫物" +"件。如果指定了多個條目,則回傳一個查詢值的 tupple。例如:" #: ../../library/operator.rst:301 msgid "After ``f = itemgetter(2)``, the call ``f(r)`` returns ``r[2]``." -msgstr "" +msgstr "在 ``f = itemgetter(2)`` 之後,呼叫 ``f(r)`` 將回傳 ``r[2]``。" #: ../../library/operator.rst:303 msgid "" "After ``g = itemgetter(2, 5, 3)``, the call ``g(r)`` returns ``(r[2], r[5], " "r[3])``." msgstr "" +"在 ``g = itemgetter(2, 5, 3)`` 之後,呼叫 ``g(r)`` 將回傳 ``(r[2], r[5], " +"r[3])``。" #: ../../library/operator.rst:318 msgid "" @@ -277,12 +314,14 @@ msgid "" "method. Dictionaries accept any hashable value. Lists, tuples, and strings " "accept an index or a slice:" msgstr "" +"傳入的條目可以為運算元的 :meth:`__getitem__` 所接受的任何型別。dictionary(字" +"典)接受任意可雜湊 (hashable) 的值。list、tupple 和字串接受索引或切片:" #: ../../library/operator.rst:332 msgid "" "Example of using :func:`itemgetter` to retrieve specific fields from a tuple " "record:" -msgstr "" +msgstr "使用 :func:`itemgetter` 從 tuple 中提取特定欄位的例子:" #: ../../library/operator.rst:345 msgid "" @@ -290,35 +329,42 @@ msgid "" "additional arguments and/or keyword arguments are given, they will be given " "to the method as well. For example:" msgstr "" +"回傳一個在運算元上呼叫 *name* method 的可呼叫物件。如果給定額外的引數和/或關" +"鍵字引數,它們也將被傳給該 method。例如:" #: ../../library/operator.rst:349 msgid "" "After ``f = methodcaller('name')``, the call ``f(b)`` returns ``b.name()``." msgstr "" +"在 ``f = methodcaller('name')`` 之後,呼叫 ``f(b)`` 將回傳 ``b.name()``。" #: ../../library/operator.rst:351 msgid "" "After ``f = methodcaller('name', 'foo', bar=1)``, the call ``f(b)`` returns " "``b.name('foo', bar=1)``." msgstr "" +"在 ``f = methodcaller('name', 'foo', bar=1)`` 之後,呼叫 ``f(b)`` 將回傳 ``b." +"name('foo', bar=1)``。" #: ../../library/operator.rst:365 msgid "Mapping Operators to Functions" -msgstr "" +msgstr "運算子與函式間的對映" #: ../../library/operator.rst:367 msgid "" "This table shows how abstract operations correspond to operator symbols in " "the Python syntax and the functions in the :mod:`operator` module." msgstr "" +"以下表格表示了抽象運算是如何對應於 Python 語法中的運算子和 :mod:`operator` " +"module中的函式。" #: ../../library/operator.rst:371 msgid "Operation" -msgstr "" +msgstr "運算" #: ../../library/operator.rst:371 msgid "Syntax" -msgstr "" +msgstr "語法" #: ../../library/operator.rst:371 msgid "Function" @@ -326,7 +372,7 @@ msgstr "函式" #: ../../library/operator.rst:373 msgid "Addition" -msgstr "" +msgstr "加法" #: ../../library/operator.rst:373 msgid "``a + b``" @@ -338,7 +384,7 @@ msgstr "``add(a, b)``" #: ../../library/operator.rst:375 msgid "Concatenation" -msgstr "" +msgstr "字串串接" #: ../../library/operator.rst:375 msgid "``seq1 + seq2``" @@ -350,7 +396,7 @@ msgstr "``concat(seq1, seq2)``" #: ../../library/operator.rst:377 msgid "Containment Test" -msgstr "" +msgstr "包含性檢測" #: ../../library/operator.rst:377 msgid "``obj in seq``" @@ -362,7 +408,7 @@ msgstr "``contains(seq, obj)``" #: ../../library/operator.rst:379 ../../library/operator.rst:381 msgid "Division" -msgstr "" +msgstr "除法" #: ../../library/operator.rst:379 msgid "``a / b``" @@ -382,7 +428,7 @@ msgstr "``floordiv(a, b)``" #: ../../library/operator.rst:383 msgid "Bitwise And" -msgstr "" +msgstr "按位元與 (And)" #: ../../library/operator.rst:383 msgid "``a & b``" @@ -394,7 +440,7 @@ msgstr "``and_(a, b)``" #: ../../library/operator.rst:385 msgid "Bitwise Exclusive Or" -msgstr "" +msgstr "按位元互斥或 (Exclusive Or)" #: ../../library/operator.rst:385 msgid "``a ^ b``" @@ -406,7 +452,7 @@ msgstr "``xor(a, b)``" #: ../../library/operator.rst:387 msgid "Bitwise Inversion" -msgstr "" +msgstr "按位元取反 (Inversion)" #: ../../library/operator.rst:387 msgid "``~ a``" @@ -418,7 +464,7 @@ msgstr "``invert(a)``" #: ../../library/operator.rst:389 msgid "Bitwise Or" -msgstr "" +msgstr "按位元或 (Or)" #: ../../library/operator.rst:389 msgid "``a | b``" @@ -430,7 +476,7 @@ msgstr "``or_(a, b)``" #: ../../library/operator.rst:391 msgid "Exponentiation" -msgstr "" +msgstr "取冪" #: ../../library/operator.rst:391 msgid "``a ** b``" @@ -442,7 +488,7 @@ msgstr "``pow(a, b)``" #: ../../library/operator.rst:393 ../../library/operator.rst:395 msgid "Identity" -msgstr "" +msgstr "標識" #: ../../library/operator.rst:393 msgid "``a is b``" @@ -462,7 +508,7 @@ msgstr "``is_not(a, b)``" #: ../../library/operator.rst:397 msgid "Indexed Assignment" -msgstr "" +msgstr "索引賦值" #: ../../library/operator.rst:397 msgid "``obj[k] = v``" @@ -474,7 +520,7 @@ msgstr "``setitem(obj, k, v)``" #: ../../library/operator.rst:399 msgid "Indexed Deletion" -msgstr "" +msgstr "索引刪除" #: ../../library/operator.rst:399 msgid "``del obj[k]``" @@ -486,7 +532,7 @@ msgstr "``delitem(obj, k)``" #: ../../library/operator.rst:401 msgid "Indexing" -msgstr "" +msgstr "索引取值" #: ../../library/operator.rst:401 msgid "``obj[k]``" @@ -498,7 +544,7 @@ msgstr "``getitem(obj, k)``" #: ../../library/operator.rst:403 msgid "Left Shift" -msgstr "" +msgstr "左移" #: ../../library/operator.rst:403 msgid "``a << b``" @@ -510,7 +556,7 @@ msgstr "``lshift(a, b)``" #: ../../library/operator.rst:405 msgid "Modulo" -msgstr "" +msgstr "模除 (Modulo)" #: ../../library/operator.rst:405 msgid "``a % b``" @@ -522,7 +568,7 @@ msgstr "``mod(a, b)``" #: ../../library/operator.rst:407 msgid "Multiplication" -msgstr "" +msgstr "乘法" #: ../../library/operator.rst:407 msgid "``a * b``" @@ -534,7 +580,7 @@ msgstr "``mul(a, b)``" #: ../../library/operator.rst:409 msgid "Matrix Multiplication" -msgstr "" +msgstr "矩陣乘法" #: ../../library/operator.rst:409 msgid "``a @ b``" @@ -546,7 +592,7 @@ msgstr "``matmul(a, b)``" #: ../../library/operator.rst:411 msgid "Negation (Arithmetic)" -msgstr "" +msgstr "反相(算術)" #: ../../library/operator.rst:411 msgid "``- a``" @@ -558,7 +604,7 @@ msgstr "``neg(a)``" #: ../../library/operator.rst:413 msgid "Negation (Logical)" -msgstr "" +msgstr "反相(邏輯)" #: ../../library/operator.rst:413 msgid "``not a``" @@ -570,7 +616,7 @@ msgstr "``not_(a)``" #: ../../library/operator.rst:415 msgid "Positive" -msgstr "" +msgstr "正數" #: ../../library/operator.rst:415 msgid "``+ a``" @@ -582,7 +628,7 @@ msgstr "``pos(a)``" #: ../../library/operator.rst:417 msgid "Right Shift" -msgstr "" +msgstr "右移" #: ../../library/operator.rst:417 msgid "``a >> b``" @@ -594,7 +640,7 @@ msgstr "``rshift(a, b)``" #: ../../library/operator.rst:419 msgid "Slice Assignment" -msgstr "" +msgstr "切片賦值" #: ../../library/operator.rst:419 msgid "``seq[i:j] = values``" @@ -606,7 +652,7 @@ msgstr "``setitem(seq, slice(i, j), values)``" #: ../../library/operator.rst:421 msgid "Slice Deletion" -msgstr "" +msgstr "切片刪除" #: ../../library/operator.rst:421 msgid "``del seq[i:j]``" @@ -618,7 +664,7 @@ msgstr "``delitem(seq, slice(i, j))``" #: ../../library/operator.rst:423 msgid "Slicing" -msgstr "" +msgstr "切片取值" #: ../../library/operator.rst:423 msgid "``seq[i:j]``" @@ -630,7 +676,7 @@ msgstr "``getitem(seq, slice(i, j))``" #: ../../library/operator.rst:425 msgid "String Formatting" -msgstr "" +msgstr "字串格式化" #: ../../library/operator.rst:425 msgid "``s % obj``" @@ -642,7 +688,7 @@ msgstr "``mod(s, obj)``" #: ../../library/operator.rst:427 msgid "Subtraction" -msgstr "" +msgstr "減法" #: ../../library/operator.rst:427 msgid "``a - b``" @@ -654,7 +700,7 @@ msgstr "``sub(a, b)``" #: ../../library/operator.rst:429 msgid "Truth Test" -msgstr "" +msgstr "真值檢測" #: ../../library/operator.rst:429 msgid "``obj``" @@ -667,7 +713,7 @@ msgstr "``truth(obj)``" #: ../../library/operator.rst:431 ../../library/operator.rst:433 #: ../../library/operator.rst:439 ../../library/operator.rst:441 msgid "Ordering" -msgstr "" +msgstr "比較大小" #: ../../library/operator.rst:431 msgid "``a < b``" @@ -687,7 +733,7 @@ msgstr "``le(a, b)``" #: ../../library/operator.rst:435 msgid "Equality" -msgstr "" +msgstr "相等性" #: ../../library/operator.rst:435 msgid "``a == b``" @@ -699,7 +745,7 @@ msgstr "``eq(a, b)``" #: ../../library/operator.rst:437 msgid "Difference" -msgstr "" +msgstr "不等性" #: ../../library/operator.rst:437 msgid "``a != b``" @@ -727,7 +773,7 @@ msgstr "``gt(a, b)``" #: ../../library/operator.rst:445 msgid "In-place Operators" -msgstr "" +msgstr "原地 (in-place) 運算子" #: ../../library/operator.rst:447 msgid "" @@ -738,6 +784,10 @@ msgid "" "operator.iadd(x, y)`` is equivalent to the compound statement ``z = x; z += " "y``." msgstr "" +"許多運算都有「原地」版本。以下列出的是提供對原地運算子(與一般語法相比)更底" +"層存取的函式,例如 :term:`statement` ``x += y`` 相當於 ``x = operator." +"iadd(x, y)``。換一種方式來講就是 ``z = operator.iadd(x, y)`` 等價於複合陳述" +"式 ``z = x; z += y``。" #: ../../library/operator.rst:454 msgid "" @@ -746,18 +796,24 @@ msgid "" "place functions listed below only do the first step, calling the in-place " "method. The second step, assignment, is not handled." msgstr "" +"在這些例子中,請注意當呼叫一個原地方法時,運算和賦值是分成兩個步驟來執行的。" +"下面列出的原地函式只執行第一步,即呼叫原地方法,第二步賦值則不加處理。" #: ../../library/operator.rst:459 msgid "" "For immutable targets such as strings, numbers, and tuples, the updated " "value is computed, but not assigned back to the input variable:" msgstr "" +"對於不可變 (immutable) 的目標例如字串、數字和 tupple,更新的值會被計算,但不" +"會被再被賦值給輸入變數:" #: ../../library/operator.rst:468 msgid "" "For mutable targets such as lists and dictionaries, the in-place method will " "perform the update, so no subsequent assignment is necessary:" msgstr "" +"對於可變 (mutable) 的目標例如 list 和 dictionary,原地方法將執行更新,因此不" +"需要後續賦值操作:" #: ../../library/operator.rst:480 msgid "``a = iadd(a, b)`` is equivalent to ``a += b``." @@ -770,7 +826,7 @@ msgstr "``a = iand(a, b)`` 等價於 ``a &= b``。" #: ../../library/operator.rst:492 msgid "" "``a = iconcat(a, b)`` is equivalent to ``a += b`` for *a* and *b* sequences." -msgstr "" +msgstr "``a = iconcat(a, b)`` 等價於 ``a += b``\\ ,其中 *a* 和 *b* 為序列。" #: ../../library/operator.rst:498 msgid "``a = ifloordiv(a, b)`` is equivalent to ``a //= b``."