diff --git a/c-api/code.po b/c-api/code.po index 73f6f8308f..6aad4889d4 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-02-05 00:18+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -105,28 +105,28 @@ msgstr "" msgid "Returns ``1`` if the function succeeds and 0 otherwise." msgstr "" -#: ../../c-api/code.rst:82 +#: ../../c-api/code.rst:84 msgid "" "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong " "reference to a :c:type:`PyBytesObject` representing the bytecode in a code " "object. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: ../../c-api/code.rst:87 +#: ../../c-api/code.rst:89 msgid "" "This ``PyBytesObject`` may be created on-demand by the interpreter and does " "not necessarily represent the bytecode actually executed by CPython. The " "primary use case for this function is debuggers and profilers." msgstr "" -#: ../../c-api/code.rst:95 +#: ../../c-api/code.rst:97 msgid "" "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " "variables. On error, ``NULL`` is returned and an exception is raised." msgstr "" -#: ../../c-api/code.rst:104 +#: ../../c-api/code.rst:106 msgid "" "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " @@ -134,7 +134,7 @@ msgid "" "returned and an exception is raised." msgstr "" -#: ../../c-api/code.rst:113 +#: ../../c-api/code.rst:115 msgid "" "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the free " diff --git a/c-api/long.po b/c-api/long.po index 6cc141e1d3..a5bd07f2ff 100644 --- a/c-api/long.po +++ b/c-api/long.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-06 00:23+0000\n" +"POT-Creation-Date: 2023-01-25 00:17+0000\n" "PO-Revision-Date: 2018-05-23 14:06+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -118,47 +118,54 @@ msgid "" "are no digits, :exc:`ValueError` will be raised." msgstr "" -#: ../../c-api/long.rst:99 +#: ../../c-api/long.rst:96 +msgid "" +"Python methods :meth:`int.to_bytes` and :meth:`int.from_bytes` to convert a :" +"c:type:`PyLongObject` to/from an array of bytes in base ``256``. You can " +"call those from C using :c:func:`PyObject_CallMethod`." +msgstr "" + +#: ../../c-api/long.rst:103 msgid "" "Convert a sequence of Unicode digits in the string *u* to a Python integer " "value." msgstr "" -#: ../../c-api/long.rst:107 +#: ../../c-api/long.rst:111 msgid "" "Create a Python integer from the pointer *p*. The pointer value can be " "retrieved from the resulting value using :c:func:`PyLong_AsVoidPtr`." msgstr "" -#: ../../c-api/long.rst:118 ../../c-api/long.rst:136 +#: ../../c-api/long.rst:122 ../../c-api/long.rst:140 msgid "" "Return a C :c:expr:`long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " "(if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:122 +#: ../../c-api/long.rst:126 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long`." msgstr "" -#: ../../c-api/long.rst:125 ../../c-api/long.rst:145 ../../c-api/long.rst:166 -#: ../../c-api/long.rst:186 ../../c-api/long.rst:209 +#: ../../c-api/long.rst:129 ../../c-api/long.rst:149 ../../c-api/long.rst:170 +#: ../../c-api/long.rst:190 ../../c-api/long.rst:213 msgid "Returns ``-1`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: ../../c-api/long.rst:127 ../../c-api/long.rst:147 ../../c-api/long.rst:168 -#: ../../c-api/long.rst:190 ../../c-api/long.rst:274 ../../c-api/long.rst:294 +#: ../../c-api/long.rst:131 ../../c-api/long.rst:151 ../../c-api/long.rst:172 +#: ../../c-api/long.rst:194 ../../c-api/long.rst:278 ../../c-api/long.rst:298 msgid "Use :meth:`__index__` if available." msgstr "" -#: ../../c-api/long.rst:130 ../../c-api/long.rst:150 ../../c-api/long.rst:171 -#: ../../c-api/long.rst:193 ../../c-api/long.rst:277 ../../c-api/long.rst:297 +#: ../../c-api/long.rst:134 ../../c-api/long.rst:154 ../../c-api/long.rst:175 +#: ../../c-api/long.rst:197 ../../c-api/long.rst:281 ../../c-api/long.rst:301 msgid "This function will no longer use :meth:`__int__`." msgstr "" -#: ../../c-api/long.rst:140 +#: ../../c-api/long.rst:144 msgid "" "If the value of *obj* is greater than :const:`LONG_MAX` or less than :const:" "`LONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " @@ -166,20 +173,20 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: ../../c-api/long.rst:159 ../../c-api/long.rst:177 +#: ../../c-api/long.rst:163 ../../c-api/long.rst:181 msgid "" "Return a C :c:expr:`long long` representation of *obj*. If *obj* is not an " "instance of :c:type:`PyLongObject`, first call its :meth:`__index__` method " "(if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:163 +#: ../../c-api/long.rst:167 msgid "" "Raise :exc:`OverflowError` if the value of *obj* is out of range for a :c:" "expr:`long long`." msgstr "" -#: ../../c-api/long.rst:181 +#: ../../c-api/long.rst:185 msgid "" "If the value of *obj* is greater than :const:`LLONG_MAX` or less than :const:" "`LLONG_MIN`, set *\\*overflow* to ``1`` or ``-1``, respectively, and return " @@ -187,133 +194,133 @@ msgid "" "occurs set *\\*overflow* to ``0`` and return ``-1`` as usual." msgstr "" -#: ../../c-api/long.rst:203 +#: ../../c-api/long.rst:207 msgid "" "Return a C :c:type:`Py_ssize_t` representation of *pylong*. *pylong* must " "be an instance of :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:206 +#: ../../c-api/long.rst:210 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`Py_ssize_t`." msgstr "" -#: ../../c-api/long.rst:218 +#: ../../c-api/long.rst:222 msgid "" "Return a C :c:expr:`unsigned long` representation of *pylong*. *pylong* " "must be an instance of :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:221 +#: ../../c-api/long.rst:225 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`unsigned long`." msgstr "" -#: ../../c-api/long.rst:224 +#: ../../c-api/long.rst:228 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: ../../c-api/long.rst:234 +#: ../../c-api/long.rst:238 msgid "" "Return a C :c:type:`size_t` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:237 +#: ../../c-api/long.rst:241 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "type:`size_t`." msgstr "" -#: ../../c-api/long.rst:240 +#: ../../c-api/long.rst:244 msgid "" "Returns ``(size_t)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: ../../c-api/long.rst:249 +#: ../../c-api/long.rst:253 msgid "" "Return a C :c:expr:`unsigned long long` representation of *pylong*. " "*pylong* must be an instance of :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:252 +#: ../../c-api/long.rst:256 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for an :" "c:expr:`unsigned long long`." msgstr "" -#: ../../c-api/long.rst:255 +#: ../../c-api/long.rst:259 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: ../../c-api/long.rst:258 +#: ../../c-api/long.rst:262 msgid "" "A negative *pylong* now raises :exc:`OverflowError`, not :exc:`TypeError`." msgstr "" -#: ../../c-api/long.rst:264 +#: ../../c-api/long.rst:268 msgid "" "Return a C :c:expr:`unsigned long` representation of *obj*. If *obj* is not " "an instance of :c:type:`PyLongObject`, first call its :meth:`__index__` " "method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:268 +#: ../../c-api/long.rst:272 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long`, return " "the reduction of that value modulo ``ULONG_MAX + 1``." msgstr "" -#: ../../c-api/long.rst:271 +#: ../../c-api/long.rst:275 msgid "" "Returns ``(unsigned long)-1`` on error. Use :c:func:`PyErr_Occurred` to " "disambiguate." msgstr "" -#: ../../c-api/long.rst:283 +#: ../../c-api/long.rst:287 msgid "" "Return a C :c:expr:`unsigned long long` representation of *obj*. If *obj* " "is not an instance of :c:type:`PyLongObject`, first call its :meth:" "`__index__` method (if present) to convert it to a :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:288 +#: ../../c-api/long.rst:292 msgid "" "If the value of *obj* is out of range for an :c:expr:`unsigned long long`, " "return the reduction of that value modulo ``ULLONG_MAX + 1``." msgstr "" -#: ../../c-api/long.rst:291 +#: ../../c-api/long.rst:295 msgid "" "Returns ``(unsigned long long)-1`` on error. Use :c:func:`PyErr_Occurred` " "to disambiguate." msgstr "" -#: ../../c-api/long.rst:303 +#: ../../c-api/long.rst:307 msgid "" "Return a C :c:expr:`double` representation of *pylong*. *pylong* must be an " "instance of :c:type:`PyLongObject`." msgstr "" -#: ../../c-api/long.rst:306 +#: ../../c-api/long.rst:310 msgid "" "Raise :exc:`OverflowError` if the value of *pylong* is out of range for a :c:" "expr:`double`." msgstr "" -#: ../../c-api/long.rst:309 +#: ../../c-api/long.rst:313 msgid "" "Returns ``-1.0`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" -#: ../../c-api/long.rst:314 +#: ../../c-api/long.rst:318 msgid "" "Convert a Python integer *pylong* to a C :c:expr:`void` pointer. If *pylong* " "cannot be converted, an :exc:`OverflowError` will be raised. This is only " @@ -321,7 +328,7 @@ msgid "" "c:func:`PyLong_FromVoidPtr`." msgstr "" -#: ../../c-api/long.rst:319 +#: ../../c-api/long.rst:323 msgid "" "Returns ``NULL`` on error. Use :c:func:`PyErr_Occurred` to disambiguate." msgstr "" diff --git a/faq/general.po b/faq/general.po index c87261f00d..0ea66d5d91 100644 --- a/faq/general.po +++ b/faq/general.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-02-01 00:19+0000\n" "PO-Revision-Date: 2022-10-16 06:51+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -507,9 +507,11 @@ msgstr "也許最好是引用你最喜歡的關於 Python 的書。" #: ../../faq/general.rst:251 msgid "" -"The very first article about Python was written in 1991 and is now quite " -"outdated." -msgstr "最早討論 Python 的文章是在 1991 年寫的,但現在來看已經過時了。" +"The `very first article `_ about Python was " +"written in 1991 and is now quite outdated." +msgstr "" +"`最早討論 Python 的文章 `_\\ 是在 1991 年寫的," +"但現在來看已經過時了。" #: ../../faq/general.rst:254 msgid "" @@ -675,10 +677,10 @@ msgid "" "administration software in Python. Companies that use Python internally " "include Google, Yahoo, and Lucasfilm Ltd." msgstr "" -"備受矚目的 Python 專案包括 `Mailman 郵件討論群管理員 `_" -"\\ 和 `Zope 應用程式伺服器 `_。有一些 Linux 發行版,最" -"著名的是 `Red Hat `_,已經用 Python 編寫了部分或全部" -"的安裝程式及系統管理軟體。內部使用 Python 的公司包括 Google、Yahoo 和 " +"備受矚目的 Python 專案包括 `Mailman 郵件討論群管理員 `_\\ 和 `Zope 應用程式伺服器 `_。有一些 Linux 發行" +"版,最著名的是 `Red Hat `_,已經用 Python 編寫了部分" +"或全部的安裝程式及系統管理軟體。內部使用 Python 的公司包括 Google、Yahoo 和 " "Lucasfilm Ltd。" #: ../../faq/general.rst:346 @@ -805,8 +807,8 @@ msgid "" "can't remember the methods for a list, they can do something like this::" msgstr "" "Python 的互動式直譯器使學生能夠在程式設計時測試語言的功能。他們可以開著一個運" -"行直譯器的視窗,同時在另一個視窗中輸入他們的程式原始碼。如果他們不記得 " -"list(串列)的 method(方法),他們可以像這樣做:\n" +"行直譯器的視窗,同時在另一個視窗中輸入他們的程式原始碼。如果他們不記得 list" +"(串列)的 method(方法),他們可以像這樣做:\n" "\n" "::" @@ -840,17 +842,3 @@ msgid "" msgstr "" "如果你想討論 Python 在教育領域中的使用,你可能會有興趣加入 `edu-sig 郵件討論" "群 `_。" - -#~ msgid "" -#~ "You must have a Roundup account to report bugs; this makes it possible " -#~ "for us to contact you if we have follow-up questions. It will also " -#~ "enable Roundup to send you updates as we act on your bug. If you had " -#~ "previously used SourceForge to report bugs to Python, you can obtain your " -#~ "Roundup password through Roundup's `password reset procedure `_." -#~ msgstr "" -#~ "你必須擁有一個 Roundup 帳號才能回報錯誤;如果我們有後續的問題,我們才可以" -#~ "與你聯繫。這樣也能讓 Roundup 在我們處理你回報的錯誤時,為你發送最新消息。" -#~ "如果你以前使用過 SourceForge 來向 Python 回報錯誤,則可以透過 Roundup 的" -#~ "\\ `密碼重設過程 `_,取" -#~ "得你的 Roundup 密碼。" diff --git a/library/array.po b/library/array.po index 180e47351f..7713e9a779 100644 --- a/library/array.po +++ b/library/array.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-02-03 00:17+0000\n" "PO-Revision-Date: 2021-11-23 18:40+0800\n" "Last-Translator: Benson Chen \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -223,16 +223,24 @@ msgstr "" msgid "" "The actual representation of values is determined by the machine " "architecture (strictly speaking, by the C implementation). The actual size " -"can be accessed through the :attr:`itemsize` attribute." +"can be accessed through the :attr:`array.itemsize` attribute." msgstr "" "實際上數值的表示方法是被機器的架構所決定(更精準地說,被 C 的實作方法決定)。" -"實際的大小可以透過 :attr:`itemsize` 屬性存取。" +"實際的大小可以透過 :attr:`array.itemsize` 屬性存取。" #: ../../library/array.rst:65 +msgid "The module defines the following item:" +msgstr "這個模組定義了以下項目:" + +#: ../../library/array.rst:70 +msgid "A string with all available type codes." +msgstr "一個包含所有可用的 type codes 的字串。" + +#: ../../library/array.rst:73 msgid "The module defines the following type:" msgstr "這個模組定義了下方的型別:" -#: ../../library/array.rst:70 +#: ../../library/array.rst:78 msgid "" "A new array whose items are restricted by *typecode*, and initialized from " "the optional *initializer* value, which must be a list, a :term:`bytes-like " @@ -242,7 +250,7 @@ msgstr "" "化,\\ *initializer* 必須是一個 list、\\ :term:`bytes-like object`\\ (類位元" "組串物件)或包含適當型別變數的可疊代物件 (iterable)。" -#: ../../library/array.rst:75 +#: ../../library/array.rst:83 msgid "" "If given a list or string, the initializer is passed to the new array's :" "meth:`fromlist`, :meth:`frombytes`, or :meth:`fromunicode` method (see " @@ -253,19 +261,7 @@ msgstr "" "meth:`frombytes` 或 :meth:`fromunicode` 方法(參照下方)將元素新增到其中。其" "他情況時, 一個 iterable initializer 將被傳入 :meth:`extend` 方法之中。" -#: ../../library/array.rst:11 -msgid "" -"Raises an :ref:`auditing event ` ``array.__new__`` with arguments " -"``typecode``, ``initializer``." -msgstr "" -"引發\\ :ref:`稽核事件 (auditing event) ` ``array.__new__`` 並帶入引" -"數 ``typecode``\\ 、\\ ``initializer``\\。" - -#: ../../library/array.rst:84 -msgid "A string with all available type codes." -msgstr "一個包含所有可用的 type codes 的字串。" - -#: ../../library/array.rst:86 +#: ../../library/array.rst:88 msgid "" "Array objects support the ordinary sequence operations of indexing, slicing, " "concatenation, and multiplication. When using slice assignment, the " @@ -280,40 +276,44 @@ msgstr "" "實作了緩衝區介面,可以在任何支援 :term:`bytes-like objects ` 的地方使用。" -#: ../../library/array.rst:92 -msgid "The following data items and methods are also supported:" -msgstr "提供下方的資料物件與方法:" +#: ../../library/array.rst:17 +msgid "" +"Raises an :ref:`auditing event ` ``array.__new__`` with arguments " +"``typecode``, ``initializer``." +msgstr "" +"引發\\ :ref:`稽核事件 (auditing event) ` ``array.__new__`` 並帶入引" +"數 ``typecode``\\ 、\\ ``initializer``\\。" -#: ../../library/array.rst:96 +#: ../../library/array.rst:99 msgid "The typecode character used to create the array." msgstr "typecode 字元被用在建立陣列時。" -#: ../../library/array.rst:101 +#: ../../library/array.rst:104 msgid "The length in bytes of one array item in the internal representation." msgstr "陣列當中的一個元素在內部需要的位元組長度。" -#: ../../library/array.rst:106 +#: ../../library/array.rst:109 msgid "Append a new item with value *x* to the end of the array." msgstr "新增一個元素 *x* 到陣列的最尾端。" -#: ../../library/array.rst:111 +#: ../../library/array.rst:114 msgid "" "Return a tuple ``(address, length)`` giving the current memory address and " "the length in elements of the buffer used to hold array's contents. The " "size of the memory buffer in bytes can be computed as ``array.buffer_info()" "[1] * array.itemsize``. This is occasionally useful when working with low-" "level (and inherently unsafe) I/O interfaces that require memory addresses, " -"such as certain :c:func:`ioctl` operations. The returned numbers are valid " +"such as certain :c:func:`!ioctl` operations. The returned numbers are valid " "as long as the array exists and no length-changing operations are applied to " "it." msgstr "" "回傳一個 tuple ``(address, length)`` 表示當前的記憶體位置和陣列儲存元素的緩衝" "區記憶體長度。緩衝區的長度單位是位元組,並可以用 ``array.buffer_info()[1] * " "array.itemsize`` 計算得到。這偶爾會在底層操作需要記憶體位置的輸出輸入時很有" -"用,例如 :c:func:`ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回" +"用,例如 :c:func:`!ioctl` 指令。只要陣列存在且沒有使用任何更改長度的操作時,回" "傳的數值就有效。" -#: ../../library/array.rst:121 +#: ../../library/array.rst:124 msgid "" "When using array objects from code written in C or C++ (the only way to " "effectively make use of this information), it makes more sense to use the " @@ -325,7 +325,7 @@ msgstr "" "適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在" "新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。" -#: ../../library/array.rst:130 +#: ../../library/array.rst:133 msgid "" "\"Byteswap\" all items of the array. This is only supported for values " "which are 1, 2, 4, or 8 bytes in size; for other types of values, :exc:" @@ -336,11 +336,11 @@ msgstr "" "列,其他型別的值會導致 :exc:`RuntimeError`\\ 。這在從機器讀取位元順序不同的檔" "案時很有用。" -#: ../../library/array.rst:138 +#: ../../library/array.rst:141 msgid "Return the number of occurrences of *x* in the array." msgstr "回傳 *x* 在陣列中出現了幾次。" -#: ../../library/array.rst:143 +#: ../../library/array.rst:146 msgid "" "Append items from *iterable* to the end of the array. If *iterable* is " "another array, it must have *exactly* the same type code; if not, :exc:" @@ -352,7 +352,7 @@ msgstr "" "是一個陣列,它必須可以被疊代 (iterable) 且其中的元素必須是可以被加入陣列中的" "正確型別。" -#: ../../library/array.rst:151 +#: ../../library/array.rst:154 msgid "" "Appends items from the string, interpreting the string as an array of " "machine values (as if it had been read from a file using the :meth:" @@ -361,11 +361,11 @@ msgstr "" "從字串中新增元素。讀取時會將字串當作一個機器數值組成的陣列(就像從檔案中使" "用 :meth:`fromfile` 方法讀出的資料)。" -#: ../../library/array.rst:154 -msgid ":meth:`fromstring` is renamed to :meth:`frombytes` for clarity." -msgstr "將 :meth:`fromstring` 更名為 :meth:`frombytes`\\ ,使其更加清晰易懂。" +#: ../../library/array.rst:157 +msgid ":meth:`!fromstring` is renamed to :meth:`frombytes` for clarity." +msgstr "將 :meth:`!fromstring` 更名為 :meth:`frombytes`\\ ,使其更加清晰易懂。" -#: ../../library/array.rst:160 +#: ../../library/array.rst:163 msgid "" "Read *n* items (as machine values) from the :term:`file object` *f* and " "append them to the end of the array. If less than *n* items are available, :" @@ -376,7 +376,7 @@ msgstr "" "入陣列的最尾端。如果只有少於 *n* 個有效的元素會導致 :exc:`EOFError`\\ ,但有" "效的元素仍然會被加入陣列中。" -#: ../../library/array.rst:168 +#: ../../library/array.rst:171 msgid "" "Append items from the list. This is equivalent to ``for x in list: a." "append(x)`` except that if there is a type error, the array is unchanged." @@ -384,7 +384,7 @@ msgstr "" "從 list 中新增元素。這等價於 ``for x in list: a.append(x)``\\ ,除了有型別錯" "誤產生時,陣列會保持原狀不會被更改。" -#: ../../library/array.rst:174 +#: ../../library/array.rst:177 msgid "" "Extends this array with data from the given unicode string. The array must " "be a type ``'u'`` array; otherwise a :exc:`ValueError` is raised. Use " @@ -395,7 +395,7 @@ msgstr "" "導致 :exc:`ValueError` 錯誤。使用 ``array.frombytes(unicodestring." "encode(enc))`` 來新增 Unicode 資料到一個其他型別的陣列。" -#: ../../library/array.rst:182 +#: ../../library/array.rst:185 msgid "" "Return the smallest *i* such that *i* is the index of the first occurrence " "of *x* in the array. The optional arguments *start* and *stop* can be " @@ -406,17 +406,17 @@ msgstr "" "數 *start* 及 *stop* 則可以被用來在指定的陣列空間中搜尋 *x*\\ 。如果 *x* 不存" "在將導致 :exc:`ValueError`\\ 。" -#: ../../library/array.rst:187 +#: ../../library/array.rst:190 msgid "Added optional *start* and *stop* parameters." msgstr "新增選擇性的參數 *start* 及 *stop*\\ 。" -#: ../../library/array.rst:192 +#: ../../library/array.rst:196 msgid "" "Insert a new item with value *x* in the array before position *i*. Negative " "values are treated as being relative to the end of the array." msgstr "在位置 *i* 之前插入一個元素 *x*\\ 。負數的索引值會從陣列尾端開始數。" -#: ../../library/array.rst:198 +#: ../../library/array.rst:202 msgid "" "Removes the item with the index *i* from the array and returns it. The " "optional argument defaults to ``-1``, so that by default the last item is " @@ -425,15 +425,15 @@ msgstr "" "移除並回傳陣列索引值 *i* 的元素。選擇性的引數 *i* 預設為 ``-1``\\ ,所以預設" "會刪除並回傳最後一個元素。" -#: ../../library/array.rst:205 +#: ../../library/array.rst:209 msgid "Remove the first occurrence of *x* from the array." msgstr "從陣列中刪除第一個出現的 *x*\\ 。" -#: ../../library/array.rst:210 +#: ../../library/array.rst:214 msgid "Reverse the order of the items in the array." msgstr "反轉陣列中元素的順序。" -#: ../../library/array.rst:215 +#: ../../library/array.rst:219 msgid "" "Convert the array to an array of machine values and return the bytes " "representation (the same sequence of bytes that would be written to a file " @@ -442,19 +442,19 @@ msgstr "" "將陣列轉為另一個機器數值組成的陣列並回傳它的位元組表示(跟用 :meth:`tofile` " "方法寫入檔案時的位元序列相同)。" -#: ../../library/array.rst:219 -msgid ":meth:`tostring` is renamed to :meth:`tobytes` for clarity." -msgstr "為了明確性,過去的 :meth:`tostring` 已更名為 :meth:`tobytes`\\ 。" +#: ../../library/array.rst:223 +msgid ":meth:`!tostring` is renamed to :meth:`tobytes` for clarity." +msgstr "為了明確性,過去的 :meth:`!tostring` 已更名為 :meth:`tobytes`\\ 。" -#: ../../library/array.rst:225 +#: ../../library/array.rst:229 msgid "Write all items (as machine values) to the :term:`file object` *f*." msgstr "將所有元素(作為機器數值)寫入 :term:`file object` *f*\\ 。" -#: ../../library/array.rst:230 +#: ../../library/array.rst:234 msgid "Convert the array to an ordinary list with the same items." msgstr "不更改元素,將陣列轉為一般的 list。" -#: ../../library/array.rst:235 +#: ../../library/array.rst:239 msgid "" "Convert the array to a unicode string. The array must be a type ``'u'`` " "array; otherwise a :exc:`ValueError` is raised. Use ``array.tobytes()." @@ -464,7 +464,7 @@ msgstr "" "`ValueError` 錯誤。使用 ``array.tobytes().decode(enc)`` 將其他型別的陣列轉為" "字串。" -#: ../../library/array.rst:240 +#: ../../library/array.rst:244 msgid "" "When an array object is printed or converted to a string, it is represented " "as ``array(typecode, initializer)``. The *initializer* is omitted if the " @@ -482,19 +482,19 @@ msgstr "" "\n" "::" -#: ../../library/array.rst:257 +#: ../../library/array.rst:261 msgid "Module :mod:`struct`" msgstr ":mod:`struct` 模組" -#: ../../library/array.rst:257 +#: ../../library/array.rst:261 msgid "Packing and unpacking of heterogeneous binary data." msgstr "將包含不同資料類型的二進位資料包裝與解開包裝。" -#: ../../library/array.rst:261 +#: ../../library/array.rst:265 msgid "Module :mod:`xdrlib`" msgstr ":mod:`xdrlib` 模組" -#: ../../library/array.rst:260 +#: ../../library/array.rst:264 msgid "" "Packing and unpacking of External Data Representation (XDR) data as used in " "some remote procedure call systems." @@ -502,10 +502,13 @@ msgstr "" "將 External Data Representation (XDR) 的資料包裝與解開包裝,這用在一些遠端操" "作的系統 (remote procedure call systems)。" -#: ../../library/array.rst:263 +#: ../../library/array.rst:267 msgid "`NumPy `_" msgstr "`NumPy `_" -#: ../../library/array.rst:264 +#: ../../library/array.rst:268 msgid "The NumPy package defines another array type." msgstr "NumPy 套件定義了另一個陣列型別" + +#~ msgid "The following data items and methods are also supported:" +#~ msgstr "提供下方的資料物件與方法:" diff --git a/library/asyncio-stream.po b/library/asyncio-stream.po index 80bf333e5a..0a4ab79f53 100644 --- a/library/asyncio-stream.po +++ b/library/asyncio-stream.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-12-15 00:16+0000\n" +"POT-Creation-Date: 2023-02-04 00:16+0000\n" "PO-Revision-Date: 2022-10-31 16:28+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -350,13 +350,15 @@ msgid "The method closes the stream and the underlying socket." msgstr "此方法會關閉串流以及底層的 socket。" #: ../../library/asyncio-stream.rst:298 -msgid "The method should be used along with the ``wait_closed()`` method::" +msgid "" +"The method should be used, though not mandatory, along with the " +"``wait_closed()`` method::" msgstr "" -"此方法應與 ``wait_closed()`` 方法一起使用:\n" +"此方法應與 ``wait_closed()`` 方法一起使用,但並非強制:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:305 +#: ../../library/asyncio-stream.rst:306 msgid "" "Return ``True`` if the underlying transport supports the :meth:`write_eof` " "method, ``False`` otherwise." @@ -364,29 +366,29 @@ msgstr "" "如果底層的傳輸支援 :meth:`write_eof` 方法就回傳 ``True``,否則回傳 " "``False``。" -#: ../../library/asyncio-stream.rst:310 +#: ../../library/asyncio-stream.rst:311 msgid "" "Close the write end of the stream after the buffered write data is flushed." msgstr "在已緩衝的寫入資料被清理 (flush) 後關閉串流的寫入端。" -#: ../../library/asyncio-stream.rst:315 +#: ../../library/asyncio-stream.rst:316 msgid "Return the underlying asyncio transport." msgstr "回傳底層的 asyncio 傳輸。" -#: ../../library/asyncio-stream.rst:319 +#: ../../library/asyncio-stream.rst:320 msgid "" "Access optional transport information; see :meth:`BaseTransport." "get_extra_info` for details." msgstr "存取可選的傳輸資訊;詳情請見 :meth:`BaseTransport.get_extra_info`。" -#: ../../library/asyncio-stream.rst:324 +#: ../../library/asyncio-stream.rst:325 msgid "Wait until it is appropriate to resume writing to the stream. Example::" msgstr "" "等待直到可以繼續寫入到串流。範例:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:330 +#: ../../library/asyncio-stream.rst:331 msgid "" "This is a flow control method that interacts with the underlying IO write " "buffer. When the size of the buffer reaches the high watermark, *drain()* " @@ -398,62 +400,65 @@ msgstr "" "(high watermark) 時,*drain()* 會阻塞直到緩衝區大小減少至最低標記位 (low " "watermark) 以便繼續寫入。當沒有要等待的資料時,:meth:`drain` 會立即回傳。" -#: ../../library/asyncio-stream.rst:340 +#: ../../library/asyncio-stream.rst:341 msgid "Upgrade an existing stream-based connection to TLS." msgstr "" -#: ../../library/asyncio-stream.rst:342 +#: ../../library/asyncio-stream.rst:343 msgid "Parameters:" msgstr "" -#: ../../library/asyncio-stream.rst:344 +#: ../../library/asyncio-stream.rst:345 msgid "*sslcontext*: a configured instance of :class:`~ssl.SSLContext`." msgstr "" -#: ../../library/asyncio-stream.rst:346 +#: ../../library/asyncio-stream.rst:347 msgid "" "*server_hostname*: sets or overrides the host name that the target server's " "certificate will be matched against." msgstr "" -#: ../../library/asyncio-stream.rst:349 +#: ../../library/asyncio-stream.rst:350 msgid "" "*ssl_handshake_timeout* is the time in seconds to wait for the TLS handshake " "to complete before aborting the connection. ``60.0`` seconds if ``None`` " "(default)." msgstr "" -#: ../../library/asyncio-stream.rst:357 +#: ../../library/asyncio-stream.rst:358 msgid "" "Return ``True`` if the stream is closed or in the process of being closed." msgstr "如果串流已被關閉或正在被關閉則回傳 ``True``。" -#: ../../library/asyncio-stream.rst:364 +#: ../../library/asyncio-stream.rst:365 msgid "Wait until the stream is closed." msgstr "等待直到串流被關閉。" -#: ../../library/asyncio-stream.rst:366 +#: ../../library/asyncio-stream.rst:367 msgid "" "Should be called after :meth:`close` to wait until the underlying connection " -"is closed." -msgstr "應當在 :meth:`close` 之後才被呼叫,這會持續等待直到底層的連線被關閉。" +"is closed, ensuring that all data has been flushed before e.g. exiting the " +"program." +msgstr "" +"應當在 :meth:`close` 之後才被呼叫,這會持續等待直到底層的連線被關閉," +"以確保在這之前(例如在程式退出前)所有資料都已經被清空" -#: ../../library/asyncio-stream.rst:373 +#: ../../library/asyncio-stream.rst:375 msgid "Examples" msgstr "範例" -#: ../../library/asyncio-stream.rst:378 +#: ../../library/asyncio-stream.rst:380 msgid "TCP echo client using streams" msgstr "使用串流的 TCP echo 客戶端" -#: ../../library/asyncio-stream.rst:380 +#: ../../library/asyncio-stream.rst:382 msgid "TCP echo client using the :func:`asyncio.open_connection` function::" msgstr "" "使用 :func:`asyncio.open_connection` 函式的 TCP echo 客戶端:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:403 +#: ../../library/asyncio-stream.rst:406 msgid "" "The :ref:`TCP echo client protocol " "` example uses the low-level :meth:" @@ -462,18 +467,18 @@ msgstr "" "使用低階 :meth:`loop.create_connection` 方法的 :ref:`TCP echo 客戶端協定 " "`\\ 範例。" -#: ../../library/asyncio-stream.rst:410 +#: ../../library/asyncio-stream.rst:413 msgid "TCP echo server using streams" msgstr "使用串流的 TCP echo 伺服器" -#: ../../library/asyncio-stream.rst:412 +#: ../../library/asyncio-stream.rst:415 msgid "TCP echo server using the :func:`asyncio.start_server` function::" msgstr "" "TCP echo 伺服器使用 :func:`asyncio.start_server` 函式:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:445 +#: ../../library/asyncio-stream.rst:449 msgid "" "The :ref:`TCP echo server protocol " "` example uses the :meth:`loop." @@ -482,11 +487,11 @@ msgstr "" "使用 :meth:`loop.create_server` 方法的 :ref:`TCP echo 伺服器協定 " "` 範例。" -#: ../../library/asyncio-stream.rst:450 +#: ../../library/asyncio-stream.rst:454 msgid "Get HTTP headers" msgstr "獲取 HTTP 標頭" -#: ../../library/asyncio-stream.rst:452 +#: ../../library/asyncio-stream.rst:456 msgid "" "Simple example querying HTTP headers of the URL passed on the command line::" msgstr "" @@ -494,25 +499,25 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-stream.rst:490 +#: ../../library/asyncio-stream.rst:495 msgid "Usage::" msgstr "" "用法:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:494 +#: ../../library/asyncio-stream.rst:499 msgid "or with HTTPS::" msgstr "" "或使用 HTTPS:\n" "\n" "::" -#: ../../library/asyncio-stream.rst:502 +#: ../../library/asyncio-stream.rst:507 msgid "Register an open socket to wait for data using streams" msgstr "註冊一個使用串流來等待資料的開放 socket" -#: ../../library/asyncio-stream.rst:504 +#: ../../library/asyncio-stream.rst:509 msgid "" "Coroutine waiting until a socket receives data using the :func:" "`open_connection` function::" @@ -521,7 +526,7 @@ msgstr "" "\n" "::" -#: ../../library/asyncio-stream.rst:538 +#: ../../library/asyncio-stream.rst:544 msgid "" "The :ref:`register an open socket to wait for data using a protocol " "` example uses a low-level protocol and " @@ -531,7 +536,7 @@ msgstr "" "`\\ 範例中,有使用了低階協定以及 :meth:" "`loop.create_connection` 方法。" -#: ../../library/asyncio-stream.rst:542 +#: ../../library/asyncio-stream.rst:548 msgid "" "The :ref:`watch a file descriptor for read events " "` example uses the low-level :meth:`loop." diff --git a/library/asyncio.po b/library/asyncio.po index ea5250c713..0fe99e3238 100644 --- a/library/asyncio.po +++ b/library/asyncio.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-01-23 14:56+0000\n" "PO-Revision-Date: 2021-11-23 12:40+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -20,15 +20,15 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Poedit 3.0\n" -#: ../../library/asyncio.rst:66 +#: ../../library/asyncio.rst:78 msgid "High-level APIs" msgstr "高階 API" -#: ../../library/asyncio.rst:78 +#: ../../library/asyncio.rst:90 msgid "Low-level APIs" msgstr "低階 API" -#: ../../library/asyncio.rst:89 +#: ../../library/asyncio.rst:101 msgid "Guides and Tutorials" msgstr "指南與教學" @@ -126,6 +126,10 @@ msgstr "" "透過 async/await 語法來\\ :ref:`橋接 `\\ 基於回呼 (callback-" "based) 的函式庫與程式碼。" +#: ../../library/asyncio.rst:59 +msgid "You can experiment with an ``asyncio`` concurrent context in the REPL:" +msgstr "" + #: ../../includes/wasm-notavail.rst:-1 msgid ":ref:`Availability `: not Emscripten, not WASI." msgstr "" @@ -137,10 +141,10 @@ msgid "" "more information." msgstr "" -#: ../../library/asyncio.rst:65 +#: ../../library/asyncio.rst:77 msgid "Reference" msgstr "參閱" -#: ../../library/asyncio.rst:98 +#: ../../library/asyncio.rst:110 msgid "The source code for asyncio can be found in :source:`Lib/asyncio/`." msgstr "asyncio 的原始碼可以在 :source:`Lib/asyncio/` 中找到。" diff --git a/library/dis.po b/library/dis.po index 8c777742e8..bb4d7384fd 100644 --- a/library/dis.po +++ b/library/dis.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-02-02 00:16+0000\n" "PO-Revision-Date: 2018-07-27 16:55+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -601,56 +601,55 @@ msgstr "" #: ../../library/dis.rst:565 msgid "" "Terminates an :keyword:`async for` loop. Handles an exception raised when " -"awaiting a next item. If TOS is :exc:`StopAsyncIteration` pop 3 values from " -"the stack and restore the exception state using the second of them. " -"Otherwise re-raise the exception using the value from the stack. An " -"exception handler block is removed from the block stack." +"awaiting a next item. The stack contains the async iterable in TOS1 and the " +"raised exception in TOS. Both are popped. If the exception is not :exc:" +"`StopAsyncIteration`, it is re-raised." msgstr "" -#: ../../library/dis.rst:573 ../../library/dis.rst:651 -#: ../../library/dis.rst:662 +#: ../../library/dis.rst:572 ../../library/dis.rst:650 +#: ../../library/dis.rst:661 msgid "" "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: ../../library/dis.rst:578 +#: ../../library/dis.rst:577 msgid "" "Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the " "stack. Pushes ``__aexit__`` and result of ``__aenter__()`` to the stack." msgstr "" -#: ../../library/dis.rst:585 +#: ../../library/dis.rst:584 msgid "**Miscellaneous opcodes**" msgstr "" -#: ../../library/dis.rst:589 +#: ../../library/dis.rst:588 msgid "" "Implements the expression statement for the interactive mode. TOS is " "removed from the stack and printed. In non-interactive mode, an expression " "statement is terminated with :opcode:`POP_TOP`." msgstr "" -#: ../../library/dis.rst:596 +#: ../../library/dis.rst:595 msgid "" "Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions." msgstr "" -#: ../../library/dis.rst:601 +#: ../../library/dis.rst:600 msgid "" "Calls ``list.append(TOS1[-i], TOS)``. Used to implement list comprehensions." msgstr "" -#: ../../library/dis.rst:606 +#: ../../library/dis.rst:605 msgid "" "Calls ``dict.__setitem__(TOS1[-i], TOS1, TOS)``. Used to implement dict " "comprehensions." msgstr "" -#: ../../library/dis.rst:610 +#: ../../library/dis.rst:609 msgid "Map value is TOS and map key is TOS1. Before, those were reversed." msgstr "" -#: ../../library/dis.rst:613 +#: ../../library/dis.rst:612 msgid "" "For all of the :opcode:`SET_ADD`, :opcode:`LIST_APPEND` and :opcode:" "`MAP_ADD` instructions, while the added value or key/value pair is popped " @@ -658,15 +657,15 @@ msgid "" "further iterations of the loop." msgstr "" -#: ../../library/dis.rst:621 +#: ../../library/dis.rst:620 msgid "Returns with TOS to the caller of the function." msgstr "" -#: ../../library/dis.rst:626 +#: ../../library/dis.rst:625 msgid "Pops TOS and yields it from a :term:`generator`." msgstr "" -#: ../../library/dis.rst:632 +#: ../../library/dis.rst:631 msgid "" "Checks whether ``__annotations__`` is defined in ``locals()``, if not it is " "set up to an empty ``dict``. This opcode is only emitted if a class or " @@ -674,45 +673,45 @@ msgid "" "statically." msgstr "" -#: ../../library/dis.rst:642 +#: ../../library/dis.rst:641 msgid "" "Loads all symbols not starting with ``'_'`` directly from the module TOS to " "the local namespace. The module is popped after loading all names. This " "opcode implements ``from module import *``." msgstr "" -#: ../../library/dis.rst:649 +#: ../../library/dis.rst:648 msgid "" "Pops a value from the stack, which is used to restore the exception state." msgstr "" -#: ../../library/dis.rst:656 +#: ../../library/dis.rst:655 msgid "" "Re-raises the exception currently on top of the stack. If oparg is non-zero, " "pops an additional value from the stack which is used to set ``f_lasti`` of " "the current frame." msgstr "" -#: ../../library/dis.rst:667 +#: ../../library/dis.rst:666 msgid "" "Pops a value from the stack. Pushes the current exception to the top of the " "stack. Pushes the value originally popped back to the stack. Used in " "exception handlers." msgstr "" -#: ../../library/dis.rst:675 +#: ../../library/dis.rst:674 msgid "" "Performs exception matching for ``except``. Tests whether the TOS1 is an " "exception matching TOS. Pops TOS and pushes the boolean result of the test." msgstr "" -#: ../../library/dis.rst:682 +#: ../../library/dis.rst:681 msgid "" "Performs exception matching for ``except*``. Applies ``split(TOS)`` on the " "exception group representing TOS1." msgstr "" -#: ../../library/dis.rst:685 +#: ../../library/dis.rst:684 msgid "" "In case of a match, pops two items from the stack and pushes the non-" "matching subgroup (``None`` in case of full match) followed by the matching " @@ -720,7 +719,7 @@ msgid "" "``None``." msgstr "" -#: ../../library/dis.rst:694 +#: ../../library/dis.rst:693 msgid "" "Combines the raised and reraised exceptions list from TOS, into an exception " "group to propagate from a try-except* block. Uses the original exception " @@ -729,7 +728,7 @@ msgid "" "there isn't one." msgstr "" -#: ../../library/dis.rst:704 +#: ../../library/dis.rst:703 msgid "" "Calls the function in position 4 on the stack with arguments (type, val, tb) " "representing the exception at the top of the stack. Used to implement the " @@ -737,25 +736,25 @@ msgid "" "occurred in a :keyword:`with` statement." msgstr "" -#: ../../library/dis.rst:711 +#: ../../library/dis.rst:710 msgid "" "The ``__exit__`` function is in position 4 of the stack rather than 7. " "Exception representation on the stack now consist of one, not three, items." msgstr "" -#: ../../library/dis.rst:718 +#: ../../library/dis.rst:717 msgid "" "Pushes :exc:`AssertionError` onto the stack. Used by the :keyword:`assert` " "statement." msgstr "" -#: ../../library/dis.rst:726 +#: ../../library/dis.rst:725 msgid "" "Pushes :func:`builtins.__build_class__` onto the stack. It is later called " "to construct a class." msgstr "" -#: ../../library/dis.rst:732 +#: ../../library/dis.rst:731 msgid "" "This opcode performs several operations before a with block starts. First, " "it loads :meth:`~object.__exit__` from the context manager and pushes it " @@ -764,11 +763,11 @@ msgid "" "``__enter__()`` method is pushed onto the stack." msgstr "" -#: ../../library/dis.rst:743 +#: ../../library/dis.rst:742 msgid "Push ``len(TOS)`` onto the stack." msgstr "" -#: ../../library/dis.rst:750 +#: ../../library/dis.rst:749 msgid "" "If TOS is an instance of :class:`collections.abc.Mapping` (or, more " "technically: if it has the :const:`Py_TPFLAGS_MAPPING` flag set in its :c:" @@ -776,7 +775,7 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:760 +#: ../../library/dis.rst:759 msgid "" "If TOS is an instance of :class:`collections.abc.Sequence` and is *not* an " "instance of :class:`str`/:class:`bytes`/:class:`bytearray` (or, more " @@ -785,39 +784,39 @@ msgid "" "push ``False``." msgstr "" -#: ../../library/dis.rst:770 +#: ../../library/dis.rst:769 msgid "" "TOS is a tuple of mapping keys, and TOS1 is the match subject. If TOS1 " "contains all of the keys in TOS, push a :class:`tuple` containing the " "corresponding values. Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:776 ../../library/dis.rst:1321 +#: ../../library/dis.rst:775 ../../library/dis.rst:1320 msgid "" "Previously, this instruction also pushed a boolean value indicating success " "(``True``) or failure (``False``)." msgstr "" -#: ../../library/dis.rst:783 +#: ../../library/dis.rst:782 msgid "" "Implements ``name = TOS``. *namei* is the index of *name* in the attribute :" "attr:`co_names` of the code object. The compiler tries to use :opcode:" "`STORE_FAST` or :opcode:`STORE_GLOBAL` if possible." msgstr "" -#: ../../library/dis.rst:790 +#: ../../library/dis.rst:789 msgid "" "Implements ``del name``, where *namei* is the index into :attr:`co_names` " "attribute of the code object." msgstr "" -#: ../../library/dis.rst:796 +#: ../../library/dis.rst:795 msgid "" "Unpacks TOS into *count* individual values, which are put onto the stack " "right-to-left." msgstr "" -#: ../../library/dis.rst:802 +#: ../../library/dis.rst:801 msgid "" "Implements assignment with a starred target: Unpacks an iterable in TOS into " "individual values, where the total number of values can be smaller than the " @@ -825,119 +824,119 @@ msgid "" "leftover items." msgstr "" -#: ../../library/dis.rst:807 +#: ../../library/dis.rst:806 msgid "" "The low byte of *counts* is the number of values before the list value, the " "high byte of *counts* the number of values after it. The resulting values " "are put onto the stack right-to-left." msgstr "" -#: ../../library/dis.rst:814 +#: ../../library/dis.rst:813 msgid "" "Implements ``TOS.name = TOS1``, where *namei* is the index of name in :attr:" "`co_names`." msgstr "" -#: ../../library/dis.rst:820 +#: ../../library/dis.rst:819 msgid "" "Implements ``del TOS.name``, using *namei* as index into :attr:`co_names`." msgstr "" -#: ../../library/dis.rst:825 +#: ../../library/dis.rst:824 msgid "Works as :opcode:`STORE_NAME`, but stores the name as a global." msgstr "" -#: ../../library/dis.rst:830 +#: ../../library/dis.rst:829 msgid "Works as :opcode:`DELETE_NAME`, but deletes a global name." msgstr "" -#: ../../library/dis.rst:835 +#: ../../library/dis.rst:834 msgid "Pushes ``co_consts[consti]`` onto the stack." msgstr "" -#: ../../library/dis.rst:840 +#: ../../library/dis.rst:839 msgid "Pushes the value associated with ``co_names[namei]`` onto the stack." msgstr "" -#: ../../library/dis.rst:845 +#: ../../library/dis.rst:844 msgid "" "Creates a tuple consuming *count* items from the stack, and pushes the " "resulting tuple onto the stack." msgstr "" -#: ../../library/dis.rst:851 +#: ../../library/dis.rst:850 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a list." msgstr "" -#: ../../library/dis.rst:856 +#: ../../library/dis.rst:855 msgid "Works as :opcode:`BUILD_TUPLE`, but creates a set." msgstr "" -#: ../../library/dis.rst:861 +#: ../../library/dis.rst:860 msgid "" "Pushes a new dictionary object onto the stack. Pops ``2 * count`` items so " "that the dictionary holds *count* entries: ``{..., TOS3: TOS2, TOS1: TOS}``." msgstr "" -#: ../../library/dis.rst:865 +#: ../../library/dis.rst:864 msgid "" "The dictionary is created from stack items instead of creating an empty " "dictionary pre-sized to hold *count* items." msgstr "" -#: ../../library/dis.rst:872 +#: ../../library/dis.rst:871 msgid "" "The version of :opcode:`BUILD_MAP` specialized for constant keys. Pops the " "top element on the stack which contains a tuple of keys, then starting from " "``TOS1``, pops *count* values to form values in the built dictionary." msgstr "" -#: ../../library/dis.rst:881 +#: ../../library/dis.rst:880 msgid "" "Concatenates *count* strings from the stack and pushes the resulting string " "onto the stack." msgstr "" -#: ../../library/dis.rst:889 +#: ../../library/dis.rst:888 msgid "" "Pops a list from the stack and pushes a tuple containing the same values." msgstr "" -#: ../../library/dis.rst:896 +#: ../../library/dis.rst:895 msgid "Calls ``list.extend(TOS1[-i], TOS)``. Used to build lists." msgstr "" -#: ../../library/dis.rst:903 +#: ../../library/dis.rst:902 msgid "Calls ``set.update(TOS1[-i], TOS)``. Used to build sets." msgstr "" -#: ../../library/dis.rst:910 +#: ../../library/dis.rst:909 msgid "Calls ``dict.update(TOS1[-i], TOS)``. Used to build dicts." msgstr "" -#: ../../library/dis.rst:917 +#: ../../library/dis.rst:916 msgid "Like :opcode:`DICT_UPDATE` but raises an exception for duplicate keys." msgstr "" -#: ../../library/dis.rst:924 +#: ../../library/dis.rst:923 msgid "Replaces TOS with ``getattr(TOS, co_names[namei])``." msgstr "" -#: ../../library/dis.rst:929 +#: ../../library/dis.rst:928 msgid "" "Performs a Boolean operation. The operation name can be found in " "``cmp_op[opname]``." msgstr "" -#: ../../library/dis.rst:935 +#: ../../library/dis.rst:934 msgid "Performs ``is`` comparison, or ``is not`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:942 +#: ../../library/dis.rst:941 msgid "Performs ``in`` comparison, or ``not in`` if ``invert`` is 1." msgstr "" -#: ../../library/dis.rst:949 +#: ../../library/dis.rst:948 msgid "" "Imports the module ``co_names[namei]``. TOS and TOS1 are popped and provide " "the *fromlist* and *level* arguments of :func:`__import__`. The module " @@ -946,86 +945,86 @@ msgid "" "modifies the namespace." msgstr "" -#: ../../library/dis.rst:958 +#: ../../library/dis.rst:957 msgid "" "Loads the attribute ``co_names[namei]`` from the module found in TOS. The " "resulting object is pushed onto the stack, to be subsequently stored by a :" "opcode:`STORE_FAST` instruction." msgstr "" -#: ../../library/dis.rst:965 +#: ../../library/dis.rst:964 msgid "Increments bytecode counter by *delta*." msgstr "" -#: ../../library/dis.rst:970 +#: ../../library/dis.rst:969 msgid "Decrements bytecode counter by *delta*. Checks for interrupts." msgstr "" -#: ../../library/dis.rst:977 +#: ../../library/dis.rst:976 msgid "Decrements bytecode counter by *delta*. Does not check for interrupts." msgstr "" -#: ../../library/dis.rst:984 +#: ../../library/dis.rst:983 msgid "" "If TOS is true, increments the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:991 +#: ../../library/dis.rst:990 msgid "" "If TOS is true, decrements the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:998 +#: ../../library/dis.rst:997 msgid "" "If TOS is false, increments the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:1005 +#: ../../library/dis.rst:1004 msgid "" "If TOS is false, decrements the bytecode counter by *delta*. TOS is popped." msgstr "" -#: ../../library/dis.rst:1012 +#: ../../library/dis.rst:1011 msgid "" "If TOS is not ``None``, increments the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1019 +#: ../../library/dis.rst:1018 msgid "" "If TOS is not ``None``, decrements the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1026 +#: ../../library/dis.rst:1025 msgid "" "If TOS is ``None``, increments the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1033 +#: ../../library/dis.rst:1032 msgid "" "If TOS is ``None``, decrements the bytecode counter by *delta*. TOS is " "popped." msgstr "" -#: ../../library/dis.rst:1040 +#: ../../library/dis.rst:1039 msgid "" "If TOS is true, increments the bytecode counter by *delta* and leaves TOS on " "the stack. Otherwise (TOS is false), TOS is popped." msgstr "" -#: ../../library/dis.rst:1045 ../../library/dis.rst:1055 +#: ../../library/dis.rst:1044 ../../library/dis.rst:1054 msgid "The oparg is now a relative delta rather than an absolute target." msgstr "" -#: ../../library/dis.rst:1050 +#: ../../library/dis.rst:1049 msgid "" "If TOS is false, increments the bytecode counter by *delta* and leaves TOS " "on the stack. Otherwise (TOS is true), TOS is popped." msgstr "" -#: ../../library/dis.rst:1061 +#: ../../library/dis.rst:1060 msgid "" "TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If " "this yields a new value, push it on the stack (leaving the iterator below " @@ -1033,153 +1032,153 @@ msgid "" "code counter is incremented by *delta*." msgstr "" -#: ../../library/dis.rst:1069 +#: ../../library/dis.rst:1068 msgid "Loads the global named ``co_names[namei>>1]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1071 +#: ../../library/dis.rst:1070 msgid "" "If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the stack " "before the global variable." msgstr "" -#: ../../library/dis.rst:1077 +#: ../../library/dis.rst:1076 msgid "" "Pushes a reference to the local ``co_varnames[var_num]`` onto the stack." msgstr "" -#: ../../library/dis.rst:1082 +#: ../../library/dis.rst:1081 msgid "Stores TOS into the local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1087 +#: ../../library/dis.rst:1086 msgid "Deletes local ``co_varnames[var_num]``." msgstr "" -#: ../../library/dis.rst:1092 +#: ../../library/dis.rst:1091 msgid "" "Creates a new cell in slot ``i``. If that slot is empty then that value is " "stored into the new cell." msgstr "" -#: ../../library/dis.rst:1100 +#: ../../library/dis.rst:1099 msgid "" -"Pushes a reference to the cell contained in slot ``i`` of the \"fast locals" -"\" storage. The name of the variable is ``co_fastlocalnames[i]``." +"Pushes a reference to the cell contained in slot ``i`` of the \"fast " +"locals\" storage. The name of the variable is ``co_fastlocalnames[i]``." msgstr "" -#: ../../library/dis.rst:1103 +#: ../../library/dis.rst:1102 msgid "" "Note that ``LOAD_CLOSURE`` is effectively an alias for ``LOAD_FAST``. It " "exists to keep bytecode a little more readable." msgstr "" -#: ../../library/dis.rst:1106 ../../library/dis.rst:1115 -#: ../../library/dis.rst:1127 ../../library/dis.rst:1136 -#: ../../library/dis.rst:1147 +#: ../../library/dis.rst:1105 ../../library/dis.rst:1114 +#: ../../library/dis.rst:1126 ../../library/dis.rst:1135 +#: ../../library/dis.rst:1146 msgid "``i`` is no longer offset by the length of ``co_varnames``." msgstr "" -#: ../../library/dis.rst:1112 +#: ../../library/dis.rst:1111 msgid "" "Loads the cell contained in slot ``i`` of the \"fast locals\" storage. " "Pushes a reference to the object the cell contains on the stack." msgstr "" -#: ../../library/dis.rst:1121 +#: ../../library/dis.rst:1120 msgid "" "Much like :opcode:`LOAD_DEREF` but first checks the locals dictionary before " "consulting the cell. This is used for loading free variables in class " "bodies." msgstr "" -#: ../../library/dis.rst:1133 +#: ../../library/dis.rst:1132 msgid "" "Stores TOS into the cell contained in slot ``i`` of the \"fast locals\" " "storage." msgstr "" -#: ../../library/dis.rst:1142 +#: ../../library/dis.rst:1141 msgid "" "Empties the cell contained in slot ``i`` of the \"fast locals\" storage. " "Used by the :keyword:`del` statement." msgstr "" -#: ../../library/dis.rst:1153 +#: ../../library/dis.rst:1152 msgid "" "Copies the ``n`` free variables from the closure into the frame. Removes the " "need for special code on the caller's side when calling closures." msgstr "" -#: ../../library/dis.rst:1162 +#: ../../library/dis.rst:1161 msgid "" "Raises an exception using one of the 3 forms of the ``raise`` statement, " "depending on the value of *argc*:" msgstr "" -#: ../../library/dis.rst:1165 +#: ../../library/dis.rst:1164 msgid "0: ``raise`` (re-raise previous exception)" msgstr "" -#: ../../library/dis.rst:1166 +#: ../../library/dis.rst:1165 msgid "1: ``raise TOS`` (raise exception instance or type at ``TOS``)" msgstr "" -#: ../../library/dis.rst:1167 +#: ../../library/dis.rst:1166 msgid "" "2: ``raise TOS1 from TOS`` (raise exception instance or type at ``TOS1`` " "with ``__cause__`` set to ``TOS``)" msgstr "" -#: ../../library/dis.rst:1173 +#: ../../library/dis.rst:1172 msgid "" "Calls a callable object with the number of arguments specified by ``argc``, " "including the named arguments specified by the preceding :opcode:`KW_NAMES`, " "if any. On the stack are (in ascending order), either:" msgstr "" -#: ../../library/dis.rst:1178 +#: ../../library/dis.rst:1177 msgid "NULL" msgstr "" -#: ../../library/dis.rst:1179 ../../library/dis.rst:1185 +#: ../../library/dis.rst:1178 ../../library/dis.rst:1184 msgid "The callable" msgstr "" -#: ../../library/dis.rst:1180 +#: ../../library/dis.rst:1179 msgid "The positional arguments" msgstr "" -#: ../../library/dis.rst:1181 ../../library/dis.rst:1188 +#: ../../library/dis.rst:1180 ../../library/dis.rst:1187 msgid "The named arguments" msgstr "" -#: ../../library/dis.rst:1183 +#: ../../library/dis.rst:1182 msgid "or:" msgstr "" -#: ../../library/dis.rst:1186 +#: ../../library/dis.rst:1185 msgid "``self``" msgstr "" -#: ../../library/dis.rst:1187 +#: ../../library/dis.rst:1186 msgid "The remaining positional arguments" msgstr "" -#: ../../library/dis.rst:1190 +#: ../../library/dis.rst:1189 msgid "" "``argc`` is the total of the positional and named arguments, excluding " "``self`` when a ``NULL`` is not present." msgstr "" -#: ../../library/dis.rst:1193 +#: ../../library/dis.rst:1192 msgid "" "``CALL`` pops all arguments and the callable object off the stack, calls the " "callable object with those arguments, and pushes the return value returned " "by the callable object." msgstr "" -#: ../../library/dis.rst:1202 +#: ../../library/dis.rst:1201 msgid "" "Calls a callable object with variable set of positional and keyword " "arguments. If the lowest bit of *flags* is set, the top of the stack " @@ -1191,7 +1190,7 @@ msgid "" "arguments, and pushes the return value returned by the callable object." msgstr "" -#: ../../library/dis.rst:1217 +#: ../../library/dis.rst:1216 msgid "" "Loads a method named ``co_names[namei]`` from the TOS object. TOS is popped. " "This bytecode distinguishes two cases: if TOS has a method with the correct " @@ -1201,70 +1200,70 @@ msgid "" "are pushed." msgstr "" -#: ../../library/dis.rst:1229 +#: ../../library/dis.rst:1228 msgid "" "Prefixes :opcode:`CALL`. Logically this is a no op. It exists to enable " "effective specialization of calls. ``argc`` is the number of arguments as " "described in :opcode:`CALL`." msgstr "" -#: ../../library/dis.rst:1238 +#: ../../library/dis.rst:1237 msgid "" "Pushes a ``NULL`` to the stack. Used in the call sequence to match the " "``NULL`` pushed by :opcode:`LOAD_METHOD` for non-method calls." msgstr "" -#: ../../library/dis.rst:1247 +#: ../../library/dis.rst:1246 msgid "" "Prefixes :opcode:`PRECALL`. Stores a reference to ``co_consts[consti]`` into " "an internal variable for use by :opcode:`CALL`. ``co_consts[consti]`` must " "be a tuple of strings." msgstr "" -#: ../../library/dis.rst:1256 +#: ../../library/dis.rst:1255 msgid "" "Pushes a new function object on the stack. From bottom to top, the consumed " "stack must consist of values if the argument carries a specified flag value" msgstr "" -#: ../../library/dis.rst:1259 +#: ../../library/dis.rst:1258 msgid "" "``0x01`` a tuple of default values for positional-only and positional-or-" "keyword parameters in positional order" msgstr "" -#: ../../library/dis.rst:1261 +#: ../../library/dis.rst:1260 msgid "``0x02`` a dictionary of keyword-only parameters' default values" msgstr "" -#: ../../library/dis.rst:1262 +#: ../../library/dis.rst:1261 msgid "``0x04`` a tuple of strings containing parameters' annotations" msgstr "" -#: ../../library/dis.rst:1263 +#: ../../library/dis.rst:1262 msgid "``0x08`` a tuple containing cells for free variables, making a closure" msgstr "" -#: ../../library/dis.rst:1264 +#: ../../library/dis.rst:1263 msgid "the code associated with the function (at TOS1)" msgstr "" -#: ../../library/dis.rst:1265 +#: ../../library/dis.rst:1264 msgid "the :term:`qualified name` of the function (at TOS)" msgstr "" -#: ../../library/dis.rst:1267 +#: ../../library/dis.rst:1266 msgid "Flag value ``0x04`` is a tuple of strings instead of dictionary" msgstr "" -#: ../../library/dis.rst:1274 +#: ../../library/dis.rst:1273 msgid "" "Pushes a slice object on the stack. *argc* must be 2 or 3. If it is 2, " "``slice(TOS1, TOS)`` is pushed; if it is 3, ``slice(TOS2, TOS1, TOS)`` is " "pushed. See the :func:`slice` built-in function for more information." msgstr "" -#: ../../library/dis.rst:1281 +#: ../../library/dis.rst:1280 msgid "" "Prefixes any opcode which has an argument too big to fit into the default " "one byte. *ext* holds an additional byte which act as higher bits in the " @@ -1272,142 +1271,142 @@ msgid "" "allowed, forming an argument from two-byte to four-byte." msgstr "" -#: ../../library/dis.rst:1289 +#: ../../library/dis.rst:1288 msgid "" "Used for implementing formatted literal strings (f-strings). Pops an " "optional *fmt_spec* from the stack, then a required *value*. *flags* is " "interpreted as follows:" msgstr "" -#: ../../library/dis.rst:1293 +#: ../../library/dis.rst:1292 msgid "``(flags & 0x03) == 0x00``: *value* is formatted as-is." msgstr "" -#: ../../library/dis.rst:1294 +#: ../../library/dis.rst:1293 msgid "" "``(flags & 0x03) == 0x01``: call :func:`str` on *value* before formatting it." msgstr "" -#: ../../library/dis.rst:1296 +#: ../../library/dis.rst:1295 msgid "" "``(flags & 0x03) == 0x02``: call :func:`repr` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1298 +#: ../../library/dis.rst:1297 msgid "" "``(flags & 0x03) == 0x03``: call :func:`ascii` on *value* before formatting " "it." msgstr "" -#: ../../library/dis.rst:1300 +#: ../../library/dis.rst:1299 msgid "" "``(flags & 0x04) == 0x04``: pop *fmt_spec* from the stack and use it, else " "use an empty *fmt_spec*." msgstr "" -#: ../../library/dis.rst:1303 +#: ../../library/dis.rst:1302 msgid "" "Formatting is performed using :c:func:`PyObject_Format`. The result is " "pushed on the stack." msgstr "" -#: ../../library/dis.rst:1311 +#: ../../library/dis.rst:1310 msgid "" "TOS is a tuple of keyword attribute names, TOS1 is the class being matched " "against, and TOS2 is the match subject. *count* is the number of positional " "sub-patterns." msgstr "" -#: ../../library/dis.rst:1315 +#: ../../library/dis.rst:1314 msgid "" "Pop TOS, TOS1, and TOS2. If TOS2 is an instance of TOS1 and has the " "positional and keyword attributes required by *count* and TOS, push a tuple " "of extracted attributes. Otherwise, push ``None``." msgstr "" -#: ../../library/dis.rst:1328 +#: ../../library/dis.rst:1327 msgid "A no-op. Performs internal tracing, debugging and optimization checks." msgstr "" -#: ../../library/dis.rst:1330 +#: ../../library/dis.rst:1329 msgid "The ``where`` operand marks where the ``RESUME`` occurs:" msgstr "" -#: ../../library/dis.rst:1332 +#: ../../library/dis.rst:1331 msgid "``0`` The start of a function" msgstr "" -#: ../../library/dis.rst:1333 +#: ../../library/dis.rst:1332 msgid "``1`` After a ``yield`` expression" msgstr "" -#: ../../library/dis.rst:1334 +#: ../../library/dis.rst:1333 msgid "``2`` After a ``yield from`` expression" msgstr "" -#: ../../library/dis.rst:1335 +#: ../../library/dis.rst:1334 msgid "``3`` After an ``await`` expression" msgstr "" -#: ../../library/dis.rst:1342 +#: ../../library/dis.rst:1341 msgid "" "Create a generator, coroutine, or async generator from the current frame. " "Clear the current frame and return the newly created generator." msgstr "" -#: ../../library/dis.rst:1350 +#: ../../library/dis.rst:1349 msgid "" "Sends ``None`` to the sub-generator of this generator. Used in ``yield " "from`` and ``await`` statements." msgstr "" -#: ../../library/dis.rst:1358 +#: ../../library/dis.rst:1357 msgid "" "Wraps the value on top of the stack in an ``async_generator_wrapped_value``. " "Used to yield in async generators." msgstr "" -#: ../../library/dis.rst:1366 +#: ../../library/dis.rst:1365 msgid "" "This is not really an opcode. It identifies the dividing line between " "opcodes which don't use their argument and those that do (``< " "HAVE_ARGUMENT`` and ``>= HAVE_ARGUMENT``, respectively)." msgstr "" -#: ../../library/dis.rst:1370 +#: ../../library/dis.rst:1369 msgid "" "Now every instruction has an argument, but opcodes ``< HAVE_ARGUMENT`` " "ignore it. Before, only opcodes ``>= HAVE_ARGUMENT`` had an argument." msgstr "" -#: ../../library/dis.rst:1378 +#: ../../library/dis.rst:1377 msgid "Opcode collections" msgstr "" -#: ../../library/dis.rst:1380 +#: ../../library/dis.rst:1379 msgid "" "These collections are provided for automatic introspection of bytecode " "instructions:" msgstr "" -#: ../../library/dis.rst:1385 +#: ../../library/dis.rst:1384 msgid "Sequence of operation names, indexable using the bytecode." msgstr "" -#: ../../library/dis.rst:1390 +#: ../../library/dis.rst:1389 msgid "Dictionary mapping operation names to bytecodes." msgstr "" -#: ../../library/dis.rst:1395 +#: ../../library/dis.rst:1394 msgid "Sequence of all compare operation names." msgstr "" -#: ../../library/dis.rst:1400 +#: ../../library/dis.rst:1399 msgid "Sequence of bytecodes that access a constant." msgstr "" -#: ../../library/dis.rst:1405 +#: ../../library/dis.rst:1404 msgid "" "Sequence of bytecodes that access a free variable (note that 'free' in this " "context refers to names in the current scope that are referenced by inner " @@ -1415,22 +1414,22 @@ msgid "" "does *not* include references to global or builtin scopes)." msgstr "" -#: ../../library/dis.rst:1413 +#: ../../library/dis.rst:1412 msgid "Sequence of bytecodes that access an attribute by name." msgstr "" -#: ../../library/dis.rst:1418 +#: ../../library/dis.rst:1417 msgid "Sequence of bytecodes that have a relative jump target." msgstr "" -#: ../../library/dis.rst:1423 +#: ../../library/dis.rst:1422 msgid "Sequence of bytecodes that have an absolute jump target." msgstr "" -#: ../../library/dis.rst:1428 +#: ../../library/dis.rst:1427 msgid "Sequence of bytecodes that access a local variable." msgstr "" -#: ../../library/dis.rst:1433 +#: ../../library/dis.rst:1432 msgid "Sequence of bytecodes of Boolean operations." msgstr "" diff --git a/library/faulthandler.po b/library/faulthandler.po index d0d28790e7..fe9904c62b 100644 --- a/library/faulthandler.po +++ b/library/faulthandler.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2023-02-05 00:18+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-" @@ -92,26 +92,49 @@ msgid "" "enable` at Python startup." msgstr "" -#: ../../library/faulthandler.rst:48 -msgid "Dumping the traceback" +#: ../../library/faulthandler.rst:49 +msgid "Module :mod:`pdb`" +msgstr "" + +#: ../../library/faulthandler.rst:49 +msgid "Interactive source code debugger for Python programs." +msgstr "" + +#: ../../library/faulthandler.rst:51 +msgid "Module :mod:`traceback`" msgstr "" #: ../../library/faulthandler.rst:52 msgid "" +"Standard interface to extract, format and print stack traces of Python " +"programs." +msgstr "" + +#: ../../library/faulthandler.rst:55 +msgid "Dumping the traceback" +msgstr "" + +#: ../../library/faulthandler.rst:59 +msgid "" "Dump the tracebacks of all threads into *file*. If *all_threads* is " "``False``, dump only the current thread." msgstr "" -#: ../../library/faulthandler.rst:55 ../../library/faulthandler.rst:73 -#: ../../library/faulthandler.rst:115 ../../library/faulthandler.rst:137 +#: ../../library/faulthandler.rst:62 +msgid "" +":func:`traceback.print_tb`, which can be used to print a traceback object." +msgstr "" + +#: ../../library/faulthandler.rst:64 ../../library/faulthandler.rst:82 +#: ../../library/faulthandler.rst:124 ../../library/faulthandler.rst:146 msgid "Added support for passing file descriptor to this function." msgstr "" -#: ../../library/faulthandler.rst:60 +#: ../../library/faulthandler.rst:69 msgid "Fault handler state" msgstr "" -#: ../../library/faulthandler.rst:64 +#: ../../library/faulthandler.rst:73 msgid "" "Enable the fault handler: install handlers for the :const:`SIGSEGV`, :const:" "`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS` and :const:`SIGILL` signals to " @@ -119,37 +142,37 @@ msgid "" "for every running thread. Otherwise, dump only the current thread." msgstr "" -#: ../../library/faulthandler.rst:70 +#: ../../library/faulthandler.rst:79 msgid "" "The *file* must be kept open until the fault handler is disabled: see :ref:" "`issue with file descriptors `." msgstr "" -#: ../../library/faulthandler.rst:76 +#: ../../library/faulthandler.rst:85 msgid "On Windows, a handler for Windows exception is also installed." msgstr "" -#: ../../library/faulthandler.rst:79 +#: ../../library/faulthandler.rst:88 msgid "" "The dump now mentions if a garbage collector collection is running if " "*all_threads* is true." msgstr "" -#: ../../library/faulthandler.rst:85 +#: ../../library/faulthandler.rst:94 msgid "" "Disable the fault handler: uninstall the signal handlers installed by :func:" "`enable`." msgstr "" -#: ../../library/faulthandler.rst:90 +#: ../../library/faulthandler.rst:99 msgid "Check if the fault handler is enabled." msgstr "" -#: ../../library/faulthandler.rst:94 +#: ../../library/faulthandler.rst:103 msgid "Dumping the tracebacks after a timeout" msgstr "" -#: ../../library/faulthandler.rst:98 +#: ../../library/faulthandler.rst:107 msgid "" "Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or " "every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, " @@ -160,58 +183,58 @@ msgid "" "a sub-second resolution." msgstr "" -#: ../../library/faulthandler.rst:106 +#: ../../library/faulthandler.rst:115 msgid "" "The *file* must be kept open until the traceback is dumped or :func:" "`cancel_dump_traceback_later` is called: see :ref:`issue with file " "descriptors `." msgstr "" -#: ../../library/faulthandler.rst:110 +#: ../../library/faulthandler.rst:119 msgid "This function is implemented using a watchdog thread." msgstr "" -#: ../../library/faulthandler.rst:112 +#: ../../library/faulthandler.rst:121 msgid "This function is now always available." msgstr "" -#: ../../library/faulthandler.rst:120 +#: ../../library/faulthandler.rst:129 msgid "Cancel the last call to :func:`dump_traceback_later`." msgstr "" -#: ../../library/faulthandler.rst:124 +#: ../../library/faulthandler.rst:133 msgid "Dumping the traceback on a user signal" msgstr "" -#: ../../library/faulthandler.rst:128 +#: ../../library/faulthandler.rst:137 msgid "" "Register a user signal: install a handler for the *signum* signal to dump " "the traceback of all threads, or of the current thread if *all_threads* is " "``False``, into *file*. Call the previous handler if chain is ``True``." msgstr "" -#: ../../library/faulthandler.rst:132 +#: ../../library/faulthandler.rst:141 msgid "" "The *file* must be kept open until the signal is unregistered by :func:" "`unregister`: see :ref:`issue with file descriptors `." msgstr "" -#: ../../library/faulthandler.rst:135 ../../library/faulthandler.rst:146 +#: ../../library/faulthandler.rst:144 ../../library/faulthandler.rst:155 msgid "Not available on Windows." msgstr "" -#: ../../library/faulthandler.rst:142 +#: ../../library/faulthandler.rst:151 msgid "" "Unregister a user signal: uninstall the handler of the *signum* signal " "installed by :func:`register`. Return ``True`` if the signal was registered, " "``False`` otherwise." msgstr "" -#: ../../library/faulthandler.rst:152 +#: ../../library/faulthandler.rst:161 msgid "Issue with file descriptors" msgstr "" -#: ../../library/faulthandler.rst:154 +#: ../../library/faulthandler.rst:163 msgid "" ":func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the " "file descriptor of their *file* argument. If the file is closed and its file " @@ -220,11 +243,11 @@ msgid "" "Call these functions again each time that the file is replaced." msgstr "" -#: ../../library/faulthandler.rst:162 +#: ../../library/faulthandler.rst:171 msgid "Example" msgstr "範例" -#: ../../library/faulthandler.rst:164 +#: ../../library/faulthandler.rst:173 msgid "" "Example of a segmentation fault on Linux with and without enabling the fault " "handler:" diff --git a/library/logging.config.po b/library/logging.config.po index 06e5211737..2a609c68a4 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-01-28 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:05+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -664,19 +664,27 @@ msgstr "" #: ../../library/logging.config.rst:528 msgid "" +"The values for keys such as ``bar``, ``spam`` and ``answer`` in the above " +"example should not be configuration dictionaries or references such as " +"``cfg://foo`` or ``ext://bar``, because they will not be processed by the " +"configuration machinery, but passed to the callable as-is." +msgstr "" + +#: ../../library/logging.config.rst:533 +msgid "" "The key ``'()'`` has been used as the special key because it is not a valid " "keyword parameter name, and so will not clash with the names of the keyword " "arguments used in the call. The ``'()'`` also serves as a mnemonic that the " "corresponding value is a callable." msgstr "" -#: ../../library/logging.config.rst:533 +#: ../../library/logging.config.rst:538 msgid "" "The ``filters`` member of ``handlers`` and ``loggers`` can take filter " "instances in addition to ids." msgstr "" -#: ../../library/logging.config.rst:537 +#: ../../library/logging.config.rst:542 msgid "" "You can also specify a special key ``'.'`` whose value is a dictionary is a " "mapping of attribute names to values. If found, the specified attributes " @@ -684,17 +692,50 @@ msgid "" "following configuration::" msgstr "" -#: ../../library/logging.config.rst:553 +#: ../../library/logging.config.rst:558 msgid "" "the returned formatter will have attribute ``foo`` set to ``'bar'`` and " "attribute ``baz`` set to ``'bozz'``." msgstr "" -#: ../../library/logging.config.rst:560 +#: ../../library/logging.config.rst:561 +msgid "" +"The values for attributes such as ``foo`` and ``baz`` in the above example " +"should not be configuration dictionaries or references such as ``cfg://foo`` " +"or ``ext://bar``, because they will not be processed by the configuration " +"machinery, but set as attribute values as-is." +msgstr "" + +#: ../../library/logging.config.rst:570 +msgid "Handler configuration order" +msgstr "" + +#: ../../library/logging.config.rst:572 +msgid "" +"Handlers are configured in alphabetical order of their keys, and a " +"configured handler replaces the configuration dictionary in (a working copy " +"of) the ``handlers`` dictionary in the schema. If you use a construct such " +"as ``cfg://handlers.foo``, then initially ``handlers['foo']`` points to the " +"configuration dictionary for the handler named ``foo``, and later (once that " +"handler has been configured) it points to the configured handler instance. " +"Thus, ``cfg://handlers.foo`` could resolve to either a dictionary or a " +"handler instance. In general, it is wise to name handlers in a way such that " +"dependent handlers are configured _after_ any handlers they depend on; that " +"allows something like ``cfg://handlers.foo`` to be used in configuring a " +"handler that depends on handler ``foo``. If that dependent handler were " +"named ``bar``, problems would result, because the configuration of ``bar`` " +"would be attempted before that of ``foo``, and ``foo`` would not yet have " +"been configured. However, if the dependent handler were named ``foobar``, it " +"would be configured after ``foo``, with the result that ``cfg://handlers." +"foo`` would resolve to configured handler ``foo``, and not its configuration " +"dictionary." +msgstr "" + +#: ../../library/logging.config.rst:593 msgid "Access to external objects" msgstr "" -#: ../../library/logging.config.rst:562 +#: ../../library/logging.config.rst:595 msgid "" "There are times where a configuration needs to refer to objects external to " "the configuration, for example ``sys.stderr``. If the configuration dict is " @@ -709,7 +750,7 @@ msgid "" "import mechanisms." msgstr "" -#: ../../library/logging.config.rst:575 +#: ../../library/logging.config.rst:608 msgid "" "The handling of such prefixes is done in a way analogous to protocol " "handling: there is a generic mechanism to look for prefixes which match the " @@ -719,11 +760,11 @@ msgid "" "prefix is not recognised, then the string value will be left as-is." msgstr "" -#: ../../library/logging.config.rst:587 +#: ../../library/logging.config.rst:620 msgid "Access to internal objects" msgstr "" -#: ../../library/logging.config.rst:589 +#: ../../library/logging.config.rst:622 msgid "" "As well as external objects, there is sometimes also a need to refer to " "objects in the configuration. This will be done implicitly by the " @@ -734,7 +775,7 @@ msgid "" "and resolve to the appropriate destination object." msgstr "" -#: ../../library/logging.config.rst:597 +#: ../../library/logging.config.rst:630 msgid "" "However, a more generic mechanism is needed for user-defined objects which " "are not known to the :mod:`logging` module. For example, consider :class:" @@ -748,7 +789,7 @@ msgid "" "resolution system allows the user to specify:" msgstr "" -#: ../../library/logging.config.rst:619 +#: ../../library/logging.config.rst:652 msgid "" "The literal string ``'cfg://handlers.file'`` will be resolved in an " "analogous way to strings with the ``ext://`` prefix, but looking in the " @@ -757,7 +798,7 @@ msgid "" "format``. Thus, given the following snippet:" msgstr "" -#: ../../library/logging.config.rst:637 +#: ../../library/logging.config.rst:670 msgid "" "in the configuration, the string ``'cfg://handlers'`` would resolve to the " "dict with key ``handlers``, the string ``'cfg://handlers.email`` would " @@ -773,7 +814,7 @@ msgid "" "to the string value if needed." msgstr "" -#: ../../library/logging.config.rst:651 +#: ../../library/logging.config.rst:684 msgid "" "Given a string ``cfg://handlers.myhandler.mykey.123``, this will resolve to " "``config_dict['handlers']['myhandler']['mykey']['123']``. If the string is " @@ -783,11 +824,11 @@ msgid "" "['mykey']['123']`` if that fails." msgstr "" -#: ../../library/logging.config.rst:663 +#: ../../library/logging.config.rst:696 msgid "Import resolution and custom importers" msgstr "" -#: ../../library/logging.config.rst:665 +#: ../../library/logging.config.rst:698 msgid "" "Import resolution, by default, uses the builtin :func:`__import__` function " "to do its importing. You may want to replace this with your own importing " @@ -799,17 +840,17 @@ msgid "" "instance level, you need to wrap it with :func:`staticmethod`. For example::" msgstr "" -#: ../../library/logging.config.rst:680 +#: ../../library/logging.config.rst:713 msgid "" "You don't need to wrap with :func:`staticmethod` if you're setting the " "import callable on a configurator *instance*." msgstr "" -#: ../../library/logging.config.rst:687 +#: ../../library/logging.config.rst:720 msgid "Configuration file format" msgstr "" -#: ../../library/logging.config.rst:689 +#: ../../library/logging.config.rst:722 msgid "" "The configuration file format understood by :func:`fileConfig` is based on :" "mod:`configparser` functionality. The file must contain sections called " @@ -826,7 +867,7 @@ msgid "" "specified in a section called ``[logger_root]``." msgstr "" -#: ../../library/logging.config.rst:704 +#: ../../library/logging.config.rst:737 msgid "" "The :func:`fileConfig` API is older than the :func:`dictConfig` API and does " "not provide functionality to cover certain aspects of logging. For example, " @@ -839,17 +880,17 @@ msgid "" "when it's convenient to do so." msgstr "" -#: ../../library/logging.config.rst:714 +#: ../../library/logging.config.rst:747 msgid "Examples of these sections in the file are given below." msgstr "" -#: ../../library/logging.config.rst:727 +#: ../../library/logging.config.rst:760 msgid "" "The root logger must specify a level and a list of handlers. An example of a " "root logger section is given below." msgstr "" -#: ../../library/logging.config.rst:736 +#: ../../library/logging.config.rst:769 msgid "" "The ``level`` entry can be one of ``DEBUG, INFO, WARNING, ERROR, CRITICAL`` " "or ``NOTSET``. For the root logger only, ``NOTSET`` means that all messages " @@ -857,7 +898,7 @@ msgid "" "of the ``logging`` package's namespace." msgstr "" -#: ../../library/logging.config.rst:741 +#: ../../library/logging.config.rst:774 msgid "" "The ``handlers`` entry is a comma-separated list of handler names, which " "must appear in the ``[handlers]`` section. These names must appear in the " @@ -865,13 +906,13 @@ msgid "" "file." msgstr "" -#: ../../library/logging.config.rst:746 +#: ../../library/logging.config.rst:779 msgid "" "For loggers other than the root logger, some additional information is " "required. This is illustrated by the following example." msgstr "" -#: ../../library/logging.config.rst:757 +#: ../../library/logging.config.rst:790 msgid "" "The ``level`` and ``handlers`` entries are interpreted as for the root " "logger, except that if a non-root logger's level is specified as ``NOTSET``, " @@ -884,20 +925,20 @@ msgid "" "application to get the logger." msgstr "" -#: ../../library/logging.config.rst:766 +#: ../../library/logging.config.rst:799 msgid "" "Sections which specify handler configuration are exemplified by the " "following." msgstr "" -#: ../../library/logging.config.rst:776 +#: ../../library/logging.config.rst:809 msgid "" "The ``class`` entry indicates the handler's class (as determined by :func:" "`eval` in the ``logging`` package's namespace). The ``level`` is interpreted " "as for loggers, and ``NOTSET`` is taken to mean 'log everything'." msgstr "" -#: ../../library/logging.config.rst:780 +#: ../../library/logging.config.rst:813 msgid "" "The ``formatter`` entry indicates the key name of the formatter for this " "handler. If blank, a default formatter (``logging._defaultFormatter``) is " @@ -905,7 +946,7 @@ msgid "" "and have a corresponding section in the configuration file." msgstr "" -#: ../../library/logging.config.rst:785 +#: ../../library/logging.config.rst:818 msgid "" "The ``args`` entry, when :ref:`evaluated ` in the context of the " "``logging`` package's namespace, is the list of arguments to the constructor " @@ -914,7 +955,7 @@ msgid "" "provided, it defaults to ``()``." msgstr "" -#: ../../library/logging.config.rst:791 +#: ../../library/logging.config.rst:824 msgid "" "The optional ``kwargs`` entry, when :ref:`evaluated ` in the " "context of the ``logging`` package's namespace, is the keyword argument dict " @@ -922,19 +963,19 @@ msgid "" "``{}``." msgstr "" -#: ../../library/logging.config.rst:848 +#: ../../library/logging.config.rst:881 msgid "" "Sections which specify formatter configuration are typified by the following." msgstr "" -#: ../../library/logging.config.rst:859 +#: ../../library/logging.config.rst:892 msgid "" "The arguments for the formatter configuration are the same as the keys in " "the dictionary schema :ref:`formatters section `." msgstr "" -#: ../../library/logging.config.rst:865 +#: ../../library/logging.config.rst:898 msgid "" "Due to the use of :func:`eval` as described above, there are potential " "security risks which result from using the :func:`listen` to send and " @@ -943,18 +984,18 @@ msgid "" "`listen` documentation for more information." msgstr "" -#: ../../library/logging.config.rst:874 +#: ../../library/logging.config.rst:907 msgid "Module :mod:`logging`" msgstr ":mod:`logging` 模組" -#: ../../library/logging.config.rst:874 +#: ../../library/logging.config.rst:907 msgid "API reference for the logging module." msgstr "" -#: ../../library/logging.config.rst:876 +#: ../../library/logging.config.rst:909 msgid "Module :mod:`logging.handlers`" msgstr ":mod:`logging.handlers` 模組" -#: ../../library/logging.config.rst:877 +#: ../../library/logging.config.rst:910 msgid "Useful handlers included with the logging module." msgstr "" diff --git a/library/os.path.po b/library/os.path.po index cc57a77576..1fbdb49d10 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-09 00:17+0000\n" +"POT-Creation-Date: 2023-02-01 00:19+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -302,11 +302,11 @@ msgstr "" msgid "" "Join one or more path segments intelligently. The return value is the " "concatenation of *path* and all members of *\\*paths*, with exactly one " -"directory separator following each non-empty part except the last. That is, " -"if the last part is empty, the result will end in a separator. If a segment " -"is an absolute path (which on Windows requires both a drive and a root), " -"then all previous segments are ignored and joining continues from the " -"absolute path segment." +"directory separator following each non-empty part, except the last. That is, " +"the result will only end in a separator if the last part is either empty or " +"ends in a separator. If a segment is an absolute path (which on Windows " +"requires both a drive and a root), then all previous segments are ignored " +"and joining continues from the absolute path segment." msgstr "" #: ../../library/os.path.rst:308 diff --git a/library/pathlib.po b/library/pathlib.po index 388563f8a7..dc69edf4bf 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-21 00:16+0000\n" +"POT-Creation-Date: 2023-01-31 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -591,7 +591,7 @@ msgid "" "arguments ``self``, ``pattern``." msgstr "" -#: ../../library/pathlib.rst:851 ../../library/pathlib.rst:1144 +#: ../../library/pathlib.rst:851 ../../library/pathlib.rst:1146 msgid "" "Return only directories if *pattern* ends with a pathname components " "separator (:data:`~os.sep` or :data:`~os.altsep`)." @@ -773,43 +773,49 @@ msgid "" "either a string or another path object::" msgstr "" -#: ../../library/pathlib.rst:1070 ../../library/pathlib.rst:1084 +#: ../../library/pathlib.rst:1070 ../../library/pathlib.rst:1086 msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the Path " "object." msgstr "" -#: ../../library/pathlib.rst:1074 ../../library/pathlib.rst:1088 +#: ../../library/pathlib.rst:1074 +msgid "" +"It is implemented in terms of :func:`os.rename` and gives the same " +"guarantees." +msgstr "" + +#: ../../library/pathlib.rst:1076 ../../library/pathlib.rst:1090 msgid "Added return value, return the new Path instance." msgstr "" -#: ../../library/pathlib.rst:1080 +#: ../../library/pathlib.rst:1082 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. If *target* points to an existing file or " "empty directory, it will be unconditionally replaced." msgstr "" -#: ../../library/pathlib.rst:1094 +#: ../../library/pathlib.rst:1096 msgid "" "Make the path absolute, without normalization or resolving symlinks. Returns " "a new path object::" msgstr "" -#: ../../library/pathlib.rst:1106 +#: ../../library/pathlib.rst:1108 msgid "" "Make the path absolute, resolving any symlinks. A new path object is " "returned::" msgstr "" -#: ../../library/pathlib.rst:1115 +#: ../../library/pathlib.rst:1117 msgid "" "\"``..``\" components are also eliminated (this is the only method to do " "so)::" msgstr "" -#: ../../library/pathlib.rst:1121 +#: ../../library/pathlib.rst:1123 msgid "" "If the path doesn't exist and *strict* is ``True``, :exc:`FileNotFoundError` " "is raised. If *strict* is ``False``, the path is resolved as far as " @@ -818,11 +824,11 @@ msgid "" "`RuntimeError` is raised." msgstr "" -#: ../../library/pathlib.rst:1127 +#: ../../library/pathlib.rst:1129 msgid "The *strict* argument (pre-3.6 behavior is strict)." msgstr "" -#: ../../library/pathlib.rst:1132 +#: ../../library/pathlib.rst:1134 msgid "" "This is like calling :func:`Path.glob` with \"``**/``\" added in front of " "the given relative *pattern*::" @@ -834,49 +840,49 @@ msgid "" "arguments ``self``, ``pattern``." msgstr "" -#: ../../library/pathlib.rst:1150 +#: ../../library/pathlib.rst:1152 msgid "Remove this directory. The directory must be empty." msgstr "" -#: ../../library/pathlib.rst:1155 +#: ../../library/pathlib.rst:1157 msgid "" "Return whether this path points to the same file as *other_path*, which can " "be either a Path object, or a string. The semantics are similar to :func:" "`os.path.samefile` and :func:`os.path.samestat`." msgstr "" -#: ../../library/pathlib.rst:1159 +#: ../../library/pathlib.rst:1161 msgid "" "An :exc:`OSError` can be raised if either file cannot be accessed for some " "reason." msgstr "" -#: ../../library/pathlib.rst:1176 +#: ../../library/pathlib.rst:1178 msgid "" "Make this path a symbolic link to *target*. Under Windows, " "*target_is_directory* must be true (default ``False``) if the link's target " "is a directory. Under POSIX, *target_is_directory*'s value is ignored." msgstr "" -#: ../../library/pathlib.rst:1192 +#: ../../library/pathlib.rst:1194 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "" -#: ../../library/pathlib.rst:1197 +#: ../../library/pathlib.rst:1199 msgid "Make this path a hard link to the same file as *target*." msgstr "" -#: ../../library/pathlib.rst:1200 +#: ../../library/pathlib.rst:1202 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "" -#: ../../library/pathlib.rst:1207 +#: ../../library/pathlib.rst:1209 msgid "Make *target* a hard link to this path." msgstr "" -#: ../../library/pathlib.rst:1211 +#: ../../library/pathlib.rst:1213 msgid "" "This function does not make this path a hard link to *target*, despite the " "implication of the function and argument names. The argument order (target, " @@ -884,14 +890,14 @@ msgid "" "hardlink_to`, but matches that of :func:`os.link`." msgstr "" -#: ../../library/pathlib.rst:1220 +#: ../../library/pathlib.rst:1222 msgid "" "This method is deprecated in favor of :meth:`Path.hardlink_to`, as the " "argument order of :meth:`Path.link_to` does not match that of :meth:`Path." "symlink_to`." msgstr "" -#: ../../library/pathlib.rst:1227 +#: ../../library/pathlib.rst:1229 msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process' ``umask`` value to determine the file mode and access flags. " @@ -900,65 +906,65 @@ msgid "" "`FileExistsError` is raised." msgstr "" -#: ../../library/pathlib.rst:1236 +#: ../../library/pathlib.rst:1238 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "" -#: ../../library/pathlib.rst:1239 +#: ../../library/pathlib.rst:1241 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." msgstr "" -#: ../../library/pathlib.rst:1242 +#: ../../library/pathlib.rst:1244 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." msgstr "" -#: ../../library/pathlib.rst:1245 +#: ../../library/pathlib.rst:1247 msgid "The *missing_ok* parameter was added." msgstr "新增 *missing_ok* 參數。" -#: ../../library/pathlib.rst:1251 +#: ../../library/pathlib.rst:1253 msgid "" "Open the file pointed to in bytes mode, write *data* to it, and close the " "file::" msgstr "" -#: ../../library/pathlib.rst:1260 +#: ../../library/pathlib.rst:1262 msgid "An existing file of the same name is overwritten." msgstr "" -#: ../../library/pathlib.rst:1267 +#: ../../library/pathlib.rst:1269 msgid "" "Open the file pointed to in text mode, write *data* to it, and close the " "file::" msgstr "" -#: ../../library/pathlib.rst:1276 +#: ../../library/pathlib.rst:1278 msgid "" "An existing file of the same name is overwritten. The optional parameters " "have the same meaning as in :func:`open`." msgstr "" -#: ../../library/pathlib.rst:1281 +#: ../../library/pathlib.rst:1283 msgid "The *newline* parameter was added." msgstr "新增 *newline* 參數。" -#: ../../library/pathlib.rst:1285 +#: ../../library/pathlib.rst:1287 msgid "Correspondence to tools in the :mod:`os` module" msgstr "" -#: ../../library/pathlib.rst:1287 +#: ../../library/pathlib.rst:1289 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." msgstr "" -#: ../../library/pathlib.rst:1292 +#: ../../library/pathlib.rst:1294 msgid "" "Not all pairs of functions/methods below are equivalent. Some of them, " "despite having some overlapping use-cases, have different semantics. They " @@ -966,237 +972,237 @@ msgid "" "relpath` and :meth:`PurePath.relative_to`." msgstr "" -#: ../../library/pathlib.rst:1298 +#: ../../library/pathlib.rst:1300 msgid ":mod:`os` and :mod:`os.path`" msgstr ":mod:`os` 和 :mod:`os.path`" -#: ../../library/pathlib.rst:1298 +#: ../../library/pathlib.rst:1300 msgid ":mod:`pathlib`" msgstr ":mod:`pathlib`" -#: ../../library/pathlib.rst:1300 +#: ../../library/pathlib.rst:1302 msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" -#: ../../library/pathlib.rst:1300 +#: ../../library/pathlib.rst:1302 msgid ":meth:`Path.absolute` [#]_" msgstr ":meth:`Path.absolute` [#]_" -#: ../../library/pathlib.rst:1301 +#: ../../library/pathlib.rst:1303 msgid ":func:`os.path.realpath`" msgstr ":func:`os.path.realpath`" -#: ../../library/pathlib.rst:1301 +#: ../../library/pathlib.rst:1303 msgid ":meth:`Path.resolve`" msgstr ":meth:`Path.resolve`" -#: ../../library/pathlib.rst:1302 +#: ../../library/pathlib.rst:1304 msgid ":func:`os.chmod`" msgstr ":func:`os.chmod`" -#: ../../library/pathlib.rst:1302 +#: ../../library/pathlib.rst:1304 msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" -#: ../../library/pathlib.rst:1303 +#: ../../library/pathlib.rst:1305 msgid ":func:`os.mkdir`" msgstr ":func:`os.mkdir`" -#: ../../library/pathlib.rst:1303 ../../library/pathlib.rst:1304 +#: ../../library/pathlib.rst:1305 ../../library/pathlib.rst:1306 msgid ":meth:`Path.mkdir`" msgstr ":meth:`Path.mkdir`" -#: ../../library/pathlib.rst:1304 +#: ../../library/pathlib.rst:1306 msgid ":func:`os.makedirs`" msgstr ":func:`os.makedirs`" -#: ../../library/pathlib.rst:1305 +#: ../../library/pathlib.rst:1307 msgid ":func:`os.rename`" msgstr ":func:`os.rename`" -#: ../../library/pathlib.rst:1305 +#: ../../library/pathlib.rst:1307 msgid ":meth:`Path.rename`" msgstr ":meth:`Path.rename`" -#: ../../library/pathlib.rst:1306 +#: ../../library/pathlib.rst:1308 msgid ":func:`os.replace`" msgstr ":func:`os.replace`" -#: ../../library/pathlib.rst:1306 +#: ../../library/pathlib.rst:1308 msgid ":meth:`Path.replace`" msgstr ":meth:`Path.replace`" -#: ../../library/pathlib.rst:1307 +#: ../../library/pathlib.rst:1309 msgid ":func:`os.rmdir`" msgstr ":func:`os.rmdir`" -#: ../../library/pathlib.rst:1307 +#: ../../library/pathlib.rst:1309 msgid ":meth:`Path.rmdir`" msgstr ":meth:`Path.rmdir`" -#: ../../library/pathlib.rst:1308 +#: ../../library/pathlib.rst:1310 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr ":func:`os.remove`, :func:`os.unlink`" -#: ../../library/pathlib.rst:1308 +#: ../../library/pathlib.rst:1310 msgid ":meth:`Path.unlink`" msgstr ":meth:`Path.unlink`" -#: ../../library/pathlib.rst:1309 +#: ../../library/pathlib.rst:1311 msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" -#: ../../library/pathlib.rst:1309 +#: ../../library/pathlib.rst:1311 msgid ":func:`Path.cwd`" msgstr ":func:`Path.cwd`" -#: ../../library/pathlib.rst:1310 +#: ../../library/pathlib.rst:1312 msgid ":func:`os.path.exists`" msgstr ":func:`os.path.exists`" -#: ../../library/pathlib.rst:1310 +#: ../../library/pathlib.rst:1312 msgid ":meth:`Path.exists`" msgstr ":meth:`Path.exists`" -#: ../../library/pathlib.rst:1311 +#: ../../library/pathlib.rst:1313 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" -#: ../../library/pathlib.rst:1311 +#: ../../library/pathlib.rst:1313 msgid ":meth:`Path.expanduser` and :meth:`Path.home`" msgstr ":meth:`Path.expanduser` 和 :meth:`Path.home`" -#: ../../library/pathlib.rst:1313 +#: ../../library/pathlib.rst:1315 msgid ":func:`os.listdir`" msgstr ":func:`os.listdir`" -#: ../../library/pathlib.rst:1313 +#: ../../library/pathlib.rst:1315 msgid ":meth:`Path.iterdir`" msgstr ":meth:`Path.iterdir`" -#: ../../library/pathlib.rst:1314 +#: ../../library/pathlib.rst:1316 msgid ":func:`os.path.isdir`" msgstr ":func:`os.path.isdir`" -#: ../../library/pathlib.rst:1314 +#: ../../library/pathlib.rst:1316 msgid ":meth:`Path.is_dir`" msgstr ":meth:`Path.is_dir`" -#: ../../library/pathlib.rst:1315 +#: ../../library/pathlib.rst:1317 msgid ":func:`os.path.isfile`" msgstr ":func:`os.path.isfile`" -#: ../../library/pathlib.rst:1315 +#: ../../library/pathlib.rst:1317 msgid ":meth:`Path.is_file`" msgstr ":meth:`Path.is_file`" -#: ../../library/pathlib.rst:1316 +#: ../../library/pathlib.rst:1318 msgid ":func:`os.path.islink`" msgstr ":func:`os.path.islink`" -#: ../../library/pathlib.rst:1316 +#: ../../library/pathlib.rst:1318 msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" -#: ../../library/pathlib.rst:1317 +#: ../../library/pathlib.rst:1319 msgid ":func:`os.link`" msgstr ":func:`os.link`" -#: ../../library/pathlib.rst:1317 +#: ../../library/pathlib.rst:1319 msgid ":meth:`Path.hardlink_to`" msgstr ":meth:`Path.hardlink_to`" -#: ../../library/pathlib.rst:1318 +#: ../../library/pathlib.rst:1320 msgid ":func:`os.symlink`" msgstr ":func:`os.symlink`" -#: ../../library/pathlib.rst:1318 +#: ../../library/pathlib.rst:1320 msgid ":meth:`Path.symlink_to`" msgstr ":meth:`Path.symlink_to`" -#: ../../library/pathlib.rst:1319 +#: ../../library/pathlib.rst:1321 msgid ":func:`os.readlink`" msgstr ":func:`os.readlink`" -#: ../../library/pathlib.rst:1319 +#: ../../library/pathlib.rst:1321 msgid ":meth:`Path.readlink`" msgstr ":meth:`Path.readlink`" -#: ../../library/pathlib.rst:1320 +#: ../../library/pathlib.rst:1322 msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" -#: ../../library/pathlib.rst:1320 +#: ../../library/pathlib.rst:1322 msgid ":meth:`PurePath.relative_to` [#]_" msgstr ":meth:`PurePath.relative_to` [#]_" -#: ../../library/pathlib.rst:1321 +#: ../../library/pathlib.rst:1323 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" -#: ../../library/pathlib.rst:1321 +#: ../../library/pathlib.rst:1323 msgid ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" msgstr ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" -#: ../../library/pathlib.rst:1324 +#: ../../library/pathlib.rst:1326 msgid ":func:`os.path.isabs`" msgstr ":func:`os.path.isabs`" -#: ../../library/pathlib.rst:1324 +#: ../../library/pathlib.rst:1326 msgid ":meth:`PurePath.is_absolute`" msgstr ":meth:`PurePath.is_absolute`" -#: ../../library/pathlib.rst:1325 +#: ../../library/pathlib.rst:1327 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" -#: ../../library/pathlib.rst:1325 +#: ../../library/pathlib.rst:1327 msgid ":func:`PurePath.joinpath`" msgstr ":func:`PurePath.joinpath`" -#: ../../library/pathlib.rst:1326 +#: ../../library/pathlib.rst:1328 msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" -#: ../../library/pathlib.rst:1326 +#: ../../library/pathlib.rst:1328 msgid ":attr:`PurePath.name`" msgstr ":attr:`PurePath.name`" -#: ../../library/pathlib.rst:1327 +#: ../../library/pathlib.rst:1329 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" -#: ../../library/pathlib.rst:1327 +#: ../../library/pathlib.rst:1329 msgid ":attr:`PurePath.parent`" msgstr ":attr:`PurePath.parent`" -#: ../../library/pathlib.rst:1328 +#: ../../library/pathlib.rst:1330 msgid ":func:`os.path.samefile`" msgstr ":func:`os.path.samefile`" -#: ../../library/pathlib.rst:1328 +#: ../../library/pathlib.rst:1330 msgid ":meth:`Path.samefile`" msgstr ":meth:`Path.samefile`" -#: ../../library/pathlib.rst:1329 +#: ../../library/pathlib.rst:1331 msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" -#: ../../library/pathlib.rst:1329 +#: ../../library/pathlib.rst:1331 msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" msgstr ":attr:`PurePath.stem` 和 :attr:`PurePath.suffix`" -#: ../../library/pathlib.rst:1334 +#: ../../library/pathlib.rst:1336 msgid "Footnotes" msgstr "註解" -#: ../../library/pathlib.rst:1335 +#: ../../library/pathlib.rst:1337 msgid "" ":func:`os.path.abspath` normalizes the resulting path, which may change its " "meaning in the presence of symlinks, while :meth:`Path.absolute` does not." msgstr "" -#: ../../library/pathlib.rst:1336 +#: ../../library/pathlib.rst:1338 msgid "" ":meth:`PurePath.relative_to` requires ``self`` to be the subpath of the " "argument, but :func:`os.path.relpath` does not." diff --git a/library/pdb.po b/library/pdb.po index e33c673406..e17199f150 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-31 08:13+0000\n" +"POT-Creation-Date: 2023-02-05 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -43,26 +43,46 @@ msgid "" "source. The extension interface uses the modules :mod:`bdb` and :mod:`cmd`." msgstr "" -#: ../../library/pdb.rst:30 +#: ../../library/pdb.rst:34 +msgid "Module :mod:`faulthandler`" +msgstr "" + +#: ../../library/pdb.rst:33 +msgid "" +"Used to dump Python tracebacks explicitly, on a fault, after a timeout, or " +"on a user signal." +msgstr "" + +#: ../../library/pdb.rst:36 +msgid "Module :mod:`traceback`" +msgstr "" + +#: ../../library/pdb.rst:37 +msgid "" +"Standard interface to extract, format and print stack traces of Python " +"programs." +msgstr "" + +#: ../../library/pdb.rst:39 msgid "" "The debugger's prompt is ``(Pdb)``. Typical usage to run a program under " "control of the debugger is::" msgstr "" -#: ../../library/pdb.rst:44 +#: ../../library/pdb.rst:53 msgid "" "Tab-completion via the :mod:`readline` module is available for commands and " "command arguments, e.g. the current global and local names are offered as " "arguments of the ``p`` command." msgstr "" -#: ../../library/pdb.rst:49 +#: ../../library/pdb.rst:58 msgid "" ":file:`pdb.py` can also be invoked as a script to debug other scripts. For " "example::" msgstr "" -#: ../../library/pdb.rst:54 +#: ../../library/pdb.rst:63 msgid "" "When invoked as a script, pdb will automatically enter post-mortem debugging " "if the program being debugged exits abnormally. After post-mortem debugging " @@ -71,47 +91,47 @@ msgid "" "cases is more useful than quitting the debugger upon program's exit." msgstr "" -#: ../../library/pdb.rst:60 +#: ../../library/pdb.rst:69 msgid "" ":file:`pdb.py` now accepts a ``-c`` option that executes commands as if " "given in a :file:`.pdbrc` file, see :ref:`debugger-commands`." msgstr "" -#: ../../library/pdb.rst:64 +#: ../../library/pdb.rst:73 msgid "" ":file:`pdb.py` now accepts a ``-m`` option that execute modules similar to " "the way ``python3 -m`` does. As with a script, the debugger will pause " "execution just before the first line of the module." msgstr "" -#: ../../library/pdb.rst:70 +#: ../../library/pdb.rst:79 msgid "The typical usage to break into the debugger is to insert::" msgstr "" -#: ../../library/pdb.rst:74 +#: ../../library/pdb.rst:83 msgid "" "at the location you want to break into the debugger, and then run the " "program. You can then step through the code following this statement, and " "continue running without the debugger using the :pdbcmd:`continue` command." msgstr "" -#: ../../library/pdb.rst:78 +#: ../../library/pdb.rst:87 msgid "" "The built-in :func:`breakpoint()`, when called with defaults, can be used " "instead of ``import pdb; pdb.set_trace()``." msgstr "" -#: ../../library/pdb.rst:82 +#: ../../library/pdb.rst:91 msgid "The typical usage to inspect a crashed program is::" msgstr "" -#: ../../library/pdb.rst:100 +#: ../../library/pdb.rst:109 msgid "" "The module defines the following functions; each enters the debugger in a " "slightly different way:" msgstr "" -#: ../../library/pdb.rst:105 +#: ../../library/pdb.rst:114 msgid "" "Execute the *statement* (given as a string or a code object) under debugger " "control. The debugger prompt appears before any code is executed; you can " @@ -123,14 +143,14 @@ msgid "" "`exec` or :func:`eval` functions.)" msgstr "" -#: ../../library/pdb.rst:117 +#: ../../library/pdb.rst:126 msgid "" "Evaluate the *expression* (given as a string or a code object) under " "debugger control. When :func:`runeval` returns, it returns the value of the " "expression. Otherwise this function is similar to :func:`run`." msgstr "" -#: ../../library/pdb.rst:124 +#: ../../library/pdb.rst:133 msgid "" "Call the *function* (a function or method object, not a string) with the " "given arguments. When :func:`runcall` returns, it returns whatever the " @@ -138,7 +158,7 @@ msgid "" "is entered." msgstr "" -#: ../../library/pdb.rst:132 +#: ../../library/pdb.rst:141 msgid "" "Enter the debugger at the calling stack frame. This is useful to hard-code " "a breakpoint at a given point in a program, even if the code is not " @@ -146,11 +166,11 @@ msgid "" "is printed to the console just before debugging begins." msgstr "" -#: ../../library/pdb.rst:137 +#: ../../library/pdb.rst:146 msgid "The keyword-only argument *header*." msgstr "" -#: ../../library/pdb.rst:143 +#: ../../library/pdb.rst:152 msgid "" "Enter post-mortem debugging of the given *traceback* object. If no " "*traceback* is given, it uses the one of the exception that is currently " @@ -158,37 +178,37 @@ msgid "" "used)." msgstr "" -#: ../../library/pdb.rst:151 +#: ../../library/pdb.rst:160 msgid "" "Enter post-mortem debugging of the traceback found in :data:`sys." "last_traceback`." msgstr "" -#: ../../library/pdb.rst:155 +#: ../../library/pdb.rst:164 msgid "" "The ``run*`` functions and :func:`set_trace` are aliases for instantiating " "the :class:`Pdb` class and calling the method of the same name. If you want " "to access further features, you have to do this yourself:" msgstr "" -#: ../../library/pdb.rst:162 +#: ../../library/pdb.rst:171 msgid ":class:`Pdb` is the debugger class." msgstr "" -#: ../../library/pdb.rst:164 +#: ../../library/pdb.rst:173 msgid "" "The *completekey*, *stdin* and *stdout* arguments are passed to the " "underlying :class:`cmd.Cmd` class; see the description there." msgstr "" -#: ../../library/pdb.rst:167 +#: ../../library/pdb.rst:176 msgid "" "The *skip* argument, if given, must be an iterable of glob-style module name " "patterns. The debugger will not step into frames that originate in a module " "that matches one of these patterns. [1]_" msgstr "" -#: ../../library/pdb.rst:171 +#: ../../library/pdb.rst:180 msgid "" "By default, Pdb sets a handler for the SIGINT signal (which is sent when the " "user presses :kbd:`Ctrl-C` on the console) when you give a ``continue`` " @@ -197,13 +217,13 @@ msgid "" "to true." msgstr "" -#: ../../library/pdb.rst:176 +#: ../../library/pdb.rst:185 msgid "" "The *readrc* argument defaults to true and controls whether Pdb will load ." "pdbrc files from the filesystem." msgstr "" -#: ../../library/pdb.rst:179 +#: ../../library/pdb.rst:188 msgid "Example call to enable tracing with *skip*::" msgstr "" @@ -212,28 +232,28 @@ msgid "" "Raises an :ref:`auditing event ` ``pdb.Pdb`` with no arguments." msgstr "" -#: ../../library/pdb.rst:185 +#: ../../library/pdb.rst:194 msgid "The *skip* argument." msgstr "" -#: ../../library/pdb.rst:188 +#: ../../library/pdb.rst:197 msgid "" "The *nosigint* argument. Previously, a SIGINT handler was never set by Pdb." msgstr "" -#: ../../library/pdb.rst:192 +#: ../../library/pdb.rst:201 msgid "The *readrc* argument." msgstr "" -#: ../../library/pdb.rst:200 +#: ../../library/pdb.rst:209 msgid "See the documentation for the functions explained above." msgstr "" -#: ../../library/pdb.rst:206 +#: ../../library/pdb.rst:215 msgid "Debugger Commands" msgstr "" -#: ../../library/pdb.rst:208 +#: ../../library/pdb.rst:217 msgid "" "The commands recognized by the debugger are listed below. Most commands can " "be abbreviated to one or two letters as indicated; e.g. ``h(elp)`` means " @@ -245,13 +265,13 @@ msgid "" "are separated by a vertical bar (``|``)." msgstr "" -#: ../../library/pdb.rst:217 +#: ../../library/pdb.rst:226 msgid "" "Entering a blank line repeats the last command entered. Exception: if the " "last command was a :pdbcmd:`list` command, the next 11 lines are listed." msgstr "" -#: ../../library/pdb.rst:220 +#: ../../library/pdb.rst:229 msgid "" "Commands that the debugger doesn't recognize are assumed to be Python " "statements and are executed in the context of the program being debugged. " @@ -262,14 +282,14 @@ msgid "" "is not changed." msgstr "" -#: ../../library/pdb.rst:228 +#: ../../library/pdb.rst:237 msgid "" "The debugger supports :ref:`aliases `. Aliases can have " "parameters which allows one a certain level of adaptability to the context " "under examination." msgstr "" -#: ../../library/pdb.rst:232 +#: ../../library/pdb.rst:241 msgid "" "Multiple commands may be entered on a single line, separated by ``;;``. (A " "single ``;`` is not used as it is the separator for multiple commands in a " @@ -280,7 +300,7 @@ msgid "" "\"\";\"``." msgstr "" -#: ../../library/pdb.rst:243 +#: ../../library/pdb.rst:252 msgid "" "If a file :file:`.pdbrc` exists in the user's home directory or in the " "current directory, it is read with ``'utf-8'`` encoding and executed as if " @@ -289,20 +309,20 @@ msgid "" "and aliases defined there can be overridden by the local file." msgstr "" -#: ../../library/pdb.rst:249 +#: ../../library/pdb.rst:258 msgid "" ":file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was " "read with the system locale encoding." msgstr "" -#: ../../library/pdb.rst:253 +#: ../../library/pdb.rst:262 msgid "" ":file:`.pdbrc` can now contain commands that continue debugging, such as :" "pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no " "effect." msgstr "" -#: ../../library/pdb.rst:261 +#: ../../library/pdb.rst:270 msgid "" "Without argument, print the list of available commands. With a *command* as " "argument, print help about that command. ``help pdb`` displays the full " @@ -311,25 +331,25 @@ msgid "" "the ``!`` command." msgstr "" -#: ../../library/pdb.rst:269 +#: ../../library/pdb.rst:278 msgid "" "Print a stack trace, with the most recent frame at the bottom. An arrow " "indicates the current frame, which determines the context of most commands." msgstr "" -#: ../../library/pdb.rst:274 +#: ../../library/pdb.rst:283 msgid "" "Move the current frame *count* (default one) levels down in the stack trace " "(to a newer frame)." msgstr "" -#: ../../library/pdb.rst:279 +#: ../../library/pdb.rst:288 msgid "" "Move the current frame *count* (default one) levels up in the stack trace " "(to an older frame)." msgstr "" -#: ../../library/pdb.rst:284 +#: ../../library/pdb.rst:293 msgid "" "With a *lineno* argument, set a break there in the current file. With a " "*function* argument, set a break at the first executable statement within " @@ -340,33 +360,33 @@ msgid "" "refer." msgstr "" -#: ../../library/pdb.rst:291 +#: ../../library/pdb.rst:300 msgid "" "If a second argument is present, it is an expression which must evaluate to " "true before the breakpoint is honored." msgstr "" -#: ../../library/pdb.rst:294 +#: ../../library/pdb.rst:303 msgid "" "Without argument, list all breaks, including for each breakpoint, the number " "of times that breakpoint has been hit, the current ignore count, and the " "associated condition if any." msgstr "" -#: ../../library/pdb.rst:300 +#: ../../library/pdb.rst:309 msgid "" "Temporary breakpoint, which is removed automatically when it is first hit. " "The arguments are the same as for :pdbcmd:`break`." msgstr "" -#: ../../library/pdb.rst:305 +#: ../../library/pdb.rst:314 msgid "" "With a *filename:lineno* argument, clear all the breakpoints at this line. " "With a space separated list of breakpoint numbers, clear those breakpoints. " "Without argument, clear all breaks (but first ask confirmation)." msgstr "" -#: ../../library/pdb.rst:311 +#: ../../library/pdb.rst:320 msgid "" "Disable the breakpoints given as a space separated list of breakpoint " "numbers. Disabling a breakpoint means it cannot cause the program to stop " @@ -374,11 +394,11 @@ msgid "" "breakpoints and can be (re-)enabled." msgstr "" -#: ../../library/pdb.rst:318 +#: ../../library/pdb.rst:327 msgid "Enable the breakpoints specified." msgstr "" -#: ../../library/pdb.rst:322 +#: ../../library/pdb.rst:331 msgid "" "Set the ignore count for the given breakpoint number. If count is omitted, " "the ignore count is set to 0. A breakpoint becomes active when the ignore " @@ -387,39 +407,39 @@ msgid "" "condition evaluates to true." msgstr "" -#: ../../library/pdb.rst:330 +#: ../../library/pdb.rst:339 msgid "" "Set a new *condition* for the breakpoint, an expression which must evaluate " "to true before the breakpoint is honored. If *condition* is absent, any " "existing condition is removed; i.e., the breakpoint is made unconditional." msgstr "" -#: ../../library/pdb.rst:336 +#: ../../library/pdb.rst:345 msgid "" "Specify a list of commands for breakpoint number *bpnumber*. The commands " "themselves appear on the following lines. Type a line containing just " "``end`` to terminate the commands. An example::" msgstr "" -#: ../../library/pdb.rst:345 +#: ../../library/pdb.rst:354 msgid "" "To remove all commands from a breakpoint, type ``commands`` and follow it " "immediately with ``end``; that is, give no commands." msgstr "" -#: ../../library/pdb.rst:348 +#: ../../library/pdb.rst:357 msgid "" "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." msgstr "" -#: ../../library/pdb.rst:350 +#: ../../library/pdb.rst:359 msgid "" "You can use breakpoint commands to start your program up again. Simply use " "the :pdbcmd:`continue` command, or :pdbcmd:`step`, or any other command that " "resumes execution." msgstr "" -#: ../../library/pdb.rst:354 +#: ../../library/pdb.rst:363 msgid "" "Specifying any command resuming execution (currently :pdbcmd:`continue`, :" "pdbcmd:`step`, :pdbcmd:`next`, :pdbcmd:`return`, :pdbcmd:`jump`, :pdbcmd:" @@ -430,7 +450,7 @@ msgid "" "ambiguities about which list to execute." msgstr "" -#: ../../library/pdb.rst:363 +#: ../../library/pdb.rst:372 msgid "" "If you use the 'silent' command in the command list, the usual message about " "stopping at a breakpoint is not printed. This may be desirable for " @@ -439,13 +459,13 @@ msgid "" "was reached." msgstr "" -#: ../../library/pdb.rst:370 +#: ../../library/pdb.rst:379 msgid "" "Execute the current line, stop at the first possible occasion (either in a " "function that is called or on the next line in the current function)." msgstr "" -#: ../../library/pdb.rst:375 +#: ../../library/pdb.rst:384 msgid "" "Continue execution until the next line in the current function is reached or " "it returns. (The difference between :pdbcmd:`next` and :pdbcmd:`step` is " @@ -454,46 +474,46 @@ msgid "" "line in the current function.)" msgstr "" -#: ../../library/pdb.rst:383 +#: ../../library/pdb.rst:392 msgid "" "Without argument, continue execution until the line with a number greater " "than the current one is reached." msgstr "" -#: ../../library/pdb.rst:386 +#: ../../library/pdb.rst:395 msgid "" "With a line number, continue execution until a line with a number greater or " "equal to that is reached. In both cases, also stop when the current frame " "returns." msgstr "" -#: ../../library/pdb.rst:390 +#: ../../library/pdb.rst:399 msgid "Allow giving an explicit line number." msgstr "" -#: ../../library/pdb.rst:395 +#: ../../library/pdb.rst:404 msgid "Continue execution until the current function returns." msgstr "" -#: ../../library/pdb.rst:399 +#: ../../library/pdb.rst:408 msgid "Continue execution, only stop when a breakpoint is encountered." msgstr "" -#: ../../library/pdb.rst:403 +#: ../../library/pdb.rst:412 msgid "" "Set the next line that will be executed. Only available in the bottom-most " "frame. This lets you jump back and execute code again, or jump forward to " "skip code that you don't want to run." msgstr "" -#: ../../library/pdb.rst:407 +#: ../../library/pdb.rst:416 msgid "" "It should be noted that not all jumps are allowed -- for instance it is not " "possible to jump into the middle of a :keyword:`for` loop or out of a :" "keyword:`finally` clause." msgstr "" -#: ../../library/pdb.rst:413 +#: ../../library/pdb.rst:422 msgid "" "List source code for the current file. Without arguments, list 11 lines " "around the current line or continue the previous listing. With ``.`` as " @@ -502,7 +522,7 @@ msgid "" "second argument is less than the first, it is interpreted as a count." msgstr "" -#: ../../library/pdb.rst:419 +#: ../../library/pdb.rst:428 msgid "" "The current line in the current frame is indicated by ``->``. If an " "exception is being debugged, the line where the exception was originally " @@ -510,77 +530,77 @@ msgid "" "line." msgstr "" -#: ../../library/pdb.rst:424 +#: ../../library/pdb.rst:433 msgid "The ``>>`` marker." msgstr "" -#: ../../library/pdb.rst:429 +#: ../../library/pdb.rst:438 msgid "" "List all source code for the current function or frame. Interesting lines " "are marked as for :pdbcmd:`list`." msgstr "" -#: ../../library/pdb.rst:436 +#: ../../library/pdb.rst:445 msgid "Print the argument list of the current function." msgstr "" -#: ../../library/pdb.rst:440 +#: ../../library/pdb.rst:449 msgid "Evaluate the *expression* in the current context and print its value." msgstr "" -#: ../../library/pdb.rst:444 +#: ../../library/pdb.rst:453 msgid "" "``print()`` can also be used, but is not a debugger command --- this " "executes the Python :func:`print` function." msgstr "" -#: ../../library/pdb.rst:450 +#: ../../library/pdb.rst:459 msgid "" "Like the :pdbcmd:`p` command, except the value of the expression is pretty-" "printed using the :mod:`pprint` module." msgstr "" -#: ../../library/pdb.rst:455 +#: ../../library/pdb.rst:464 msgid "Print the type of the *expression*." msgstr "" -#: ../../library/pdb.rst:459 +#: ../../library/pdb.rst:468 msgid "Try to get source code for the given object and display it." msgstr "" -#: ../../library/pdb.rst:465 +#: ../../library/pdb.rst:474 msgid "" "Display the value of the expression if it changed, each time execution stops " "in the current frame." msgstr "" -#: ../../library/pdb.rst:468 +#: ../../library/pdb.rst:477 msgid "Without expression, list all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:474 +#: ../../library/pdb.rst:483 msgid "" "Do not display the expression any more in the current frame. Without " "expression, clear all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:481 +#: ../../library/pdb.rst:490 msgid "" "Start an interactive interpreter (using the :mod:`code` module) whose global " "namespace contains all the (global and local) names found in the current " "scope." msgstr "" -#: ../../library/pdb.rst:491 +#: ../../library/pdb.rst:500 msgid "" "Create an alias called *name* that executes *command*. The command must " -"*not* be enclosed in quotes. Replaceable parameters can be indicated by ``" -"%1``, ``%2``, and so on, while ``%*`` is replaced by all the parameters. If " -"no command is given, the current alias for *name* is shown. If no arguments " -"are given, all aliases are listed." +"*not* be enclosed in quotes. Replaceable parameters can be indicated by " +"``%1``, ``%2``, and so on, while ``%*`` is replaced by all the parameters. " +"If no command is given, the current alias for *name* is shown. If no " +"arguments are given, all aliases are listed." msgstr "" -#: ../../library/pdb.rst:497 +#: ../../library/pdb.rst:506 msgid "" "Aliases may be nested and can contain anything that can be legally typed at " "the pdb prompt. Note that internal pdb commands *can* be overridden by " @@ -589,17 +609,17 @@ msgid "" "other words in the line are left alone." msgstr "" -#: ../../library/pdb.rst:503 +#: ../../library/pdb.rst:512 msgid "" "As an example, here are two useful aliases (especially when placed in the :" "file:`.pdbrc` file)::" msgstr "" -#: ../../library/pdb.rst:513 +#: ../../library/pdb.rst:522 msgid "Delete the specified alias." msgstr "" -#: ../../library/pdb.rst:517 +#: ../../library/pdb.rst:526 msgid "" "Execute the (one-line) *statement* in the context of the current stack " "frame. The exclamation point can be omitted unless the first word of the " @@ -608,7 +628,7 @@ msgid "" "line, e.g.::" msgstr "" -#: ../../library/pdb.rst:529 +#: ../../library/pdb.rst:538 msgid "" "Restart the debugged Python program. If an argument is supplied, it is " "split with :mod:`shlex` and the result is used as the new :data:`sys.argv`. " @@ -616,25 +636,25 @@ msgid "" "`restart` is an alias for :pdbcmd:`run`." msgstr "" -#: ../../library/pdb.rst:536 +#: ../../library/pdb.rst:545 msgid "Quit from the debugger. The program being executed is aborted." msgstr "" -#: ../../library/pdb.rst:540 +#: ../../library/pdb.rst:549 msgid "" "Enter a recursive debugger that steps through the code argument (which is an " "arbitrary expression or statement to be executed in the current environment)." msgstr "" -#: ../../library/pdb.rst:546 +#: ../../library/pdb.rst:555 msgid "Print the return value for the last return of a function." msgstr "" -#: ../../library/pdb.rst:549 +#: ../../library/pdb.rst:558 msgid "Footnotes" msgstr "註解" -#: ../../library/pdb.rst:550 +#: ../../library/pdb.rst:559 msgid "" "Whether a frame is considered to originate in a certain module is determined " "by the ``__name__`` in the frame globals." diff --git a/library/sqlite3.po b/library/sqlite3.po index 33d08f519e..5b7394ed50 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-19 00:17+0000\n" +"POT-Creation-Date: 2023-02-02 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -236,7 +236,7 @@ msgstr ":ref:`sqlite3-adapters`" msgid ":ref:`sqlite3-converters`" msgstr ":ref:`sqlite3-converters`" -#: ../../library/sqlite3.rst:241 ../../library/sqlite3.rst:554 +#: ../../library/sqlite3.rst:241 ../../library/sqlite3.rst:557 msgid ":ref:`sqlite3-connection-context-manager`" msgstr ":ref:`sqlite3-connection-context-manager`" @@ -303,24 +303,26 @@ msgstr "" #: ../../library/sqlite3.rst:301 msgid "" -"If ``True`` (default), only the creating thread may use the connection. If " -"``False``, the connection may be shared across multiple threads; if so, " -"write operations should be serialized by the user to avoid data corruption." +"If ``True`` (default), :exc:`ProgrammingError` will be raised if the " +"database connection is used by a thread other than the one that created it. " +"If ``False``, the connection may be accessed in multiple threads; write " +"operations may need to be serialized by the user to avoid data corruption. " +"See :attr:`threadsafety` for more information." msgstr "" -#: ../../library/sqlite3.rst:307 +#: ../../library/sqlite3.rst:310 msgid "" "A custom subclass of :class:`Connection` to create the connection with, if " "not the default :class:`Connection` class." msgstr "" -#: ../../library/sqlite3.rst:311 +#: ../../library/sqlite3.rst:314 msgid "" "The number of statements that :mod:`!sqlite3` should internally cache for " "this connection, to avoid parsing overhead. By default, 128 statements." msgstr "" -#: ../../library/sqlite3.rst:316 +#: ../../library/sqlite3.rst:319 msgid "" "If set to ``True``, *database* is interpreted as a :abbr:`URI (Uniform " "Resource Identifier)` with a file path and an optional query string. The " @@ -333,32 +335,32 @@ msgstr "" msgid "Return type" msgstr "" -#: ../../library/sqlite3.rst:64 +#: ../../library/sqlite3.rst:67 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect`` with argument " "``database``." msgstr "" -#: ../../library/sqlite3.rst:65 +#: ../../library/sqlite3.rst:68 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.connect/handle`` with " "argument ``connection_handle``." msgstr "" -#: ../../library/sqlite3.rst:330 +#: ../../library/sqlite3.rst:333 msgid "The *uri* parameter." msgstr "*uri* 參數。" -#: ../../library/sqlite3.rst:333 +#: ../../library/sqlite3.rst:336 msgid "" "*database* can now also be a :term:`path-like object`, not only a string." msgstr "" -#: ../../library/sqlite3.rst:336 +#: ../../library/sqlite3.rst:339 msgid "The ``sqlite3.connect/handle`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:341 +#: ../../library/sqlite3.rst:344 msgid "" "Return ``True`` if the string *statement* appears to contain one or more " "complete SQL statements. No syntactic verification or parsing of any kind is " @@ -366,18 +368,18 @@ msgid "" "and the statement is terminated by a semicolon." msgstr "" -#: ../../library/sqlite3.rst:347 +#: ../../library/sqlite3.rst:350 msgid "For example:" msgstr "範例:" -#: ../../library/sqlite3.rst:356 +#: ../../library/sqlite3.rst:359 msgid "" "This function may be useful during command-line input to determine if the " "entered text seems to form a complete SQL statement, or if additional input " "is needed before calling :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:362 +#: ../../library/sqlite3.rst:365 msgid "" "Enable or disable callback tracebacks. By default you will not get any " "tracebacks in user-defined functions, aggregates, converters, authorizer " @@ -386,13 +388,13 @@ msgid "" "on :data:`sys.stderr`. Use ``False`` to disable the feature again." msgstr "" -#: ../../library/sqlite3.rst:369 +#: ../../library/sqlite3.rst:372 msgid "" "Register an :func:`unraisable hook handler ` for an " "improved debug experience:" msgstr "" -#: ../../library/sqlite3.rst:394 +#: ../../library/sqlite3.rst:397 msgid "" "Register an *adapter* callable to adapt the Python type *type* into an " "SQLite type. The adapter is called with a Python object of type *type* as " @@ -400,7 +402,7 @@ msgid "" "natively understands `." msgstr "" -#: ../../library/sqlite3.rst:402 +#: ../../library/sqlite3.rst:405 msgid "" "Register the *converter* callable to convert SQLite objects of type " "*typename* into a Python object of a specific type. The converter is invoked " @@ -410,17 +412,17 @@ msgid "" "type detection works." msgstr "" -#: ../../library/sqlite3.rst:410 +#: ../../library/sqlite3.rst:413 msgid "" "Note: *typename* and the name of the type in your query are matched case-" "insensitively." msgstr "" -#: ../../library/sqlite3.rst:417 +#: ../../library/sqlite3.rst:420 msgid "Module constants" msgstr "" -#: ../../library/sqlite3.rst:421 +#: ../../library/sqlite3.rst:424 msgid "" "Pass this flag value to the *detect_types* parameter of :func:`connect` to " "look up a converter function by using the type name, parsed from the query " @@ -428,13 +430,13 @@ msgid "" "in square brackets (``[]``)." msgstr "" -#: ../../library/sqlite3.rst:431 +#: ../../library/sqlite3.rst:434 msgid "" "This flag may be combined with :const:`PARSE_DECLTYPES` using the ``|`` " "(bitwise or) operator." msgstr "" -#: ../../library/sqlite3.rst:436 +#: ../../library/sqlite3.rst:439 msgid "" "Pass this flag value to the *detect_types* parameter of :func:`connect` to " "look up a converter function using the declared types for each column. The " @@ -443,61 +445,61 @@ msgid "" "the converter dictionary key. For example:" msgstr "" -#: ../../library/sqlite3.rst:452 +#: ../../library/sqlite3.rst:455 msgid "" "This flag may be combined with :const:`PARSE_COLNAMES` using the ``|`` " "(bitwise or) operator." msgstr "" -#: ../../library/sqlite3.rst:459 +#: ../../library/sqlite3.rst:462 msgid "" "Flags that should be returned by the *authorizer_callback* callable passed " "to :meth:`Connection.set_authorizer`, to indicate whether:" msgstr "" -#: ../../library/sqlite3.rst:462 +#: ../../library/sqlite3.rst:465 msgid "Access is allowed (:const:`!SQLITE_OK`)," msgstr "" -#: ../../library/sqlite3.rst:463 +#: ../../library/sqlite3.rst:466 msgid "" "The SQL statement should be aborted with an error (:const:`!SQLITE_DENY`)" msgstr "" -#: ../../library/sqlite3.rst:464 +#: ../../library/sqlite3.rst:467 msgid "" "The column should be treated as a ``NULL`` value (:const:`!SQLITE_IGNORE`)" msgstr "" -#: ../../library/sqlite3.rst:468 +#: ../../library/sqlite3.rst:471 msgid "" "String constant stating the supported DB-API level. Required by the DB-API. " "Hard-coded to ``\"2.0\"``." msgstr "" -#: ../../library/sqlite3.rst:473 +#: ../../library/sqlite3.rst:476 msgid "" "String constant stating the type of parameter marker formatting expected by " "the :mod:`!sqlite3` module. Required by the DB-API. Hard-coded to " "``\"qmark\"``." msgstr "" -#: ../../library/sqlite3.rst:479 +#: ../../library/sqlite3.rst:482 msgid "The ``named`` DB-API parameter style is also supported." msgstr "" -#: ../../library/sqlite3.rst:483 +#: ../../library/sqlite3.rst:486 msgid "" "Version number of the runtime SQLite library as a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:487 +#: ../../library/sqlite3.rst:490 msgid "" "Version number of the runtime SQLite library as a :class:`tuple` of :class:" "`integers `." msgstr "" -#: ../../library/sqlite3.rst:492 +#: ../../library/sqlite3.rst:495 msgid "" "Integer constant required by the DB-API 2.0, stating the level of thread " "safety the :mod:`!sqlite3` module supports. This attribute is set based on " @@ -505,154 +507,154 @@ msgid "" "underlying SQLite library is compiled with. The SQLite threading modes are:" msgstr "" -#: ../../library/sqlite3.rst:497 +#: ../../library/sqlite3.rst:500 msgid "" "**Single-thread**: In this mode, all mutexes are disabled and SQLite is " "unsafe to use in more than a single thread at once." msgstr "" -#: ../../library/sqlite3.rst:499 +#: ../../library/sqlite3.rst:502 msgid "" "**Multi-thread**: In this mode, SQLite can be safely used by multiple " "threads provided that no single database connection is used simultaneously " "in two or more threads." msgstr "" -#: ../../library/sqlite3.rst:502 +#: ../../library/sqlite3.rst:505 msgid "" "**Serialized**: In serialized mode, SQLite can be safely used by multiple " "threads with no restriction." msgstr "" -#: ../../library/sqlite3.rst:505 +#: ../../library/sqlite3.rst:508 msgid "" "The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels " "are as follows:" msgstr "" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:512 msgid "SQLite threading mode" msgstr "" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:512 msgid "`threadsafety`_" msgstr "`threadsafety`_" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:512 msgid "`SQLITE_THREADSAFE`_" msgstr "`SQLITE_THREADSAFE`_" -#: ../../library/sqlite3.rst:509 +#: ../../library/sqlite3.rst:512 msgid "DB-API 2.0 meaning" msgstr "" -#: ../../library/sqlite3.rst:512 +#: ../../library/sqlite3.rst:515 msgid "single-thread" msgstr "" -#: ../../library/sqlite3.rst:512 +#: ../../library/sqlite3.rst:515 msgid "0" msgstr "0" -#: ../../library/sqlite3.rst:512 +#: ../../library/sqlite3.rst:515 msgid "Threads may not share the module" msgstr "" -#: ../../library/sqlite3.rst:515 +#: ../../library/sqlite3.rst:518 msgid "multi-thread" msgstr "" -#: ../../library/sqlite3.rst:515 ../../library/sqlite3.rst:518 +#: ../../library/sqlite3.rst:518 ../../library/sqlite3.rst:521 msgid "1" msgstr "1" -#: ../../library/sqlite3.rst:515 +#: ../../library/sqlite3.rst:518 msgid "2" msgstr "2" -#: ../../library/sqlite3.rst:515 +#: ../../library/sqlite3.rst:518 msgid "Threads may share the module, but not connections" msgstr "" -#: ../../library/sqlite3.rst:518 +#: ../../library/sqlite3.rst:521 msgid "serialized" msgstr "" -#: ../../library/sqlite3.rst:518 +#: ../../library/sqlite3.rst:521 msgid "3" msgstr "3" -#: ../../library/sqlite3.rst:518 +#: ../../library/sqlite3.rst:521 msgid "Threads may share the module, connections and cursors" msgstr "" -#: ../../library/sqlite3.rst:525 +#: ../../library/sqlite3.rst:528 msgid "Set *threadsafety* dynamically instead of hard-coding it to ``1``." msgstr "" -#: ../../library/sqlite3.rst:530 +#: ../../library/sqlite3.rst:533 msgid "" "Version number of this module as a :class:`string `. This is not the " "version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:535 +#: ../../library/sqlite3.rst:538 msgid "" "Version number of this module as a :class:`tuple` of :class:`integers " "`. This is not the version of the SQLite library." msgstr "" -#: ../../library/sqlite3.rst:542 +#: ../../library/sqlite3.rst:545 msgid "Connection objects" msgstr "" -#: ../../library/sqlite3.rst:546 +#: ../../library/sqlite3.rst:549 msgid "" "Each open SQLite database is represented by a ``Connection`` object, which " "is created using :func:`sqlite3.connect`. Their main purpose is creating :" "class:`Cursor` objects, and :ref:`sqlite3-controlling-transactions`." msgstr "" -#: ../../library/sqlite3.rst:553 +#: ../../library/sqlite3.rst:556 msgid ":ref:`sqlite3-connection-shortcuts`" msgstr ":ref:`sqlite3-connection-shortcuts`" -#: ../../library/sqlite3.rst:556 +#: ../../library/sqlite3.rst:559 msgid "An SQLite database connection has the following attributes and methods:" msgstr "" -#: ../../library/sqlite3.rst:560 +#: ../../library/sqlite3.rst:563 msgid "" "Create and return a :class:`Cursor` object. The cursor method accepts a " "single optional parameter *factory*. If supplied, this must be a callable " "returning an instance of :class:`Cursor` or its subclasses." msgstr "" -#: ../../library/sqlite3.rst:567 +#: ../../library/sqlite3.rst:570 msgid "" "Open a :class:`Blob` handle to an existing :abbr:`BLOB (Binary Large " "OBject)`." msgstr "" -#: ../../library/sqlite3.rst:570 +#: ../../library/sqlite3.rst:573 msgid "The name of the table where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:573 +#: ../../library/sqlite3.rst:576 msgid "The name of the column where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:576 +#: ../../library/sqlite3.rst:579 msgid "The name of the row where the blob is located." msgstr "" -#: ../../library/sqlite3.rst:579 +#: ../../library/sqlite3.rst:582 msgid "" "Set to ``True`` if the blob should be opened without write permissions. " "Defaults to ``False``." msgstr "" -#: ../../library/sqlite3.rst:584 +#: ../../library/sqlite3.rst:587 msgid "" "The name of the database where the blob is located. Defaults to ``\"main\"``." msgstr "" @@ -661,111 +663,111 @@ msgstr "" msgid "Raises" msgstr "" -#: ../../library/sqlite3.rst:588 +#: ../../library/sqlite3.rst:591 msgid "When trying to open a blob in a ``WITHOUT ROWID`` table." msgstr "" -#: ../../library/sqlite3.rst:595 +#: ../../library/sqlite3.rst:598 msgid "" "The blob size cannot be changed using the :class:`Blob` class. Use the SQL " "function ``zeroblob`` to create a blob with a fixed size." msgstr "" -#: ../../library/sqlite3.rst:602 +#: ../../library/sqlite3.rst:605 msgid "" "Commit any pending transaction to the database. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:607 +#: ../../library/sqlite3.rst:610 msgid "" "Roll back to the start of any pending transaction. If there is no open " "transaction, this method is a no-op." msgstr "" -#: ../../library/sqlite3.rst:612 +#: ../../library/sqlite3.rst:615 msgid "" "Close the database connection. Any pending transaction is not committed " "implicitly; make sure to :meth:`commit` before closing to avoid losing " "pending changes." msgstr "" -#: ../../library/sqlite3.rst:619 +#: ../../library/sqlite3.rst:622 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " "with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:625 +#: ../../library/sqlite3.rst:628 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " "it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:631 +#: ../../library/sqlite3.rst:634 msgid "" "Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " "on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:637 +#: ../../library/sqlite3.rst:640 msgid "Create or remove a user-defined SQL function." msgstr "" -#: ../../library/sqlite3.rst:639 +#: ../../library/sqlite3.rst:642 msgid "The name of the SQL function." msgstr "" -#: ../../library/sqlite3.rst:642 +#: ../../library/sqlite3.rst:645 msgid "" "The number of arguments the SQL function can accept. If ``-1``, it may take " "any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:646 +#: ../../library/sqlite3.rst:649 msgid "" "A callable that is called when the SQL function is invoked. The callable " "must return :ref:`a type natively supported by SQLite `. Set " "to ``None`` to remove an existing SQL function." msgstr "" -#: ../../library/sqlite3.rst:653 +#: ../../library/sqlite3.rst:656 msgid "" "If ``True``, the created SQL function is marked as `deterministic `_, which allows SQLite to perform additional " "optimizations." msgstr "" -#: ../../library/sqlite3.rst:658 +#: ../../library/sqlite3.rst:661 msgid "If *deterministic* is used with SQLite versions older than 3.8.3." msgstr "" -#: ../../library/sqlite3.rst:661 +#: ../../library/sqlite3.rst:664 msgid "The *deterministic* parameter." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:664 ../../library/sqlite3.rst:702 -#: ../../library/sqlite3.rst:765 ../../library/sqlite3.rst:1016 -#: ../../library/sqlite3.rst:1253 ../../library/sqlite3.rst:1359 -#: ../../library/sqlite3.rst:1380 +#: ../../library/sqlite3.rst:667 ../../library/sqlite3.rst:705 +#: ../../library/sqlite3.rst:768 ../../library/sqlite3.rst:1019 +#: ../../library/sqlite3.rst:1256 ../../library/sqlite3.rst:1362 +#: ../../library/sqlite3.rst:1383 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:680 +#: ../../library/sqlite3.rst:683 msgid "Create or remove a user-defined SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:682 +#: ../../library/sqlite3.rst:685 msgid "The name of the SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:685 +#: ../../library/sqlite3.rst:688 msgid "" "The number of arguments the SQL aggregate function can accept. If ``-1``, it " "may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:689 +#: ../../library/sqlite3.rst:692 msgid "" "A class must implement the following methods: * ``step()``: Add a row to " "the aggregate. * ``finalize()``: Return the final result of the aggregate " @@ -774,45 +776,45 @@ msgid "" "*n_arg*. Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:690 +#: ../../library/sqlite3.rst:693 msgid "A class must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:692 +#: ../../library/sqlite3.rst:695 msgid "``step()``: Add a row to the aggregate." msgstr "" -#: ../../library/sqlite3.rst:693 ../../library/sqlite3.rst:749 +#: ../../library/sqlite3.rst:696 ../../library/sqlite3.rst:752 msgid "" "``finalize()``: Return the final result of the aggregate as :ref:`a type " "natively supported by SQLite `." msgstr "" -#: ../../library/sqlite3.rst:696 +#: ../../library/sqlite3.rst:699 msgid "" "The number of arguments that the ``step()`` method must accept is controlled " "by *n_arg*." msgstr "" -#: ../../library/sqlite3.rst:699 +#: ../../library/sqlite3.rst:702 msgid "Set to ``None`` to remove an existing SQL aggregate function." msgstr "" -#: ../../library/sqlite3.rst:734 +#: ../../library/sqlite3.rst:737 msgid "Create or remove a user-defined aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:736 +#: ../../library/sqlite3.rst:739 msgid "The name of the SQL aggregate window function to create or remove." msgstr "" -#: ../../library/sqlite3.rst:739 +#: ../../library/sqlite3.rst:742 msgid "" "The number of arguments the SQL aggregate window function can accept. If " "``-1``, it may take any number of arguments." msgstr "" -#: ../../library/sqlite3.rst:743 +#: ../../library/sqlite3.rst:746 msgid "" "A class that must implement the following methods: * ``step()``: Add a row " "to the current window. * ``value()``: Return the current value of the " @@ -824,78 +826,78 @@ msgid "" "function." msgstr "" -#: ../../library/sqlite3.rst:744 +#: ../../library/sqlite3.rst:747 msgid "A class that must implement the following methods:" msgstr "" -#: ../../library/sqlite3.rst:746 +#: ../../library/sqlite3.rst:749 msgid "``step()``: Add a row to the current window." msgstr "" -#: ../../library/sqlite3.rst:747 +#: ../../library/sqlite3.rst:750 msgid "``value()``: Return the current value of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:748 +#: ../../library/sqlite3.rst:751 msgid "``inverse()``: Remove a row from the current window." msgstr "" -#: ../../library/sqlite3.rst:752 +#: ../../library/sqlite3.rst:755 msgid "" "The number of arguments that the ``step()`` and ``value()`` methods must " "accept is controlled by *num_params*." msgstr "" -#: ../../library/sqlite3.rst:755 +#: ../../library/sqlite3.rst:758 msgid "Set to ``None`` to remove an existing SQL aggregate window function." msgstr "" -#: ../../library/sqlite3.rst:757 +#: ../../library/sqlite3.rst:760 msgid "" "If used with a version of SQLite older than 3.25.0, which does not support " "aggregate window functions." msgstr "" -#: ../../library/sqlite3.rst:820 +#: ../../library/sqlite3.rst:823 msgid "" "Create a collation named *name* using the collating function *callable*. " "*callable* is passed two :class:`string ` arguments, and it should " "return an :class:`integer `:" msgstr "" -#: ../../library/sqlite3.rst:824 +#: ../../library/sqlite3.rst:827 msgid "``1`` if the first is ordered higher than the second" msgstr "" -#: ../../library/sqlite3.rst:825 +#: ../../library/sqlite3.rst:828 msgid "``-1`` if the first is ordered lower than the second" msgstr "" -#: ../../library/sqlite3.rst:826 +#: ../../library/sqlite3.rst:829 msgid "``0`` if they are ordered equal" msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:831 msgid "The following example shows a reverse sorting collation:" msgstr "" -#: ../../library/sqlite3.rst:856 +#: ../../library/sqlite3.rst:859 msgid "Remove a collation function by setting *callable* to ``None``." msgstr "" -#: ../../library/sqlite3.rst:858 +#: ../../library/sqlite3.rst:861 msgid "" "The collation name can contain any Unicode character. Earlier, only ASCII " "characters were allowed." msgstr "" -#: ../../library/sqlite3.rst:865 +#: ../../library/sqlite3.rst:868 msgid "" "Call this method from a different thread to abort any queries that might be " "executing on the connection. Aborted queries will raise an exception." msgstr "" -#: ../../library/sqlite3.rst:872 +#: ../../library/sqlite3.rst:875 msgid "" "Register callable *authorizer_callback* to be invoked for each attempt to " "access a column of a table in the database. The callback should return one " @@ -904,7 +906,7 @@ msgid "" "library." msgstr "" -#: ../../library/sqlite3.rst:878 +#: ../../library/sqlite3.rst:881 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or ``None`` " @@ -914,7 +916,7 @@ msgid "" "attempt or ``None`` if this access attempt is directly from input SQL code." msgstr "" -#: ../../library/sqlite3.rst:885 +#: ../../library/sqlite3.rst:888 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -922,15 +924,15 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:889 +#: ../../library/sqlite3.rst:892 msgid "Passing ``None`` as *authorizer_callback* will disable the authorizer." msgstr "" -#: ../../library/sqlite3.rst:891 +#: ../../library/sqlite3.rst:894 msgid "Added support for disabling the authorizer using ``None``." msgstr "" -#: ../../library/sqlite3.rst:897 +#: ../../library/sqlite3.rst:900 msgid "" "Register callable *progress_handler* to be invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -938,26 +940,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:902 +#: ../../library/sqlite3.rst:905 msgid "" "If you want to clear any previously installed progress handler, call the " "method with ``None`` for *progress_handler*." msgstr "" -#: ../../library/sqlite3.rst:905 +#: ../../library/sqlite3.rst:908 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:912 +#: ../../library/sqlite3.rst:915 msgid "" "Register callable *trace_callback* to be invoked for each SQL statement that " "is actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:915 +#: ../../library/sqlite3.rst:918 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -967,18 +969,18 @@ msgid "" "execution of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:923 +#: ../../library/sqlite3.rst:926 msgid "Passing ``None`` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:926 +#: ../../library/sqlite3.rst:929 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:936 +#: ../../library/sqlite3.rst:939 msgid "" "Enable the SQLite engine to load SQLite extensions from shared libraries if " "*enabled* is ``True``; else, disallow loading SQLite extensions. SQLite " @@ -987,7 +989,7 @@ msgid "" "distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:945 +#: ../../library/sqlite3.rst:948 msgid "" "The :mod:`!sqlite3` module is not built with loadable extension support by " "default, because some platforms (notably macOS) have SQLite libraries which " @@ -1002,11 +1004,11 @@ msgid "" "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:956 +#: ../../library/sqlite3.rst:959 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:999 +#: ../../library/sqlite3.rst:1002 msgid "" "Load an SQLite extension from a shared library located at *path*. Enable " "extension loading with :meth:`enable_load_extension` before calling this " @@ -1019,38 +1021,38 @@ msgid "" "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:1007 +#: ../../library/sqlite3.rst:1010 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:1012 +#: ../../library/sqlite3.rst:1015 msgid "" "Return an :term:`iterator` to dump the database as SQL source code. Useful " "when saving an in-memory database for later restoration. Similar to the ``." "dump`` command in the :program:`sqlite3` shell." msgstr "" -#: ../../library/sqlite3.rst:1030 +#: ../../library/sqlite3.rst:1033 msgid "Create a backup of an SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1032 +#: ../../library/sqlite3.rst:1035 msgid "" "Works even if the database is being accessed by other clients or " "concurrently by the same connection." msgstr "" -#: ../../library/sqlite3.rst:1035 +#: ../../library/sqlite3.rst:1038 msgid "The database connection to save the backup to." msgstr "" -#: ../../library/sqlite3.rst:1038 +#: ../../library/sqlite3.rst:1041 msgid "" "The number of pages to copy at a time. If equal to or less than ``0``, the " "entire database is copied in a single step. Defaults to ``-1``." msgstr "" -#: ../../library/sqlite3.rst:1044 +#: ../../library/sqlite3.rst:1047 msgid "" "If set to a callable, it is invoked with three integer arguments for every " "backup iteration: the *status* of the last iteration, the *remaining* number " @@ -1058,46 +1060,46 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1053 +#: ../../library/sqlite3.rst:1056 msgid "" "The name of the database to back up. Either ``\"main\"`` (the default) for " "the main database, ``\"temp\"`` for the temporary database, or the name of a " "custom database as attached using the ``ATTACH DATABASE`` SQL statement." msgstr "" -#: ../../library/sqlite3.rst:1060 +#: ../../library/sqlite3.rst:1063 msgid "" "The number of seconds to sleep between successive attempts to back up " "remaining pages." msgstr "" -#: ../../library/sqlite3.rst:1064 +#: ../../library/sqlite3.rst:1067 msgid "Example 1, copy an existing database into another:" msgstr "" -#: ../../library/sqlite3.rst:1083 +#: ../../library/sqlite3.rst:1086 msgid "Example 2, copy an existing database into a transient copy:" msgstr "" -#: ../../library/sqlite3.rst:1095 +#: ../../library/sqlite3.rst:1098 msgid "Get a connection runtime limit." msgstr "" -#: ../../library/sqlite3.rst:1097 +#: ../../library/sqlite3.rst:1100 msgid "The `SQLite limit category`_ to be queried." msgstr "" -#: ../../library/sqlite3.rst:1102 ../../library/sqlite3.rst:1139 +#: ../../library/sqlite3.rst:1105 ../../library/sqlite3.rst:1142 msgid "If *category* is not recognised by the underlying SQLite library." msgstr "" -#: ../../library/sqlite3.rst:1105 +#: ../../library/sqlite3.rst:1108 msgid "" "Example, query the maximum length of an SQL statement for :class:" "`Connection` ``con`` (the default is 1000000000):" msgstr "" -#: ../../library/sqlite3.rst:1125 +#: ../../library/sqlite3.rst:1128 msgid "" "Set a connection runtime limit. Attempts to increase a limit above its hard " "upper bound are silently truncated to the hard upper bound. Regardless of " @@ -1105,22 +1107,22 @@ msgid "" "returned." msgstr "" -#: ../../library/sqlite3.rst:1130 +#: ../../library/sqlite3.rst:1133 msgid "The `SQLite limit category`_ to be set." msgstr "" -#: ../../library/sqlite3.rst:1133 +#: ../../library/sqlite3.rst:1136 msgid "" "The value of the new limit. If negative, the current limit is unchanged." msgstr "" -#: ../../library/sqlite3.rst:1142 +#: ../../library/sqlite3.rst:1145 msgid "" "Example, limit the number of attached databases to 1 for :class:`Connection` " "``con`` (the default limit is 10):" msgstr "" -#: ../../library/sqlite3.rst:1159 +#: ../../library/sqlite3.rst:1162 msgid "" "Serialize a database into a :class:`bytes` object. For an ordinary on-disk " "database file, the serialization is just a copy of the disk file. For an in-" @@ -1129,17 +1131,17 @@ msgid "" "backed up to disk." msgstr "" -#: ../../library/sqlite3.rst:1165 +#: ../../library/sqlite3.rst:1168 msgid "The database name to be serialized. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1173 +#: ../../library/sqlite3.rst:1176 msgid "" "This method is only available if the underlying SQLite library has the " "serialize API." msgstr "" -#: ../../library/sqlite3.rst:1181 +#: ../../library/sqlite3.rst:1184 msgid "" "Deserialize a :meth:`serialized ` database into a :class:" "`Connection`. This method causes the database connection to disconnect from " @@ -1147,47 +1149,47 @@ msgid "" "serialization contained in *data*." msgstr "" -#: ../../library/sqlite3.rst:1187 +#: ../../library/sqlite3.rst:1190 msgid "A serialized database." msgstr "" -#: ../../library/sqlite3.rst:1190 +#: ../../library/sqlite3.rst:1193 msgid "The database name to deserialize into. Defaults to ``\"main\"``." msgstr "" -#: ../../library/sqlite3.rst:1194 +#: ../../library/sqlite3.rst:1197 msgid "" "If the database connection is currently involved in a read transaction or a " "backup operation." msgstr "" -#: ../../library/sqlite3.rst:1198 +#: ../../library/sqlite3.rst:1201 msgid "If *data* does not contain a valid SQLite database." msgstr "" -#: ../../library/sqlite3.rst:1201 +#: ../../library/sqlite3.rst:1204 msgid "If :func:`len(data) ` is larger than ``2**63 - 1``." msgstr "" -#: ../../library/sqlite3.rst:1206 +#: ../../library/sqlite3.rst:1209 msgid "" "This method is only available if the underlying SQLite library has the " "deserialize API." msgstr "" -#: ../../library/sqlite3.rst:1213 +#: ../../library/sqlite3.rst:1216 msgid "" "This read-only attribute corresponds to the low-level SQLite `autocommit " "mode`_." msgstr "" -#: ../../library/sqlite3.rst:1216 +#: ../../library/sqlite3.rst:1219 msgid "" "``True`` if a transaction is active (there are uncommitted changes), " "``False`` otherwise." msgstr "" -#: ../../library/sqlite3.rst:1223 +#: ../../library/sqlite3.rst:1226 msgid "" "This attribute controls the :ref:`transaction handling ` performed by :mod:`!sqlite3`. If set to ``None``, " @@ -1197,13 +1199,13 @@ msgid "" "` is performed." msgstr "" -#: ../../library/sqlite3.rst:1231 +#: ../../library/sqlite3.rst:1234 msgid "" "If not overridden by the *isolation_level* parameter of :func:`connect`, the " "default is ``\"\"``, which is an alias for ``\"DEFERRED\"``." msgstr "" -#: ../../library/sqlite3.rst:1236 +#: ../../library/sqlite3.rst:1239 msgid "" "The initial :attr:`~Cursor.row_factory` for :class:`Cursor` objects created " "from this connection. Assigning to this attribute does not affect the :attr:" @@ -1212,12 +1214,12 @@ msgid "" "`tuple`." msgstr "" -#: ../../library/sqlite3.rst:1243 ../../library/sqlite3.rst:1504 -#: ../../library/sqlite3.rst:1527 +#: ../../library/sqlite3.rst:1246 ../../library/sqlite3.rst:1507 +#: ../../library/sqlite3.rst:1530 msgid "See :ref:`sqlite3-howto-row-factory` for more details." msgstr "" -#: ../../library/sqlite3.rst:1247 +#: ../../library/sqlite3.rst:1250 msgid "" "A callable that accepts a :class:`bytes` parameter and returns a text " "representation of it. The callable is invoked for SQLite values with the " @@ -1225,17 +1227,17 @@ msgid "" "you want to return ``bytes`` instead, set *text_factory* to ``bytes``." msgstr "" -#: ../../library/sqlite3.rst:1287 +#: ../../library/sqlite3.rst:1290 msgid "" "Return the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:1294 +#: ../../library/sqlite3.rst:1297 msgid "Cursor objects" msgstr "" -#: ../../library/sqlite3.rst:1296 +#: ../../library/sqlite3.rst:1299 msgid "" "A ``Cursor`` object represents a `database cursor`_ which is used to execute " "SQL statements, and manage the context of a fetch operation. Cursors are " @@ -1243,25 +1245,25 @@ msgid "" "`connection shortcut methods `." msgstr "" -#: ../../library/sqlite3.rst:1303 +#: ../../library/sqlite3.rst:1306 msgid "" "Cursor objects are :term:`iterators `, meaning that if you :meth:" "`~Cursor.execute` a ``SELECT`` query, you can simply iterate over the cursor " "to fetch the resulting rows:" msgstr "" -#: ../../library/sqlite3.rst:1328 +#: ../../library/sqlite3.rst:1331 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:1335 +#: ../../library/sqlite3.rst:1338 msgid "" "Execute SQL statement *sql*. Bind values to the statement using :ref:" "`placeholders ` that map to the :term:`sequence` or :" "class:`dict` *parameters*." msgstr "" -#: ../../library/sqlite3.rst:1340 +#: ../../library/sqlite3.rst:1343 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:" @@ -1269,7 +1271,7 @@ msgid "" "multiple SQL statements with one call." msgstr "" -#: ../../library/sqlite3.rst:1345 +#: ../../library/sqlite3.rst:1348 msgid "" "If :attr:`~Connection.isolation_level` is not ``None``, *sql* is an " "``INSERT``, ``UPDATE``, ``DELETE``, or ``REPLACE`` statement, and there is " @@ -1277,7 +1279,7 @@ msgid "" "*sql*." msgstr "" -#: ../../library/sqlite3.rst:1353 +#: ../../library/sqlite3.rst:1356 msgid "" "Execute :ref:`parameterized ` SQL statement *sql* " "against all parameter sequences or mappings found in the sequence " @@ -1286,7 +1288,7 @@ msgid "" "handling as :meth:`~Cursor.execute`." msgstr "" -#: ../../library/sqlite3.rst:1372 +#: ../../library/sqlite3.rst:1375 msgid "" "Execute the SQL statements in *sql_script*. If there is a pending " "transaction, an implicit ``COMMIT`` statement is executed first. No other " @@ -1294,24 +1296,24 @@ msgid "" "added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:1378 +#: ../../library/sqlite3.rst:1381 msgid "*sql_script* must be a :class:`string `." msgstr "" -#: ../../library/sqlite3.rst:1396 +#: ../../library/sqlite3.rst:1399 msgid "" "If :attr:`~Cursor.row_factory` is ``None``, return the next row query result " "set as a :class:`tuple`. Else, pass it to the row factory and return its " "result. Return ``None`` if no more data is available." msgstr "" -#: ../../library/sqlite3.rst:1404 +#: ../../library/sqlite3.rst:1407 msgid "" "Return the next set of rows of a query result as a :class:`list`. Return an " "empty list if no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:1407 +#: ../../library/sqlite3.rst:1410 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If *size* is not given, :attr:`arraysize` determines the number of rows to " @@ -1319,7 +1321,7 @@ msgid "" "available are returned." msgstr "" -#: ../../library/sqlite3.rst:1413 +#: ../../library/sqlite3.rst:1416 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -1327,36 +1329,36 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:1420 +#: ../../library/sqlite3.rst:1423 msgid "" "Return all (remaining) rows of a query result as a :class:`list`. Return an " "empty list if no rows are available. Note that the :attr:`arraysize` " "attribute can affect the performance of this operation." msgstr "" -#: ../../library/sqlite3.rst:1427 +#: ../../library/sqlite3.rst:1430 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:1429 +#: ../../library/sqlite3.rst:1432 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:1434 ../../library/sqlite3.rst:1438 +#: ../../library/sqlite3.rst:1437 ../../library/sqlite3.rst:1441 msgid "Required by the DB-API. Does nothing in :mod:`!sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:1442 +#: ../../library/sqlite3.rst:1445 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:1447 +#: ../../library/sqlite3.rst:1450 msgid "" "Read-only attribute that provides the SQLite database :class:`Connection` " "belonging to the cursor. A :class:`Cursor` object created by calling :meth:" @@ -1364,18 +1366,18 @@ msgid "" "that refers to *con*:" msgstr "" -#: ../../library/sqlite3.rst:1461 +#: ../../library/sqlite3.rst:1464 msgid "" "Read-only attribute that provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are ``None``." msgstr "" -#: ../../library/sqlite3.rst:1465 +#: ../../library/sqlite3.rst:1468 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:1469 +#: ../../library/sqlite3.rst:1472 msgid "" "Read-only attribute that provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -1385,15 +1387,15 @@ msgid "" "``None``." msgstr "" -#: ../../library/sqlite3.rst:1477 +#: ../../library/sqlite3.rst:1480 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:1479 +#: ../../library/sqlite3.rst:1482 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:1484 +#: ../../library/sqlite3.rst:1487 msgid "" "Read-only attribute that provides the number of modified rows for " "``INSERT``, ``UPDATE``, ``DELETE``, and ``REPLACE`` statements; is ``-1`` " @@ -1402,7 +1404,7 @@ msgid "" "methods." msgstr "" -#: ../../library/sqlite3.rst:1492 +#: ../../library/sqlite3.rst:1495 msgid "" "Control how a row fetched from this :class:`!Cursor` is represented. If " "``None``, a row is represented as a :class:`tuple`. Can be set to the " @@ -1411,18 +1413,18 @@ msgid "" "and returns a custom object representing an SQLite row." msgstr "" -#: ../../library/sqlite3.rst:1499 +#: ../../library/sqlite3.rst:1502 msgid "" "Defaults to what :attr:`Connection.row_factory` was set to when the :class:`!" "Cursor` was created. Assigning to this attribute does not affect :attr:" "`Connection.row_factory` of the parent connection." msgstr "" -#: ../../library/sqlite3.rst:1515 +#: ../../library/sqlite3.rst:1518 msgid "Row objects" msgstr "" -#: ../../library/sqlite3.rst:1519 +#: ../../library/sqlite3.rst:1522 msgid "" "A :class:`!Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It supports iteration, " @@ -1430,28 +1432,28 @@ msgid "" "index." msgstr "" -#: ../../library/sqlite3.rst:1524 +#: ../../library/sqlite3.rst:1527 msgid "" "Two :class:`!Row` objects compare equal if they have identical column names " "and values." msgstr "" -#: ../../library/sqlite3.rst:1531 +#: ../../library/sqlite3.rst:1534 msgid "" "Return a :class:`list` of column names as :class:`strings `. " "Immediately after a query, it is the first member of each tuple in :attr:" "`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:1535 +#: ../../library/sqlite3.rst:1538 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:1542 +#: ../../library/sqlite3.rst:1545 msgid "Blob objects" msgstr "" -#: ../../library/sqlite3.rst:1548 +#: ../../library/sqlite3.rst:1551 msgid "" "A :class:`Blob` instance is a :term:`file-like object` that can read and " "write data in an SQLite :abbr:`BLOB (Binary Large OBject)`. Call :func:" @@ -1459,24 +1461,24 @@ msgid "" "and :term:`slices ` for direct access to the blob data." msgstr "" -#: ../../library/sqlite3.rst:1553 +#: ../../library/sqlite3.rst:1556 msgid "" "Use the :class:`Blob` as a :term:`context manager` to ensure that the blob " "handle is closed after use." msgstr "" -#: ../../library/sqlite3.rst:1583 +#: ../../library/sqlite3.rst:1586 msgid "Close the blob." msgstr "" -#: ../../library/sqlite3.rst:1585 +#: ../../library/sqlite3.rst:1588 msgid "" "The blob will be unusable from this point onward. An :class:`~sqlite3." "Error` (or subclass) exception will be raised if any further operation is " "attempted with the blob." msgstr "" -#: ../../library/sqlite3.rst:1591 +#: ../../library/sqlite3.rst:1594 msgid "" "Read *length* bytes of data from the blob at the current offset position. If " "the end of the blob is reached, the data up to :abbr:`EOF (End of File)` " @@ -1484,18 +1486,18 @@ msgid "" "`~Blob.read` will read until the end of the blob." msgstr "" -#: ../../library/sqlite3.rst:1599 +#: ../../library/sqlite3.rst:1602 msgid "" "Write *data* to the blob at the current offset. This function cannot change " "the blob length. Writing beyond the end of the blob will raise :exc:" "`ValueError`." msgstr "" -#: ../../library/sqlite3.rst:1605 +#: ../../library/sqlite3.rst:1608 msgid "Return the current access position of the blob." msgstr "" -#: ../../library/sqlite3.rst:1609 +#: ../../library/sqlite3.rst:1612 msgid "" "Set the current access position of the blob to *offset*. The *origin* " "argument defaults to :data:`os.SEEK_SET` (absolute blob positioning). Other " @@ -1503,26 +1505,26 @@ msgid "" "position) and :data:`os.SEEK_END` (seek relative to the blob’s end)." msgstr "" -#: ../../library/sqlite3.rst:1617 +#: ../../library/sqlite3.rst:1620 msgid "PrepareProtocol objects" msgstr "" -#: ../../library/sqlite3.rst:1621 +#: ../../library/sqlite3.rst:1624 msgid "" "The PrepareProtocol type's single purpose is to act as a :pep:`246` style " "adaption protocol for objects that can :ref:`adapt themselves ` to :ref:`native SQLite types `." msgstr "" -#: ../../library/sqlite3.rst:1629 +#: ../../library/sqlite3.rst:1632 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:1631 +#: ../../library/sqlite3.rst:1634 msgid "The exception hierarchy is defined by the DB-API 2.0 (:pep:`249`)." msgstr "" -#: ../../library/sqlite3.rst:1635 +#: ../../library/sqlite3.rst:1638 msgid "" "This exception is not currently raised by the :mod:`!sqlite3` module, but " "may be raised by applications using :mod:`!sqlite3`, for example if a user-" @@ -1530,39 +1532,39 @@ msgid "" "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1642 +#: ../../library/sqlite3.rst:1645 msgid "" "The base class of the other exceptions in this module. Use this to catch all " "errors with one single :keyword:`except` statement. ``Error`` is a subclass " "of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:1646 +#: ../../library/sqlite3.rst:1649 msgid "" "If the exception originated from within the SQLite library, the following " "two attributes are added to the exception:" msgstr "" -#: ../../library/sqlite3.rst:1651 +#: ../../library/sqlite3.rst:1654 msgid "" "The numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1658 +#: ../../library/sqlite3.rst:1661 msgid "" "The symbolic name of the numeric error code from the `SQLite API `_" msgstr "" -#: ../../library/sqlite3.rst:1665 +#: ../../library/sqlite3.rst:1668 msgid "" "Exception raised for misuse of the low-level SQLite C API. In other words, " "if this exception is raised, it probably indicates a bug in the :mod:`!" "sqlite3` module. ``InterfaceError`` is a subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1672 +#: ../../library/sqlite3.rst:1675 msgid "" "Exception raised for errors that are related to the database. This serves as " "the base exception for several types of database errors. It is only raised " @@ -1570,14 +1572,14 @@ msgid "" "subclass of :exc:`Error`." msgstr "" -#: ../../library/sqlite3.rst:1679 +#: ../../library/sqlite3.rst:1682 msgid "" "Exception raised for errors caused by problems with the processed data, like " "numeric values out of range, and strings which are too long. ``DataError`` " "is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1685 +#: ../../library/sqlite3.rst:1688 msgid "" "Exception raised for errors that are related to the database's operation, " "and not necessarily under the control of the programmer. For example, the " @@ -1585,20 +1587,20 @@ msgid "" "``OperationalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1693 +#: ../../library/sqlite3.rst:1696 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1698 +#: ../../library/sqlite3.rst:1701 msgid "" "Exception raised when SQLite encounters an internal error. If this is " "raised, it may indicate that there is a problem with the runtime SQLite " "library. ``InternalError`` is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1705 +#: ../../library/sqlite3.rst:1708 msgid "" "Exception raised for :mod:`!sqlite3` API programming errors, for example " "supplying the wrong number of bindings to a query, or trying to operate on a " @@ -1606,7 +1608,7 @@ msgid "" "`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1712 +#: ../../library/sqlite3.rst:1715 msgid "" "Exception raised in case a method or database API is not supported by the " "underlying SQLite library. For example, setting *deterministic* to ``True`` " @@ -1615,78 +1617,78 @@ msgid "" "subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:1722 +#: ../../library/sqlite3.rst:1725 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:1724 +#: ../../library/sqlite3.rst:1727 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:1727 +#: ../../library/sqlite3.rst:1730 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:1730 ../../library/sqlite3.rst:1747 +#: ../../library/sqlite3.rst:1733 ../../library/sqlite3.rst:1750 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:1730 ../../library/sqlite3.rst:1747 +#: ../../library/sqlite3.rst:1733 ../../library/sqlite3.rst:1750 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:1732 ../../library/sqlite3.rst:1749 +#: ../../library/sqlite3.rst:1735 ../../library/sqlite3.rst:1752 msgid "``None``" msgstr "``None``" -#: ../../library/sqlite3.rst:1732 ../../library/sqlite3.rst:1749 +#: ../../library/sqlite3.rst:1735 ../../library/sqlite3.rst:1752 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 +#: ../../library/sqlite3.rst:1737 ../../library/sqlite3.rst:1754 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:1734 ../../library/sqlite3.rst:1751 +#: ../../library/sqlite3.rst:1737 ../../library/sqlite3.rst:1754 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 +#: ../../library/sqlite3.rst:1739 ../../library/sqlite3.rst:1756 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:1736 ../../library/sqlite3.rst:1753 +#: ../../library/sqlite3.rst:1739 ../../library/sqlite3.rst:1756 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:1738 +#: ../../library/sqlite3.rst:1741 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:1738 ../../library/sqlite3.rst:1755 +#: ../../library/sqlite3.rst:1741 ../../library/sqlite3.rst:1758 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1758 +#: ../../library/sqlite3.rst:1743 ../../library/sqlite3.rst:1761 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:1740 ../../library/sqlite3.rst:1758 +#: ../../library/sqlite3.rst:1743 ../../library/sqlite3.rst:1761 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:1744 +#: ../../library/sqlite3.rst:1747 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:1755 +#: ../../library/sqlite3.rst:1758 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:1761 +#: ../../library/sqlite3.rst:1764 msgid "" "The type system of the :mod:`!sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via :ref:`object " @@ -1695,42 +1697,42 @@ msgid "" "converters>`." msgstr "" -#: ../../library/sqlite3.rst:1771 +#: ../../library/sqlite3.rst:1774 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1773 +#: ../../library/sqlite3.rst:1776 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1776 +#: ../../library/sqlite3.rst:1779 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1780 +#: ../../library/sqlite3.rst:1783 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1784 +#: ../../library/sqlite3.rst:1787 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1788 +#: ../../library/sqlite3.rst:1791 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1794 +#: ../../library/sqlite3.rst:1797 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1738,15 +1740,15 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1803 +#: ../../library/sqlite3.rst:1806 msgid "How-to guides" msgstr "" -#: ../../library/sqlite3.rst:1808 +#: ../../library/sqlite3.rst:1811 msgid "How to use placeholders to bind values in SQL queries" msgstr "" -#: ../../library/sqlite3.rst:1810 +#: ../../library/sqlite3.rst:1813 msgid "" "SQL operations usually need to use values from Python variables. However, " "beware of using Python's string operations to assemble queries, as they are " @@ -1754,7 +1756,7 @@ msgid "" "close the single quote and inject ``OR TRUE`` to select all rows::" msgstr "" -#: ../../library/sqlite3.rst:1823 +#: ../../library/sqlite3.rst:1826 msgid "" "Instead, use the DB-API's parameter substitution. To insert a variable into " "a query string, use a placeholder in the string, and substitute the actual " @@ -1762,7 +1764,7 @@ msgid "" "second argument of the cursor's :meth:`~Cursor.execute` method." msgstr "" -#: ../../library/sqlite3.rst:1828 +#: ../../library/sqlite3.rst:1831 msgid "" "An SQL statement may use one of two kinds of placeholders: question marks " "(qmark style) or named placeholders (named style). For the qmark style, " @@ -1773,24 +1775,24 @@ msgid "" "are ignored. Here's an example of both styles:" msgstr "" -#: ../../library/sqlite3.rst:1865 +#: ../../library/sqlite3.rst:1868 msgid "" ":pep:`249` numeric placeholders are *not* supported. If used, they will be " "interpreted as named placeholders." msgstr "" -#: ../../library/sqlite3.rst:1872 +#: ../../library/sqlite3.rst:1875 msgid "How to adapt custom Python types to SQLite values" msgstr "" -#: ../../library/sqlite3.rst:1874 +#: ../../library/sqlite3.rst:1877 msgid "" "SQLite supports only a limited set of data types natively. To store custom " "Python types in SQLite databases, *adapt* them to one of the :ref:`Python " "types SQLite natively understands `." msgstr "" -#: ../../library/sqlite3.rst:1878 +#: ../../library/sqlite3.rst:1881 msgid "" "There are two ways to adapt Python objects to SQLite types: letting your " "object adapt itself, or using an *adapter callable*. The latter will take " @@ -1800,11 +1802,11 @@ msgid "" "custom adapter functions." msgstr "" -#: ../../library/sqlite3.rst:1890 +#: ../../library/sqlite3.rst:1893 msgid "How to write adaptable objects" msgstr "" -#: ../../library/sqlite3.rst:1892 +#: ../../library/sqlite3.rst:1895 msgid "" "Suppose we have a :class:`!Point` class that represents a pair of " "coordinates, ``x`` and ``y``, in a Cartesian coordinate system. The " @@ -1814,84 +1816,84 @@ msgid "" "object passed to *protocol* will be of type :class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1923 +#: ../../library/sqlite3.rst:1926 msgid "How to register adapter callables" msgstr "" -#: ../../library/sqlite3.rst:1925 +#: ../../library/sqlite3.rst:1928 msgid "" "The other possibility is to create a function that converts the Python " "object to an SQLite-compatible type. This function can then be registered " "using :func:`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1955 +#: ../../library/sqlite3.rst:1958 msgid "How to convert SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1957 +#: ../../library/sqlite3.rst:1960 msgid "" "Writing an adapter lets you convert *from* custom Python types *to* SQLite " "values. To be able to convert *from* SQLite values *to* custom Python types, " "we use *converters*." msgstr "" -#: ../../library/sqlite3.rst:1962 +#: ../../library/sqlite3.rst:1965 msgid "" "Let's go back to the :class:`!Point` class. We stored the x and y " "coordinates separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1965 +#: ../../library/sqlite3.rst:1968 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`!Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1970 +#: ../../library/sqlite3.rst:1973 msgid "" "Converter functions are **always** passed a :class:`bytes` object, no matter " "the underlying SQLite data type." msgstr "" -#: ../../library/sqlite3.rst:1979 +#: ../../library/sqlite3.rst:1982 msgid "" "We now need to tell :mod:`!sqlite3` when it should convert a given SQLite " "value. This is done when connecting to a database, using the *detect_types* " "parameter of :func:`connect`. There are three options:" msgstr "" -#: ../../library/sqlite3.rst:1983 +#: ../../library/sqlite3.rst:1986 msgid "Implicit: set *detect_types* to :const:`PARSE_DECLTYPES`" msgstr "" -#: ../../library/sqlite3.rst:1984 +#: ../../library/sqlite3.rst:1987 msgid "Explicit: set *detect_types* to :const:`PARSE_COLNAMES`" msgstr "" -#: ../../library/sqlite3.rst:1985 +#: ../../library/sqlite3.rst:1988 msgid "" "Both: set *detect_types* to ``sqlite3.PARSE_DECLTYPES | sqlite3." "PARSE_COLNAMES``. Column names take precedence over declared types." msgstr "" -#: ../../library/sqlite3.rst:1989 +#: ../../library/sqlite3.rst:1992 msgid "The following example illustrates the implicit and explicit approaches:" msgstr "" -#: ../../library/sqlite3.rst:2040 +#: ../../library/sqlite3.rst:2043 msgid "Adapter and converter recipes" msgstr "" -#: ../../library/sqlite3.rst:2042 +#: ../../library/sqlite3.rst:2045 msgid "This section shows recipes for common adapters and converters." msgstr "" -#: ../../library/sqlite3.rst:2104 +#: ../../library/sqlite3.rst:2107 msgid "How to use connection shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:2106 +#: ../../library/sqlite3.rst:2109 msgid "" "Using the :meth:`~Connection.execute`, :meth:`~Connection.executemany`, and :" "meth:`~Connection.executescript` methods of the :class:`Connection` class, " @@ -1903,11 +1905,11 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:2147 +#: ../../library/sqlite3.rst:2150 msgid "How to use the connection context manager" msgstr "" -#: ../../library/sqlite3.rst:2149 +#: ../../library/sqlite3.rst:2152 msgid "" "A :class:`Connection` object can be used as a context manager that " "automatically commits or rolls back open transactions when leaving the body " @@ -1917,58 +1919,58 @@ msgid "" "exception, the transaction is rolled back." msgstr "" -#: ../../library/sqlite3.rst:2158 +#: ../../library/sqlite3.rst:2161 msgid "" "If there is no open transaction upon leaving the body of the ``with`` " "statement, the context manager is a no-op." msgstr "" -#: ../../library/sqlite3.rst:2163 +#: ../../library/sqlite3.rst:2166 msgid "" "The context manager neither implicitly opens a new transaction nor closes " "the connection." msgstr "" -#: ../../library/sqlite3.rst:2196 +#: ../../library/sqlite3.rst:2199 msgid "How to work with SQLite URIs" msgstr "" -#: ../../library/sqlite3.rst:2198 +#: ../../library/sqlite3.rst:2201 msgid "Some useful URI tricks include:" msgstr "" -#: ../../library/sqlite3.rst:2200 +#: ../../library/sqlite3.rst:2203 msgid "Open a database in read-only mode:" msgstr "" -#: ../../library/sqlite3.rst:2209 +#: ../../library/sqlite3.rst:2212 msgid "" "Do not implicitly create a new database file if it does not already exist; " "will raise :exc:`~sqlite3.OperationalError` if unable to create a new file:" msgstr "" -#: ../../library/sqlite3.rst:2219 +#: ../../library/sqlite3.rst:2222 msgid "Create a shared named in-memory database:" msgstr "" -#: ../../library/sqlite3.rst:2233 +#: ../../library/sqlite3.rst:2236 msgid "" "More information about this feature, including a list of parameters, can be " "found in the `SQLite URI documentation`_." msgstr "" -#: ../../library/sqlite3.rst:2242 +#: ../../library/sqlite3.rst:2245 msgid "How to create and use row factories" msgstr "" -#: ../../library/sqlite3.rst:2244 +#: ../../library/sqlite3.rst:2247 msgid "" "By default, :mod:`!sqlite3` represents each row as a :class:`tuple`. If a :" "class:`!tuple` does not suit your needs, you can use the :class:`sqlite3." "Row` class or a custom :attr:`~Cursor.row_factory`." msgstr "" -#: ../../library/sqlite3.rst:2249 +#: ../../library/sqlite3.rst:2252 msgid "" "While :attr:`!row_factory` exists as an attribute both on the :class:" "`Cursor` and the :class:`Connection`, it is recommended to set :class:" @@ -1976,7 +1978,7 @@ msgid "" "use the same row factory." msgstr "" -#: ../../library/sqlite3.rst:2254 +#: ../../library/sqlite3.rst:2257 msgid "" ":class:`!Row` provides indexed and case-insensitive named access to columns, " "with minimal memory overhead and performance impact over a :class:`!tuple`. " @@ -1984,51 +1986,51 @@ msgid "" "attribute:" msgstr "" -#: ../../library/sqlite3.rst:2264 +#: ../../library/sqlite3.rst:2267 msgid "Queries now return :class:`!Row` objects:" msgstr "" -#: ../../library/sqlite3.rst:2279 +#: ../../library/sqlite3.rst:2282 msgid "" "You can create a custom :attr:`~Cursor.row_factory` that returns each row as " "a :class:`dict`, with column names mapped to values:" msgstr "" -#: ../../library/sqlite3.rst:2288 +#: ../../library/sqlite3.rst:2291 msgid "" "Using it, queries now return a :class:`!dict` instead of a :class:`!tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2298 +#: ../../library/sqlite3.rst:2301 msgid "The following row factory returns a :term:`named tuple`:" msgstr "" -#: ../../library/sqlite3.rst:2309 +#: ../../library/sqlite3.rst:2312 msgid ":func:`!namedtuple_factory` can be used as follows:" msgstr "" -#: ../../library/sqlite3.rst:2324 +#: ../../library/sqlite3.rst:2327 msgid "" "With some adjustments, the above recipe can be adapted to use a :class:" "`~dataclasses.dataclass`, or any other custom class, instead of a :class:" "`~collections.namedtuple`." msgstr "" -#: ../../library/sqlite3.rst:2332 +#: ../../library/sqlite3.rst:2335 msgid "Explanation" msgstr "解釋" -#: ../../library/sqlite3.rst:2337 +#: ../../library/sqlite3.rst:2340 msgid "Transaction control" msgstr "" -#: ../../library/sqlite3.rst:2339 +#: ../../library/sqlite3.rst:2342 msgid "" "The :mod:`!sqlite3` module does not adhere to the transaction handling " "recommended by :pep:`249`." msgstr "" -#: ../../library/sqlite3.rst:2342 +#: ../../library/sqlite3.rst:2345 msgid "" "If the connection attribute :attr:`~Connection.isolation_level` is not " "``None``, new transactions are implicitly opened before :meth:`~Cursor." @@ -2042,7 +2044,7 @@ msgid "" "attribute." msgstr "" -#: ../../library/sqlite3.rst:2355 +#: ../../library/sqlite3.rst:2358 msgid "" "If :attr:`~Connection.isolation_level` is set to ``None``, no transactions " "are implicitly opened at all. This leaves the underlying SQLite library in " @@ -2052,14 +2054,14 @@ msgid "" "in_transaction` attribute." msgstr "" -#: ../../library/sqlite3.rst:2363 +#: ../../library/sqlite3.rst:2366 msgid "" "The :meth:`~Cursor.executescript` method implicitly commits any pending " "transaction before execution of the given SQL script, regardless of the " "value of :attr:`~Connection.isolation_level`." msgstr "" -#: ../../library/sqlite3.rst:2367 +#: ../../library/sqlite3.rst:2370 msgid "" ":mod:`!sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." diff --git a/library/traceback.po b/library/traceback.po index f6b7fad4fa..f8ae935e92 100644 --- a/library/traceback.po +++ b/library/traceback.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-02-05 00:18+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -42,11 +42,29 @@ msgid "" "from :func:`sys.exc_info`." msgstr "" -#: ../../library/traceback.rst:23 -msgid "The module defines the following functions:" +#: ../../library/traceback.rst:26 +msgid "Module :mod:`faulthandler`" +msgstr "" + +#: ../../library/traceback.rst:26 +msgid "" +"Used to dump Python tracebacks explicitly, on a fault, after a timeout, or " +"on a user signal." msgstr "" #: ../../library/traceback.rst:28 +msgid "Module :mod:`pdb`" +msgstr "" + +#: ../../library/traceback.rst:29 +msgid "Interactive source code debugger for Python programs." +msgstr "" + +#: ../../library/traceback.rst:31 +msgid "The module defines the following functions:" +msgstr "" + +#: ../../library/traceback.rst:35 msgid "" "Print up to *limit* stack trace entries from traceback object *tb* (starting " "from the caller's frame) if *limit* is positive. Otherwise, print the last " @@ -56,41 +74,41 @@ msgid "" "the output." msgstr "" -#: ../../library/traceback.rst:35 ../../library/traceback.rst:98 +#: ../../library/traceback.rst:42 ../../library/traceback.rst:105 msgid "Added negative *limit* support." msgstr "" -#: ../../library/traceback.rst:42 +#: ../../library/traceback.rst:49 msgid "" "Print exception information and stack trace entries from traceback object " "*tb* to *file*. This differs from :func:`print_tb` in the following ways:" msgstr "" -#: ../../library/traceback.rst:46 +#: ../../library/traceback.rst:53 msgid "" "if *tb* is not ``None``, it prints a header ``Traceback (most recent call " "last):``" msgstr "" -#: ../../library/traceback.rst:49 +#: ../../library/traceback.rst:56 msgid "it prints the exception type and *value* after the stack trace" msgstr "" -#: ../../library/traceback.rst:53 +#: ../../library/traceback.rst:60 msgid "" "if *type(value)* is :exc:`SyntaxError` and *value* has the appropriate " "format, it prints the line where the syntax error occurred with a caret " "indicating the approximate position of the error." msgstr "" -#: ../../library/traceback.rst:57 +#: ../../library/traceback.rst:64 msgid "" "Since Python 3.10, instead of passing *value* and *tb*, an exception object " "can be passed as the first argument. If *value* and *tb* are provided, the " "first argument is ignored in order to provide backwards compatibility." msgstr "" -#: ../../library/traceback.rst:61 +#: ../../library/traceback.rst:68 msgid "" "The optional *limit* argument has the same meaning as for :func:`print_tb`. " "If *chain* is true (the default), then chained exceptions (the :attr:" @@ -99,29 +117,29 @@ msgid "" "exception." msgstr "" -#: ../../library/traceback.rst:67 ../../library/traceback.rst:160 +#: ../../library/traceback.rst:74 ../../library/traceback.rst:167 msgid "The *etype* argument is ignored and inferred from the type of *value*." msgstr "" -#: ../../library/traceback.rst:70 ../../library/traceback.rst:147 +#: ../../library/traceback.rst:77 ../../library/traceback.rst:154 msgid "" "The *etype* parameter has been renamed to *exc* and is now positional-only." msgstr "" -#: ../../library/traceback.rst:77 +#: ../../library/traceback.rst:84 msgid "" "This is a shorthand for ``print_exception(*sys.exc_info(), limit, file, " "chain)``." msgstr "" -#: ../../library/traceback.rst:83 +#: ../../library/traceback.rst:90 msgid "" "This is a shorthand for ``print_exception(sys.last_type, sys.last_value, sys." "last_traceback, limit, file, chain)``. In general it will work only after " "an exception has reached an interactive prompt (see :data:`sys.last_type`)." msgstr "" -#: ../../library/traceback.rst:91 +#: ../../library/traceback.rst:98 msgid "" "Print up to *limit* stack trace entries (starting from the invocation point) " "if *limit* is positive. Otherwise, print the last ``abs(limit)`` entries. " @@ -130,11 +148,11 @@ msgid "" "optional *file* argument has the same meaning as for :func:`print_tb`." msgstr "" -#: ../../library/traceback.rst:104 +#: ../../library/traceback.rst:111 msgid "" -"Return a :class:`StackSummary` object representing a list of \"pre-processed" -"\" stack trace entries extracted from the traceback object *tb*. It is " -"useful for alternate formatting of stack traces. The optional *limit* " +"Return a :class:`StackSummary` object representing a list of \"pre-" +"processed\" stack trace entries extracted from the traceback object *tb*. " +"It is useful for alternate formatting of stack traces. The optional *limit* " "argument has the same meaning as for :func:`print_tb`. A \"pre-processed\" " "stack trace entry is a :class:`FrameSummary` object containing attributes :" "attr:`~FrameSummary.filename`, :attr:`~FrameSummary.lineno`, :attr:" @@ -144,14 +162,14 @@ msgid "" "stripped; if the source is not available it is ``None``." msgstr "" -#: ../../library/traceback.rst:118 +#: ../../library/traceback.rst:125 msgid "" "Extract the raw traceback from the current stack frame. The return value " "has the same format as for :func:`extract_tb`. The optional *f* and *limit* " "arguments have the same meaning as for :func:`print_stack`." msgstr "" -#: ../../library/traceback.rst:125 +#: ../../library/traceback.rst:132 msgid "" "Given a list of tuples or :class:`FrameSummary` objects as returned by :func:" "`extract_tb` or :func:`extract_stack`, return a list of strings ready for " @@ -161,7 +179,7 @@ msgid "" "text line is not ``None``." msgstr "" -#: ../../library/traceback.rst:135 +#: ../../library/traceback.rst:142 msgid "" "Format the exception part of a traceback using an exception value such as " "given by ``sys.last_value``. The return value is a list of strings, each " @@ -172,14 +190,14 @@ msgid "" "the list." msgstr "" -#: ../../library/traceback.rst:143 +#: ../../library/traceback.rst:150 msgid "" "Since Python 3.10, instead of passing *value*, an exception object can be " "passed as the first argument. If *value* is provided, the first argument is " "ignored in order to provide backwards compatibility." msgstr "" -#: ../../library/traceback.rst:154 +#: ../../library/traceback.rst:161 msgid "" "Format a stack trace and the exception information. The arguments have the " "same meaning as the corresponding arguments to :func:`print_exception`. The " @@ -188,66 +206,66 @@ msgid "" "printed, exactly the same text is printed as does :func:`print_exception`." msgstr "" -#: ../../library/traceback.rst:163 +#: ../../library/traceback.rst:170 msgid "" "This function's behavior and signature were modified to match :func:" "`print_exception`." msgstr "" -#: ../../library/traceback.rst:170 +#: ../../library/traceback.rst:177 msgid "" "This is like ``print_exc(limit)`` but returns a string instead of printing " "to a file." msgstr "" -#: ../../library/traceback.rst:176 +#: ../../library/traceback.rst:183 msgid "A shorthand for ``format_list(extract_tb(tb, limit))``." msgstr "" -#: ../../library/traceback.rst:181 +#: ../../library/traceback.rst:188 msgid "A shorthand for ``format_list(extract_stack(f, limit))``." msgstr "" -#: ../../library/traceback.rst:185 +#: ../../library/traceback.rst:192 msgid "" "Clears the local variables of all the stack frames in a traceback *tb* by " "calling the :meth:`clear` method of each frame object." msgstr "" -#: ../../library/traceback.rst:192 +#: ../../library/traceback.rst:199 msgid "" "Walk a stack following ``f.f_back`` from the given frame, yielding the frame " "and line number for each frame. If *f* is ``None``, the current stack is " "used. This helper is used with :meth:`StackSummary.extract`." msgstr "" -#: ../../library/traceback.rst:200 +#: ../../library/traceback.rst:207 msgid "" "Walk a traceback following ``tb_next`` yielding the frame and line number " "for each frame. This helper is used with :meth:`StackSummary.extract`." msgstr "" -#: ../../library/traceback.rst:205 +#: ../../library/traceback.rst:212 msgid "The module also defines the following classes:" msgstr "" -#: ../../library/traceback.rst:208 +#: ../../library/traceback.rst:215 msgid ":class:`TracebackException` Objects" msgstr ":class:`TracebackException` 物件" -#: ../../library/traceback.rst:212 +#: ../../library/traceback.rst:219 msgid "" ":class:`TracebackException` objects are created from actual exceptions to " "capture data for later printing in a lightweight fashion." msgstr "" -#: ../../library/traceback.rst:217 ../../library/traceback.rst:277 +#: ../../library/traceback.rst:224 ../../library/traceback.rst:284 msgid "" "Capture an exception for later rendering. *limit*, *lookup_lines* and " "*capture_locals* are as for the :class:`StackSummary` class." msgstr "" -#: ../../library/traceback.rst:220 +#: ../../library/traceback.rst:227 msgid "" "If *compact* is true, only data that is required by :class:" "`TracebackException`'s ``format`` method is saved in the class attributes. " @@ -255,122 +273,122 @@ msgid "" "is ``None`` and ``__suppress_context__`` is false." msgstr "" -#: ../../library/traceback.rst:225 ../../library/traceback.rst:280 +#: ../../library/traceback.rst:232 ../../library/traceback.rst:287 msgid "" "Note that when locals are captured, they are also shown in the traceback." msgstr "" -#: ../../library/traceback.rst:229 +#: ../../library/traceback.rst:236 msgid "A :class:`TracebackException` of the original ``__cause__``." msgstr "" -#: ../../library/traceback.rst:233 +#: ../../library/traceback.rst:240 msgid "A :class:`TracebackException` of the original ``__context__``." msgstr "" -#: ../../library/traceback.rst:237 +#: ../../library/traceback.rst:244 msgid "The ``__suppress_context__`` value from the original exception." msgstr "" -#: ../../library/traceback.rst:241 +#: ../../library/traceback.rst:248 msgid "" "The ``__notes__`` value from the original exception, or ``None`` if the " "exception does not have any notes. If it is not ``None`` is it formatted in " "the traceback after the exception string." msgstr "" -#: ../../library/traceback.rst:249 +#: ../../library/traceback.rst:256 msgid "A :class:`StackSummary` representing the traceback." msgstr "" -#: ../../library/traceback.rst:253 +#: ../../library/traceback.rst:260 msgid "The class of the original traceback." msgstr "" -#: ../../library/traceback.rst:257 +#: ../../library/traceback.rst:264 msgid "For syntax errors - the file name where the error occurred." msgstr "" -#: ../../library/traceback.rst:261 +#: ../../library/traceback.rst:268 msgid "For syntax errors - the line number where the error occurred." msgstr "" -#: ../../library/traceback.rst:265 +#: ../../library/traceback.rst:272 msgid "For syntax errors - the text where the error occurred." msgstr "" -#: ../../library/traceback.rst:269 +#: ../../library/traceback.rst:276 msgid "For syntax errors - the offset into the text where the error occurred." msgstr "" -#: ../../library/traceback.rst:273 +#: ../../library/traceback.rst:280 msgid "For syntax errors - the compiler error message." msgstr "" -#: ../../library/traceback.rst:284 +#: ../../library/traceback.rst:291 msgid "" "Print to *file* (default ``sys.stderr``) the exception information returned " "by :meth:`format`." msgstr "" -#: ../../library/traceback.rst:291 +#: ../../library/traceback.rst:298 msgid "Format the exception." msgstr "" -#: ../../library/traceback.rst:293 +#: ../../library/traceback.rst:300 msgid "" "If *chain* is not ``True``, ``__cause__`` and ``__context__`` will not be " "formatted." msgstr "" -#: ../../library/traceback.rst:296 +#: ../../library/traceback.rst:303 msgid "" "The return value is a generator of strings, each ending in a newline and " "some containing internal newlines. :func:`~traceback.print_exception` is a " "wrapper around this method which just prints the lines to a file." msgstr "" -#: ../../library/traceback.rst:300 ../../library/traceback.rst:314 +#: ../../library/traceback.rst:307 ../../library/traceback.rst:321 msgid "" "The message indicating which exception occurred is always the last string in " "the output." msgstr "" -#: ../../library/traceback.rst:305 +#: ../../library/traceback.rst:312 msgid "Format the exception part of the traceback." msgstr "" -#: ../../library/traceback.rst:307 +#: ../../library/traceback.rst:314 msgid "The return value is a generator of strings, each ending in a newline." msgstr "" -#: ../../library/traceback.rst:309 +#: ../../library/traceback.rst:316 msgid "" "Normally, the generator emits a single string; however, for :exc:" "`SyntaxError` exceptions, it emits several lines that (when printed) display " "detailed information about where the syntax error occurred." msgstr "" -#: ../../library/traceback.rst:317 +#: ../../library/traceback.rst:324 msgid "Added the *compact* parameter." msgstr "新增 *compact* 參數。" -#: ../../library/traceback.rst:322 +#: ../../library/traceback.rst:329 msgid ":class:`StackSummary` Objects" msgstr ":class:`StackSummary` 物件" -#: ../../library/traceback.rst:326 +#: ../../library/traceback.rst:333 msgid "" ":class:`StackSummary` objects represent a call stack ready for formatting." msgstr "" -#: ../../library/traceback.rst:332 +#: ../../library/traceback.rst:339 msgid "" "Construct a :class:`StackSummary` object from a frame generator (such as is " "returned by :func:`~traceback.walk_stack` or :func:`~traceback.walk_tb`)." msgstr "" -#: ../../library/traceback.rst:336 +#: ../../library/traceback.rst:343 msgid "" "If *limit* is supplied, only this many frames are taken from *frame_gen*. If " "*lookup_lines* is ``False``, the returned :class:`FrameSummary` objects will " @@ -380,14 +398,14 @@ msgid "" "class:`FrameSummary` are captured as object representations." msgstr "" -#: ../../library/traceback.rst:346 +#: ../../library/traceback.rst:353 msgid "" "Construct a :class:`StackSummary` object from a supplied list of :class:" "`FrameSummary` objects or old-style list of tuples. Each tuple should be a " "4-tuple with filename, lineno, name, line as the elements." msgstr "" -#: ../../library/traceback.rst:352 +#: ../../library/traceback.rst:359 msgid "" "Returns a list of strings ready for printing. Each string in the resulting " "list corresponds to a single frame from the stack. Each string ends in a " @@ -395,18 +413,18 @@ msgid "" "with source text lines." msgstr "" -#: ../../library/traceback.rst:357 +#: ../../library/traceback.rst:364 msgid "" "For long sequences of the same frame and line, the first few repetitions are " "shown, followed by a summary line stating the exact number of further " "repetitions." msgstr "" -#: ../../library/traceback.rst:361 +#: ../../library/traceback.rst:368 msgid "Long sequences of repeated frames are now abbreviated." msgstr "" -#: ../../library/traceback.rst:366 +#: ../../library/traceback.rst:373 msgid "" "Returns a string for printing one of the frames involved in the stack. This " "method is called for each :class:`FrameSummary` object to be printed by :" @@ -414,16 +432,16 @@ msgid "" "from the output." msgstr "" -#: ../../library/traceback.rst:375 +#: ../../library/traceback.rst:382 msgid ":class:`FrameSummary` Objects" msgstr ":class:`FrameSummary` 物件" -#: ../../library/traceback.rst:379 +#: ../../library/traceback.rst:386 msgid "" "A :class:`FrameSummary` object represents a single frame in a traceback." msgstr "" -#: ../../library/traceback.rst:383 +#: ../../library/traceback.rst:390 msgid "" "Represent a single frame in the traceback or stack that is being formatted " "or printed. It may optionally have a stringified version of the frames " @@ -436,11 +454,11 @@ msgid "" "display." msgstr "" -#: ../../library/traceback.rst:396 +#: ../../library/traceback.rst:403 msgid "Traceback Examples" msgstr "" -#: ../../library/traceback.rst:398 +#: ../../library/traceback.rst:405 msgid "" "This simple example implements a basic read-eval-print loop, similar to (but " "less useful than) the standard Python interactive interpreter loop. For a " @@ -448,22 +466,22 @@ msgid "" "`code` module. ::" msgstr "" -#: ../../library/traceback.rst:420 +#: ../../library/traceback.rst:427 msgid "" "The following example demonstrates the different ways to print and format " "the exception and traceback:" msgstr "" -#: ../../library/traceback.rst:455 +#: ../../library/traceback.rst:462 msgid "The output for the example would look similar to this:" msgstr "" -#: ../../library/traceback.rst:497 +#: ../../library/traceback.rst:504 msgid "" "The following example shows the different ways to print and format the " "stack::" msgstr "" -#: ../../library/traceback.rst:523 +#: ../../library/traceback.rst:530 msgid "This last example demonstrates the final few formatting functions:" msgstr "" diff --git a/tutorial/venv.po b/tutorial/venv.po index 1fcd3b296f..62926459ef 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-15 20:43+0000\n" +"POT-Creation-Date: 2023-02-04 00:16+0000\n" "PO-Revision-Date: 2022-10-16 05:35+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -178,12 +178,12 @@ msgstr "用 pip 管理套件" #: ../../tutorial/venv.rst:100 msgid "" "You can install, upgrade, and remove packages using a program called :" -"program:`pip`. By default ``pip`` will install packages from the Python " -"Package Index, . You can browse the Python Package Index " +"program:`pip`. By default ``pip`` will install packages from the `Python " +"Package Index `_. You can browse the Python Package Index " "by going to it in your web browser." msgstr "" "你可以使用一個叫做 :program:`pip` 的程式來安裝、升級和移除套件。``pip`` 預設" -"會從 Python Package Index 安裝套件。你可以透過你的網頁瀏覽" +"會從 `Python Package Index `_ 安裝套件。你可以透過你的網頁瀏覽" "器瀏覽 Python Package Index。" #: ../../tutorial/venv.rst:105 diff --git a/using/windows.po b/using/windows.po index e46e2c99fe..b6dacb657f 100644 --- a/using/windows.po +++ b/using/windows.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-01-17 00:16+0000\n" +"POT-Creation-Date: 2023-02-02 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -245,11 +245,11 @@ msgid "" "list of available options is shown below." msgstr "" -#: ../../using/windows.rst:140 ../../using/windows.rst:1044 +#: ../../using/windows.rst:140 ../../using/windows.rst:1069 msgid "Name" msgstr "" -#: ../../using/windows.rst:140 ../../using/windows.rst:1044 +#: ../../using/windows.rst:140 ../../using/windows.rst:1069 msgid "Description" msgstr "描述" @@ -1228,36 +1228,58 @@ msgid "" msgstr "" #: ../../using/windows.rst:733 -msgid "You should find the latest version of Python 3.x starts." -msgstr "" - -#: ../../using/windows.rst:735 msgid "" "If you see the following error, you do not have the launcher installed::" msgstr "" -#: ../../using/windows.rst:740 -msgid "" -"Per-user installations of Python do not add the launcher to :envvar:`PATH` " -"unless the option was selected on installation." -msgstr "" - -#: ../../using/windows.rst:743 +#: ../../using/windows.rst:738 msgid "The command::" msgstr "" "指令:\n" "\n" "::" -#: ../../using/windows.rst:747 +#: ../../using/windows.rst:742 msgid "displays the currently installed version(s) of Python." msgstr "" +#: ../../using/windows.rst:744 +msgid "" +"The ``-x.y`` argument is the short form of the ``-V:Company/Tag`` argument, " +"which allows selecting a specific Python runtime, including those that may " +"have come from somewhere other than python.org. Any runtime registered by " +"following :pep:`514` will be discoverable. The ``--list`` command lists all " +"available runtimes using the ``-V:`` format." +msgstr "" + #: ../../using/windows.rst:750 +msgid "" +"When using the ``-V:`` argument, specifying the Company will limit selection " +"to runtimes from that provider, while specifying only the Tag will select " +"from all providers. Note that omitting the slash implies a tag::" +msgstr "" + +#: ../../using/windows.rst:763 +msgid "" +"The short form of the argument (``-3``) only ever selects from core Python " +"releases, and not other distributions. However, the longer form (``-V:3``) " +"will select from any." +msgstr "" + +#: ../../using/windows.rst:767 +msgid "" +"The Company is matched on the full string, case-insenitive. The Tag is " +"matched oneither the full string, or a prefix, provided the next character " +"is a dot or a hyphen. This allows ``-V:3.1`` to match ``3.1-32``, but not " +"``3.10``. Tags are sorted using numerical ordering (``3.10`` is newer than " +"``3.1``), but are compared using text (``-V:3.01`` does not match ``3.1``)." +msgstr "" + +#: ../../using/windows.rst:775 msgid "Virtual environments" msgstr "虛擬環境(Virtual environment)" -#: ../../using/windows.rst:754 +#: ../../using/windows.rst:779 msgid "" "If the launcher is run with no explicit Python version specification, and a " "virtual environment (created with the standard library :mod:`venv` module or " @@ -1267,36 +1289,36 @@ msgid "" "specify the global Python version." msgstr "" -#: ../../using/windows.rst:762 +#: ../../using/windows.rst:787 msgid "From a script" msgstr "" -#: ../../using/windows.rst:764 +#: ../../using/windows.rst:789 msgid "" "Let's create a test Python script - create a file called ``hello.py`` with " "the following contents" msgstr "" -#: ../../using/windows.rst:773 +#: ../../using/windows.rst:798 msgid "From the directory in which hello.py lives, execute the command::" msgstr "" -#: ../../using/windows.rst:777 +#: ../../using/windows.rst:802 msgid "" "You should notice the version number of your latest Python 2.x installation " "is printed. Now try changing the first line to be:" msgstr "" -#: ../../using/windows.rst:784 +#: ../../using/windows.rst:809 msgid "" "Re-executing the command should now print the latest Python 3.x information. " "As with the above command-line examples, you can specify a more explicit " "version qualifier. Assuming you have Python 3.7 installed, try changing the " -"first line to ``#! python3.7`` and you should find the |version| version " +"first line to ``#! python3.7`` and you should find the 3.7 version " "information printed." msgstr "" -#: ../../using/windows.rst:790 +#: ../../using/windows.rst:815 msgid "" "Note that unlike interactive use, a bare \"python\" will use the latest " "version of Python 2.x that you have installed. This is for backward " @@ -1304,11 +1326,11 @@ msgid "" "typically refers to Python 2." msgstr "" -#: ../../using/windows.rst:796 +#: ../../using/windows.rst:821 msgid "From file associations" msgstr "從檔案關聯" -#: ../../using/windows.rst:798 +#: ../../using/windows.rst:823 msgid "" "The launcher should have been associated with Python files (i.e. ``.py``, ``." "pyw``, ``.pyc`` files) when it was installed. This means that when you " @@ -1317,17 +1339,17 @@ msgid "" "have the script specify the version which should be used." msgstr "" -#: ../../using/windows.rst:804 +#: ../../using/windows.rst:829 msgid "" "The key benefit of this is that a single launcher can support multiple " "Python versions at the same time depending on the contents of the first line." msgstr "" -#: ../../using/windows.rst:808 +#: ../../using/windows.rst:833 msgid "Shebang Lines" msgstr "" -#: ../../using/windows.rst:810 +#: ../../using/windows.rst:835 msgid "" "If the first line of a script file starts with ``#!``, it is known as a " "\"shebang\" line. Linux and other Unix like operating systems have native " @@ -1337,34 +1359,34 @@ msgid "" "demonstrate their use." msgstr "" -#: ../../using/windows.rst:817 +#: ../../using/windows.rst:842 msgid "" "To allow shebang lines in Python scripts to be portable between Unix and " "Windows, this launcher supports a number of 'virtual' commands to specify " "which interpreter to use. The supported virtual commands are:" msgstr "" -#: ../../using/windows.rst:821 +#: ../../using/windows.rst:846 msgid "``/usr/bin/env``" msgstr "``/usr/bin/env``" -#: ../../using/windows.rst:822 +#: ../../using/windows.rst:847 msgid "``/usr/bin/python``" msgstr "``/usr/bin/python``" -#: ../../using/windows.rst:823 +#: ../../using/windows.rst:848 msgid "``/usr/local/bin/python``" msgstr "``/usr/local/bin/python``" -#: ../../using/windows.rst:824 +#: ../../using/windows.rst:849 msgid "``python``" msgstr "``python``" -#: ../../using/windows.rst:826 +#: ../../using/windows.rst:851 msgid "For example, if the first line of your script starts with" msgstr "" -#: ../../using/windows.rst:832 +#: ../../using/windows.rst:857 msgid "" "The default Python will be located and used. As many Python scripts written " "to work on Unix will already have this line, you should find these scripts " @@ -1373,7 +1395,7 @@ msgid "" "of the shebang lines starting with ``/usr``." msgstr "" -#: ../../using/windows.rst:838 +#: ../../using/windows.rst:863 msgid "" "Any of the above virtual commands can be suffixed with an explicit version " "(either just the major version, or the major and minor version). Furthermore " @@ -1382,21 +1404,21 @@ msgid "" "python 3.7." msgstr "" -#: ../../using/windows.rst:846 +#: ../../using/windows.rst:871 msgid "" "Beginning with python launcher 3.7 it is possible to request 64-bit version " "by the \"-64\" suffix. Furthermore it is possible to specify a major and " "architecture without minor (i.e. ``/usr/bin/python3-64``)." msgstr "" -#: ../../using/windows.rst:852 +#: ../../using/windows.rst:877 msgid "" "The \"-64\" suffix is deprecated, and now implies \"any architecture that is " "not provably i386/32-bit\". To request a specific environment, use the new " "``-V:`` argument with the complete tag." msgstr "" -#: ../../using/windows.rst:856 +#: ../../using/windows.rst:881 msgid "" "The ``/usr/bin/env`` form of shebang line has one further special property. " "Before looking for installed Python interpreters, this form will search the " @@ -1410,7 +1432,7 @@ msgid "" "of :envvar:`PATH`." msgstr "" -#: ../../using/windows.rst:867 +#: ../../using/windows.rst:892 msgid "" "Shebang lines that do not match any of these patterns are looked up in the " "``[commands]`` section of the launcher's :ref:`.INI file `. " @@ -1421,7 +1443,7 @@ msgid "" "part of the filename)." msgstr "" -#: ../../using/windows.rst:880 +#: ../../using/windows.rst:905 msgid "" "Any commands not found in the .INI file are treated as **Windows** " "executable paths that are absolute or relative to the directory containing " @@ -1432,29 +1454,29 @@ msgid "" "will be appended." msgstr "" -#: ../../using/windows.rst:889 +#: ../../using/windows.rst:914 msgid "Arguments in shebang lines" msgstr "" -#: ../../using/windows.rst:891 +#: ../../using/windows.rst:916 msgid "" "The shebang lines can also specify additional options to be passed to the " "Python interpreter. For example, if you have a shebang line:" msgstr "" -#: ../../using/windows.rst:898 +#: ../../using/windows.rst:923 msgid "Then Python will be started with the ``-v`` option" msgstr "" -#: ../../using/windows.rst:901 +#: ../../using/windows.rst:926 msgid "Customization" msgstr "" -#: ../../using/windows.rst:906 +#: ../../using/windows.rst:931 msgid "Customization via INI files" msgstr "" -#: ../../using/windows.rst:908 +#: ../../using/windows.rst:933 msgid "" "Two .ini files will be searched by the launcher - ``py.ini`` in the current " "user's application data directory (``%LOCALAPPDATA%`` or ``$env:" @@ -1463,7 +1485,7 @@ msgid "" "e. py.exe) and for the 'windows' version (i.e. pyw.exe)." msgstr "" -#: ../../using/windows.rst:914 +#: ../../using/windows.rst:939 msgid "" "Customization specified in the \"application directory\" will have " "precedence over the one next to the executable, so a user, who may not have " @@ -1471,11 +1493,11 @@ msgid "" "that global .ini file." msgstr "" -#: ../../using/windows.rst:919 +#: ../../using/windows.rst:944 msgid "Customizing default Python versions" msgstr "" -#: ../../using/windows.rst:921 +#: ../../using/windows.rst:946 msgid "" "In some cases, a version qualifier can be included in a command to dictate " "which version of Python will be used by the command. A version qualifier " @@ -1485,13 +1507,13 @@ msgid "" "\"-32\" or \"-64\"." msgstr "" -#: ../../using/windows.rst:927 +#: ../../using/windows.rst:952 msgid "" "For example, a shebang line of ``#!python`` has no version qualifier, while " "``#!python3`` has a version qualifier which specifies only a major version." msgstr "" -#: ../../using/windows.rst:930 +#: ../../using/windows.rst:955 msgid "" "If no version qualifiers are found in a command, the environment variable :" "envvar:`PY_PYTHON` can be set to specify the default version qualifier. If " @@ -1501,7 +1523,7 @@ msgid "" "launcher included with Python 3.7 or newer.)" msgstr "" -#: ../../using/windows.rst:937 +#: ../../using/windows.rst:962 msgid "" "If no minor version qualifiers are found, the environment variable " "``PY_PYTHON{major}`` (where ``{major}`` is the current major version " @@ -1512,7 +1534,7 @@ msgid "" "version in that family." msgstr "" -#: ../../using/windows.rst:945 +#: ../../using/windows.rst:970 msgid "" "On 64-bit Windows with both 32-bit and 64-bit implementations of the same " "(major.minor) Python version installed, the 64-bit version will always be " @@ -1526,30 +1548,30 @@ msgid "" "suffix can be used on a version specifier to change this behaviour." msgstr "" -#: ../../using/windows.rst:956 +#: ../../using/windows.rst:981 msgid "Examples:" msgstr "範例:" -#: ../../using/windows.rst:958 +#: ../../using/windows.rst:983 msgid "" "If no relevant options are set, the commands ``python`` and ``python2`` will " "use the latest Python 2.x version installed and the command ``python3`` will " "use the latest Python 3.x installed." msgstr "" -#: ../../using/windows.rst:962 +#: ../../using/windows.rst:987 msgid "" "The command ``python3.7`` will not consult any options at all as the " "versions are fully specified." msgstr "" -#: ../../using/windows.rst:965 +#: ../../using/windows.rst:990 msgid "" "If ``PY_PYTHON=3``, the commands ``python`` and ``python3`` will both use " "the latest installed Python 3 version." msgstr "" -#: ../../using/windows.rst:968 +#: ../../using/windows.rst:993 msgid "" "If ``PY_PYTHON=3.7-32``, the command ``python`` will use the 32-bit " "implementation of 3.7 whereas the command ``python3`` will use the latest " @@ -1557,13 +1579,13 @@ msgid "" "specified.)" msgstr "" -#: ../../using/windows.rst:973 +#: ../../using/windows.rst:998 msgid "" "If ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7``, the commands ``python`` and " "``python3`` will both use specifically 3.7" msgstr "" -#: ../../using/windows.rst:976 +#: ../../using/windows.rst:1001 msgid "" "In addition to environment variables, the same settings can be configured in " "the .INI file used by the launcher. The section in the INI file is called " @@ -1573,25 +1595,25 @@ msgid "" "will override things specified in the INI file." msgstr "" -#: ../../using/windows.rst:983 +#: ../../using/windows.rst:1008 msgid "For example:" msgstr "" -#: ../../using/windows.rst:985 +#: ../../using/windows.rst:1010 msgid "Setting ``PY_PYTHON=3.7`` is equivalent to the INI file containing:" msgstr "" -#: ../../using/windows.rst:992 +#: ../../using/windows.rst:1017 msgid "" "Setting ``PY_PYTHON=3`` and ``PY_PYTHON3=3.7`` is equivalent to the INI file " "containing:" msgstr "" -#: ../../using/windows.rst:1002 +#: ../../using/windows.rst:1027 msgid "Diagnostics" msgstr "" -#: ../../using/windows.rst:1004 +#: ../../using/windows.rst:1029 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DEBUG` is set (to any value), " "the launcher will print diagnostic information to stderr (i.e. to the " @@ -1601,11 +1623,11 @@ msgid "" "the target Python. It is primarily intended for testing and debugging." msgstr "" -#: ../../using/windows.rst:1012 +#: ../../using/windows.rst:1037 msgid "Dry Run" msgstr "" -#: ../../using/windows.rst:1014 +#: ../../using/windows.rst:1039 msgid "" "If an environment variable :envvar:`PYLAUNCHER_DRYRUN` is set (to any " "value), the launcher will output the command it would have run, but will not " @@ -1615,11 +1637,11 @@ msgid "" "correctly in the console." msgstr "" -#: ../../using/windows.rst:1022 +#: ../../using/windows.rst:1047 msgid "Install on demand" msgstr "安裝隨選" -#: ../../using/windows.rst:1024 +#: ../../using/windows.rst:1049 msgid "" "If an environment variable :envvar:`PYLAUNCHER_ALLOW_INSTALL` is set (to any " "value), and the requested Python version is not installed but is available " @@ -1628,7 +1650,7 @@ msgid "" "again." msgstr "" -#: ../../using/windows.rst:1029 +#: ../../using/windows.rst:1054 msgid "" "An additional :envvar:`PYLAUNCHER_ALWAYS_INSTALL` variable causes the " "launcher to always try to install Python, even if it is detected. This is " @@ -1636,137 +1658,137 @@ msgid "" "`PYLAUNCHER_DRYRUN`)." msgstr "" -#: ../../using/windows.rst:1034 +#: ../../using/windows.rst:1059 msgid "Return codes" msgstr "" -#: ../../using/windows.rst:1036 +#: ../../using/windows.rst:1061 msgid "" "The following exit codes may be returned by the Python launcher. " "Unfortunately, there is no way to distinguish these from the exit code of " "Python itself." msgstr "" -#: ../../using/windows.rst:1039 +#: ../../using/windows.rst:1064 msgid "" "The names of codes are as used in the sources, and are only for reference. " "There is no way to access or resolve them apart from reading this page. " "Entries are listed in alphabetical order of names." msgstr "" -#: ../../using/windows.rst:1044 +#: ../../using/windows.rst:1069 msgid "Value" msgstr "" -#: ../../using/windows.rst:1046 +#: ../../using/windows.rst:1071 msgid "RC_BAD_VENV_CFG" msgstr "RC_BAD_VENV_CFG" -#: ../../using/windows.rst:1046 +#: ../../using/windows.rst:1071 msgid "107" msgstr "107" -#: ../../using/windows.rst:1046 +#: ../../using/windows.rst:1071 msgid "A :file:`pyvenv.cfg` was found but is corrupt." msgstr "" -#: ../../using/windows.rst:1048 +#: ../../using/windows.rst:1073 msgid "RC_CREATE_PROCESS" msgstr "RC_CREATE_PROCESS" -#: ../../using/windows.rst:1048 +#: ../../using/windows.rst:1073 msgid "101" msgstr "101" -#: ../../using/windows.rst:1048 +#: ../../using/windows.rst:1073 msgid "Failed to launch Python." msgstr "" -#: ../../using/windows.rst:1050 +#: ../../using/windows.rst:1075 msgid "RC_INSTALLING" msgstr "RC_INSTALLING" -#: ../../using/windows.rst:1050 +#: ../../using/windows.rst:1075 msgid "111" msgstr "111" -#: ../../using/windows.rst:1050 +#: ../../using/windows.rst:1075 msgid "" "An install was started, but the command will need to be re-run after it " "completes." msgstr "" -#: ../../using/windows.rst:1053 +#: ../../using/windows.rst:1078 msgid "RC_INTERNAL_ERROR" msgstr "RC_INTERNAL_ERROR" -#: ../../using/windows.rst:1053 +#: ../../using/windows.rst:1078 msgid "109" msgstr "109" -#: ../../using/windows.rst:1053 +#: ../../using/windows.rst:1078 msgid "Unexpected error. Please report a bug." msgstr "" -#: ../../using/windows.rst:1055 +#: ../../using/windows.rst:1080 msgid "RC_NO_COMMANDLINE" msgstr "RC_NO_COMMANDLINE" -#: ../../using/windows.rst:1055 +#: ../../using/windows.rst:1080 msgid "108" msgstr "108" -#: ../../using/windows.rst:1055 +#: ../../using/windows.rst:1080 msgid "Unable to obtain command line from the operating system." msgstr "" -#: ../../using/windows.rst:1058 +#: ../../using/windows.rst:1083 msgid "RC_NO_PYTHON" msgstr "RC_NO_PYTHON" -#: ../../using/windows.rst:1058 +#: ../../using/windows.rst:1083 msgid "103" msgstr "103" -#: ../../using/windows.rst:1058 +#: ../../using/windows.rst:1083 msgid "Unable to locate the requested version." msgstr "" -#: ../../using/windows.rst:1060 +#: ../../using/windows.rst:1085 msgid "RC_NO_VENV_CFG" msgstr "RC_NO_VENV_CFG" -#: ../../using/windows.rst:1060 +#: ../../using/windows.rst:1085 msgid "106" msgstr "106" -#: ../../using/windows.rst:1060 +#: ../../using/windows.rst:1085 msgid "A :file:`pyvenv.cfg` was required but not found." msgstr "" -#: ../../using/windows.rst:1068 +#: ../../using/windows.rst:1093 msgid "Finding modules" msgstr "" -#: ../../using/windows.rst:1070 +#: ../../using/windows.rst:1095 msgid "" "These notes supplement the description at :ref:`sys-path-init` with detailed " "Windows notes." msgstr "" -#: ../../using/windows.rst:1073 +#: ../../using/windows.rst:1098 msgid "" "When no ``._pth`` file is found, this is how :data:`sys.path` is populated " "on Windows:" msgstr "" -#: ../../using/windows.rst:1076 +#: ../../using/windows.rst:1101 msgid "" "An empty entry is added at the start, which corresponds to the current " "directory." msgstr "" -#: ../../using/windows.rst:1079 +#: ../../using/windows.rst:1104 msgid "" "If the environment variable :envvar:`PYTHONPATH` exists, as described in :" "ref:`using-on-envvars`, its entries are added next. Note that on Windows, " @@ -1774,7 +1796,7 @@ msgid "" "from the colon used in drive identifiers (``C:\\`` etc.)." msgstr "" -#: ../../using/windows.rst:1084 +#: ../../using/windows.rst:1109 msgid "" "Additional \"application paths\" can be added in the registry as subkeys of :" "samp:`\\\\SOFTWARE\\\\Python\\\\PythonCore\\\\{version}\\\\PythonPath` under " @@ -1784,7 +1806,7 @@ msgid "" "installers only use HKLM, so HKCU is typically empty.)" msgstr "" -#: ../../using/windows.rst:1091 +#: ../../using/windows.rst:1116 msgid "" "If the environment variable :envvar:`PYTHONHOME` is set, it is assumed as " "\"Python Home\". Otherwise, the path of the main Python executable is used " @@ -1795,31 +1817,31 @@ msgid "" "PythonPath stored in the registry." msgstr "" -#: ../../using/windows.rst:1099 +#: ../../using/windows.rst:1124 msgid "" "If the Python Home cannot be located, no :envvar:`PYTHONPATH` is specified " "in the environment, and no registry entries can be found, a default path " "with relative entries is used (e.g. ``.\\Lib;.\\plat-win``, etc)." msgstr "" -#: ../../using/windows.rst:1103 +#: ../../using/windows.rst:1128 msgid "" "If a ``pyvenv.cfg`` file is found alongside the main executable or in the " "directory one level above the executable, the following variations apply:" msgstr "" -#: ../../using/windows.rst:1106 +#: ../../using/windows.rst:1131 msgid "" "If ``home`` is an absolute path and :envvar:`PYTHONHOME` is not set, this " "path is used instead of the path to the main executable when deducing the " "home location." msgstr "" -#: ../../using/windows.rst:1110 +#: ../../using/windows.rst:1135 msgid "The end result of all this is:" msgstr "最終這所有的結果為:" -#: ../../using/windows.rst:1112 +#: ../../using/windows.rst:1137 msgid "" "When running :file:`python.exe`, or any other .exe in the main Python " "directory (either an installed version, or directly from the PCbuild " @@ -1827,7 +1849,7 @@ msgid "" "ignored. Other \"application paths\" in the registry are always read." msgstr "" -#: ../../using/windows.rst:1117 +#: ../../using/windows.rst:1142 msgid "" "When Python is hosted in another .exe (different directory, embedded via " "COM, etc), the \"Python Home\" will not be deduced, so the core path from " @@ -1835,20 +1857,20 @@ msgid "" "always read." msgstr "" -#: ../../using/windows.rst:1121 +#: ../../using/windows.rst:1146 msgid "" "If Python can't find its home and there are no registry value (frozen .exe, " "some very strange installation setup) you get a path with some default, but " "relative, paths." msgstr "" -#: ../../using/windows.rst:1125 +#: ../../using/windows.rst:1150 msgid "" "For those who want to bundle Python into their application or distribution, " "the following advice will prevent conflicts with other installations:" msgstr "" -#: ../../using/windows.rst:1128 +#: ../../using/windows.rst:1153 msgid "" "Include a ``._pth`` file alongside your executable containing the " "directories to include. This will ignore paths listed in the registry and " @@ -1856,20 +1878,20 @@ msgid "" "listed." msgstr "" -#: ../../using/windows.rst:1133 +#: ../../using/windows.rst:1158 msgid "" "If you are loading :file:`python3.dll` or :file:`python37.dll` in your own " "executable, explicitly call :c:func:`Py_SetPath` or (at least) :c:func:" "`Py_SetProgramName` before :c:func:`Py_Initialize`." msgstr "" -#: ../../using/windows.rst:1137 +#: ../../using/windows.rst:1162 msgid "" "Clear and/or overwrite :envvar:`PYTHONPATH` and set :envvar:`PYTHONHOME` " "before launching :file:`python.exe` from your application." msgstr "" -#: ../../using/windows.rst:1140 +#: ../../using/windows.rst:1165 msgid "" "If you cannot use the previous suggestions (for example, you are a " "distribution that allows people to run :file:`python.exe` directly), ensure " @@ -1878,7 +1900,7 @@ msgid "" "correctly named ZIP file will be detected instead.)" msgstr "" -#: ../../using/windows.rst:1146 +#: ../../using/windows.rst:1171 msgid "" "These will ensure that the files in a system-wide installation will not take " "precedence over the copy of the standard library bundled with your " @@ -1888,19 +1910,19 @@ msgid "" "packages." msgstr "" -#: ../../using/windows.rst:1155 +#: ../../using/windows.rst:1180 msgid "" "Adds ``._pth`` file support and removes ``applocal`` option from ``pyvenv." "cfg``." msgstr "" -#: ../../using/windows.rst:1157 +#: ../../using/windows.rst:1182 msgid "" "Adds ``pythonXX.zip`` as a potential landmark when directly adjacent to the " "executable." msgstr "" -#: ../../using/windows.rst:1163 +#: ../../using/windows.rst:1188 msgid "" "Modules specified in the registry under ``Modules`` (not ``PythonPath``) may " "be imported by :class:`importlib.machinery.WindowsRegistryFinder`. This " @@ -1908,88 +1930,88 @@ msgid "" "explicitly added to :attr:`sys.meta_path` in the future." msgstr "" -#: ../../using/windows.rst:1169 +#: ../../using/windows.rst:1194 msgid "Additional modules" msgstr "" -#: ../../using/windows.rst:1171 +#: ../../using/windows.rst:1196 msgid "" "Even though Python aims to be portable among all platforms, there are " "features that are unique to Windows. A couple of modules, both in the " "standard library and external, and snippets exist to use these features." msgstr "" -#: ../../using/windows.rst:1175 +#: ../../using/windows.rst:1200 msgid "" "The Windows-specific standard modules are documented in :ref:`mswin-specific-" "services`." msgstr "" -#: ../../using/windows.rst:1179 +#: ../../using/windows.rst:1204 msgid "PyWin32" msgstr "PyWin32" -#: ../../using/windows.rst:1181 +#: ../../using/windows.rst:1206 msgid "" "The `PyWin32 `_ module by Mark Hammond is " "a collection of modules for advanced Windows-specific support. This " "includes utilities for:" msgstr "" -#: ../../using/windows.rst:1185 +#: ../../using/windows.rst:1210 msgid "" "`Component Object Model `_ (COM)" msgstr "" -#: ../../using/windows.rst:1188 +#: ../../using/windows.rst:1213 msgid "Win32 API calls" msgstr "Win32 API 呼叫" -#: ../../using/windows.rst:1189 +#: ../../using/windows.rst:1214 msgid "Registry" msgstr "登錄檔(Registry)" -#: ../../using/windows.rst:1190 +#: ../../using/windows.rst:1215 msgid "Event log" msgstr "事件日誌(Event log)" -#: ../../using/windows.rst:1191 +#: ../../using/windows.rst:1216 msgid "" "`Microsoft Foundation Classes `_ (MFC) user interfaces" msgstr "" -#: ../../using/windows.rst:1195 +#: ../../using/windows.rst:1220 msgid "" "`PythonWin `_ is a sample MFC application shipped with PyWin32. " "It is an embeddable IDE with a built-in debugger." msgstr "" -#: ../../using/windows.rst:1202 +#: ../../using/windows.rst:1227 msgid "" "`Win32 How Do I...? `_" msgstr "" "`Win32 How Do I...? `_" -#: ../../using/windows.rst:1202 +#: ../../using/windows.rst:1227 msgid "by Tim Golden" msgstr "由 Tim Golden 所著" -#: ../../using/windows.rst:1204 +#: ../../using/windows.rst:1229 msgid "`Python and COM `_" msgstr "`Python and COM `_" -#: ../../using/windows.rst:1205 +#: ../../using/windows.rst:1230 msgid "by David and Paul Boddie" msgstr "由 David 與 Paul Boddie 所著" -#: ../../using/windows.rst:1209 +#: ../../using/windows.rst:1234 msgid "cx_Freeze" msgstr "cx_Freeze" -#: ../../using/windows.rst:1211 +#: ../../using/windows.rst:1236 msgid "" "`cx_Freeze `_ is a :mod:" "`distutils` extension (see :ref:`extending-distutils`) which wraps Python " @@ -1998,11 +2020,11 @@ msgid "" "users to install Python." msgstr "" -#: ../../using/windows.rst:1219 +#: ../../using/windows.rst:1244 msgid "Compiling Python on Windows" msgstr "編譯 Python 在 Windows" -#: ../../using/windows.rst:1221 +#: ../../using/windows.rst:1246 msgid "" "If you want to compile CPython yourself, first thing you should do is get " "the `source `_. You can download " @@ -2010,48 +2032,48 @@ msgid "" "devguide.python.org/setup/#get-the-source-code>`_." msgstr "" -#: ../../using/windows.rst:1226 +#: ../../using/windows.rst:1251 msgid "" "The source tree contains a build solution and project files for Microsoft " "Visual Studio, which is the compiler used to build the official Python " "releases. These files are in the :file:`PCbuild` directory." msgstr "" -#: ../../using/windows.rst:1230 +#: ../../using/windows.rst:1255 msgid "" "Check :file:`PCbuild/readme.txt` for general information on the build " "process." msgstr "" -#: ../../using/windows.rst:1232 +#: ../../using/windows.rst:1257 msgid "For extension modules, consult :ref:`building-on-windows`." msgstr "" -#: ../../using/windows.rst:1236 +#: ../../using/windows.rst:1261 msgid "Other Platforms" msgstr "其他平台" -#: ../../using/windows.rst:1238 +#: ../../using/windows.rst:1263 msgid "" "With ongoing development of Python, some platforms that used to be supported " "earlier are no longer supported (due to the lack of users or developers). " "Check :pep:`11` for details on all unsupported platforms." msgstr "" -#: ../../using/windows.rst:1242 +#: ../../using/windows.rst:1267 msgid "" "`Windows CE `_ is `no longer supported " "`__ since Python 3 (if it " "ever was)." msgstr "" -#: ../../using/windows.rst:1245 +#: ../../using/windows.rst:1270 msgid "" "The `Cygwin `_ installer offers to install the `Python " "interpreter `__ as well" msgstr "" -#: ../../using/windows.rst:1249 +#: ../../using/windows.rst:1274 msgid "" "See `Python for Windows `_ for " "detailed information about platforms with pre-compiled installers."