diff --git a/faq/extending.po b/faq/extending.po index 5d22aba70e..96c85e4a7e 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-27 07:52+0000\n" "PO-Revision-Date: 2018-05-23 14:35+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -305,11 +305,11 @@ msgstr "" msgid "For Debian, run ``apt-get install python-dev``." msgstr "" -#: ../../faq/extending.rst:259 +#: ../../faq/extending.rst:258 msgid "How do I tell \"incomplete input\" from \"invalid input\"?" msgstr "" -#: ../../faq/extending.rst:261 +#: ../../faq/extending.rst:260 msgid "" "Sometimes you want to emulate the Python interactive interpreter's behavior, " "where it gives you a continuation prompt when the input is incomplete (e.g. " @@ -318,13 +318,13 @@ msgid "" "message immediately when the input is invalid." msgstr "" -#: ../../faq/extending.rst:267 +#: ../../faq/extending.rst:266 msgid "" "In Python you can use the :mod:`codeop` module, which approximates the " "parser's behavior sufficiently. IDLE uses this, for example." msgstr "" -#: ../../faq/extending.rst:270 +#: ../../faq/extending.rst:269 msgid "" "The easiest way to do it in C is to call :c:func:`PyRun_InteractiveLoop` " "(perhaps in a separate thread) and let the Python interpreter handle the " @@ -334,44 +334,29 @@ msgid "" msgstr "" #: ../../faq/extending.rst:276 -msgid "" -"However sometimes you have to run the embedded Python interpreter in the " -"same thread as your rest application and you can't allow the :c:func:" -"`PyRun_InteractiveLoop` to stop while waiting for user input. A solution is " -"trying to compile the received string with :c:func:`Py_CompileString`. If it " -"compiles without errors, try to execute the returned code object by calling :" -"c:func:`PyEval_EvalCode`. Otherwise save the input for later. If the " -"compilation fails, find out if it's an error or just more input is required " -"- by extracting the message string from the exception tuple and comparing it " -"to the string \"unexpected EOF while parsing\". Here is a complete example " -"using the GNU readline library (you may want to ignore **SIGINT** while " -"calling readline())::" -msgstr "" - -#: ../../faq/extending.rst:401 msgid "How do I find undefined g++ symbols __builtin_new or __pure_virtual?" msgstr "" -#: ../../faq/extending.rst:403 +#: ../../faq/extending.rst:278 msgid "" "To dynamically load g++ extension modules, you must recompile Python, relink " "it using g++ (change LINKCC in the Python Modules Makefile), and link your " "extension module using g++ (e.g., ``g++ -shared -o mymodule.so mymodule.o``)." msgstr "" -#: ../../faq/extending.rst:409 +#: ../../faq/extending.rst:284 msgid "" "Can I create an object class with some methods implemented in C and others " "in Python (e.g. through inheritance)?" msgstr "" -#: ../../faq/extending.rst:411 +#: ../../faq/extending.rst:286 msgid "" "Yes, you can inherit from built-in classes such as :class:`int`, :class:" "`list`, :class:`dict`, etc." msgstr "" -#: ../../faq/extending.rst:414 +#: ../../faq/extending.rst:289 msgid "" "The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index." "html) provides a way of doing this from C++ (i.e. you can inherit from an " diff --git a/library/asyncio-task.po b/library/asyncio-task.po index b0127d076d..33d15cd68b 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-11-17 00:09+0000\n" +"POT-Creation-Date: 2022-02-05 00:08+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -985,8 +985,8 @@ msgstr "" #: ../../library/asyncio-task.rst:1059 msgid "" -"Support for generator-based coroutines is **deprecated** and is scheduled " -"for removal in Python 3.10." +"Support for generator-based coroutines is **deprecated** and is removed in " +"Python 3.11." msgstr "" #: ../../library/asyncio-task.rst:1062 diff --git a/library/collections.po b/library/collections.po index 3910fa35f6..9b06fd5ceb 100644 --- a/library/collections.po +++ b/library/collections.po @@ -10,8 +10,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-14 13:34+0800\n" -"PO-Revision-Date: 2022-01-14 13:26+0800\n" +"POT-Creation-Date: 2022-02-02 05:33+0000\n" +"PO-Revision-Date: 2022-02-07 11:41+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -389,7 +389,7 @@ msgstr "" #: ../../library/collections.rst:273 msgid "" -"As a :class:`dict` subclass, :class:`Counter` Inherited the capability to " +"As a :class:`dict` subclass, :class:`Counter` inherited the capability to " "remember insertion order. Math operations on *Counter* objects also " "preserve order. Results are ordered according to when an element is first " "encountered in the left operand and then by the order encountered in the " @@ -501,28 +501,28 @@ msgid "" "objects to produce multisets (counters that have counts greater than zero). " "Addition and subtraction combine counters by adding or subtracting the " "counts of corresponding elements. Intersection and union return the minimum " -"and maximum of corresponding counts. Each operation can accept inputs with " -"signed counts, but the output will exclude results with counts of zero or " -"less." +"and maximum of corresponding counts. Equality and inclusion compare " +"corresponding counts. Each operation can accept inputs with signed counts, " +"but the output will exclude results with counts of zero or less." msgstr "" "為結合多個 :class:`Counter` 物件以產生 multiset(多重集合,擁有大於 0 計數元" "素的計數器),有提供了幾種數學操作。加法和減法是根據各個對應元素分別將 " -"Counter 加上和減去計數,交集和聯集則分別回傳各個元素最小和最大計數。每一個操" -"作都可以接受輸入帶有正負號的計數,但輸出的 Counter 則會將擁有小於或等於 0 計" -"數的元素剔除。" +"Counter 加上和減去計數,交集和聯集分別回傳各個元素最小和最大計數,相等性與包" +"含性運算則會比較對應的計數。每一個操作都可以接受輸入帶有正負號的計數,但輸出" +"的 Counter 則會將擁有小於或等於 0 計數的元素剔除。" -#: ../../library/collections.rst:383 +#: ../../library/collections.rst:390 msgid "" "Unary addition and subtraction are shortcuts for adding an empty counter or " "subtracting from an empty counter." msgstr "加減法的一元運算子分別是加上空的 Counter 和從空 Counter 減去的簡寫。" -#: ../../library/collections.rst:392 +#: ../../library/collections.rst:399 msgid "" "Added support for unary plus, unary minus, and in-place multiset operations." msgstr "開始支援加減一元運算子和 multiset 的原地 (in-place) 操作。" -#: ../../library/collections.rst:397 +#: ../../library/collections.rst:404 msgid "" "Counters were primarily designed to work with positive integers to represent " "running counts; however, care was taken to not unnecessarily preclude use " @@ -533,7 +533,7 @@ msgstr "" "為負數或為其他型別的案例中,Counter 也小心地被設計成不會預先排除這些特殊元" "素。為了輔助使用於上述案例,這一小節記錄了最小範圍和型別限制。" -#: ../../library/collections.rst:402 +#: ../../library/collections.rst:409 msgid "" "The :class:`Counter` class itself is a dictionary subclass with no " "restrictions on its keys and values. The values are intended to be numbers " @@ -542,13 +542,13 @@ msgstr "" ":class:`Counter` 類別本身是字典的子類別,且不限制其鍵與值。值被用來表示計數," "但實際上你\\ *可以*\\ 儲存任何值。" -#: ../../library/collections.rst:406 +#: ../../library/collections.rst:413 msgid "" "The :meth:`~Counter.most_common` method requires only that the values be " "orderable." msgstr "使用 :meth:`~Counter.most_common` 方法的唯一條件是其值要是可被排序的。" -#: ../../library/collections.rst:408 +#: ../../library/collections.rst:415 msgid "" "For in-place operations such as ``c[key] += 1``, the value type need only " "support addition and subtraction. So fractions, floats, and decimals would " @@ -560,7 +560,7 @@ msgstr "" "數、十進位數與其負值都可以使用。同理,\\ :meth:`~Counter.update` 和 :meth:" "`~Counter.subtract` 也都允許 0 或負值為輸入或輸出。" -#: ../../library/collections.rst:414 +#: ../../library/collections.rst:421 msgid "" "The multiset methods are designed only for use cases with positive values. " "The inputs may be negative or zero, but only outputs with positive values " @@ -570,13 +570,13 @@ msgstr "" "Multiset 相關方法只為了處理正值而設計,其輸入允許是 0 或負值但只有正值會被輸" "出。並無型別限制,但其值的型別須支援加、減及比較運算。" -#: ../../library/collections.rst:419 +#: ../../library/collections.rst:426 msgid "" "The :meth:`~Counter.elements` method requires integer counts. It ignores " "zero and negative counts." msgstr ":meth:`~Counter.elements` 方法需要其計數為正值,如為 0 或負值則忽略。" -#: ../../library/collections.rst:424 +#: ../../library/collections.rst:431 msgid "" "`Bag class `_ in Smalltalk." @@ -584,13 +584,13 @@ msgstr "" "Smalltalk 中的 `Bag class `_\\ 。" -#: ../../library/collections.rst:427 +#: ../../library/collections.rst:434 msgid "" "Wikipedia entry for `Multisets `_." msgstr "" "維基百科上的\\ `多重集合 `_\\ 條目。" -#: ../../library/collections.rst:429 +#: ../../library/collections.rst:436 msgid "" "`C++ multisets `_ tutorial with examples." @@ -598,7 +598,7 @@ msgstr "" "`C++ multisets `_ 教學與範例。" -#: ../../library/collections.rst:432 +#: ../../library/collections.rst:439 msgid "" "For mathematical operations on multisets and their use cases, see *Knuth, " "Donald. The Art of Computer Programming Volume II, Section 4.6.3, Exercise " @@ -607,7 +607,7 @@ msgstr "" "Multiset 的數學運算及其使用時機,參考 *Knuth, Donald. The Art of Computer " "Programming Volume II, Section 4.6.3, Exercise 19*\\ 。" -#: ../../library/collections.rst:436 +#: ../../library/collections.rst:443 msgid "" "To enumerate all distinct multisets of a given size over a given set of " "elements, see :func:`itertools.combinations_with_replacement`::" @@ -617,11 +617,11 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:443 +#: ../../library/collections.rst:450 msgid ":class:`deque` objects" msgstr ":class:`deque` 物件" -#: ../../library/collections.rst:447 +#: ../../library/collections.rst:454 msgid "" "Returns a new deque object initialized left-to-right (using :meth:`append`) " "with data from *iterable*. If *iterable* is not specified, the new deque is " @@ -631,7 +631,7 @@ msgstr "" "meth:`append`\\ )加入來做初始化。如果 *iterable* 並未給定,回傳的則是一個空" "的 deque。" -#: ../../library/collections.rst:450 +#: ../../library/collections.rst:457 msgid "" "Deques are a generalization of stacks and queues (the name is pronounced " "\"deck\" and is short for \"double-ended queue\"). Deques support thread-" @@ -642,7 +642,7 @@ msgstr "" "的一般化。deque 支援執行緒安全 (thread-safe),且能夠有效率地節省記憶體在頭和" "尾加入和移除元素,兩個方向的表現都大致為 O(1) 複雜度。" -#: ../../library/collections.rst:455 +#: ../../library/collections.rst:462 msgid "" "Though :class:`list` objects support similar operations, they are optimized " "for fast fixed-length operations and incur O(n) memory movement costs for " @@ -653,7 +653,7 @@ msgstr "" "變底層資料的長度及位置的 ``pop(0)`` 和 ``insert(0, v)`` 操作,記憶體移動則為 " "O(n) 複雜度。" -#: ../../library/collections.rst:461 +#: ../../library/collections.rst:468 msgid "" "If *maxlen* is not specified or is ``None``, deques may grow to an arbitrary " "length. Otherwise, the deque is bounded to the specified maximum length. " @@ -669,37 +669,37 @@ msgstr "" "Unix ``tail`` filter 類似的功能,可用於追蹤使用者在意的那些最新執行事項或數據" "源。" -#: ../../library/collections.rst:470 +#: ../../library/collections.rst:477 msgid "Deque objects support the following methods:" msgstr "Deque 物件支援以下方法:" -#: ../../library/collections.rst:474 +#: ../../library/collections.rst:481 msgid "Add *x* to the right side of the deque." msgstr "將 *x* 自 deque 的右側加入。" -#: ../../library/collections.rst:479 +#: ../../library/collections.rst:486 msgid "Add *x* to the left side of the deque." msgstr "將 *x* 自 deque 的左側加入。" -#: ../../library/collections.rst:484 +#: ../../library/collections.rst:491 msgid "Remove all elements from the deque leaving it with length 0." msgstr "將所有元素從 deque 中移除,使其長度為 0。" -#: ../../library/collections.rst:489 +#: ../../library/collections.rst:496 msgid "Create a shallow copy of the deque." msgstr "建立一個 deque 的淺複製 (shallow copy)。" -#: ../../library/collections.rst:496 +#: ../../library/collections.rst:503 msgid "Count the number of deque elements equal to *x*." msgstr "計算 deque 內元素為 *x* 的個數。" -#: ../../library/collections.rst:503 +#: ../../library/collections.rst:510 msgid "" "Extend the right side of the deque by appending elements from the iterable " "argument." msgstr "將 iterable 引數加入 deque 的右側。" -#: ../../library/collections.rst:509 +#: ../../library/collections.rst:516 msgid "" "Extend the left side of the deque by appending elements from *iterable*. " "Note, the series of left appends results in reversing the order of elements " @@ -708,7 +708,7 @@ msgstr "" "將 iterable 引數加入 deque 的左側。要注意的是,加入後的元素順序和 iterable 參" "數是相反的。" -#: ../../library/collections.rst:516 +#: ../../library/collections.rst:523 msgid "" "Return the position of *x* in the deque (at or after index *start* and " "before index *stop*). Returns the first match or raises :exc:`ValueError` " @@ -717,11 +717,11 @@ msgstr "" "回傳 deque 中 *x* 的位置(或在索引 *start* 之後、索引 *stop* 之前的位置)。回" "傳第一個匹配的位置,如果沒找到就引發 :exc:`ValueError`\\ 。" -#: ../../library/collections.rst:525 +#: ../../library/collections.rst:532 msgid "Insert *x* into the deque at position *i*." msgstr "在 deque 位置 *i* 中插入 *x*\\ 。" -#: ../../library/collections.rst:527 +#: ../../library/collections.rst:534 msgid "" "If the insertion would cause a bounded deque to grow beyond *maxlen*, an :" "exc:`IndexError` is raised." @@ -729,7 +729,7 @@ msgstr "" "如果此插入操作導致 deque 超過其長度上限 *maxlen* 的話,會引發 :exc:" "`IndexError` 例外。" -#: ../../library/collections.rst:535 +#: ../../library/collections.rst:542 msgid "" "Remove and return an element from the right side of the deque. If no " "elements are present, raises an :exc:`IndexError`." @@ -737,7 +737,7 @@ msgstr "" "移除並回傳 deque 的最右側元素,若本來就沒有任何元素,則會引發 :exc:" "`IndexError`\\ 。" -#: ../../library/collections.rst:541 +#: ../../library/collections.rst:548 msgid "" "Remove and return an element from the left side of the deque. If no elements " "are present, raises an :exc:`IndexError`." @@ -745,24 +745,24 @@ msgstr "" "移除並回傳 deque 的最左側元素,若本來就沒有任何元素,則會引發 :exc:" "`IndexError`\\ 。" -#: ../../library/collections.rst:547 +#: ../../library/collections.rst:554 msgid "" "Remove the first occurrence of *value*. If not found, raises a :exc:" "`ValueError`." msgstr "" "移除第一個出現的 *value*\\ ,如果沒找到的話就引發一個 :exc:`ValueError`\\ 。" -#: ../../library/collections.rst:553 +#: ../../library/collections.rst:560 msgid "Reverse the elements of the deque in-place and then return ``None``." msgstr "將 deque 中的元素原地 (in-place) 倒序排列並回傳 ``None``\\ 。" -#: ../../library/collections.rst:560 +#: ../../library/collections.rst:567 msgid "" "Rotate the deque *n* steps to the right. If *n* is negative, rotate to the " "left." msgstr "將 deque 向右輪轉 *n* 步。若 *n* 為負值則向左輪轉。" -#: ../../library/collections.rst:563 +#: ../../library/collections.rst:570 msgid "" "When the deque is not empty, rotating one step to the right is equivalent to " "``d.appendleft(d.pop())``, and rotating one step to the left is equivalent " @@ -771,15 +771,15 @@ msgstr "" "當 deque 不是空的,向右輪轉一步和 ``d.appendleft(d.pop())`` 有相同意義,而向" "左輪轉亦等價於 ``d.append(d.popleft())``\\ 。" -#: ../../library/collections.rst:568 +#: ../../library/collections.rst:575 msgid "Deque objects also provide one read-only attribute:" msgstr "Deque 物件也提供了一個唯讀屬性:" -#: ../../library/collections.rst:572 +#: ../../library/collections.rst:579 msgid "Maximum size of a deque or ``None`` if unbounded." msgstr "Deque 的最大長度,如果不限制長度的話則為 ``None``\\ 。" -#: ../../library/collections.rst:577 +#: ../../library/collections.rst:584 msgid "" "In addition to the above, deques support iteration, pickling, ``len(d)``, " "``reversed(d)``, ``copy.copy(d)``, ``copy.deepcopy(d)``, membership testing " @@ -792,7 +792,7 @@ msgstr "" "及像是 ``d[0]`` 的標號引用來取得第一個元素。在兩端做索引存取的複雜度為 O(1) " "但越靠近中間則減慢至 O(n)。若想要隨機而快速的存取,使用 list 會較為合適。" -#: ../../library/collections.rst:583 +#: ../../library/collections.rst:590 msgid "" "Starting in version 3.5, deques support ``__add__()``, ``__mul__()``, and " "``__imul__()``." @@ -800,19 +800,19 @@ msgstr "" "自從 3.5 版本起,deque 開始支援 ``__add__()``、``__mul__()`` 和 " "``__imul__()``。" -#: ../../library/collections.rst:586 +#: ../../library/collections.rst:593 msgid "Example:" msgstr "範例:" -#: ../../library/collections.rst:643 +#: ../../library/collections.rst:650 msgid ":class:`deque` Recipes" msgstr ":class:`deque` 用法" -#: ../../library/collections.rst:645 +#: ../../library/collections.rst:652 msgid "This section shows various approaches to working with deques." msgstr "這一章節提供了多種操作 deque 的案例。" -#: ../../library/collections.rst:647 +#: ../../library/collections.rst:654 msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" @@ -821,7 +821,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:655 +#: ../../library/collections.rst:662 msgid "" "Another approach to using deques is to maintain a sequence of recently added " "elements by appending to the right and popping to the left::" @@ -830,7 +830,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:670 +#: ../../library/collections.rst:677 msgid "" "A `round-robin scheduler `_ can be implemented with input iterators stored in a :" @@ -846,7 +846,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:689 +#: ../../library/collections.rst:696 msgid "" "The :meth:`~deque.rotate` method provides a way to implement :class:`deque` " "slicing and deletion. For example, a pure Python implementation of ``del " @@ -858,7 +858,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:698 +#: ../../library/collections.rst:705 msgid "" "To implement :class:`deque` slicing, use a similar approach applying :meth:" "`~deque.rotate` to bring a target element to the left side of the deque. " @@ -873,11 +873,11 @@ msgstr "" "就能簡單地實現 Forth 風格的 stack 操作,例如 ``dup``、``drop``、``swap``、" "``over``、``pick``、``rot`` 和 ``roll``。" -#: ../../library/collections.rst:708 +#: ../../library/collections.rst:715 msgid ":class:`defaultdict` objects" msgstr ":class:`defaultdict` 物件" -#: ../../library/collections.rst:712 +#: ../../library/collections.rst:719 msgid "" "Return a new dictionary-like object. :class:`defaultdict` is a subclass of " "the built-in :class:`dict` class. It overrides one method and adds one " @@ -888,7 +888,7 @@ msgstr "" "的子類別。它覆蓋掉了一個方法並添加了一個可寫入的實例變數。其餘功能與 :class:" "`dict` 相同,此文件不再複述。" -#: ../../library/collections.rst:717 +#: ../../library/collections.rst:724 msgid "" "The first argument provides the initial value for the :attr:" "`default_factory` attribute; it defaults to ``None``. All remaining " @@ -899,13 +899,13 @@ msgstr "" "所有其他的引數(包括關鍵字引數)都會被傳遞給 :class:`dict` 的建構函式 " "(constructor)。" -#: ../../library/collections.rst:723 +#: ../../library/collections.rst:730 msgid "" ":class:`defaultdict` objects support the following method in addition to the " "standard :class:`dict` operations:" msgstr ":class:`defaultdict` 物件支援以下 :class:`dict` 所沒有的方法:" -#: ../../library/collections.rst:728 +#: ../../library/collections.rst:735 msgid "" "If the :attr:`default_factory` attribute is ``None``, this raises a :exc:" "`KeyError` exception with the *key* as argument." @@ -913,7 +913,7 @@ msgstr "" "如果 :attr:`default_factory` 屬性為 ``None``,呼叫此方法會引發一個附帶引數 " "*key* 的 :exc:`KeyError` 例外。" -#: ../../library/collections.rst:731 +#: ../../library/collections.rst:738 msgid "" "If :attr:`default_factory` is not ``None``, it is called without arguments " "to provide a default value for the given *key*, this value is inserted in " @@ -923,14 +923,14 @@ msgstr "" "*key* 提供一個預設值,這個值和 *key* 被作為鍵值對來插入到字典中,並且被此方法" "所回傳。" -#: ../../library/collections.rst:735 +#: ../../library/collections.rst:742 msgid "" "If calling :attr:`default_factory` raises an exception this exception is " "propagated unchanged." msgstr "" "如果呼叫 :attr:`default_factory` 時發生例外,則該例外將會保持不變地向外傳遞。" -#: ../../library/collections.rst:738 +#: ../../library/collections.rst:745 msgid "" "This method is called by the :meth:`__getitem__` method of the :class:`dict` " "class when the requested key is not found; whatever it returns or raises is " @@ -940,7 +940,7 @@ msgstr "" "方法呼叫。無論此方法回傳了值還是引發了例外,都會被 :meth:`__getitem__` 所傳" "遞。" -#: ../../library/collections.rst:742 +#: ../../library/collections.rst:749 msgid "" "Note that :meth:`__missing__` is *not* called for any operations besides :" "meth:`__getitem__`. This means that :meth:`get` will, like normal " @@ -951,11 +951,11 @@ msgstr "" "叫,這意味著 :meth:`get` 會像一般的 dict 那樣回傳 ``None`` 做為預設值,而非使" "用 :attr:`default_factory`。" -#: ../../library/collections.rst:748 +#: ../../library/collections.rst:755 msgid ":class:`defaultdict` objects support the following instance variable:" msgstr ":class:`defaultdict` 物件支援以下實例變數:" -#: ../../library/collections.rst:753 +#: ../../library/collections.rst:760 msgid "" "This attribute is used by the :meth:`__missing__` method; it is initialized " "from the first argument to the constructor, if present, or to ``None``, if " @@ -964,16 +964,16 @@ msgstr "" "此屬性為 :meth:`__missing__` 方法所使用。如果有引數被傳入建構函式,則此屬性會" "被初始化成第一個引數,如未提供引數則被初始化為 ``None``。" -#: ../../library/collections.rst:757 ../../library/collections.rst:1156 +#: ../../library/collections.rst:764 ../../library/collections.rst:1163 msgid "" "Added merge (``|``) and update (``|=``) operators, specified in :pep:`584`." msgstr "新增合併 (``|``) 和更新 (``|=``) 運算子,請見 :pep:`584`。" -#: ../../library/collections.rst:763 +#: ../../library/collections.rst:770 msgid ":class:`defaultdict` Examples" msgstr ":class:`defaultdict` 範例" -#: ../../library/collections.rst:765 +#: ../../library/collections.rst:772 msgid "" "Using :class:`list` as the :attr:`~defaultdict.default_factory`, it is easy " "to group a sequence of key-value pairs into a dictionary of lists:" @@ -981,7 +981,7 @@ msgstr "" "使用 :class:`list` 作為 :attr:`~defaultdict.default_factory` 可以很輕鬆地將鍵" "值對序列轉換為包含 list 之字典:" -#: ../../library/collections.rst:776 +#: ../../library/collections.rst:783 msgid "" "When each key is encountered for the first time, it is not already in the " "mapping; so an entry is automatically created using the :attr:`~defaultdict." @@ -999,7 +999,7 @@ msgstr "" "會新增另一個值到 list 中。和使用與其等價的 :meth:`dict.setdefault` 相比,這個" "技巧更加快速和簡單:" -#: ../../library/collections.rst:791 +#: ../../library/collections.rst:798 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`int` makes the :" "class:`defaultdict` useful for counting (like a bag or multiset in other " @@ -1008,7 +1008,7 @@ msgstr "" "設定 :attr:`~defaultdict.default_factory` 為 :class:`int` 使得 :class:" "`defaultdict` 可被用於計數(類似其他語言中的 bag 或 multiset):" -#: ../../library/collections.rst:803 +#: ../../library/collections.rst:810 msgid "" "When a letter is first encountered, it is missing from the mapping, so the :" "attr:`~defaultdict.default_factory` function calls :func:`int` to supply a " @@ -1019,7 +1019,7 @@ msgstr "" "default_factory` 函式會呼叫 :func:`int` 來提供一個整數 0 作為預設值。後續的增" "加操作繼續對每個字母做計數。" -#: ../../library/collections.rst:807 +#: ../../library/collections.rst:814 msgid "" "The function :func:`int` which always returns zero is just a special case of " "constant functions. A faster and more flexible way to create constant " @@ -1029,7 +1029,7 @@ msgstr "" "函式 :func:`int` 總是回傳 0,這是常數函式的特殊情況。一個更快、更有彈性的方法" "是使用 lambda 函式來提供任何常數值(不用一定要是 0):" -#: ../../library/collections.rst:819 +#: ../../library/collections.rst:826 msgid "" "Setting the :attr:`~defaultdict.default_factory` to :class:`set` makes the :" "class:`defaultdict` useful for building a dictionary of sets:" @@ -1037,11 +1037,11 @@ msgstr "" "將 :attr:`~defaultdict.default_factory` 設為 :class:`set` 使 :class:" "`defaultdict` 可用於構建一個值為 set 的字典:" -#: ../../library/collections.rst:832 +#: ../../library/collections.rst:839 msgid ":func:`namedtuple` Factory Function for Tuples with Named Fields" msgstr ":func:`namedtuple` 擁有具名欄位之 tuple 的工廠函式" -#: ../../library/collections.rst:834 +#: ../../library/collections.rst:841 msgid "" "Named tuples assign meaning to each position in a tuple and allow for more " "readable, self-documenting code. They can be used wherever regular tuples " @@ -1052,7 +1052,7 @@ msgstr "" "件性。它們可以用於任何普通 tuple 可使用的場合,賦予其透過名稱(而非位置索引)" "來存取欄位的能力。" -#: ../../library/collections.rst:840 +#: ../../library/collections.rst:847 msgid "" "Returns a new tuple subclass named *typename*. The new subclass is used to " "create tuple-like objects that have fields accessible by attribute lookup as " @@ -1066,7 +1066,7 @@ msgstr "" "位名 field_names)和一個好用的 :meth:`__repr__` 方法,可將 tuple 內容以 " "``name=value`` 格式列出。" -#: ../../library/collections.rst:846 +#: ../../library/collections.rst:853 msgid "" "The *field_names* are a sequence of strings such as ``['x', 'y']``. " "Alternatively, *field_names* can be a single string with each fieldname " @@ -1075,7 +1075,7 @@ msgstr "" "*field_names* 是一個像 ``['x', 'y']`` 一樣的字串序列。*field_names* 也可以是" "一個用空白或逗號分隔各個欄位名稱的字串,比如 ``'x y'`` 或者 ``'x, y'``。" -#: ../../library/collections.rst:850 +#: ../../library/collections.rst:857 msgid "" "Any valid Python identifier may be used for a fieldname except for names " "starting with an underscore. Valid identifiers consist of letters, digits, " @@ -1087,7 +1087,7 @@ msgstr "" "詞 :mod:`keyword`,例如 *class*、*for*、*return*、*global*、*pass* 或 " "*raise*。" -#: ../../library/collections.rst:856 +#: ../../library/collections.rst:863 msgid "" "If *rename* is true, invalid fieldnames are automatically replaced with " "positional names. For example, ``['abc', 'def', 'ghi', 'abc']`` is " @@ -1098,7 +1098,7 @@ msgstr "" "'def', 'ghi', 'abc']`` 會被轉換成 ``['abc', '_1', 'ghi', '_3']``,移除了關鍵" "字 ``def`` 和重複欄位名 ``abc``。" -#: ../../library/collections.rst:861 +#: ../../library/collections.rst:868 msgid "" "*defaults* can be ``None`` or an :term:`iterable` of default values. Since " "fields with a default value must come after any fields without a default, " @@ -1112,14 +1112,14 @@ msgstr "" "如 fieldnames 為 ``['x', 'y', 'z']`` 且 defaults 為 ``(1, 2)``,那麼 ``x`` 就" "必須被給定一個引數,``y`` 被預設為 ``1``,``z`` 則被預設為 ``2``。" -#: ../../library/collections.rst:868 +#: ../../library/collections.rst:875 msgid "" "If *module* is defined, the ``__module__`` attribute of the named tuple is " "set to that value." msgstr "" "如果 *module* 值有被定義,named tuple 的 ``__module__`` 屬性就被設定為該值。" -#: ../../library/collections.rst:871 +#: ../../library/collections.rst:878 msgid "" "Named tuple instances do not have per-instance dictionaries, so they are " "lightweight and require no more memory than regular tuples." @@ -1127,17 +1127,17 @@ msgstr "" "Named tuple 實例中沒有字典,所以它們更加輕量,且和一般 tuple 相比佔用更少記憶" "體。" -#: ../../library/collections.rst:874 +#: ../../library/collections.rst:881 msgid "" "To support pickling, the named tuple class should be assigned to a variable " "that matches *typename*." msgstr "要支援 pickle,應將 named tuple 類別賦值給一個符合 *typename* 的變數。" -#: ../../library/collections.rst:877 +#: ../../library/collections.rst:884 msgid "Added support for *rename*." msgstr "新增對於 *rename* 的支援。" -#: ../../library/collections.rst:880 +#: ../../library/collections.rst:887 msgid "" "The *verbose* and *rename* parameters became :ref:`keyword-only arguments " "`." @@ -1145,20 +1145,20 @@ msgstr "" "*verbose* 和 *rename* 參數成為\\ :ref:`僅限關鍵字引數 `\\ 。" -#: ../../library/collections.rst:884 +#: ../../library/collections.rst:891 msgid "Added the *module* parameter." msgstr "新增 *module* 參數。" -#: ../../library/collections.rst:887 +#: ../../library/collections.rst:894 msgid "Removed the *verbose* parameter and the :attr:`_source` attribute." msgstr "移除 *verbose* 參數和 :attr:`_source` 屬性。" -#: ../../library/collections.rst:890 +#: ../../library/collections.rst:897 msgid "" "Added the *defaults* parameter and the :attr:`_field_defaults` attribute." msgstr "新增 *defaults* 參數和 :attr:`_field_defaults` 屬性。" -#: ../../library/collections.rst:910 +#: ../../library/collections.rst:917 msgid "" "Named tuples are especially useful for assigning field names to result " "tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" @@ -1168,7 +1168,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:926 +#: ../../library/collections.rst:933 msgid "" "In addition to the methods inherited from tuples, named tuples support three " "additional methods and two attributes. To prevent conflicts with field " @@ -1177,22 +1177,22 @@ msgstr "" "除了繼承自 tuple 的方法,named tuple 還支援三個額外的方法和兩個屬性。為了防止" "欄位名稱有衝突,方法和屬性的名稱以底線開頭。" -#: ../../library/collections.rst:932 +#: ../../library/collections.rst:939 msgid "" "Class method that makes a new instance from an existing sequence or iterable." msgstr "從已存在的序列或可疊代物件建立一個新實例的類別方法。" -#: ../../library/collections.rst:942 +#: ../../library/collections.rst:949 msgid "" "Return a new :class:`dict` which maps field names to their corresponding " "values:" msgstr "回傳一個將欄位名稱對映至對應值的 :class:`dict`:" -#: ../../library/collections.rst:951 +#: ../../library/collections.rst:958 msgid "Returns an :class:`OrderedDict` instead of a regular :class:`dict`." msgstr "回傳一個 :class:`OrderedDict` 而非 :class:`dict`。" -#: ../../library/collections.rst:954 +#: ../../library/collections.rst:961 msgid "" "Returns a regular :class:`dict` instead of an :class:`OrderedDict`. As of " "Python 3.7, regular dicts are guaranteed to be ordered. If the extra " @@ -1203,7 +1203,7 @@ msgstr "" "dict 已經保證有順序性,如果需要 :class:`OrderedDict` 所專屬的特性,推薦的解法" "是將結果專換成所需的類型:\\ ``OrderedDict(nt._asdict())``\\ 。" -#: ../../library/collections.rst:963 +#: ../../library/collections.rst:970 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" @@ -1212,7 +1212,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:975 +#: ../../library/collections.rst:982 msgid "" "Tuple of strings listing the field names. Useful for introspection and for " "creating new named tuple types from existing named tuples." @@ -1220,17 +1220,17 @@ msgstr "" "列出 tuple 欄位名稱的字串,用於自我檢查或是從現有 named tuple 建立一個新的 " "named tuple 型別。" -#: ../../library/collections.rst:990 +#: ../../library/collections.rst:997 msgid "Dictionary mapping field names to default values." msgstr "將欄位名稱對映至預設值的字典。" -#: ../../library/collections.rst:1000 +#: ../../library/collections.rst:1007 msgid "" "To retrieve a field whose name is stored in a string, use the :func:" "`getattr` function:" msgstr "要取得這個名稱存於字串的欄位,要使用 :func:`getattr` 函式:" -#: ../../library/collections.rst:1006 +#: ../../library/collections.rst:1013 msgid "" "To convert a dictionary to a named tuple, use the double-star-operator (as " "described in :ref:`tut-unpacking-arguments`):" @@ -1238,7 +1238,7 @@ msgstr "" "(如\\ :ref:`tut-unpacking-arguments`\\ 所述)將一個字典轉換成 named tuple," "要使用 \\*\\* 雙星號運算子:" -#: ../../library/collections.rst:1013 +#: ../../library/collections.rst:1020 msgid "" "Since a named tuple is a regular Python class, it is easy to add or change " "functionality with a subclass. Here is how to add a calculated field and a " @@ -1247,7 +1247,7 @@ msgstr "" "因為一個 named tuple 是一個常規的 Python 類別,我們可以很容易的透過子類別來新" "增或更改功能,以下是如何新增一個計算得到的欄位和固定寬度的輸出列印格式:" -#: ../../library/collections.rst:1032 +#: ../../library/collections.rst:1039 msgid "" "The subclass shown above sets ``__slots__`` to an empty tuple. This helps " "keep memory requirements low by preventing the creation of instance " @@ -1256,7 +1256,7 @@ msgstr "" "上面的子類別將 ``__slots__`` 設定為空 tuple,這樣一來就防止了字典實例被建立," "因而保持了較低的記憶體用量。" -#: ../../library/collections.rst:1035 +#: ../../library/collections.rst:1042 msgid "" "Subclassing is not useful for adding new, stored fields. Instead, simply " "create a new named tuple type from the :attr:`~somenamedtuple._fields` " @@ -1265,17 +1265,17 @@ msgstr "" "子類別化無法用於增加新的、已被儲存的欄位,應當透過 :attr:`~somenamedtuple." "_fields` 屬性以建立一個新的 named tuple 來實現:" -#: ../../library/collections.rst:1040 +#: ../../library/collections.rst:1047 msgid "" "Docstrings can be customized by making direct assignments to the ``__doc__`` " "fields:" msgstr "透過直接賦值給 ``__doc__``,可以自訂說明文件字串:" -#: ../../library/collections.rst:1049 +#: ../../library/collections.rst:1056 msgid "Property docstrings became writeable." msgstr "文件字串屬性變成可寫入。" -#: ../../library/collections.rst:1054 +#: ../../library/collections.rst:1061 msgid "" "See :class:`typing.NamedTuple` for a way to add type hints for named " "tuples. It also provides an elegant notation using the :keyword:`class` " @@ -1286,7 +1286,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:1063 +#: ../../library/collections.rst:1070 msgid "" "See :meth:`types.SimpleNamespace` for a mutable namespace based on an " "underlying dictionary instead of a tuple." @@ -1294,7 +1294,7 @@ msgstr "" "關於以 dict 而非 tuple 為底層的可變命名空間,請參考 :meth:`types." "SimpleNamespace`。" -#: ../../library/collections.rst:1066 +#: ../../library/collections.rst:1073 msgid "" "The :mod:`dataclasses` module provides a decorator and functions for " "automatically adding generated special methods to user-defined classes." @@ -1302,11 +1302,11 @@ msgstr "" ":mod:`dataclasses` 模組提供了一個裝飾器和一些函式,用於自動將被生成的特殊方法" "新增到使用者定義的類別中。" -#: ../../library/collections.rst:1071 +#: ../../library/collections.rst:1078 msgid ":class:`OrderedDict` objects" msgstr ":class:`OrderedDict` 物件" -#: ../../library/collections.rst:1073 +#: ../../library/collections.rst:1080 msgid "" "Ordered dictionaries are just like regular dictionaries but have some extra " "capabilities relating to ordering operations. They have become less " @@ -1317,11 +1317,11 @@ msgstr "" "功能,但由於內建的 :class:`dict` 類別現在已經有記憶插入順序的能力(Python " "3.7 中確保了這種新行為),它們變得不那麼重要了。" -#: ../../library/collections.rst:1079 +#: ../../library/collections.rst:1086 msgid "Some differences from :class:`dict` still remain:" msgstr "仍存在一些與 :class:`dict` 的不同之處:" -#: ../../library/collections.rst:1081 +#: ../../library/collections.rst:1088 msgid "" "The regular :class:`dict` was designed to be very good at mapping " "operations. Tracking insertion order was secondary." @@ -1329,7 +1329,7 @@ msgstr "" "常規的 :class:`dict` 被設計成非常擅長於對映相關操作,追蹤插入的順序為次要目" "標。" -#: ../../library/collections.rst:1084 +#: ../../library/collections.rst:1091 msgid "" "The :class:`OrderedDict` was designed to be good at reordering operations. " "Space efficiency, iteration speed, and the performance of update operations " @@ -1338,7 +1338,7 @@ msgstr "" ":class:`OrderedDict` 則被設計成擅長於重新排序相關的操作,空間效率、疊代速度和" "更新操作的效能則為次要設計目標。" -#: ../../library/collections.rst:1088 +#: ../../library/collections.rst:1095 msgid "" "Algorithmically, :class:`OrderedDict` can handle frequent reordering " "operations better than :class:`dict`. This makes it suitable for tracking " @@ -1349,12 +1349,12 @@ msgstr "" "序操作,這讓它適合用於追蹤近期存取紀錄(例如用於 `LRU cache `_)。" -#: ../../library/collections.rst:1093 +#: ../../library/collections.rst:1100 msgid "" "The equality operation for :class:`OrderedDict` checks for matching order." msgstr ":class:`OrderedDict` 之相等性運算會檢查順序是否相同。" -#: ../../library/collections.rst:1095 +#: ../../library/collections.rst:1102 msgid "" "The :meth:`popitem` method of :class:`OrderedDict` has a different " "signature. It accepts an optional argument to specify which item is popped." @@ -1362,7 +1362,7 @@ msgstr "" ":class:`OrderedDict` 類別的 :meth:`popitem` 方法有不同的函數簽名 " "(signature),它接受傳入一個選擇性引數來指定要移除哪個元素。" -#: ../../library/collections.rst:1098 +#: ../../library/collections.rst:1105 msgid "" ":class:`OrderedDict` has a :meth:`move_to_end` method to efficiently " "reposition an element to an endpoint." @@ -1370,18 +1370,18 @@ msgstr "" ":class:`OrderedDict` 有個 :meth:`move_to_end` 方法可有效率地將一個元素重新排" "列到任一端。" -#: ../../library/collections.rst:1101 +#: ../../library/collections.rst:1108 msgid "Until Python 3.8, :class:`dict` lacked a :meth:`__reversed__` method." msgstr "在 Python 3.8 之前,:class:`dict` 並沒有 :meth:`__reversed__` 方法。" -#: ../../library/collections.rst:1106 +#: ../../library/collections.rst:1113 msgid "" "Return an instance of a :class:`dict` subclass that has methods specialized " "for rearranging dictionary order." msgstr "" "回傳一個 :class:`dict` 子類別的實例,它具有專門用於重新排列字典順序的方法。" -#: ../../library/collections.rst:1113 +#: ../../library/collections.rst:1120 msgid "" "The :meth:`popitem` method for ordered dictionaries returns and removes a " "(key, value) pair. The pairs are returned in :abbr:`LIFO (last-in, first-" @@ -1393,7 +1393,7 @@ msgstr "" "回傳鍵值對,否則就按 :abbr:`FIFO (first-in, first-out)` 先進先出的順序回傳鍵" "值對。" -#: ../../library/collections.rst:1120 +#: ../../library/collections.rst:1127 msgid "" "Move an existing *key* to either end of an ordered dictionary. The item is " "moved to the right end if *last* is true (the default) or to the beginning " @@ -1403,7 +1403,7 @@ msgstr "" "設值)則將元素移至右端;如果 *last* 為假值則將元素移至左端。如果 *key* 不存在" "則會引發 :exc:`KeyError`:" -#: ../../library/collections.rst:1137 +#: ../../library/collections.rst:1144 msgid "" "In addition to the usual mapping methods, ordered dictionaries also support " "reverse iteration using :func:`reversed`." @@ -1411,7 +1411,7 @@ msgstr "" "除了普通的對映方法,ordered dictionary 還支援了透過 :func:`reversed` 來做倒序" "疊代。" -#: ../../library/collections.rst:1140 +#: ../../library/collections.rst:1147 msgid "" "Equality tests between :class:`OrderedDict` objects are order-sensitive and " "are implemented as ``list(od1.items())==list(od2.items())``. Equality tests " @@ -1425,7 +1425,7 @@ msgstr "" "和其他 :class:`~collections.abc.Mapping` 物件間的相等性運算則像普通字典一樣不" "考慮順序性,這使得 :class:`OrderedDict` 可於任何字典可使用的時機中被替換掉。" -#: ../../library/collections.rst:1147 +#: ../../library/collections.rst:1154 msgid "" "The items, keys, and values :term:`views ` of :class:" "`OrderedDict` now support reverse iteration using :func:`reversed`." @@ -1433,7 +1433,7 @@ msgstr "" ":class:`OrderedDict` 的項 (item)、鍵與值之\\ :term:`視圖 `" "\\ 現在可透過 :func:`reversed` 來倒序疊代。" -#: ../../library/collections.rst:1151 +#: ../../library/collections.rst:1158 msgid "" "With the acceptance of :pep:`468`, order is retained for keyword arguments " "passed to the :class:`OrderedDict` constructor and its :meth:`update` method." @@ -1441,11 +1441,11 @@ msgstr "" "隨著 :pep:`468` 被核可,被傳入給 :class:`OrderedDict` 建構函式與其 :meth:" "`update` 方法的關鍵字引數之順序被保留了下來。" -#: ../../library/collections.rst:1161 +#: ../../library/collections.rst:1168 msgid ":class:`OrderedDict` Examples and Recipes" msgstr ":class:`OrderedDict` 範例與用法" -#: ../../library/collections.rst:1163 +#: ../../library/collections.rst:1170 msgid "" "It is straightforward to create an ordered dictionary variant that remembers " "the order the keys were *last* inserted. If a new entry overwrites an " @@ -1457,7 +1457,7 @@ msgstr "" "\n" "::" -#: ../../library/collections.rst:1175 +#: ../../library/collections.rst:1182 msgid "" "An :class:`OrderedDict` would also be useful for implementing variants of :" "func:`functools.lru_cache`:" @@ -1465,11 +1465,11 @@ msgstr "" ":class:`OrderedDict` 在實現一個 :func:`functools.lru_cache` 的變形版本時也非" "常有用:" -#: ../../library/collections.rst:1273 +#: ../../library/collections.rst:1280 msgid ":class:`UserDict` objects" msgstr ":class:`UserDict` 物件" -#: ../../library/collections.rst:1275 +#: ../../library/collections.rst:1282 msgid "" "The class, :class:`UserDict` acts as a wrapper around dictionary objects. " "The need for this class has been partially supplanted by the ability to " @@ -1480,7 +1480,7 @@ msgstr "" "`dict` 建立子類別,這個類別的需求已部分被滿足,不過這個類別使用起來更方便,因" "為被包裝的字典可以作為其屬性來存取。" -#: ../../library/collections.rst:1283 +#: ../../library/collections.rst:1290 msgid "" "Class that simulates a dictionary. The instance's contents are kept in a " "regular dictionary, which is accessible via the :attr:`data` attribute of :" @@ -1492,23 +1492,23 @@ msgstr "" "`data` 屬性來做存取。如果有提供 *initialdata*\\ ,\\ :attr:`data` 屬性會被初" "始化為其值;要注意指到 *initialdata* 的參照不會被保留,使其可被用於其他目的。" -#: ../../library/collections.rst:1289 +#: ../../library/collections.rst:1296 msgid "" "In addition to supporting the methods and operations of mappings, :class:" "`UserDict` instances provide the following attribute:" msgstr "" "除了支援作為對映所需的方法與操作,\\ :class:`UserDict` 實例提供了以下屬性:" -#: ../../library/collections.rst:1294 +#: ../../library/collections.rst:1301 msgid "" "A real dictionary used to store the contents of the :class:`UserDict` class." msgstr "一個真實的字典,用於儲存 :class:`UserDict` 類別的資料內容。" -#: ../../library/collections.rst:1300 +#: ../../library/collections.rst:1307 msgid ":class:`UserList` objects" msgstr ":class:`UserList` 物件" -#: ../../library/collections.rst:1302 +#: ../../library/collections.rst:1309 msgid "" "This class acts as a wrapper around list objects. It is a useful base class " "for your own list-like classes which can inherit from them and override " @@ -1519,7 +1519,7 @@ msgstr "" "入新方法來定義你所需的一個類似於 list 的類別。如此一來,我們可以為 list 加入" "新的特性。" -#: ../../library/collections.rst:1307 +#: ../../library/collections.rst:1314 msgid "" "The need for this class has been partially supplanted by the ability to " "subclass directly from :class:`list`; however, this class can be easier to " @@ -1528,7 +1528,7 @@ msgstr "" "因為已經可以直接自 :class:`list` 建立子類別,這個類別的需求已部分被滿足,不過" "這個類別使用起來更方便,因為被包裝的 list 可以作為其屬性來存取。" -#: ../../library/collections.rst:1313 +#: ../../library/collections.rst:1320 msgid "" "Class that simulates a list. The instance's contents are kept in a regular " "list, which is accessible via the :attr:`data` attribute of :class:" @@ -1541,21 +1541,21 @@ msgstr "" "list ``[]``。\\ *list* 可以是任何 iterable,例如一個真實的 Python list 或是一" "個 :class:`UserList` 物件。" -#: ../../library/collections.rst:1319 +#: ../../library/collections.rst:1326 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" msgstr "" "除了支援可變序列的方法與操作,\\ :class:`UserList` 實例提供了以下屬性:" -#: ../../library/collections.rst:1324 +#: ../../library/collections.rst:1331 msgid "" "A real :class:`list` object used to store the contents of the :class:" "`UserList` class." msgstr "" "一個真實的 :class:`list` 物件,用於儲存 :class:`UserList` 類別的資料內容。" -#: ../../library/collections.rst:1327 +#: ../../library/collections.rst:1334 msgid "" "**Subclassing requirements:** Subclasses of :class:`UserList` are expected " "to offer a constructor which can be called with either no arguments or one " @@ -1569,7 +1569,7 @@ msgstr "" "例,為了達成上述目的,它假設建構函式可傳入單一參數來呼叫,該參數即是做為數據" "來源的一個序列物件。" -#: ../../library/collections.rst:1334 +#: ../../library/collections.rst:1341 msgid "" "If a derived class does not wish to comply with this requirement, all of the " "special methods supported by this class will need to be overridden; please " @@ -1579,11 +1579,11 @@ msgstr "" "如果希望一個自此獲得的子類別不遵從上述要求,那所有該類別支援的特殊方法則必須" "被覆寫;請參考原始碼來理解在這情況下哪些方法是必須提供的。" -#: ../../library/collections.rst:1340 +#: ../../library/collections.rst:1347 msgid ":class:`UserString` objects" msgstr ":class:`UserString` 物件" -#: ../../library/collections.rst:1342 +#: ../../library/collections.rst:1349 msgid "" "The class, :class:`UserString` acts as a wrapper around string objects. The " "need for this class has been partially supplanted by the ability to subclass " @@ -1594,7 +1594,7 @@ msgstr "" "建立子類別,這個類別的需求已經部分被滿足,不過這個類別使用起來更方便,因為被" "包裝的字串可以作為其屬性來存取。" -#: ../../library/collections.rst:1350 +#: ../../library/collections.rst:1357 msgid "" "Class that simulates a string object. The instance's content is kept in a " "regular string object, which is accessible via the :attr:`data` attribute " @@ -1606,21 +1606,21 @@ msgstr "" "的 :attr:`data` 屬性來做存取。實例內容被初始化為 *seq* 的複製,\\ *seq* 引數" "可以是任何可被內建函式 :func:`str` 轉換成字串的物件。" -#: ../../library/collections.rst:1357 +#: ../../library/collections.rst:1364 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" msgstr "" "除了支援字串的方法和操作以外,\\ :class:`UserString` 實例也提供了以下屬性:" -#: ../../library/collections.rst:1362 +#: ../../library/collections.rst:1369 msgid "" "A real :class:`str` object used to store the contents of the :class:" "`UserString` class." msgstr "" "一個真實的 :class:`str` 物件,用來儲存 :class:`UserString` 類別的資料內容。" -#: ../../library/collections.rst:1365 +#: ../../library/collections.rst:1372 msgid "" "New methods ``__getnewargs__``, ``__rmod__``, ``casefold``, ``format_map``, " "``isprintable``, and ``maketrans``." diff --git a/library/exceptions.po b/library/exceptions.po index fc9e00fe14..b917114498 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-28 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:01+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -67,22 +67,20 @@ msgstr "" #: ../../library/exceptions.rst:41 msgid "" -"When raising (or re-raising) an exception in an :keyword:`except` or :" -"keyword:`finally` clause :attr:`__context__` is automatically set to the " -"last exception caught; if the new exception is not handled the traceback " -"that is eventually displayed will include the originating exception(s) and " -"the final exception." +"When raising a new exception while another exception is already being " +"handled, the new exception's :attr:`__context__` attribute is automatically " +"set to the handled exception. An exception may be handled when an :keyword:" +"`except` or :keyword:`finally` clause, or a :keyword:`with` statement, is " +"used." msgstr "" #: ../../library/exceptions.rst:47 msgid "" -"When raising a new exception (rather than using a bare ``raise`` to re-raise " -"the exception currently being handled), the implicit exception context can " -"be supplemented with an explicit cause by using :keyword:`from` with :" -"keyword:`raise`::" +"This implicit exception context can be supplemented with an explicit cause " +"by using :keyword:`!from` with :keyword:`raise`::" msgstr "" -#: ../../library/exceptions.rst:54 +#: ../../library/exceptions.rst:53 msgid "" "The expression following :keyword:`from` must be an exception or " "``None``. It will be set as :attr:`__cause__` on the raised exception. " @@ -94,7 +92,7 @@ msgid "" "introspection when debugging." msgstr "" -#: ../../library/exceptions.rst:63 +#: ../../library/exceptions.rst:62 msgid "" "The default traceback display code shows these chained exceptions in " "addition to the traceback for the exception itself. An explicitly chained " @@ -103,18 +101,18 @@ msgid "" "is :const:`None` and :attr:`__suppress_context__` is false." msgstr "" -#: ../../library/exceptions.rst:69 +#: ../../library/exceptions.rst:68 msgid "" "In either case, the exception itself is always shown after any chained " "exceptions so that the final line of the traceback always shows the last " "exception that was raised." msgstr "" -#: ../../library/exceptions.rst:75 +#: ../../library/exceptions.rst:74 msgid "Inheriting from built-in exceptions" msgstr "繼承自內建的例外" -#: ../../library/exceptions.rst:77 +#: ../../library/exceptions.rst:76 msgid "" "User code can create subclasses that inherit from an exception type. It's " "recommended to only subclass one exception type at a time to avoid any " @@ -122,7 +120,7 @@ msgid "" "well as due to possible memory layout incompatibilities." msgstr "" -#: ../../library/exceptions.rst:84 +#: ../../library/exceptions.rst:83 msgid "" "Most built-in exceptions are implemented in C for efficiency, see: :source:" "`Objects/exceptions.c`. Some have custom memory layouts which makes it " @@ -132,17 +130,17 @@ msgid "" "it's recommended to avoid subclassing multiple exception types altogether." msgstr "" -#: ../../library/exceptions.rst:94 +#: ../../library/exceptions.rst:93 msgid "Base classes" msgstr "" -#: ../../library/exceptions.rst:96 +#: ../../library/exceptions.rst:95 msgid "" "The following exceptions are used mostly as base classes for other " "exceptions." msgstr "" -#: ../../library/exceptions.rst:100 +#: ../../library/exceptions.rst:99 msgid "" "The base class for all built-in exceptions. It is not meant to be directly " "inherited by user-defined classes (for that, use :exc:`Exception`). If :" @@ -151,7 +149,7 @@ msgid "" "were no arguments." msgstr "" -#: ../../library/exceptions.rst:108 +#: ../../library/exceptions.rst:107 msgid "" "The tuple of arguments given to the exception constructor. Some built-in " "exceptions (like :exc:`OSError`) expect a certain number of arguments and " @@ -159,7 +157,7 @@ msgid "" "usually called only with a single string giving an error message." msgstr "" -#: ../../library/exceptions.rst:115 +#: ../../library/exceptions.rst:114 msgid "" "This method sets *tb* as the new traceback for the exception and returns the " "exception object. It was more commonly used before the exception chaining " @@ -171,52 +169,52 @@ msgid "" "it to propagate to the caller. ::" msgstr "" -#: ../../library/exceptions.rst:133 +#: ../../library/exceptions.rst:132 msgid "" "All built-in, non-system-exiting exceptions are derived from this class. " "All user-defined exceptions should also be derived from this class." msgstr "" -#: ../../library/exceptions.rst:139 +#: ../../library/exceptions.rst:138 msgid "" "The base class for those built-in exceptions that are raised for various " "arithmetic errors: :exc:`OverflowError`, :exc:`ZeroDivisionError`, :exc:" "`FloatingPointError`." msgstr "" -#: ../../library/exceptions.rst:146 +#: ../../library/exceptions.rst:145 msgid "" "Raised when a :ref:`buffer ` related operation cannot be " "performed." msgstr "" -#: ../../library/exceptions.rst:152 +#: ../../library/exceptions.rst:151 msgid "" "The base class for the exceptions that are raised when a key or index used " "on a mapping or sequence is invalid: :exc:`IndexError`, :exc:`KeyError`. " "This can be raised directly by :func:`codecs.lookup`." msgstr "" -#: ../../library/exceptions.rst:158 +#: ../../library/exceptions.rst:157 msgid "Concrete exceptions" msgstr "" -#: ../../library/exceptions.rst:160 +#: ../../library/exceptions.rst:159 msgid "The following exceptions are the exceptions that are usually raised." msgstr "" -#: ../../library/exceptions.rst:166 +#: ../../library/exceptions.rst:165 msgid "Raised when an :keyword:`assert` statement fails." msgstr "" -#: ../../library/exceptions.rst:171 +#: ../../library/exceptions.rst:170 msgid "" "Raised when an attribute reference (see :ref:`attribute-references`) or " "assignment fails. (When an object does not support attribute references or " "attribute assignments at all, :exc:`TypeError` is raised.)" msgstr "" -#: ../../library/exceptions.rst:175 +#: ../../library/exceptions.rst:174 msgid "" "The :attr:`name` and :attr:`obj` attributes can be set using keyword-only " "arguments to the constructor. When set they represent the name of the " @@ -224,22 +222,22 @@ msgid "" "for said attribute, respectively." msgstr "" -#: ../../library/exceptions.rst:180 +#: ../../library/exceptions.rst:179 msgid "Added the :attr:`name` and :attr:`obj` attributes." msgstr "新增 :attr:`name` 與 :attr:`obj` 屬性。" -#: ../../library/exceptions.rst:185 +#: ../../library/exceptions.rst:184 msgid "" "Raised when the :func:`input` function hits an end-of-file condition (EOF) " "without reading any data. (N.B.: the :meth:`io.IOBase.read` and :meth:`io." "IOBase.readline` methods return an empty string when they hit EOF.)" msgstr "" -#: ../../library/exceptions.rst:192 +#: ../../library/exceptions.rst:191 msgid "Not currently used." msgstr "" -#: ../../library/exceptions.rst:197 +#: ../../library/exceptions.rst:196 msgid "" "Raised when a :term:`generator` or :term:`coroutine` is closed; see :meth:" "`generator.close` and :meth:`coroutine.close`. It directly inherits from :" @@ -247,14 +245,14 @@ msgid "" "an error." msgstr "" -#: ../../library/exceptions.rst:205 +#: ../../library/exceptions.rst:204 msgid "" "Raised when the :keyword:`import` statement has troubles trying to load a " "module. Also raised when the \"from list\" in ``from ... import`` has a " "name that cannot be found." msgstr "" -#: ../../library/exceptions.rst:209 +#: ../../library/exceptions.rst:208 msgid "" "The :attr:`name` and :attr:`path` attributes can be set using keyword-only " "arguments to the constructor. When set they represent the name of the module " @@ -262,31 +260,31 @@ msgid "" "the exception, respectively." msgstr "" -#: ../../library/exceptions.rst:214 +#: ../../library/exceptions.rst:213 msgid "Added the :attr:`name` and :attr:`path` attributes." msgstr "新增 :attr:`name` 與 :attr:`path` 屬性。" -#: ../../library/exceptions.rst:219 +#: ../../library/exceptions.rst:218 msgid "" "A subclass of :exc:`ImportError` which is raised by :keyword:`import` when a " "module could not be located. It is also raised when ``None`` is found in :" "data:`sys.modules`." msgstr "" -#: ../../library/exceptions.rst:228 +#: ../../library/exceptions.rst:227 msgid "" "Raised when a sequence subscript is out of range. (Slice indices are " "silently truncated to fall in the allowed range; if an index is not an " "integer, :exc:`TypeError` is raised.)" msgstr "" -#: ../../library/exceptions.rst:237 +#: ../../library/exceptions.rst:236 msgid "" "Raised when a mapping (dictionary) key is not found in the set of existing " "keys." msgstr "" -#: ../../library/exceptions.rst:244 +#: ../../library/exceptions.rst:243 msgid "" "Raised when the user hits the interrupt key (normally :kbd:`Control-C` or :" "kbd:`Delete`). During execution, a check for interrupts is made regularly. " @@ -295,7 +293,7 @@ msgid "" "the interpreter from exiting." msgstr "" -#: ../../library/exceptions.rst:253 +#: ../../library/exceptions.rst:252 msgid "" "Raised when an operation runs out of memory but the situation may still be " "rescued (by deleting some objects). The associated value is a string " @@ -306,25 +304,25 @@ msgid "" "stack traceback can be printed, in case a run-away program was the cause." msgstr "" -#: ../../library/exceptions.rst:264 +#: ../../library/exceptions.rst:263 msgid "" "Raised when a local or global name is not found. This applies only to " "unqualified names. The associated value is an error message that includes " "the name that could not be found." msgstr "" -#: ../../library/exceptions.rst:268 +#: ../../library/exceptions.rst:267 msgid "" "The :attr:`name` attribute can be set using a keyword-only argument to the " "constructor. When set it represent the name of the variable that was " "attempted to be accessed." msgstr "" -#: ../../library/exceptions.rst:272 +#: ../../library/exceptions.rst:271 msgid "Added the :attr:`name` attribute." msgstr "新增 :attr:`name` 屬性。" -#: ../../library/exceptions.rst:278 +#: ../../library/exceptions.rst:277 msgid "" "This exception is derived from :exc:`RuntimeError`. In user defined base " "classes, abstract methods should raise this exception when they require " @@ -332,28 +330,28 @@ msgid "" "developed to indicate that the real implementation still needs to be added." msgstr "" -#: ../../library/exceptions.rst:285 +#: ../../library/exceptions.rst:284 msgid "" "It should not be used to indicate that an operator or method is not meant to " "be supported at all -- in that case either leave the operator / method " "undefined or, if a subclass, set it to :data:`None`." msgstr "" -#: ../../library/exceptions.rst:291 +#: ../../library/exceptions.rst:290 msgid "" "``NotImplementedError`` and ``NotImplemented`` are not interchangeable, even " "though they have similar names and purposes. See :data:`NotImplemented` for " "details on when to use it." msgstr "" -#: ../../library/exceptions.rst:300 +#: ../../library/exceptions.rst:299 msgid "" "This exception is raised when a system function returns a system-related " "error, including I/O failures such as \"file not found\" or \"disk full" "\" (not for illegal argument types or other incidental errors)." msgstr "" -#: ../../library/exceptions.rst:304 +#: ../../library/exceptions.rst:303 msgid "" "The second form of the constructor sets the corresponding attributes, " "described below. The attributes default to :const:`None` if not specified. " @@ -362,7 +360,7 @@ msgid "" "constructor arguments." msgstr "" -#: ../../library/exceptions.rst:310 +#: ../../library/exceptions.rst:309 msgid "" "The constructor often actually returns a subclass of :exc:`OSError`, as " "described in `OS exceptions`_ below. The particular subclass depends on the " @@ -371,18 +369,18 @@ msgid "" "subclassing." msgstr "" -#: ../../library/exceptions.rst:318 +#: ../../library/exceptions.rst:317 msgid "A numeric error code from the C variable :c:data:`errno`." msgstr "" -#: ../../library/exceptions.rst:322 +#: ../../library/exceptions.rst:321 msgid "" "Under Windows, this gives you the native Windows error code. The :attr:`." "errno` attribute is then an approximate translation, in POSIX terms, of that " "native error code." msgstr "" -#: ../../library/exceptions.rst:326 +#: ../../library/exceptions.rst:325 msgid "" "Under Windows, if the *winerror* constructor argument is an integer, the :" "attr:`.errno` attribute is determined from the Windows error code, and the " @@ -390,14 +388,14 @@ msgid "" "ignored, and the :attr:`winerror` attribute does not exist." msgstr "" -#: ../../library/exceptions.rst:334 +#: ../../library/exceptions.rst:333 msgid "" "The corresponding error message, as provided by the operating system. It is " "formatted by the C functions :c:func:`perror` under POSIX, and :c:func:" "`FormatMessage` under Windows." msgstr "" -#: ../../library/exceptions.rst:342 +#: ../../library/exceptions.rst:341 msgid "" "For exceptions that involve a file system path (such as :func:`open` or :" "func:`os.unlink`), :attr:`filename` is the file name passed to the function. " @@ -406,14 +404,14 @@ msgid "" "the function." msgstr "" -#: ../../library/exceptions.rst:349 +#: ../../library/exceptions.rst:348 msgid "" ":exc:`EnvironmentError`, :exc:`IOError`, :exc:`WindowsError`, :exc:`socket." "error`, :exc:`select.error` and :exc:`mmap.error` have been merged into :exc:" "`OSError`, and the constructor may return a subclass." msgstr "" -#: ../../library/exceptions.rst:355 +#: ../../library/exceptions.rst:354 msgid "" "The :attr:`filename` attribute is now the original file name passed to the " "function, instead of the name encoded to or decoded from the :term:" @@ -421,7 +419,7 @@ msgid "" "argument and attribute was added." msgstr "" -#: ../../library/exceptions.rst:364 +#: ../../library/exceptions.rst:363 msgid "" "Raised when the result of an arithmetic operation is too large to be " "represented. This cannot occur for integers (which would rather raise :exc:" @@ -431,18 +429,18 @@ msgid "" "in C, most floating point operations are not checked." msgstr "" -#: ../../library/exceptions.rst:374 +#: ../../library/exceptions.rst:373 msgid "" "This exception is derived from :exc:`RuntimeError`. It is raised when the " "interpreter detects that the maximum recursion depth (see :func:`sys." "getrecursionlimit`) is exceeded." msgstr "" -#: ../../library/exceptions.rst:378 +#: ../../library/exceptions.rst:377 msgid "Previously, a plain :exc:`RuntimeError` was raised." msgstr "" -#: ../../library/exceptions.rst:384 +#: ../../library/exceptions.rst:383 msgid "" "This exception is raised when a weak reference proxy, created by the :func:" "`weakref.proxy` function, is used to access an attribute of the referent " @@ -450,65 +448,65 @@ msgid "" "references, see the :mod:`weakref` module." msgstr "" -#: ../../library/exceptions.rst:392 +#: ../../library/exceptions.rst:391 msgid "" "Raised when an error is detected that doesn't fall in any of the other " "categories. The associated value is a string indicating what precisely went " "wrong." msgstr "" -#: ../../library/exceptions.rst:399 +#: ../../library/exceptions.rst:398 msgid "" "Raised by built-in function :func:`next` and an :term:`iterator`\\'s :meth:" "`~iterator.__next__` method to signal that there are no further items " "produced by the iterator." msgstr "" -#: ../../library/exceptions.rst:403 +#: ../../library/exceptions.rst:402 msgid "" "The exception object has a single attribute :attr:`value`, which is given as " "an argument when constructing the exception, and defaults to :const:`None`." msgstr "" -#: ../../library/exceptions.rst:407 +#: ../../library/exceptions.rst:406 msgid "" "When a :term:`generator` or :term:`coroutine` function returns, a new :exc:" "`StopIteration` instance is raised, and the value returned by the function " "is used as the :attr:`value` parameter to the constructor of the exception." msgstr "" -#: ../../library/exceptions.rst:412 +#: ../../library/exceptions.rst:411 msgid "" "If a generator code directly or indirectly raises :exc:`StopIteration`, it " "is converted into a :exc:`RuntimeError` (retaining the :exc:`StopIteration` " "as the new exception's cause)." msgstr "" -#: ../../library/exceptions.rst:416 +#: ../../library/exceptions.rst:415 msgid "" "Added ``value`` attribute and the ability for generator functions to use it " "to return a value." msgstr "" -#: ../../library/exceptions.rst:420 +#: ../../library/exceptions.rst:419 msgid "" "Introduced the RuntimeError transformation via ``from __future__ import " "generator_stop``, see :pep:`479`." msgstr "" -#: ../../library/exceptions.rst:424 +#: ../../library/exceptions.rst:423 msgid "" "Enable :pep:`479` for all code by default: a :exc:`StopIteration` error " "raised in a generator is transformed into a :exc:`RuntimeError`." msgstr "" -#: ../../library/exceptions.rst:430 +#: ../../library/exceptions.rst:429 msgid "" "Must be raised by :meth:`__anext__` method of an :term:`asynchronous " "iterator` object to stop the iteration." msgstr "" -#: ../../library/exceptions.rst:437 +#: ../../library/exceptions.rst:436 msgid "" "Raised when the parser encounters a syntax error. This may occur in an :" "keyword:`import` statement, in a call to the built-in functions :func:" @@ -516,45 +514,45 @@ msgid "" "or standard input (also interactively)." msgstr "" -#: ../../library/exceptions.rst:443 +#: ../../library/exceptions.rst:442 msgid "" "The :func:`str` of the exception instance returns only the error message. " "Details is a tuple whose members are also available as separate attributes." msgstr "" -#: ../../library/exceptions.rst:448 +#: ../../library/exceptions.rst:447 msgid "The name of the file the syntax error occurred in." msgstr "" -#: ../../library/exceptions.rst:452 +#: ../../library/exceptions.rst:451 msgid "" "Which line number in the file the error occurred in. This is 1-indexed: the " "first line in the file has a ``lineno`` of 1." msgstr "" -#: ../../library/exceptions.rst:457 +#: ../../library/exceptions.rst:456 msgid "" "The column in the line where the error occurred. This is 1-indexed: the " "first character in the line has an ``offset`` of 1." msgstr "" -#: ../../library/exceptions.rst:462 +#: ../../library/exceptions.rst:461 msgid "The source code text involved in the error." msgstr "" -#: ../../library/exceptions.rst:466 +#: ../../library/exceptions.rst:465 msgid "" "Which line number in the file the error occurred ends in. This is 1-indexed: " "the first line in the file has a ``lineno`` of 1." msgstr "" -#: ../../library/exceptions.rst:471 +#: ../../library/exceptions.rst:470 msgid "" "The column in the end line where the error occurred finishes. This is 1-" "indexed: the first character in the line has an ``offset`` of 1." msgstr "" -#: ../../library/exceptions.rst:474 +#: ../../library/exceptions.rst:473 msgid "" "For errors in f-string fields, the message is prefixed by \"f-string: \" and " "the offsets are offsets in a text constructed from the replacement " @@ -562,30 +560,30 @@ msgid "" "attribute: ('f-string: ...', ('', 1, 2, '(a b)\\n', 1, 5))." msgstr "" -#: ../../library/exceptions.rst:479 +#: ../../library/exceptions.rst:478 msgid "Added the :attr:`end_lineno` and :attr:`end_offset` attributes." msgstr "新增 :attr:`end_lineno` 與 :attr:`end_offset` 屬性。" -#: ../../library/exceptions.rst:484 +#: ../../library/exceptions.rst:483 msgid "" "Base class for syntax errors related to incorrect indentation. This is a " "subclass of :exc:`SyntaxError`." msgstr "" -#: ../../library/exceptions.rst:490 +#: ../../library/exceptions.rst:489 msgid "" "Raised when indentation contains an inconsistent use of tabs and spaces. " "This is a subclass of :exc:`IndentationError`." msgstr "" -#: ../../library/exceptions.rst:496 +#: ../../library/exceptions.rst:495 msgid "" "Raised when the interpreter finds an internal error, but the situation does " "not look so serious to cause it to abandon all hope. The associated value is " "a string indicating what went wrong (in low-level terms)." msgstr "" -#: ../../library/exceptions.rst:500 +#: ../../library/exceptions.rst:499 msgid "" "You should report this to the author or maintainer of your Python " "interpreter. Be sure to report the version of the Python interpreter (``sys." @@ -594,7 +592,7 @@ msgid "" "possible the source of the program that triggered the error." msgstr "" -#: ../../library/exceptions.rst:509 +#: ../../library/exceptions.rst:508 msgid "" "This exception is raised by the :func:`sys.exit` function. It inherits " "from :exc:`BaseException` instead of :exc:`Exception` so that it is not " @@ -608,7 +606,7 @@ msgid "" "printed and the exit status is one." msgstr "" -#: ../../library/exceptions.rst:520 +#: ../../library/exceptions.rst:519 msgid "" "A call to :func:`sys.exit` is translated into an exception so that clean-up " "handlers (:keyword:`finally` clauses of :keyword:`try` statements) can be " @@ -618,20 +616,20 @@ msgid "" "child process after a call to :func:`os.fork`)." msgstr "" -#: ../../library/exceptions.rst:529 +#: ../../library/exceptions.rst:528 msgid "" "The exit status or error message that is passed to the constructor. " "(Defaults to ``None``.)" msgstr "" -#: ../../library/exceptions.rst:535 +#: ../../library/exceptions.rst:534 msgid "" "Raised when an operation or function is applied to an object of " "inappropriate type. The associated value is a string giving details about " "the type mismatch." msgstr "" -#: ../../library/exceptions.rst:538 +#: ../../library/exceptions.rst:537 msgid "" "This exception may be raised by user code to indicate that an attempted " "operation on an object is not supported, and is not meant to be. If an " @@ -639,7 +637,7 @@ msgid "" "implementation, :exc:`NotImplementedError` is the proper exception to raise." msgstr "" -#: ../../library/exceptions.rst:543 +#: ../../library/exceptions.rst:542 msgid "" "Passing arguments of the wrong type (e.g. passing a :class:`list` when an :" "class:`int` is expected) should result in a :exc:`TypeError`, but passing " @@ -647,135 +645,135 @@ msgid "" "should result in a :exc:`ValueError`." msgstr "" -#: ../../library/exceptions.rst:550 +#: ../../library/exceptions.rst:549 msgid "" "Raised when a reference is made to a local variable in a function or method, " "but no value has been bound to that variable. This is a subclass of :exc:" "`NameError`." msgstr "" -#: ../../library/exceptions.rst:557 +#: ../../library/exceptions.rst:556 msgid "" "Raised when a Unicode-related encoding or decoding error occurs. It is a " "subclass of :exc:`ValueError`." msgstr "" -#: ../../library/exceptions.rst:560 +#: ../../library/exceptions.rst:559 msgid "" ":exc:`UnicodeError` has attributes that describe the encoding or decoding " "error. For example, ``err.object[err.start:err.end]`` gives the particular " "invalid input that the codec failed on." msgstr "" -#: ../../library/exceptions.rst:566 +#: ../../library/exceptions.rst:565 msgid "The name of the encoding that raised the error." msgstr "" -#: ../../library/exceptions.rst:570 +#: ../../library/exceptions.rst:569 msgid "A string describing the specific codec error." msgstr "" -#: ../../library/exceptions.rst:574 +#: ../../library/exceptions.rst:573 msgid "The object the codec was attempting to encode or decode." msgstr "" -#: ../../library/exceptions.rst:578 +#: ../../library/exceptions.rst:577 msgid "The first index of invalid data in :attr:`object`." msgstr "" -#: ../../library/exceptions.rst:582 +#: ../../library/exceptions.rst:581 msgid "The index after the last invalid data in :attr:`object`." msgstr "" -#: ../../library/exceptions.rst:587 +#: ../../library/exceptions.rst:586 msgid "" "Raised when a Unicode-related error occurs during encoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:593 +#: ../../library/exceptions.rst:592 msgid "" "Raised when a Unicode-related error occurs during decoding. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:599 +#: ../../library/exceptions.rst:598 msgid "" "Raised when a Unicode-related error occurs during translating. It is a " "subclass of :exc:`UnicodeError`." msgstr "" -#: ../../library/exceptions.rst:605 +#: ../../library/exceptions.rst:604 msgid "" "Raised when an operation or function receives an argument that has the right " "type but an inappropriate value, and the situation is not described by a " "more precise exception such as :exc:`IndexError`." msgstr "" -#: ../../library/exceptions.rst:612 +#: ../../library/exceptions.rst:611 msgid "" "Raised when the second argument of a division or modulo operation is zero. " "The associated value is a string indicating the type of the operands and the " "operation." msgstr "" -#: ../../library/exceptions.rst:617 +#: ../../library/exceptions.rst:616 msgid "" "The following exceptions are kept for compatibility with previous versions; " "starting from Python 3.3, they are aliases of :exc:`OSError`." msgstr "" -#: ../../library/exceptions.rst:626 +#: ../../library/exceptions.rst:625 msgid "Only available on Windows." msgstr "" -#: ../../library/exceptions.rst:630 +#: ../../library/exceptions.rst:629 msgid "OS exceptions" msgstr "" -#: ../../library/exceptions.rst:632 +#: ../../library/exceptions.rst:631 msgid "" "The following exceptions are subclasses of :exc:`OSError`, they get raised " "depending on the system error code." msgstr "" -#: ../../library/exceptions.rst:637 +#: ../../library/exceptions.rst:636 msgid "" "Raised when an operation would block on an object (e.g. socket) set for non-" "blocking operation. Corresponds to :c:data:`errno` ``EAGAIN``, ``EALREADY``, " "``EWOULDBLOCK`` and ``EINPROGRESS``." msgstr "" -#: ../../library/exceptions.rst:642 +#: ../../library/exceptions.rst:641 msgid "" "In addition to those of :exc:`OSError`, :exc:`BlockingIOError` can have one " "more attribute:" msgstr "" -#: ../../library/exceptions.rst:647 +#: ../../library/exceptions.rst:646 msgid "" "An integer containing the number of characters written to the stream before " "it blocked. This attribute is available when using the buffered I/O classes " "from the :mod:`io` module." msgstr "" -#: ../../library/exceptions.rst:653 +#: ../../library/exceptions.rst:652 msgid "" "Raised when an operation on a child process failed. Corresponds to :c:data:" "`errno` ``ECHILD``." msgstr "" -#: ../../library/exceptions.rst:658 +#: ../../library/exceptions.rst:657 msgid "A base class for connection-related issues." msgstr "" -#: ../../library/exceptions.rst:660 +#: ../../library/exceptions.rst:659 msgid "" "Subclasses are :exc:`BrokenPipeError`, :exc:`ConnectionAbortedError`, :exc:" "`ConnectionRefusedError` and :exc:`ConnectionResetError`." msgstr "" -#: ../../library/exceptions.rst:665 +#: ../../library/exceptions.rst:664 msgid "" "A subclass of :exc:`ConnectionError`, raised when trying to write on a pipe " "while the other end has been closed, or trying to write on a socket which " @@ -783,56 +781,56 @@ msgid "" "``ESHUTDOWN``." msgstr "" -#: ../../library/exceptions.rst:672 +#: ../../library/exceptions.rst:671 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " "aborted by the peer. Corresponds to :c:data:`errno` ``ECONNABORTED``." msgstr "" -#: ../../library/exceptions.rst:678 +#: ../../library/exceptions.rst:677 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection attempt is " "refused by the peer. Corresponds to :c:data:`errno` ``ECONNREFUSED``." msgstr "" -#: ../../library/exceptions.rst:684 +#: ../../library/exceptions.rst:683 msgid "" "A subclass of :exc:`ConnectionError`, raised when a connection is reset by " "the peer. Corresponds to :c:data:`errno` ``ECONNRESET``." msgstr "" -#: ../../library/exceptions.rst:690 +#: ../../library/exceptions.rst:689 msgid "" "Raised when trying to create a file or directory which already exists. " "Corresponds to :c:data:`errno` ``EEXIST``." msgstr "" -#: ../../library/exceptions.rst:695 +#: ../../library/exceptions.rst:694 msgid "" "Raised when a file or directory is requested but doesn't exist. Corresponds " "to :c:data:`errno` ``ENOENT``." msgstr "" -#: ../../library/exceptions.rst:700 +#: ../../library/exceptions.rst:699 msgid "" "Raised when a system call is interrupted by an incoming signal. Corresponds " "to :c:data:`errno` :py:data:`~errno.EINTR`." msgstr "" -#: ../../library/exceptions.rst:703 +#: ../../library/exceptions.rst:702 msgid "" "Python now retries system calls when a syscall is interrupted by a signal, " "except if the signal handler raises an exception (see :pep:`475` for the " "rationale), instead of raising :exc:`InterruptedError`." msgstr "" -#: ../../library/exceptions.rst:710 +#: ../../library/exceptions.rst:709 msgid "" "Raised when a file operation (such as :func:`os.remove`) is requested on a " "directory. Corresponds to :c:data:`errno` ``EISDIR``." msgstr "" -#: ../../library/exceptions.rst:716 +#: ../../library/exceptions.rst:715 msgid "" "Raised when a directory operation (such as :func:`os.listdir`) is requested " "on something which is not a directory. On most POSIX platforms, it may also " @@ -840,131 +838,131 @@ msgid "" "as if it were a directory. Corresponds to :c:data:`errno` ``ENOTDIR``." msgstr "" -#: ../../library/exceptions.rst:724 +#: ../../library/exceptions.rst:723 msgid "" "Raised when trying to run an operation without the adequate access rights - " "for example filesystem permissions. Corresponds to :c:data:`errno` " "``EACCES`` and ``EPERM``." msgstr "" -#: ../../library/exceptions.rst:730 +#: ../../library/exceptions.rst:729 msgid "" "Raised when a given process doesn't exist. Corresponds to :c:data:`errno` " "``ESRCH``." msgstr "" -#: ../../library/exceptions.rst:735 +#: ../../library/exceptions.rst:734 msgid "" "Raised when a system function timed out at the system level. Corresponds to :" "c:data:`errno` ``ETIMEDOUT``." msgstr "" -#: ../../library/exceptions.rst:738 +#: ../../library/exceptions.rst:737 msgid "All the above :exc:`OSError` subclasses were added." msgstr "" -#: ../../library/exceptions.rst:744 +#: ../../library/exceptions.rst:743 msgid ":pep:`3151` - Reworking the OS and IO exception hierarchy" msgstr "" -#: ../../library/exceptions.rst:750 +#: ../../library/exceptions.rst:749 msgid "Warnings" msgstr "警告" -#: ../../library/exceptions.rst:752 +#: ../../library/exceptions.rst:751 msgid "" "The following exceptions are used as warning categories; see the :ref:" "`warning-categories` documentation for more details." msgstr "" -#: ../../library/exceptions.rst:757 +#: ../../library/exceptions.rst:756 msgid "Base class for warning categories." msgstr "" -#: ../../library/exceptions.rst:762 +#: ../../library/exceptions.rst:761 msgid "Base class for warnings generated by user code." msgstr "" -#: ../../library/exceptions.rst:767 +#: ../../library/exceptions.rst:766 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for other Python developers." msgstr "" -#: ../../library/exceptions.rst:770 +#: ../../library/exceptions.rst:769 msgid "" "Ignored by the default warning filters, except in the ``__main__`` module (:" "pep:`565`). Enabling the :ref:`Python Development Mode ` shows this " "warning." msgstr "" -#: ../../library/exceptions.rst:774 ../../library/exceptions.rst:790 +#: ../../library/exceptions.rst:773 ../../library/exceptions.rst:789 msgid "The deprecation policy is described in :pep:`387`." msgstr "" -#: ../../library/exceptions.rst:779 +#: ../../library/exceptions.rst:778 msgid "" "Base class for warnings about features which are obsolete and expected to be " "deprecated in the future, but are not deprecated at the moment." msgstr "" -#: ../../library/exceptions.rst:783 +#: ../../library/exceptions.rst:782 msgid "" "This class is rarely used as emitting a warning about a possible upcoming " "deprecation is unusual, and :exc:`DeprecationWarning` is preferred for " "already active deprecations." msgstr "" -#: ../../library/exceptions.rst:787 ../../library/exceptions.rst:813 -#: ../../library/exceptions.rst:840 +#: ../../library/exceptions.rst:786 ../../library/exceptions.rst:812 +#: ../../library/exceptions.rst:839 msgid "" "Ignored by the default warning filters. Enabling the :ref:`Python " "Development Mode ` shows this warning." msgstr "" -#: ../../library/exceptions.rst:795 +#: ../../library/exceptions.rst:794 msgid "Base class for warnings about dubious syntax." msgstr "" -#: ../../library/exceptions.rst:800 +#: ../../library/exceptions.rst:799 msgid "Base class for warnings about dubious runtime behavior." msgstr "" -#: ../../library/exceptions.rst:805 +#: ../../library/exceptions.rst:804 msgid "" "Base class for warnings about deprecated features when those warnings are " "intended for end users of applications that are written in Python." msgstr "" -#: ../../library/exceptions.rst:811 +#: ../../library/exceptions.rst:810 msgid "Base class for warnings about probable mistakes in module imports." msgstr "" -#: ../../library/exceptions.rst:819 +#: ../../library/exceptions.rst:818 msgid "Base class for warnings related to Unicode." msgstr "" -#: ../../library/exceptions.rst:824 +#: ../../library/exceptions.rst:823 msgid "Base class for warnings related to encodings." msgstr "" -#: ../../library/exceptions.rst:826 +#: ../../library/exceptions.rst:825 msgid "See :ref:`io-encoding-warning` for details." msgstr "細節請見 :ref:`io-encoding-warning`\\ 。" -#: ../../library/exceptions.rst:833 +#: ../../library/exceptions.rst:832 msgid "" "Base class for warnings related to :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../library/exceptions.rst:838 +#: ../../library/exceptions.rst:837 msgid "Base class for warnings related to resource usage." msgstr "" -#: ../../library/exceptions.rst:848 +#: ../../library/exceptions.rst:847 msgid "Exception hierarchy" msgstr "" -#: ../../library/exceptions.rst:850 +#: ../../library/exceptions.rst:849 msgid "The class hierarchy for built-in exceptions is:" msgstr "" diff --git a/library/hashlib.po b/library/hashlib.po index 7f1501c953..01a41b3c25 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-28 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -274,36 +274,37 @@ msgstr "" #: ../../library/hashlib.rst:251 msgid "" "The number of *iterations* should be chosen based on the hash algorithm and " -"computing power. As of 2013, at least 100,000 iterations of SHA-256 are " -"suggested." +"computing power. As of 2022, hundreds of thousands of iterations of SHA-256 " +"are suggested. For rationale as to why and how to choose what is best for " +"your application, read *Appendix A.2.2* of NIST-SP-800-132_." msgstr "" -#: ../../library/hashlib.rst:255 +#: ../../library/hashlib.rst:256 msgid "" "*dklen* is the length of the derived key. If *dklen* is ``None`` then the " "digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512." msgstr "" -#: ../../library/hashlib.rst:267 +#: ../../library/hashlib.rst:268 msgid "" "A fast implementation of *pbkdf2_hmac* is available with OpenSSL. The " "Python implementation uses an inline version of :mod:`hmac`. It is about " "three times slower and doesn't release the GIL." msgstr "" -#: ../../library/hashlib.rst:273 +#: ../../library/hashlib.rst:274 msgid "" "Slow Python implementation of *pbkdf2_hmac* is deprecated. In the future the " "function will only be available when Python is compiled with OpenSSL." msgstr "" -#: ../../library/hashlib.rst:279 +#: ../../library/hashlib.rst:280 msgid "" "The function provides scrypt password-based key derivation function as " "defined in :rfc:`7914`." msgstr "" -#: ../../library/hashlib.rst:282 +#: ../../library/hashlib.rst:283 msgid "" "*password* and *salt* must be :term:`bytes-like objects `. Applications and libraries should limit *password* to a sensible " @@ -311,138 +312,138 @@ msgid "" "source, e.g. :func:`os.urandom`." msgstr "" -#: ../../library/hashlib.rst:287 +#: ../../library/hashlib.rst:288 msgid "" "*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization " "factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). " "*dklen* is the length of the derived key." msgstr "" -#: ../../library/hashlib.rst:295 +#: ../../library/hashlib.rst:296 msgid "BLAKE2" msgstr "BLAKE2" -#: ../../library/hashlib.rst:302 +#: ../../library/hashlib.rst:303 msgid "" "BLAKE2_ is a cryptographic hash function defined in :rfc:`7693` that comes " "in two flavors:" msgstr "" -#: ../../library/hashlib.rst:305 +#: ../../library/hashlib.rst:306 msgid "" "**BLAKE2b**, optimized for 64-bit platforms and produces digests of any size " "between 1 and 64 bytes," msgstr "" -#: ../../library/hashlib.rst:308 +#: ../../library/hashlib.rst:309 msgid "" "**BLAKE2s**, optimized for 8- to 32-bit platforms and produces digests of " "any size between 1 and 32 bytes." msgstr "" -#: ../../library/hashlib.rst:311 +#: ../../library/hashlib.rst:312 msgid "" "BLAKE2 supports **keyed mode** (a faster and simpler replacement for HMAC_), " "**salted hashing**, **personalization**, and **tree hashing**." msgstr "" -#: ../../library/hashlib.rst:314 +#: ../../library/hashlib.rst:315 msgid "" "Hash objects from this module follow the API of standard library's :mod:" "`hashlib` objects." msgstr "" -#: ../../library/hashlib.rst:319 +#: ../../library/hashlib.rst:320 msgid "Creating hash objects" msgstr "" -#: ../../library/hashlib.rst:321 +#: ../../library/hashlib.rst:322 msgid "New hash objects are created by calling constructor functions:" msgstr "" -#: ../../library/hashlib.rst:335 +#: ../../library/hashlib.rst:336 msgid "" "These functions return the corresponding hash objects for calculating " "BLAKE2b or BLAKE2s. They optionally take these general parameters:" msgstr "" -#: ../../library/hashlib.rst:338 +#: ../../library/hashlib.rst:339 msgid "" "*data*: initial chunk of data to hash, which must be :term:`bytes-like " "object`. It can be passed only as positional argument." msgstr "" -#: ../../library/hashlib.rst:341 +#: ../../library/hashlib.rst:342 msgid "*digest_size*: size of output digest in bytes." msgstr "" -#: ../../library/hashlib.rst:343 +#: ../../library/hashlib.rst:344 msgid "" "*key*: key for keyed hashing (up to 64 bytes for BLAKE2b, up to 32 bytes for " "BLAKE2s)." msgstr "" -#: ../../library/hashlib.rst:346 +#: ../../library/hashlib.rst:347 msgid "" "*salt*: salt for randomized hashing (up to 16 bytes for BLAKE2b, up to 8 " "bytes for BLAKE2s)." msgstr "" -#: ../../library/hashlib.rst:349 +#: ../../library/hashlib.rst:350 msgid "" "*person*: personalization string (up to 16 bytes for BLAKE2b, up to 8 bytes " "for BLAKE2s)." msgstr "" -#: ../../library/hashlib.rst:352 +#: ../../library/hashlib.rst:353 msgid "The following table shows limits for general parameters (in bytes):" msgstr "" -#: ../../library/hashlib.rst:355 +#: ../../library/hashlib.rst:356 msgid "Hash" msgstr "" -#: ../../library/hashlib.rst:355 +#: ../../library/hashlib.rst:356 msgid "digest_size" msgstr "digest_size" -#: ../../library/hashlib.rst:355 +#: ../../library/hashlib.rst:356 msgid "len(key)" msgstr "len(key)" -#: ../../library/hashlib.rst:355 +#: ../../library/hashlib.rst:356 msgid "len(salt)" msgstr "len(salt)" -#: ../../library/hashlib.rst:355 +#: ../../library/hashlib.rst:356 msgid "len(person)" msgstr "len(person)" -#: ../../library/hashlib.rst:357 +#: ../../library/hashlib.rst:358 msgid "BLAKE2b" msgstr "BLAKE2b" -#: ../../library/hashlib.rst:357 +#: ../../library/hashlib.rst:358 msgid "64" msgstr "64" -#: ../../library/hashlib.rst:357 +#: ../../library/hashlib.rst:358 msgid "16" msgstr "16" -#: ../../library/hashlib.rst:358 +#: ../../library/hashlib.rst:359 msgid "BLAKE2s" msgstr "BLAKE2s" -#: ../../library/hashlib.rst:358 +#: ../../library/hashlib.rst:359 msgid "32" msgstr "32" -#: ../../library/hashlib.rst:358 +#: ../../library/hashlib.rst:359 msgid "8" msgstr "8" -#: ../../library/hashlib.rst:363 +#: ../../library/hashlib.rst:364 msgid "" "BLAKE2 specification defines constant lengths for salt and personalization " "parameters, however, for convenience, this implementation accepts byte " @@ -452,49 +453,49 @@ msgid "" "the case for *key*.)" msgstr "" -#: ../../library/hashlib.rst:370 +#: ../../library/hashlib.rst:371 msgid "These sizes are available as module `constants`_ described below." msgstr "" -#: ../../library/hashlib.rst:372 +#: ../../library/hashlib.rst:373 msgid "" "Constructor functions also accept the following tree hashing parameters:" msgstr "" -#: ../../library/hashlib.rst:374 +#: ../../library/hashlib.rst:375 msgid "*fanout*: fanout (0 to 255, 0 if unlimited, 1 in sequential mode)." msgstr "" -#: ../../library/hashlib.rst:376 +#: ../../library/hashlib.rst:377 msgid "" "*depth*: maximal depth of tree (1 to 255, 255 if unlimited, 1 in sequential " "mode)." msgstr "" -#: ../../library/hashlib.rst:379 +#: ../../library/hashlib.rst:380 msgid "" "*leaf_size*: maximal byte length of leaf (0 to ``2**32-1``, 0 if unlimited " "or in sequential mode)." msgstr "" -#: ../../library/hashlib.rst:382 +#: ../../library/hashlib.rst:383 msgid "" "*node_offset*: node offset (0 to ``2**64-1`` for BLAKE2b, 0 to ``2**48-1`` " "for BLAKE2s, 0 for the first, leftmost, leaf, or in sequential mode)." msgstr "" -#: ../../library/hashlib.rst:385 +#: ../../library/hashlib.rst:386 msgid "" "*node_depth*: node depth (0 to 255, 0 for leaves, or in sequential mode)." msgstr "" -#: ../../library/hashlib.rst:387 +#: ../../library/hashlib.rst:388 msgid "" "*inner_size*: inner digest size (0 to 64 for BLAKE2b, 0 to 32 for BLAKE2s, 0 " "in sequential mode)." msgstr "" -#: ../../library/hashlib.rst:390 +#: ../../library/hashlib.rst:391 msgid "" "*last_node*: boolean indicating whether the processed node is the last one " "(`False` for sequential mode)." @@ -504,42 +505,42 @@ msgstr "" msgid "Explanation of tree mode parameters." msgstr "" -#: ../../library/hashlib.rst:396 +#: ../../library/hashlib.rst:397 msgid "" "See section 2.10 in `BLAKE2 specification `_ for comprehensive review of tree hashing." msgstr "" -#: ../../library/hashlib.rst:402 +#: ../../library/hashlib.rst:403 msgid "Constants" msgstr "常數" -#: ../../library/hashlib.rst:407 +#: ../../library/hashlib.rst:408 msgid "Salt length (maximum length accepted by constructors)." msgstr "" -#: ../../library/hashlib.rst:413 +#: ../../library/hashlib.rst:414 msgid "" "Personalization string length (maximum length accepted by constructors)." msgstr "" -#: ../../library/hashlib.rst:419 +#: ../../library/hashlib.rst:420 msgid "Maximum key size." msgstr "" -#: ../../library/hashlib.rst:425 +#: ../../library/hashlib.rst:426 msgid "Maximum digest size that the hash function can output." msgstr "" -#: ../../library/hashlib.rst:429 +#: ../../library/hashlib.rst:430 msgid "Examples" msgstr "範例" -#: ../../library/hashlib.rst:432 +#: ../../library/hashlib.rst:433 msgid "Simple hashing" msgstr "" -#: ../../library/hashlib.rst:434 +#: ../../library/hashlib.rst:435 msgid "" "To calculate hash of some data, you should first construct a hash object by " "calling the appropriate constructor function (:func:`blake2b` or :func:" @@ -548,41 +549,41 @@ msgid "" "`digest` (or :meth:`hexdigest` for hex-encoded string)." msgstr "" -#: ../../library/hashlib.rst:447 +#: ../../library/hashlib.rst:448 msgid "" "As a shortcut, you can pass the first chunk of data to update directly to " "the constructor as the positional argument:" msgstr "" -#: ../../library/hashlib.rst:454 +#: ../../library/hashlib.rst:455 msgid "" "You can call :meth:`hash.update` as many times as you need to iteratively " "update the hash:" msgstr "" -#: ../../library/hashlib.rst:467 +#: ../../library/hashlib.rst:468 msgid "Using different digest sizes" msgstr "" -#: ../../library/hashlib.rst:469 +#: ../../library/hashlib.rst:470 msgid "" "BLAKE2 has configurable size of digests up to 64 bytes for BLAKE2b and up to " "32 bytes for BLAKE2s. For example, to replace SHA-1 with BLAKE2b without " "changing the size of output, we can tell BLAKE2b to produce 20-byte digests:" msgstr "" -#: ../../library/hashlib.rst:483 +#: ../../library/hashlib.rst:484 msgid "" "Hash objects with different digest sizes have completely different outputs " "(shorter hashes are *not* prefixes of longer hashes); BLAKE2b and BLAKE2s " "produce different outputs even if the output length is the same:" msgstr "" -#: ../../library/hashlib.rst:499 +#: ../../library/hashlib.rst:500 msgid "Keyed hashing" msgstr "" -#: ../../library/hashlib.rst:501 +#: ../../library/hashlib.rst:502 msgid "" "Keyed hashing can be used for authentication as a faster and simpler " "replacement for `Hash-based message authentication code `_)" msgstr "" -#: ../../library/hashlib.rst:585 +#: ../../library/hashlib.rst:586 msgid "" "In BLAKE2 the salt is processed as a one-time input to the hash function " "during initialization, rather than as an input to each compression function." msgstr "" -#: ../../library/hashlib.rst:590 +#: ../../library/hashlib.rst:591 msgid "" "*Salted hashing* (or just hashing) with BLAKE2 or any other general-purpose " "cryptographic hash function, such as SHA-256, is not suitable for hashing " "passwords. See `BLAKE2 FAQ `_ for more information." msgstr "" -#: ../../library/hashlib.rst:613 +#: ../../library/hashlib.rst:614 msgid "Personalization" msgstr "" -#: ../../library/hashlib.rst:615 +#: ../../library/hashlib.rst:616 msgid "" "Sometimes it is useful to force hash function to produce different digests " "for the same input for different purposes. Quoting the authors of the Skein " "hash function:" msgstr "" -#: ../../library/hashlib.rst:619 +#: ../../library/hashlib.rst:620 msgid "" "We recommend that all application designers seriously consider doing this; " "we have seen many protocols where a hash that is computed in one part of the " @@ -680,41 +681,41 @@ msgid "" "hash function used in the protocol summarily stops this type of attack." msgstr "" -#: ../../library/hashlib.rst:626 +#: ../../library/hashlib.rst:627 msgid "" "(`The Skein Hash Function Family `_, p. 21)" msgstr "" -#: ../../library/hashlib.rst:630 +#: ../../library/hashlib.rst:631 msgid "BLAKE2 can be personalized by passing bytes to the *person* argument::" msgstr "" -#: ../../library/hashlib.rst:644 +#: ../../library/hashlib.rst:645 msgid "" "Personalization together with the keyed mode can also be used to derive " "different keys from a single one." msgstr "" -#: ../../library/hashlib.rst:658 +#: ../../library/hashlib.rst:659 msgid "Tree mode" msgstr "" -#: ../../library/hashlib.rst:660 +#: ../../library/hashlib.rst:661 msgid "Here's an example of hashing a minimal tree with two leaf nodes::" msgstr "" -#: ../../library/hashlib.rst:666 +#: ../../library/hashlib.rst:667 msgid "" "This example uses 64-byte internal digests, and returns the 32-byte final " "digest::" msgstr "" -#: ../../library/hashlib.rst:696 +#: ../../library/hashlib.rst:697 msgid "Credits" msgstr "" -#: ../../library/hashlib.rst:698 +#: ../../library/hashlib.rst:699 msgid "" "BLAKE2_ was designed by *Jean-Philippe Aumasson*, *Samuel Neves*, *Zooko " "Wilcox-O'Hearn*, and *Christian Winnerlein* based on SHA-3_ finalist BLAKE_ " @@ -722,79 +723,79 @@ msgid "" "*Raphael C.-W. Phan*." msgstr "" -#: ../../library/hashlib.rst:703 +#: ../../library/hashlib.rst:704 msgid "" "It uses core algorithm from ChaCha_ cipher designed by *Daniel J. " "Bernstein*." msgstr "" -#: ../../library/hashlib.rst:705 +#: ../../library/hashlib.rst:706 msgid "" "The stdlib implementation is based on pyblake2_ module. It was written by " "*Dmitry Chestnykh* based on C implementation written by *Samuel Neves*. The " "documentation was copied from pyblake2_ and written by *Dmitry Chestnykh*." msgstr "" -#: ../../library/hashlib.rst:709 +#: ../../library/hashlib.rst:710 msgid "The C code was partly rewritten for Python by *Christian Heimes*." msgstr "" -#: ../../library/hashlib.rst:711 +#: ../../library/hashlib.rst:712 msgid "" "The following public domain dedication applies for both C hash function " "implementation, extension code, and this documentation:" msgstr "" -#: ../../library/hashlib.rst:714 +#: ../../library/hashlib.rst:715 msgid "" "To the extent possible under law, the author(s) have dedicated all copyright " "and related and neighboring rights to this software to the public domain " "worldwide. This software is distributed without any warranty." msgstr "" -#: ../../library/hashlib.rst:718 +#: ../../library/hashlib.rst:719 msgid "" "You should have received a copy of the CC0 Public Domain Dedication along " "with this software. If not, see https://creativecommons.org/publicdomain/" "zero/1.0/." msgstr "" -#: ../../library/hashlib.rst:722 +#: ../../library/hashlib.rst:723 msgid "" "The following people have helped with development or contributed their " "changes to the project and the public domain according to the Creative " "Commons Public Domain Dedication 1.0 Universal:" msgstr "" -#: ../../library/hashlib.rst:726 +#: ../../library/hashlib.rst:727 msgid "*Alexandr Sokolovskiy*" msgstr "" -#: ../../library/hashlib.rst:740 +#: ../../library/hashlib.rst:742 msgid "Module :mod:`hmac`" msgstr ":mod:`hmac` 模組" -#: ../../library/hashlib.rst:740 +#: ../../library/hashlib.rst:742 msgid "A module to generate message authentication codes using hashes." msgstr "" -#: ../../library/hashlib.rst:743 +#: ../../library/hashlib.rst:745 msgid "Module :mod:`base64`" msgstr ":mod:`base64` 模組" -#: ../../library/hashlib.rst:743 +#: ../../library/hashlib.rst:745 msgid "Another way to encode binary hashes for non-binary environments." msgstr "" -#: ../../library/hashlib.rst:746 +#: ../../library/hashlib.rst:748 msgid "https://blake2.net" msgstr "https://blake2.net" -#: ../../library/hashlib.rst:746 +#: ../../library/hashlib.rst:748 msgid "Official BLAKE2 website." msgstr "BLAKE2 官方網站。" -#: ../../library/hashlib.rst:749 +#: ../../library/hashlib.rst:751 msgid "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" @@ -802,11 +803,11 @@ msgstr "" "https://csrc.nist.gov/csrc/media/publications/fips/180/2/archive/2002-08-01/" "documents/fips180-2.pdf" -#: ../../library/hashlib.rst:749 +#: ../../library/hashlib.rst:751 msgid "The FIPS 180-2 publication on Secure Hash Algorithms." msgstr "" -#: ../../library/hashlib.rst:753 +#: ../../library/hashlib.rst:755 msgid "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" @@ -814,16 +815,25 @@ msgstr "" "https://en.wikipedia.org/wiki/" "Cryptographic_hash_function#Cryptographic_hash_algorithms" -#: ../../library/hashlib.rst:752 +#: ../../library/hashlib.rst:754 msgid "" "Wikipedia article with information on which algorithms have known issues and " "what that means regarding their use." msgstr "" -#: ../../library/hashlib.rst:755 +#: ../../library/hashlib.rst:758 msgid "https://www.ietf.org/rfc/rfc8018.txt" msgstr "https://www.ietf.org/rfc/rfc8018.txt" -#: ../../library/hashlib.rst:756 +#: ../../library/hashlib.rst:758 msgid "PKCS #5: Password-Based Cryptography Specification Version 2.1" msgstr "" + +#: ../../library/hashlib.rst:760 +msgid "" +"https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf" +msgstr "" + +#: ../../library/hashlib.rst:761 +msgid "NIST Recommendation for Password-Based Key Derivation." +msgstr "" diff --git a/library/idle.po b/library/idle.po index 9806e1349c..6076fb5d01 100644 --- a/library/idle.po +++ b/library/idle.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-27 07:52+0000\n" "PO-Revision-Date: 2018-05-23 16:03+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -192,259 +192,262 @@ msgstr "" msgid "Print the current window to the default printer." msgstr "" -#: ../../library/idle.rst:100 -msgid "Close" -msgstr "關閉" +#: ../../library/idle.rst:102 +msgid "Close Window" +msgstr "" #: ../../library/idle.rst:100 -msgid "Close the current window (ask to save if unsaved)." +msgid "" +"Close the current window (if an unsaved editor, ask to save; if an unsaved " +"Shell, ask to quit execution). Calling ``exit()`` or ``close()`` in the " +"Shell window also closes Shell. If this is the only window, also exit IDLE." msgstr "" -#: ../../library/idle.rst:103 -msgid "Exit" -msgstr "離開" +#: ../../library/idle.rst:105 +msgid "Exit IDLE" +msgstr "離開 IDLE" -#: ../../library/idle.rst:103 -msgid "Close all windows and quit IDLE (ask to save unsaved windows)." +#: ../../library/idle.rst:105 +msgid "Close all windows and quit IDLE (ask to save unsaved edit windows)." msgstr "" -#: ../../library/idle.rst:106 +#: ../../library/idle.rst:108 msgid "Edit menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:110 +#: ../../library/idle.rst:112 msgid "Undo" msgstr "" -#: ../../library/idle.rst:109 +#: ../../library/idle.rst:111 msgid "" "Undo the last change to the current window. A maximum of 1000 changes may " "be undone." msgstr "" -#: ../../library/idle.rst:113 +#: ../../library/idle.rst:115 msgid "Redo" msgstr "" -#: ../../library/idle.rst:113 +#: ../../library/idle.rst:115 msgid "Redo the last undone change to the current window." msgstr "" -#: ../../library/idle.rst:116 ../../library/idle.rst:365 +#: ../../library/idle.rst:118 ../../library/idle.rst:367 msgid "Cut" msgstr "剪下" -#: ../../library/idle.rst:116 ../../library/idle.rst:365 +#: ../../library/idle.rst:118 ../../library/idle.rst:367 msgid "" "Copy selection into the system-wide clipboard; then delete the selection." msgstr "" -#: ../../library/idle.rst:119 ../../library/idle.rst:368 +#: ../../library/idle.rst:121 ../../library/idle.rst:370 msgid "Copy" msgstr "複製" -#: ../../library/idle.rst:119 ../../library/idle.rst:368 +#: ../../library/idle.rst:121 ../../library/idle.rst:370 msgid "Copy selection into the system-wide clipboard." msgstr "" -#: ../../library/idle.rst:122 ../../library/idle.rst:371 +#: ../../library/idle.rst:124 ../../library/idle.rst:373 msgid "Paste" msgstr "貼上" -#: ../../library/idle.rst:122 ../../library/idle.rst:371 +#: ../../library/idle.rst:124 ../../library/idle.rst:373 msgid "Insert contents of the system-wide clipboard into the current window." msgstr "" -#: ../../library/idle.rst:124 +#: ../../library/idle.rst:126 msgid "The clipboard functions are also available in context menus." msgstr "" -#: ../../library/idle.rst:127 +#: ../../library/idle.rst:129 msgid "Select All" msgstr "選擇全部" -#: ../../library/idle.rst:127 +#: ../../library/idle.rst:129 msgid "Select the entire contents of the current window." msgstr "" -#: ../../library/idle.rst:130 +#: ../../library/idle.rst:132 msgid "Find..." msgstr "" -#: ../../library/idle.rst:130 +#: ../../library/idle.rst:132 msgid "Open a search dialog with many options" msgstr "" -#: ../../library/idle.rst:133 +#: ../../library/idle.rst:135 msgid "Find Again" msgstr "" -#: ../../library/idle.rst:133 +#: ../../library/idle.rst:135 msgid "Repeat the last search, if there is one." msgstr "" -#: ../../library/idle.rst:136 +#: ../../library/idle.rst:138 msgid "Find Selection" msgstr "" -#: ../../library/idle.rst:136 +#: ../../library/idle.rst:138 msgid "Search for the currently selected string, if there is one." msgstr "" -#: ../../library/idle.rst:139 +#: ../../library/idle.rst:141 msgid "Find in Files..." msgstr "" -#: ../../library/idle.rst:139 +#: ../../library/idle.rst:141 msgid "Open a file search dialog. Put results in a new output window." msgstr "" -#: ../../library/idle.rst:142 +#: ../../library/idle.rst:144 msgid "Replace..." msgstr "" -#: ../../library/idle.rst:142 +#: ../../library/idle.rst:144 msgid "Open a search-and-replace dialog." msgstr "" -#: ../../library/idle.rst:147 +#: ../../library/idle.rst:149 msgid "Go to Line" msgstr "" -#: ../../library/idle.rst:145 +#: ../../library/idle.rst:147 msgid "" "Move the cursor to the beginning of the line requested and make that line " "visible. A request past the end of the file goes to the end. Clear any " "selection and update the line and column status." msgstr "" -#: ../../library/idle.rst:151 +#: ../../library/idle.rst:153 msgid "Show Completions" msgstr "" -#: ../../library/idle.rst:150 +#: ../../library/idle.rst:152 msgid "" "Open a scrollable list allowing selection of existing names. See :ref:" "`Completions ` in the Editing and navigation section below." msgstr "" -#: ../../library/idle.rst:155 +#: ../../library/idle.rst:157 msgid "Expand Word" msgstr "" -#: ../../library/idle.rst:154 +#: ../../library/idle.rst:156 msgid "" "Expand a prefix you have typed to match a full word in the same window; " "repeat to get a different expansion." msgstr "" -#: ../../library/idle.rst:160 +#: ../../library/idle.rst:162 msgid "Show call tip" msgstr "" -#: ../../library/idle.rst:158 +#: ../../library/idle.rst:160 msgid "" "After an unclosed parenthesis for a function, open a small window with " "function parameter hints. See :ref:`Calltips ` in the Editing and " "navigation section below." msgstr "" -#: ../../library/idle.rst:163 +#: ../../library/idle.rst:165 msgid "Show surrounding parens" msgstr "" -#: ../../library/idle.rst:163 +#: ../../library/idle.rst:165 msgid "Highlight the surrounding parenthesis." msgstr "" -#: ../../library/idle.rst:168 +#: ../../library/idle.rst:170 msgid "Format menu (Editor window only)" msgstr "" -#: ../../library/idle.rst:171 +#: ../../library/idle.rst:173 msgid "Indent Region" msgstr "" -#: ../../library/idle.rst:171 +#: ../../library/idle.rst:173 msgid "Shift selected lines right by the indent width (default 4 spaces)." msgstr "" -#: ../../library/idle.rst:174 +#: ../../library/idle.rst:176 msgid "Dedent Region" msgstr "" -#: ../../library/idle.rst:174 +#: ../../library/idle.rst:176 msgid "Shift selected lines left by the indent width (default 4 spaces)." msgstr "" -#: ../../library/idle.rst:177 +#: ../../library/idle.rst:179 msgid "Comment Out Region" msgstr "" -#: ../../library/idle.rst:177 +#: ../../library/idle.rst:179 msgid "Insert ## in front of selected lines." msgstr "" -#: ../../library/idle.rst:180 +#: ../../library/idle.rst:182 msgid "Uncomment Region" msgstr "" -#: ../../library/idle.rst:180 +#: ../../library/idle.rst:182 msgid "Remove leading # or ## from selected lines." msgstr "" -#: ../../library/idle.rst:184 +#: ../../library/idle.rst:186 msgid "Tabify Region" msgstr "" -#: ../../library/idle.rst:183 +#: ../../library/idle.rst:185 msgid "" "Turn *leading* stretches of spaces into tabs. (Note: We recommend using 4 " "space blocks to indent Python code.)" msgstr "" -#: ../../library/idle.rst:187 +#: ../../library/idle.rst:189 msgid "Untabify Region" msgstr "" -#: ../../library/idle.rst:187 +#: ../../library/idle.rst:189 msgid "Turn *all* tabs into the correct number of spaces." msgstr "" -#: ../../library/idle.rst:190 +#: ../../library/idle.rst:192 msgid "Toggle Tabs" msgstr "" -#: ../../library/idle.rst:190 +#: ../../library/idle.rst:192 msgid "Open a dialog to switch between indenting with spaces and tabs." msgstr "" -#: ../../library/idle.rst:194 +#: ../../library/idle.rst:196 msgid "New Indent Width" msgstr "" -#: ../../library/idle.rst:193 +#: ../../library/idle.rst:195 msgid "" "Open a dialog to change indent width. The accepted default by the Python " "community is 4 spaces." msgstr "" -#: ../../library/idle.rst:199 +#: ../../library/idle.rst:201 msgid "Format Paragraph" msgstr "" -#: ../../library/idle.rst:197 +#: ../../library/idle.rst:199 msgid "" "Reformat the current blank-line-delimited paragraph in comment block or " "multiline string or selected line in a string. All lines in the paragraph " "will be formatted to less than N columns, where N defaults to 72." msgstr "" -#: ../../library/idle.rst:205 +#: ../../library/idle.rst:207 msgid "Strip trailing whitespace" msgstr "" -#: ../../library/idle.rst:202 +#: ../../library/idle.rst:204 msgid "" "Remove trailing space and other whitespace characters after the last non-" "whitespace character of a line by applying str.rstrip to each line, " @@ -452,15 +455,15 @@ msgid "" "extra newlines at the end of the file." msgstr "" -#: ../../library/idle.rst:211 +#: ../../library/idle.rst:213 msgid "Run menu (Editor window only)" msgstr "" -#: ../../library/idle.rst:222 +#: ../../library/idle.rst:224 msgid "Run Module" msgstr "" -#: ../../library/idle.rst:216 +#: ../../library/idle.rst:218 msgid "" "Do :ref:`Check Module `. If no error, restart the shell to " "clean the environment, then execute the module. Output is displayed in the " @@ -470,22 +473,22 @@ msgid "" "similar to executing a file with ``python -i file`` at a command line." msgstr "" -#: ../../library/idle.rst:229 +#: ../../library/idle.rst:231 msgid "Run... Customized" msgstr "" -#: ../../library/idle.rst:227 +#: ../../library/idle.rst:229 msgid "" "Same as :ref:`Run Module `, but run the module with customized " "settings. *Command Line Arguments* extend :data:`sys.argv` as if passed on " "a command line. The module can be run in the Shell without restarting." msgstr "" -#: ../../library/idle.rst:238 +#: ../../library/idle.rst:240 msgid "Check Module" msgstr "" -#: ../../library/idle.rst:234 +#: ../../library/idle.rst:236 msgid "" "Check the syntax of the module currently open in the Editor window. If the " "module has not been saved IDLE will either prompt the user to save or " @@ -494,70 +497,70 @@ msgid "" "window." msgstr "" -#: ../../library/idle.rst:244 +#: ../../library/idle.rst:246 msgid "Python Shell" msgstr "" -#: ../../library/idle.rst:243 +#: ../../library/idle.rst:245 msgid "Open or wake up the Python Shell window." msgstr "" -#: ../../library/idle.rst:247 +#: ../../library/idle.rst:249 msgid "Shell menu (Shell window only)" msgstr "" -#: ../../library/idle.rst:250 +#: ../../library/idle.rst:252 msgid "View Last Restart" msgstr "" -#: ../../library/idle.rst:250 +#: ../../library/idle.rst:252 msgid "Scroll the shell window to the last Shell restart." msgstr "" -#: ../../library/idle.rst:253 +#: ../../library/idle.rst:255 msgid "Restart Shell" msgstr "" -#: ../../library/idle.rst:253 +#: ../../library/idle.rst:255 msgid "" "Restart the shell to clean the environment and reset display and exception " "handling." msgstr "" -#: ../../library/idle.rst:256 +#: ../../library/idle.rst:258 msgid "Previous History" msgstr "" -#: ../../library/idle.rst:256 +#: ../../library/idle.rst:258 msgid "" "Cycle through earlier commands in history which match the current entry." msgstr "" -#: ../../library/idle.rst:259 +#: ../../library/idle.rst:261 msgid "Next History" msgstr "" -#: ../../library/idle.rst:259 +#: ../../library/idle.rst:261 msgid "Cycle through later commands in history which match the current entry." msgstr "" -#: ../../library/idle.rst:262 +#: ../../library/idle.rst:264 msgid "Interrupt Execution" msgstr "" -#: ../../library/idle.rst:262 +#: ../../library/idle.rst:264 msgid "Stop a running program." msgstr "" -#: ../../library/idle.rst:265 +#: ../../library/idle.rst:267 msgid "Debug menu (Shell window only)" msgstr "" -#: ../../library/idle.rst:272 +#: ../../library/idle.rst:274 msgid "Go to File/Line" msgstr "" -#: ../../library/idle.rst:268 +#: ../../library/idle.rst:270 msgid "" "Look on the current line. with the cursor, and the line above for a filename " "and line number. If found, open the file if not already open, and show the " @@ -566,45 +569,45 @@ msgid "" "Shell window and Output windows." msgstr "" -#: ../../library/idle.rst:281 +#: ../../library/idle.rst:283 msgid "Debugger (toggle)" msgstr "" -#: ../../library/idle.rst:279 +#: ../../library/idle.rst:281 msgid "" "When activated, code entered in the Shell or run from an Editor will run " "under the debugger. In the Editor, breakpoints can be set with the context " "menu. This feature is still incomplete and somewhat experimental." msgstr "" -#: ../../library/idle.rst:285 +#: ../../library/idle.rst:287 msgid "Stack Viewer" msgstr "" -#: ../../library/idle.rst:284 +#: ../../library/idle.rst:286 msgid "" "Show the stack traceback of the last exception in a tree widget, with access " "to locals and globals." msgstr "" -#: ../../library/idle.rst:288 +#: ../../library/idle.rst:290 msgid "Auto-open Stack Viewer" msgstr "" -#: ../../library/idle.rst:288 +#: ../../library/idle.rst:290 msgid "" "Toggle automatically opening the stack viewer on an unhandled exception." msgstr "" -#: ../../library/idle.rst:291 +#: ../../library/idle.rst:293 msgid "Options menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:299 +#: ../../library/idle.rst:301 msgid "Configure IDLE" msgstr "" -#: ../../library/idle.rst:294 +#: ../../library/idle.rst:296 msgid "" "Open a configuration dialog and change preferences for the following: fonts, " "indentation, keybindings, text color themes, startup windows and size, " @@ -613,39 +616,39 @@ msgid "" "see :ref:`Setting preferences ` under Help and preferences." msgstr "" -#: ../../library/idle.rst:301 +#: ../../library/idle.rst:303 msgid "" "Most configuration options apply to all windows or all future windows. The " "option items below only apply to the active window." msgstr "" -#: ../../library/idle.rst:308 +#: ../../library/idle.rst:310 msgid "Show/Hide Code Context (Editor Window only)" msgstr "" -#: ../../library/idle.rst:305 +#: ../../library/idle.rst:307 msgid "" "Open a pane at the top of the edit window which shows the block context of " "the code which has scrolled above the top of the window. See :ref:`Code " "Context ` in the Editing and Navigation section below." msgstr "" -#: ../../library/idle.rst:313 +#: ../../library/idle.rst:315 msgid "Show/Hide Line Numbers (Editor Window only)" msgstr "" -#: ../../library/idle.rst:311 +#: ../../library/idle.rst:313 msgid "" "Open a column to the left of the edit window which shows the number of each " "line of text. The default is off, which may be changed in the preferences " "(see :ref:`Setting preferences `)." msgstr "" -#: ../../library/idle.rst:321 +#: ../../library/idle.rst:323 msgid "Zoom/Restore Height" msgstr "" -#: ../../library/idle.rst:316 +#: ../../library/idle.rst:318 msgid "" "Toggles the window between normal size and maximum height. The initial size " "defaults to 40 lines by 80 chars unless changed on the General tab of the " @@ -655,74 +658,74 @@ msgid "" "no effect when a window is maximized." msgstr "" -#: ../../library/idle.rst:324 +#: ../../library/idle.rst:326 msgid "Window menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:326 +#: ../../library/idle.rst:328 msgid "" "Lists the names of all open windows; select one to bring it to the " "foreground (deiconifying it if necessary)." msgstr "" -#: ../../library/idle.rst:330 +#: ../../library/idle.rst:332 msgid "Help menu (Shell and Editor)" msgstr "" -#: ../../library/idle.rst:333 +#: ../../library/idle.rst:335 msgid "About IDLE" msgstr "" -#: ../../library/idle.rst:333 +#: ../../library/idle.rst:335 msgid "Display version, copyright, license, credits, and more." msgstr "" -#: ../../library/idle.rst:337 +#: ../../library/idle.rst:339 msgid "IDLE Help" msgstr "" -#: ../../library/idle.rst:336 +#: ../../library/idle.rst:338 msgid "" "Display this IDLE document, detailing the menu options, basic editing and " "navigation, and other tips." msgstr "" -#: ../../library/idle.rst:341 +#: ../../library/idle.rst:343 msgid "Python Docs" msgstr "" -#: ../../library/idle.rst:340 +#: ../../library/idle.rst:342 msgid "" "Access local Python documentation, if installed, or start a web browser and " "open docs.python.org showing the latest Python documentation." msgstr "" -#: ../../library/idle.rst:344 +#: ../../library/idle.rst:346 msgid "Turtle Demo" msgstr "" -#: ../../library/idle.rst:344 +#: ../../library/idle.rst:346 msgid "Run the turtledemo module with example Python code and turtle drawings." msgstr "" -#: ../../library/idle.rst:346 +#: ../../library/idle.rst:348 msgid "" "Additional help sources may be added here with the Configure IDLE dialog " "under the General tab. See the :ref:`Help sources ` subsection " "below for more on Help menu choices." msgstr "" -#: ../../library/idle.rst:359 +#: ../../library/idle.rst:361 msgid "Context Menus" msgstr "" -#: ../../library/idle.rst:361 +#: ../../library/idle.rst:363 msgid "" "Open a context menu by right-clicking in a window (Control-click on macOS). " "Context menus have the standard clipboard functions also on the Edit menu." msgstr "" -#: ../../library/idle.rst:373 +#: ../../library/idle.rst:375 msgid "" "Editor windows also have breakpoint functions. Lines with a breakpoint set " "are specially marked. Breakpoints only have an effect when running under " @@ -730,66 +733,66 @@ msgid "" "directory." msgstr "" -#: ../../library/idle.rst:379 +#: ../../library/idle.rst:381 msgid "Set Breakpoint" msgstr "" -#: ../../library/idle.rst:379 +#: ../../library/idle.rst:381 msgid "Set a breakpoint on the current line." msgstr "" -#: ../../library/idle.rst:382 +#: ../../library/idle.rst:384 msgid "Clear Breakpoint" msgstr "" -#: ../../library/idle.rst:382 +#: ../../library/idle.rst:384 msgid "Clear the breakpoint on that line." msgstr "" -#: ../../library/idle.rst:384 +#: ../../library/idle.rst:386 msgid "Shell and Output windows also have the following." msgstr "" -#: ../../library/idle.rst:387 +#: ../../library/idle.rst:389 msgid "Go to file/line" msgstr "" -#: ../../library/idle.rst:387 +#: ../../library/idle.rst:389 msgid "Same as in Debug menu." msgstr "" -#: ../../library/idle.rst:389 +#: ../../library/idle.rst:391 msgid "" "The Shell window also has an output squeezing facility explained in the " "*Python Shell window* subsection below." msgstr "" -#: ../../library/idle.rst:395 +#: ../../library/idle.rst:397 msgid "Squeeze" msgstr "" -#: ../../library/idle.rst:393 +#: ../../library/idle.rst:395 msgid "" "If the cursor is over an output line, squeeze all the output between the " "code above and the prompt below down to a 'Squeezed text' label." msgstr "" -#: ../../library/idle.rst:400 +#: ../../library/idle.rst:402 msgid "Editing and navigation" msgstr "" -#: ../../library/idle.rst:403 +#: ../../library/idle.rst:405 msgid "Editor windows" msgstr "" -#: ../../library/idle.rst:405 +#: ../../library/idle.rst:407 msgid "" "IDLE may open editor windows when it starts, depending on settings and how " "you start IDLE. Thereafter, use the File menu. There can be only one open " "editor window for a given file." msgstr "" -#: ../../library/idle.rst:409 +#: ../../library/idle.rst:411 msgid "" "The title bar contains the name of the file, the full path, and the version " "of Python and IDLE running the window. The status bar contains the line " @@ -797,99 +800,99 @@ msgid "" "numbers with 0." msgstr "" -#: ../../library/idle.rst:414 +#: ../../library/idle.rst:416 msgid "" "IDLE assumes that files with a known .py* extension contain Python code and " "that other files do not. Run Python code with the Run menu." msgstr "" -#: ../../library/idle.rst:418 +#: ../../library/idle.rst:420 msgid "Key bindings" msgstr "" -#: ../../library/idle.rst:420 +#: ../../library/idle.rst:422 msgid "" "In this section, 'C' refers to the :kbd:`Control` key on Windows and Unix " "and the :kbd:`Command` key on macOS." msgstr "" -#: ../../library/idle.rst:423 +#: ../../library/idle.rst:425 msgid ":kbd:`Backspace` deletes to the left; :kbd:`Del` deletes to the right" msgstr "" -#: ../../library/idle.rst:425 +#: ../../library/idle.rst:427 msgid "" ":kbd:`C-Backspace` delete word left; :kbd:`C-Del` delete word to the right" msgstr "" -#: ../../library/idle.rst:427 +#: ../../library/idle.rst:429 msgid "Arrow keys and :kbd:`Page Up`/:kbd:`Page Down` to move around" msgstr "" -#: ../../library/idle.rst:429 +#: ../../library/idle.rst:431 msgid ":kbd:`C-LeftArrow` and :kbd:`C-RightArrow` moves by words" msgstr "" -#: ../../library/idle.rst:431 +#: ../../library/idle.rst:433 msgid ":kbd:`Home`/:kbd:`End` go to begin/end of line" msgstr "" -#: ../../library/idle.rst:433 +#: ../../library/idle.rst:435 msgid ":kbd:`C-Home`/:kbd:`C-End` go to begin/end of file" msgstr "" -#: ../../library/idle.rst:435 +#: ../../library/idle.rst:437 msgid "Some useful Emacs bindings are inherited from Tcl/Tk:" msgstr "" -#: ../../library/idle.rst:437 +#: ../../library/idle.rst:439 msgid ":kbd:`C-a` beginning of line" msgstr "" -#: ../../library/idle.rst:439 +#: ../../library/idle.rst:441 msgid ":kbd:`C-e` end of line" msgstr "" -#: ../../library/idle.rst:441 +#: ../../library/idle.rst:443 msgid ":kbd:`C-k` kill line (but doesn't put it in clipboard)" msgstr "" -#: ../../library/idle.rst:443 +#: ../../library/idle.rst:445 msgid ":kbd:`C-l` center window around the insertion point" msgstr "" -#: ../../library/idle.rst:445 +#: ../../library/idle.rst:447 msgid "" ":kbd:`C-b` go backward one character without deleting (usually you can also " "use the cursor key for this)" msgstr "" -#: ../../library/idle.rst:448 +#: ../../library/idle.rst:450 msgid "" ":kbd:`C-f` go forward one character without deleting (usually you can also " "use the cursor key for this)" msgstr "" -#: ../../library/idle.rst:451 +#: ../../library/idle.rst:453 msgid "" ":kbd:`C-p` go up one line (usually you can also use the cursor key for this)" msgstr "" -#: ../../library/idle.rst:454 +#: ../../library/idle.rst:456 msgid ":kbd:`C-d` delete next character" msgstr "" -#: ../../library/idle.rst:456 +#: ../../library/idle.rst:458 msgid "" "Standard keybindings (like :kbd:`C-c` to copy and :kbd:`C-v` to paste) may " "work. Keybindings are selected in the Configure IDLE dialog." msgstr "" -#: ../../library/idle.rst:460 +#: ../../library/idle.rst:462 msgid "Automatic indentation" msgstr "" -#: ../../library/idle.rst:462 +#: ../../library/idle.rst:464 msgid "" "After a block-opening statement, the next line is indented by 4 spaces (in " "the Python Shell window by one tab). After certain keywords (break, return " @@ -899,17 +902,17 @@ msgid "" "tabs are restricted to four spaces due to Tcl/Tk limitations." msgstr "" -#: ../../library/idle.rst:469 +#: ../../library/idle.rst:471 msgid "" "See also the indent/dedent region commands on the :ref:`Format menu `." msgstr "" -#: ../../library/idle.rst:475 +#: ../../library/idle.rst:477 msgid "Completions" msgstr "" -#: ../../library/idle.rst:477 +#: ../../library/idle.rst:479 msgid "" "Completions are supplied, when requested and available, for module names, " "attributes of classes or functions, or filenames. Each request method " @@ -922,7 +925,7 @@ msgid "" "box. A double click within the box selects and closes." msgstr "" -#: ../../library/idle.rst:488 +#: ../../library/idle.rst:490 msgid "" "One way to open a box is to type a key character and wait for a predefined " "interval. This defaults to 2 seconds; customize it in the settings dialog. " @@ -934,7 +937,7 @@ msgid "" "directory name and a separator." msgstr "" -#: ../../library/idle.rst:498 +#: ../../library/idle.rst:500 msgid "" "Instead of waiting, or after a box is closed, open a completion box " "immediately with Show Completions on the Edit menu. The default hot key is :" @@ -945,7 +948,7 @@ msgid "" "directory." msgstr "" -#: ../../library/idle.rst:506 +#: ../../library/idle.rst:508 msgid "" "Hitting :kbd:`Tab` after a prefix usually has the same effect as Show " "Completions. (With no prefix, it indents.) However, if there is only one " @@ -953,14 +956,14 @@ msgid "" "without opening a box." msgstr "" -#: ../../library/idle.rst:511 +#: ../../library/idle.rst:513 msgid "" "Invoking 'Show Completions', or hitting :kbd:`Tab` after a prefix, outside " "of a string and without a preceding '.' opens a box with keywords, builtin " "names, and available module-level names." msgstr "" -#: ../../library/idle.rst:515 +#: ../../library/idle.rst:517 msgid "" "When editing code in an editor (as oppose to Shell), increase the available " "module-level names by running your code and not restarting the Shell " @@ -968,18 +971,18 @@ msgid "" "file. This also increases possible attribute completions." msgstr "" -#: ../../library/idle.rst:521 +#: ../../library/idle.rst:523 msgid "" "Completion boxes initially exclude names beginning with '_' or, for modules, " "not included in '__all__'. The hidden names can be accessed by typing '_' " "after '.', either before or after the box is opened." msgstr "" -#: ../../library/idle.rst:528 +#: ../../library/idle.rst:530 msgid "Calltips" msgstr "" -#: ../../library/idle.rst:530 +#: ../../library/idle.rst:532 msgid "" "A calltip is shown automatically when one types :kbd:`(` after the name of " "an *accessible* function. A function name expression may include dots and " @@ -989,7 +992,7 @@ msgid "" "or enter its shortcut to display a calltip." msgstr "" -#: ../../library/idle.rst:537 +#: ../../library/idle.rst:539 msgid "" "The calltip consists of the function's signature and docstring up to the " "latter's first blank line or the fifth non-blank line. (Some builtin " @@ -998,14 +1001,14 @@ msgid "" "or name (keyword) only. Details are subject to change." msgstr "" -#: ../../library/idle.rst:543 +#: ../../library/idle.rst:545 msgid "" "In Shell, the accessible functions depends on what modules have been " "imported into the user process, including those imported by Idle itself, and " "which definitions have been run, all since the last restart." msgstr "" -#: ../../library/idle.rst:547 +#: ../../library/idle.rst:549 msgid "" "For example, restart the Shell and enter ``itertools.count(``. A calltip " "appears because Idle imports itertools into the user process for its own " @@ -1015,18 +1018,18 @@ msgid "" "display a calltip." msgstr "" -#: ../../library/idle.rst:554 +#: ../../library/idle.rst:556 msgid "" "In an editor, import statements have no effect until one runs the file. One " "might want to run a file after writing import statements, after adding " "function definitions, or after opening an existing file." msgstr "" -#: ../../library/idle.rst:561 +#: ../../library/idle.rst:563 msgid "Code Context" msgstr "" -#: ../../library/idle.rst:563 +#: ../../library/idle.rst:565 msgid "" "Within an editor window containing Python code, code context can be toggled " "in order to show or hide a pane at the top of the window. When shown, this " @@ -1040,23 +1043,23 @@ msgid "" "the top of the editor." msgstr "" -#: ../../library/idle.rst:574 +#: ../../library/idle.rst:576 msgid "" "The text and background colors for the context pane can be configured under " "the Highlights tab in the Configure IDLE dialog." msgstr "" -#: ../../library/idle.rst:578 +#: ../../library/idle.rst:580 msgid "Python Shell window" msgstr "" -#: ../../library/idle.rst:580 +#: ../../library/idle.rst:582 msgid "" "With IDLE's Shell, one enters, edits, and recalls complete statements. Most " "consoles and terminals only work with a single physical line at a time." msgstr "" -#: ../../library/idle.rst:583 +#: ../../library/idle.rst:585 msgid "" "When one pastes code into Shell, it is not compiled and possibly executed " "until one hits :kbd:`Return`. One may edit pasted code first. If one pastes " @@ -1064,48 +1067,48 @@ msgid "" "when multiple statements are compiled as if they were one." msgstr "" -#: ../../library/idle.rst:588 +#: ../../library/idle.rst:590 msgid "" "The editing features described in previous subsections work when entering " "code interactively. IDLE's Shell window also responds to the following keys." msgstr "" -#: ../../library/idle.rst:591 +#: ../../library/idle.rst:593 msgid ":kbd:`C-c` interrupts executing command" msgstr "" -#: ../../library/idle.rst:593 +#: ../../library/idle.rst:595 msgid "" ":kbd:`C-d` sends end-of-file; closes window if typed at a ``>>>`` prompt" msgstr "" -#: ../../library/idle.rst:595 +#: ../../library/idle.rst:597 msgid ":kbd:`Alt-/` (Expand word) is also useful to reduce typing" msgstr "" -#: ../../library/idle.rst:597 +#: ../../library/idle.rst:599 msgid "Command history" msgstr "" -#: ../../library/idle.rst:599 +#: ../../library/idle.rst:601 msgid "" ":kbd:`Alt-p` retrieves previous command matching what you have typed. On " "macOS use :kbd:`C-p`." msgstr "" -#: ../../library/idle.rst:602 +#: ../../library/idle.rst:604 msgid ":kbd:`Alt-n` retrieves next. On macOS use :kbd:`C-n`." msgstr "" -#: ../../library/idle.rst:604 +#: ../../library/idle.rst:606 msgid ":kbd:`Return` while on any previous command retrieves that command" msgstr "" -#: ../../library/idle.rst:607 +#: ../../library/idle.rst:609 msgid "Text colors" msgstr "" -#: ../../library/idle.rst:609 +#: ../../library/idle.rst:611 msgid "" "Idle defaults to black on white text, but colors text with special meanings. " "For the shell, these are shell output, shell error, user output, and user " @@ -1115,7 +1118,7 @@ msgid "" "(when present), found text (when possible), and selected text." msgstr "" -#: ../../library/idle.rst:616 +#: ../../library/idle.rst:618 msgid "" "IDLE also highlights the :ref:`soft keywords ` :keyword:" "`match`, :keyword:`case `, and :keyword:`_ ` in " @@ -1124,7 +1127,7 @@ msgid "" "patterns." msgstr "" -#: ../../library/idle.rst:622 +#: ../../library/idle.rst:624 msgid "" "Text coloring is done in the background, so uncolorized text is occasionally " "visible. To change the color scheme, use the Configure IDLE dialog " @@ -1132,11 +1135,11 @@ msgid "" "and text in popups and dialogs is not user-configurable." msgstr "" -#: ../../library/idle.rst:629 +#: ../../library/idle.rst:631 msgid "Startup and code execution" msgstr "" -#: ../../library/idle.rst:631 +#: ../../library/idle.rst:633 msgid "" "Upon startup with the ``-s`` option, IDLE will execute the file referenced " "by the environment variables :envvar:`IDLESTARTUP` or :envvar:" @@ -1148,7 +1151,7 @@ msgid "" "modules." msgstr "" -#: ../../library/idle.rst:639 +#: ../../library/idle.rst:641 msgid "" "In addition, ``Tk`` also loads a startup file if it is present. Note that " "the Tk file is loaded unconditionally. This additional file is ``.Idle.py`` " @@ -1157,15 +1160,15 @@ msgid "" "importing functions to be used from IDLE's Python shell." msgstr "" -#: ../../library/idle.rst:646 +#: ../../library/idle.rst:648 msgid "Command line usage" msgstr "" -#: ../../library/idle.rst:662 +#: ../../library/idle.rst:664 msgid "If there are arguments:" msgstr "" -#: ../../library/idle.rst:664 +#: ../../library/idle.rst:666 msgid "" "If ``-``, ``-c``, or ``r`` is used, all arguments are placed in ``sys." "argv[1:...]`` and ``sys.argv[0]`` is set to ``''``, ``'-c'``, or ``'-r'``. " @@ -1173,17 +1176,17 @@ msgid "" "dialog." msgstr "" -#: ../../library/idle.rst:669 +#: ../../library/idle.rst:671 msgid "" "Otherwise, arguments are files opened for editing and ``sys.argv`` reflects " "the arguments passed to IDLE itself." msgstr "" -#: ../../library/idle.rst:673 +#: ../../library/idle.rst:675 msgid "Startup failure" msgstr "" -#: ../../library/idle.rst:675 +#: ../../library/idle.rst:677 msgid "" "IDLE uses a socket to communicate between the IDLE GUI process and the user " "code execution process. A connection must be established whenever the Shell " @@ -1193,7 +1196,7 @@ msgid "" "directs the user here. It then exits." msgstr "" -#: ../../library/idle.rst:682 +#: ../../library/idle.rst:684 msgid "" "One specific connection failure on Unix systems results from misconfigured " "masquerading rules somewhere in a system's network setup. When IDLE is " @@ -1203,7 +1206,7 @@ msgid "" "``tcplisten `` in another." msgstr "" -#: ../../library/idle.rst:690 +#: ../../library/idle.rst:692 msgid "" "A common cause of failure is a user-written file with the same name as a " "standard library module, such as *random.py* and *tkinter.py*. When such a " @@ -1212,7 +1215,7 @@ msgid "" "file." msgstr "" -#: ../../library/idle.rst:696 +#: ../../library/idle.rst:698 msgid "" "Though less common than in the past, an antivirus or firewall program may " "stop the connection. If the program cannot be taught to allow the " @@ -1222,7 +1225,7 @@ msgid "" "connections." msgstr "" -#: ../../library/idle.rst:703 +#: ../../library/idle.rst:705 msgid "" "Python installation issues occasionally stop IDLE: multiple versions can " "clash, or a single installation might need admin access. If one undo the " @@ -1230,7 +1233,7 @@ msgid "" "completely remove Python and start over." msgstr "" -#: ../../library/idle.rst:708 +#: ../../library/idle.rst:710 msgid "" "A zombie pythonw.exe process could be a problem. On Windows, use Task " "Manager to check for one and stop it if there is. Sometimes a restart " @@ -1239,7 +1242,7 @@ msgid "" "may fix a temporary problem." msgstr "" -#: ../../library/idle.rst:714 +#: ../../library/idle.rst:716 msgid "" "When IDLE first starts, it attempts to read user configuration files in ``~/." "idlerc/`` (~ is one's home directory). If there is a problem, an error " @@ -1250,14 +1253,14 @@ msgid "" "with the settings dialog." msgstr "" -#: ../../library/idle.rst:722 +#: ../../library/idle.rst:724 msgid "" "If IDLE quits with no message, and it was not started from a console, try " "starting it from a console or terminal (``python -m idlelib``) and see if " "this results in an error message." msgstr "" -#: ../../library/idle.rst:726 +#: ../../library/idle.rst:728 msgid "" "On Unix-based systems with tcl/tk older than ``8.6.11`` (see ``About IDLE``) " "certain characters of certain fonts can cause a tk failure with a message to " @@ -1266,11 +1269,11 @@ msgid "" "upgrade tcl/tk, then re-configure IDLE to use a font that works better." msgstr "" -#: ../../library/idle.rst:734 +#: ../../library/idle.rst:736 msgid "Running user code" msgstr "" -#: ../../library/idle.rst:736 +#: ../../library/idle.rst:738 msgid "" "With rare exceptions, the result of executing Python code with IDLE is " "intended to be the same as executing the same code by the default method, " @@ -1280,7 +1283,7 @@ msgid "" "``threading.active_count()`` returns 2 instead of 1." msgstr "" -#: ../../library/idle.rst:743 +#: ../../library/idle.rst:745 msgid "" "By default, IDLE runs user code in a separate OS process rather than in the " "user interface process that runs the shell and editor. In the execution " @@ -1290,7 +1293,7 @@ msgid "" "__stderr__`` are not touched, but may be ``None``." msgstr "" -#: ../../library/idle.rst:750 +#: ../../library/idle.rst:752 msgid "" "Sending print output from one process to a text widget in another is slower " "than printing to a system terminal in the same process. This has the most " @@ -1302,7 +1305,7 @@ msgid "" "fields and lines." msgstr "" -#: ../../library/idle.rst:759 +#: ../../library/idle.rst:761 msgid "" "IDLE's standard stream replacements are not inherited by subprocesses " "created in the execution process, whether directly by user code or by " @@ -1312,14 +1315,14 @@ msgid "" "attached to that window for input and output." msgstr "" -#: ../../library/idle.rst:766 +#: ../../library/idle.rst:768 msgid "" "If ``sys`` is reset by user code, such as with ``importlib.reload(sys)``, " "IDLE's changes are lost and input from the keyboard and output to the screen " "will not work correctly." msgstr "" -#: ../../library/idle.rst:770 +#: ../../library/idle.rst:772 msgid "" "When Shell has the focus, it controls the keyboard and screen. This is " "normally transparent, but functions that directly access the keyboard and " @@ -1327,7 +1330,7 @@ msgid "" "determine whether a key has been pressed and if so, which." msgstr "" -#: ../../library/idle.rst:775 +#: ../../library/idle.rst:777 msgid "" "The IDLE code running in the execution process adds frames to the call stack " "that would not be there otherwise. IDLE wraps ``sys.getrecursionlimit`` and " @@ -1335,17 +1338,17 @@ msgid "" "frames." msgstr "" -#: ../../library/idle.rst:780 +#: ../../library/idle.rst:782 msgid "" "When user code raises SystemExit either directly or by calling sys.exit, " "IDLE returns to a Shell prompt instead of exiting." msgstr "" -#: ../../library/idle.rst:784 +#: ../../library/idle.rst:786 msgid "User output in Shell" msgstr "" -#: ../../library/idle.rst:786 +#: ../../library/idle.rst:788 msgid "" "When a program outputs text, the result is determined by the corresponding " "output device. When IDLE executes user code, ``sys.stdout`` and ``sys." @@ -1355,7 +1358,7 @@ msgid "" "rather than production runs." msgstr "" -#: ../../library/idle.rst:793 +#: ../../library/idle.rst:795 msgid "" "For instance, Shell never throws away output. A program that sends " "unlimited output to Shell will eventually fill memory, resulting in a memory " @@ -1364,7 +1367,7 @@ msgid "" "lines, with 300 the default." msgstr "" -#: ../../library/idle.rst:799 +#: ../../library/idle.rst:801 msgid "" "A Tk Text widget, and hence IDLE's Shell, displays characters (codepoints) " "in the BMP (Basic Multilingual Plane) subset of Unicode. Which characters " @@ -1378,7 +1381,7 @@ msgid "" "spacing behavior.) ::" msgstr "" -#: ../../library/idle.rst:817 +#: ../../library/idle.rst:819 msgid "" "The ``repr`` function is used for interactive echo of expression values. It " "returns an altered version of the input string in which control codes, some " @@ -1387,13 +1390,13 @@ msgid "" "regardless of how they are displayed." msgstr "" -#: ../../library/idle.rst:823 +#: ../../library/idle.rst:825 msgid "" "Normal and error output are generally kept separate (on separate lines) from " "code input and each other. They each get different highlight colors." msgstr "" -#: ../../library/idle.rst:826 +#: ../../library/idle.rst:828 msgid "" "For SyntaxError tracebacks, the normal '^' marking where the error was " "detected is replaced by coloring the text with an error highlight. When code " @@ -1402,7 +1405,7 @@ msgid "" "opened if necessary." msgstr "" -#: ../../library/idle.rst:832 +#: ../../library/idle.rst:834 msgid "" "Shell has a special facility for squeezing output lines down to a 'Squeezed " "text' label. This is done automatically for output over N lines (N = 50 by " @@ -1411,18 +1414,18 @@ msgid "" "on the output. This can be useful lines long enough to slow down scrolling." msgstr "" -#: ../../library/idle.rst:840 +#: ../../library/idle.rst:842 msgid "" "Squeezed output is expanded in place by double-clicking the label. It can " "also be sent to the clipboard or a separate view window by right-clicking " "the label." msgstr "" -#: ../../library/idle.rst:845 +#: ../../library/idle.rst:847 msgid "Developing tkinter applications" msgstr "" -#: ../../library/idle.rst:847 +#: ../../library/idle.rst:849 msgid "" "IDLE is intentionally different from standard Python in order to facilitate " "development of tkinter programs. Enter ``import tkinter as tk; root = tk." @@ -1434,7 +1437,7 @@ msgid "" "changes in standard Python until one enters ``root.update()``." msgstr "" -#: ../../library/idle.rst:856 +#: ../../library/idle.rst:858 msgid "" "Most tkinter programs run ``root.mainloop()``, which usually does not return " "until the tk app is destroyed. If the program is run with ``python -i`` or " @@ -1442,7 +1445,7 @@ msgid "" "``mainloop()`` returns, at which time there is nothing left to interact with." msgstr "" -#: ../../library/idle.rst:862 +#: ../../library/idle.rst:864 msgid "" "When running a tkinter program from an IDLE editor, one can comment out the " "mainloop call. One then gets a shell prompt immediately and can interact " @@ -1450,11 +1453,11 @@ msgid "" "mainloop call when running in standard Python." msgstr "" -#: ../../library/idle.rst:868 +#: ../../library/idle.rst:870 msgid "Running without a subprocess" msgstr "" -#: ../../library/idle.rst:870 +#: ../../library/idle.rst:872 msgid "" "By default, IDLE executes user code in a separate subprocess via a socket, " "which uses the internal loopback interface. This connection is not " @@ -1462,7 +1465,7 @@ msgid "" "firewall software complains anyway, you can ignore it." msgstr "" -#: ../../library/idle.rst:875 +#: ../../library/idle.rst:877 msgid "" "If the attempt to make the socket connection fails, Idle will notify you. " "Such failures are sometimes transient, but if persistent, the problem may be " @@ -1471,7 +1474,7 @@ msgid "" "command line switch." msgstr "" -#: ../../library/idle.rst:881 +#: ../../library/idle.rst:883 msgid "" "If IDLE is started with the -n command line switch it will run in a single " "process and will not create the subprocess which runs the RPC Python " @@ -1485,15 +1488,15 @@ msgid "" "at all possible." msgstr "" -#: ../../library/idle.rst:896 +#: ../../library/idle.rst:898 msgid "Help and preferences" msgstr "" -#: ../../library/idle.rst:901 +#: ../../library/idle.rst:903 msgid "Help sources" msgstr "" -#: ../../library/idle.rst:903 +#: ../../library/idle.rst:905 msgid "" "Help menu entry \"IDLE Help\" displays a formatted html version of the IDLE " "chapter of the Library Reference. The result, in a read-only tkinter text " @@ -1503,7 +1506,7 @@ msgid "" "the opened box." msgstr "" -#: ../../library/idle.rst:911 +#: ../../library/idle.rst:913 msgid "" "Help menu entry \"Python Docs\" opens the extensive sources of help, " "including tutorials, available at ``docs.python.org/x.y``, where 'x.y' is " @@ -1512,17 +1515,17 @@ msgid "" "instead." msgstr "" -#: ../../library/idle.rst:917 +#: ../../library/idle.rst:919 msgid "" "Selected URLs can be added or removed from the help menu at any time using " "the General tab of the Configure IDLE dialog." msgstr "" -#: ../../library/idle.rst:923 +#: ../../library/idle.rst:925 msgid "Setting preferences" msgstr "" -#: ../../library/idle.rst:925 +#: ../../library/idle.rst:927 msgid "" "The font preferences, highlighting, keys, and general preferences can be " "changed via Configure IDLE on the Option menu. Non-default user settings are " @@ -1531,7 +1534,7 @@ msgid "" "or more of the files in ``.idlerc``." msgstr "" -#: ../../library/idle.rst:931 +#: ../../library/idle.rst:933 msgid "" "On the Font tab, see the text sample for the effect of font face and size on " "multiple characters in multiple languages. Edit the sample to add other " @@ -1540,7 +1543,7 @@ msgid "" "them to the top of the sample and try changing first size and then font." msgstr "" -#: ../../library/idle.rst:938 +#: ../../library/idle.rst:940 msgid "" "On the Highlights and Keys tab, select a built-in or custom color theme and " "key set. To use a newer built-in color theme or key set with older IDLEs, " @@ -1548,22 +1551,22 @@ msgid "" "IDLEs." msgstr "" -#: ../../library/idle.rst:944 +#: ../../library/idle.rst:946 msgid "IDLE on macOS" msgstr "" -#: ../../library/idle.rst:946 +#: ../../library/idle.rst:948 msgid "" "Under System Preferences: Dock, one can set \"Prefer tabs when opening " "documents\" to \"Always\". This setting is not compatible with the tk/" "tkinter GUI framework used by IDLE, and it breaks a few IDLE features." msgstr "" -#: ../../library/idle.rst:951 +#: ../../library/idle.rst:953 msgid "Extensions" msgstr "" -#: ../../library/idle.rst:953 +#: ../../library/idle.rst:955 msgid "" "IDLE contains an extension facility. Preferences for extensions can be " "changed with the Extensions tab of the preferences dialog. See the beginning " diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index 263723110a..32e4c89531 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-01-28 00:10+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -554,10 +554,10 @@ msgstr "" #: ../../reference/simple_stmts.rst:566 msgid "" -"If no expressions are present, :keyword:`raise` re-raises the last exception " -"that was active in the current scope. If no exception is active in the " -"current scope, a :exc:`RuntimeError` exception is raised indicating that " -"this is an error." +"If no expressions are present, :keyword:`raise` re-raises the exception that " +"is currently being handled, which is also known as the *active exception*. " +"If there isn't currently an active exception, a :exc:`RuntimeError` " +"exception is raised indicating that this is an error." msgstr "" #: ../../reference/simple_stmts.rst:571 @@ -579,8 +579,9 @@ msgid "" "A traceback object is normally created automatically when an exception is " "raised and attached to it as the :attr:`__traceback__` attribute, which is " "writable. You can create an exception and set your own traceback in one step " -"using the :meth:`with_traceback` exception method (which returns the same " -"exception instance, with its traceback set to its argument), like so::" +"using the :meth:`~BaseException.with_traceback` exception method (which " +"returns the same exception instance, with its traceback set to its " +"argument), like so::" msgstr "" #: ../../reference/simple_stmts.rst:593 @@ -597,69 +598,71 @@ msgstr "" #: ../../reference/simple_stmts.rst:617 msgid "" -"A similar mechanism works implicitly if an exception is raised inside an " -"exception handler or a :keyword:`finally` clause: the previous exception is " -"then attached as the new exception's :attr:`__context__` attribute::" +"A similar mechanism works implicitly if a new exception is raised when an " +"exception is already being handled. An exception may be handled when an :" +"keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " +"statement, is used. The previous exception is then attached as the new " +"exception's :attr:`__context__` attribute::" msgstr "" -#: ../../reference/simple_stmts.rst:636 +#: ../../reference/simple_stmts.rst:638 msgid "" "Exception chaining can be explicitly suppressed by specifying :const:`None` " "in the ``from`` clause::" msgstr "" -#: ../../reference/simple_stmts.rst:648 +#: ../../reference/simple_stmts.rst:650 msgid "" "Additional information on exceptions can be found in section :ref:" "`exceptions`, and information about handling exceptions is in section :ref:" "`try`." msgstr "" -#: ../../reference/simple_stmts.rst:651 +#: ../../reference/simple_stmts.rst:653 msgid ":const:`None` is now permitted as ``Y`` in ``raise X from Y``." msgstr "" -#: ../../reference/simple_stmts.rst:654 +#: ../../reference/simple_stmts.rst:656 msgid "" "The ``__suppress_context__`` attribute to suppress automatic display of the " "exception context." msgstr "" -#: ../../reference/simple_stmts.rst:661 +#: ../../reference/simple_stmts.rst:663 msgid "The :keyword:`!break` statement" msgstr "" -#: ../../reference/simple_stmts.rst:672 +#: ../../reference/simple_stmts.rst:674 msgid "" ":keyword:`break` may only occur syntactically nested in a :keyword:`for` or :" "keyword:`while` loop, but not nested in a function or class definition " "within that loop." msgstr "" -#: ../../reference/simple_stmts.rst:679 +#: ../../reference/simple_stmts.rst:681 msgid "" "It terminates the nearest enclosing loop, skipping the optional :keyword:`!" "else` clause if the loop has one." msgstr "" -#: ../../reference/simple_stmts.rst:682 +#: ../../reference/simple_stmts.rst:684 msgid "" "If a :keyword:`for` loop is terminated by :keyword:`break`, the loop control " "target keeps its current value." msgstr "" -#: ../../reference/simple_stmts.rst:687 +#: ../../reference/simple_stmts.rst:689 msgid "" "When :keyword:`break` passes control out of a :keyword:`try` statement with " "a :keyword:`finally` clause, that :keyword:`!finally` clause is executed " "before really leaving the loop." msgstr "" -#: ../../reference/simple_stmts.rst:695 +#: ../../reference/simple_stmts.rst:697 msgid "The :keyword:`!continue` statement" msgstr "" -#: ../../reference/simple_stmts.rst:707 +#: ../../reference/simple_stmts.rst:709 msgid "" ":keyword:`continue` may only occur syntactically nested in a :keyword:`for` " "or :keyword:`while` loop, but not nested in a function or class definition " @@ -667,41 +670,41 @@ msgid "" "loop." msgstr "" -#: ../../reference/simple_stmts.rst:711 +#: ../../reference/simple_stmts.rst:713 msgid "" "When :keyword:`continue` passes control out of a :keyword:`try` statement " "with a :keyword:`finally` clause, that :keyword:`!finally` clause is " "executed before really starting the next loop cycle." msgstr "" -#: ../../reference/simple_stmts.rst:720 +#: ../../reference/simple_stmts.rst:722 msgid "The :keyword:`!import` statement" msgstr "" -#: ../../reference/simple_stmts.rst:741 +#: ../../reference/simple_stmts.rst:743 msgid "" "The basic import statement (no :keyword:`from` clause) is executed in two " "steps:" msgstr "" -#: ../../reference/simple_stmts.rst:744 +#: ../../reference/simple_stmts.rst:746 msgid "find a module, loading and initializing it if necessary" msgstr "" -#: ../../reference/simple_stmts.rst:745 +#: ../../reference/simple_stmts.rst:747 msgid "" "define a name or names in the local namespace for the scope where the :" "keyword:`import` statement occurs." msgstr "" -#: ../../reference/simple_stmts.rst:748 +#: ../../reference/simple_stmts.rst:750 msgid "" "When the statement contains multiple clauses (separated by commas) the two " "steps are carried out separately for each clause, just as though the clauses " "had been separated out into individual import statements." msgstr "" -#: ../../reference/simple_stmts.rst:753 +#: ../../reference/simple_stmts.rst:755 msgid "" "The details of the first step, finding and loading modules are described in " "greater detail in the section on the :ref:`import system `, " @@ -712,26 +715,26 @@ msgid "" "module, which includes execution of the module's code." msgstr "" -#: ../../reference/simple_stmts.rst:761 +#: ../../reference/simple_stmts.rst:763 msgid "" "If the requested module is retrieved successfully, it will be made available " "in the local namespace in one of three ways:" msgstr "" -#: ../../reference/simple_stmts.rst:766 +#: ../../reference/simple_stmts.rst:768 msgid "" "If the module name is followed by :keyword:`!as`, then the name following :" "keyword:`!as` is bound directly to the imported module." msgstr "" -#: ../../reference/simple_stmts.rst:768 +#: ../../reference/simple_stmts.rst:770 msgid "" "If no other name is specified, and the module being imported is a top level " "module, the module's name is bound in the local namespace as a reference to " "the imported module" msgstr "" -#: ../../reference/simple_stmts.rst:771 +#: ../../reference/simple_stmts.rst:773 msgid "" "If the module being imported is *not* a top level module, then the name of " "the top level package that contains the module is bound in the local " @@ -739,56 +742,56 @@ msgid "" "be accessed using its full qualified name rather than directly" msgstr "" -#: ../../reference/simple_stmts.rst:781 +#: ../../reference/simple_stmts.rst:783 msgid "The :keyword:`from` form uses a slightly more complex process:" msgstr "" -#: ../../reference/simple_stmts.rst:783 +#: ../../reference/simple_stmts.rst:785 msgid "" "find the module specified in the :keyword:`from` clause, loading and " "initializing it if necessary;" msgstr "" -#: ../../reference/simple_stmts.rst:785 +#: ../../reference/simple_stmts.rst:787 msgid "for each of the identifiers specified in the :keyword:`import` clauses:" msgstr "" -#: ../../reference/simple_stmts.rst:787 +#: ../../reference/simple_stmts.rst:789 msgid "check if the imported module has an attribute by that name" msgstr "" -#: ../../reference/simple_stmts.rst:788 +#: ../../reference/simple_stmts.rst:790 msgid "" "if not, attempt to import a submodule with that name and then check the " "imported module again for that attribute" msgstr "" -#: ../../reference/simple_stmts.rst:790 +#: ../../reference/simple_stmts.rst:792 msgid "if the attribute is not found, :exc:`ImportError` is raised." msgstr "" -#: ../../reference/simple_stmts.rst:791 +#: ../../reference/simple_stmts.rst:793 msgid "" "otherwise, a reference to that value is stored in the local namespace, using " "the name in the :keyword:`!as` clause if it is present, otherwise using the " "attribute name" msgstr "" -#: ../../reference/simple_stmts.rst:795 +#: ../../reference/simple_stmts.rst:797 msgid "Examples::" msgstr "" "範例:\n" "\n" "::" -#: ../../reference/simple_stmts.rst:805 +#: ../../reference/simple_stmts.rst:807 msgid "" "If the list of identifiers is replaced by a star (``'*'``), all public names " "defined in the module are bound in the local namespace for the scope where " "the :keyword:`import` statement occurs." msgstr "" -#: ../../reference/simple_stmts.rst:811 +#: ../../reference/simple_stmts.rst:813 msgid "" "The *public names* defined by a module are determined by checking the " "module's namespace for a variable named ``__all__``; if defined, it must be " @@ -801,14 +804,14 @@ msgid "" "API (such as library modules which were imported and used within the module)." msgstr "" -#: ../../reference/simple_stmts.rst:821 +#: ../../reference/simple_stmts.rst:823 msgid "" "The wild card form of import --- ``from module import *`` --- is only " "allowed at the module level. Attempting to use it in class or function " "definitions will raise a :exc:`SyntaxError`." msgstr "" -#: ../../reference/simple_stmts.rst:828 +#: ../../reference/simple_stmts.rst:830 msgid "" "When specifying what module to import you do not have to specify the " "absolute name of the module. When a module or package is contained within " @@ -825,31 +828,31 @@ msgid "" "the :ref:`relativeimports` section." msgstr "" -#: ../../reference/simple_stmts.rst:842 +#: ../../reference/simple_stmts.rst:844 msgid "" ":func:`importlib.import_module` is provided to support applications that " "determine dynamically the modules to be loaded." msgstr "" -#: ../../reference/simple_stmts.rst:845 +#: ../../reference/simple_stmts.rst:847 msgid "" "Raises an :ref:`auditing event ` ``import`` with arguments " "``module``, ``filename``, ``sys.path``, ``sys.meta_path``, ``sys." "path_hooks``." msgstr "" -#: ../../reference/simple_stmts.rst:850 +#: ../../reference/simple_stmts.rst:852 msgid "Future statements" msgstr "" -#: ../../reference/simple_stmts.rst:856 +#: ../../reference/simple_stmts.rst:858 msgid "" "A :dfn:`future statement` is a directive to the compiler that a particular " "module should be compiled using syntax or semantics that will be available " "in a specified future release of Python where the feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:860 +#: ../../reference/simple_stmts.rst:862 msgid "" "The future statement is intended to ease migration to future versions of " "Python that introduce incompatible changes to the language. It allows use " @@ -857,35 +860,35 @@ msgid "" "feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:872 +#: ../../reference/simple_stmts.rst:874 msgid "" "A future statement must appear near the top of the module. The only lines " "that can appear before a future statement are:" msgstr "" -#: ../../reference/simple_stmts.rst:875 +#: ../../reference/simple_stmts.rst:877 msgid "the module docstring (if any)," msgstr "" -#: ../../reference/simple_stmts.rst:876 +#: ../../reference/simple_stmts.rst:878 msgid "comments," msgstr "" -#: ../../reference/simple_stmts.rst:877 +#: ../../reference/simple_stmts.rst:879 msgid "blank lines, and" msgstr "" -#: ../../reference/simple_stmts.rst:878 +#: ../../reference/simple_stmts.rst:880 msgid "other future statements." msgstr "" -#: ../../reference/simple_stmts.rst:880 +#: ../../reference/simple_stmts.rst:882 msgid "" "The only feature that requires using the future statement is ``annotations`` " "(see :pep:`563`)." msgstr "" -#: ../../reference/simple_stmts.rst:883 +#: ../../reference/simple_stmts.rst:885 msgid "" "All historical features enabled by the future statement are still recognized " "by Python 3. The list includes ``absolute_import``, ``division``, " @@ -895,7 +898,7 @@ msgid "" "compatibility." msgstr "" -#: ../../reference/simple_stmts.rst:890 +#: ../../reference/simple_stmts.rst:892 msgid "" "A future statement is recognized and treated specially at compile time: " "Changes to the semantics of core constructs are often implemented by " @@ -905,37 +908,37 @@ msgid "" "cannot be pushed off until runtime." msgstr "" -#: ../../reference/simple_stmts.rst:897 +#: ../../reference/simple_stmts.rst:899 msgid "" "For any given release, the compiler knows which feature names have been " "defined, and raises a compile-time error if a future statement contains a " "feature not known to it." msgstr "" -#: ../../reference/simple_stmts.rst:901 +#: ../../reference/simple_stmts.rst:903 msgid "" "The direct runtime semantics are the same as for any import statement: there " "is a standard module :mod:`__future__`, described later, and it will be " "imported in the usual way at the time the future statement is executed." msgstr "" -#: ../../reference/simple_stmts.rst:905 +#: ../../reference/simple_stmts.rst:907 msgid "" "The interesting runtime semantics depend on the specific feature enabled by " "the future statement." msgstr "" -#: ../../reference/simple_stmts.rst:908 +#: ../../reference/simple_stmts.rst:910 msgid "Note that there is nothing special about the statement::" msgstr "" -#: ../../reference/simple_stmts.rst:912 +#: ../../reference/simple_stmts.rst:914 msgid "" "That is not a future statement; it's an ordinary import statement with no " "special semantics or syntax restrictions." msgstr "" -#: ../../reference/simple_stmts.rst:915 +#: ../../reference/simple_stmts.rst:917 msgid "" "Code compiled by calls to the built-in functions :func:`exec` and :func:" "`compile` that occur in a module :mod:`M` containing a future statement " @@ -944,7 +947,7 @@ msgid "" "--- see the documentation of that function for details." msgstr "" -#: ../../reference/simple_stmts.rst:921 +#: ../../reference/simple_stmts.rst:923 msgid "" "A future statement typed at an interactive interpreter prompt will take " "effect for the rest of the interpreter session. If an interpreter is " @@ -953,19 +956,19 @@ msgid "" "interactive session started after the script is executed." msgstr "" -#: ../../reference/simple_stmts.rst:929 +#: ../../reference/simple_stmts.rst:931 msgid ":pep:`236` - Back to the __future__" msgstr "" -#: ../../reference/simple_stmts.rst:930 +#: ../../reference/simple_stmts.rst:932 msgid "The original proposal for the __future__ mechanism." msgstr "" -#: ../../reference/simple_stmts.rst:936 +#: ../../reference/simple_stmts.rst:938 msgid "The :keyword:`!global` statement" msgstr "" -#: ../../reference/simple_stmts.rst:946 +#: ../../reference/simple_stmts.rst:948 msgid "" "The :keyword:`global` statement is a declaration which holds for the entire " "current code block. It means that the listed identifiers are to be " @@ -974,13 +977,13 @@ msgid "" "globals without being declared global." msgstr "" -#: ../../reference/simple_stmts.rst:952 +#: ../../reference/simple_stmts.rst:954 msgid "" "Names listed in a :keyword:`global` statement must not be used in the same " "code block textually preceding that :keyword:`!global` statement." msgstr "" -#: ../../reference/simple_stmts.rst:955 +#: ../../reference/simple_stmts.rst:957 msgid "" "Names listed in a :keyword:`global` statement must not be defined as formal " "parameters, or as targets in :keyword:`with` statements or :keyword:`except` " @@ -988,14 +991,14 @@ msgid "" "function definition, :keyword:`import` statement, or variable annotation." msgstr "" -#: ../../reference/simple_stmts.rst:962 +#: ../../reference/simple_stmts.rst:964 msgid "" "The current implementation does not enforce some of these restrictions, but " "programs should not abuse this freedom, as future implementations may " "enforce them or silently change the meaning of the program." msgstr "" -#: ../../reference/simple_stmts.rst:971 +#: ../../reference/simple_stmts.rst:973 msgid "" "**Programmer's note:** :keyword:`global` is a directive to the parser. It " "applies only to code parsed at the same time as the :keyword:`!global` " @@ -1007,11 +1010,11 @@ msgid "" "func:`compile` functions." msgstr "" -#: ../../reference/simple_stmts.rst:983 +#: ../../reference/simple_stmts.rst:985 msgid "The :keyword:`!nonlocal` statement" msgstr "" -#: ../../reference/simple_stmts.rst:995 +#: ../../reference/simple_stmts.rst:997 msgid "" "The :keyword:`nonlocal` statement causes the listed identifiers to refer to " "previously bound variables in the nearest enclosing scope excluding globals. " @@ -1020,7 +1023,7 @@ msgid "" "variables outside of the local scope besides the global (module) scope." msgstr "" -#: ../../reference/simple_stmts.rst:1005 +#: ../../reference/simple_stmts.rst:1007 msgid "" "Names listed in a :keyword:`nonlocal` statement, unlike those listed in a :" "keyword:`global` statement, must refer to pre-existing bindings in an " @@ -1028,16 +1031,16 @@ msgid "" "be determined unambiguously)." msgstr "" -#: ../../reference/simple_stmts.rst:1010 +#: ../../reference/simple_stmts.rst:1012 msgid "" "Names listed in a :keyword:`nonlocal` statement must not collide with pre-" "existing bindings in the local scope." msgstr "" -#: ../../reference/simple_stmts.rst:1015 +#: ../../reference/simple_stmts.rst:1017 msgid ":pep:`3104` - Access to Names in Outer Scopes" msgstr "" -#: ../../reference/simple_stmts.rst:1016 +#: ../../reference/simple_stmts.rst:1018 msgid "The specification for the :keyword:`nonlocal` statement." msgstr ""