diff --git a/extending/extending.po b/extending/extending.po index ec20dea8d4..8fed1eb075 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-27 00:15+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2025-02-17 14:34+0000\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -859,11 +859,11 @@ msgstr "" #: ../../extending/extending.rst:428 msgid "" "When embedding Python, the :c:func:`!PyInit_spam` function is not called " -"automatically unless there's an entry in the :c:data:`PyImport_Inittab` " +"automatically unless there's an entry in the :c:data:`!PyImport_Inittab` " "table. To add the module to the initialization table, use :c:func:" "`PyImport_AppendInittab`, optionally followed by an import of the module::" msgstr "" -"嵌入 Python 時,除非在 :c:data:`PyImport_Inittab` 表中有相關條目,否則不會自" +"嵌入 Python 時,除非在 :c:data:`!PyImport_Inittab` 表中有相關條目,否則不會自" "動呼叫 :c:func:`!PyInit_spam` 函式。要將模組加入初始化表,請使用 :c:func:" "`PyImport_AppendInittab` 並在隨後選擇性地將該模組引入: ::" @@ -1522,7 +1522,7 @@ msgstr "" #: ../../extending/extending.rst:899 msgid "Reference Counts" -msgstr "" +msgstr "參照計數" #: ../../extending/extending.rst:901 msgid "" @@ -1616,7 +1616,7 @@ msgstr "" #: ../../extending/extending.rst:971 msgid "Reference Counting in Python" -msgstr "" +msgstr "Python 中的參照計數" #: ../../extending/extending.rst:973 msgid "" @@ -2303,129 +2303,3 @@ msgstr "PyArg_ParseTupleAndKeywords(C 函式)" #: ../../extending/extending.rst:797 msgid "Philbrick, Geoff" msgstr "Philbrick, Geoff" - -#~ msgid "" -#~ "All user-visible symbols defined by :file:`Python.h` have a prefix of " -#~ "``Py`` or ``PY``, except those defined in standard header files. For " -#~ "convenience, and since they are used extensively by the Python " -#~ "interpreter, ``\"Python.h\"`` includes a few standard header files: " -#~ "````, ````, ````, and ````. If the " -#~ "latter header file does not exist on your system, it declares the " -#~ "functions :c:func:`malloc`, :c:func:`free` and :c:func:`realloc` directly." -#~ msgstr "" -#~ "除了那些在標準標頭檔中定義的符號以外,所有由 :file:`Python.h` 定義的使用者" -#~ "可見符號 (user-visible symbols) 的前綴都是 ``Py`` 或 ``PY``。為了方便,也" -#~ "因為 Python 直譯器的大量使用,``\"Python.h\"`` 也引入了一些標準的標頭檔:" -#~ "````、````、```` 和 ````。如果 " -#~ "```` 在你的系統上不存在,它會直接宣告 :c:func:`malloc`、:c:func:" -#~ "`free` 和 :c:func:`realloc` 函式。" - -#~ msgid "" -#~ "and initialize it in your module's initialization function (:c:func:`!" -#~ "PyInit_spam`) with an exception object::" -#~ msgstr "" -#~ "並在你的模組初始化函式中使用一個例外物件來初始化它 (:c:func:`!" -#~ "PyInit_spam`): ::" - -#~ msgid "" -#~ "PyMODINIT_FUNC\n" -#~ "PyInit_spam(void)\n" -#~ "{\n" -#~ " PyObject *m;\n" -#~ "\n" -#~ " m = PyModule_Create(&spammodule);\n" -#~ " if (m == NULL)\n" -#~ " return NULL;\n" -#~ "\n" -#~ " SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);\n" -#~ " if (PyModule_AddObjectRef(m, \"error\", SpamError) < 0) {\n" -#~ " Py_CLEAR(SpamError);\n" -#~ " Py_DECREF(m);\n" -#~ " return NULL;\n" -#~ " }\n" -#~ "\n" -#~ " return m;\n" -#~ "}" -#~ msgstr "" -#~ "PyMODINIT_FUNC\n" -#~ "PyInit_spam(void)\n" -#~ "{\n" -#~ " PyObject *m;\n" -#~ "\n" -#~ " m = PyModule_Create(&spammodule);\n" -#~ " if (m == NULL)\n" -#~ " return NULL;\n" -#~ "\n" -#~ " SpamError = PyErr_NewException(\"spam.error\", NULL, NULL);\n" -#~ " if (PyModule_AddObjectRef(m, \"error\", SpamError) < 0) {\n" -#~ " Py_CLEAR(SpamError);\n" -#~ " Py_DECREF(m);\n" -#~ " return NULL;\n" -#~ " }\n" -#~ "\n" -#~ " return m;\n" -#~ "}" - -#~ msgid "" -#~ "static struct PyModuleDef spammodule = {\n" -#~ " PyModuleDef_HEAD_INIT,\n" -#~ " \"spam\", /* name of module */\n" -#~ " spam_doc, /* module documentation, may be NULL */\n" -#~ " -1, /* size of per-interpreter state of the module,\n" -#~ " or -1 if the module keeps state in global variables. */\n" -#~ " SpamMethods\n" -#~ "};" -#~ msgstr "" -#~ "static struct PyModuleDef spammodule = {\n" -#~ " PyModuleDef_HEAD_INIT,\n" -#~ " \"spam\", /* 模組名稱 */\n" -#~ " spam_doc, /* 模組文件,可能為 NULL */\n" -#~ " -1, /* 模組的個別直譯器狀態的大小,\n" -#~ " 如果模組將狀態保存在全域變數中則為 -1 */\n" -#~ " SpamMethods\n" -#~ "};" - -#~ msgid "" -#~ "When the Python program imports module :mod:`!spam` for the first time, :" -#~ "c:func:`!PyInit_spam` is called. (See below for comments about embedding " -#~ "Python.) It calls :c:func:`PyModule_Create`, which returns a module " -#~ "object, and inserts built-in function objects into the newly created " -#~ "module based upon the table (an array of :c:type:`PyMethodDef` " -#~ "structures) found in the module definition. :c:func:`PyModule_Create` " -#~ "returns a pointer to the module object that it creates. It may abort " -#~ "with a fatal error for certain errors, or return ``NULL`` if the module " -#~ "could not be initialized satisfactorily. The init function must return " -#~ "the module object to its caller, so that it then gets inserted into ``sys." -#~ "modules``." -#~ msgstr "" -#~ "當 Python 程式第一次引入模組 :mod:`!spam` 時,:c:func:`!PyInit_spam` 會被" -#~ "呼叫。(有關嵌入 Python 的註解請參見下文。)它會呼叫回傳一個模組物件的 :c:" -#~ "func:`PyModule_Create`,並根據在模組定義中所找到的表(一個 :c:type:" -#~ "`PyMethodDef` 結構的陣列)將內建的函式物件插入到新建立的模組中。:c:func:" -#~ "`PyModule_Create` 會回傳一個指向它建立之模組物件的指標。對於某些錯誤情況," -#~ "它可能會以嚴重錯誤的形式來中止;如果模組無法令人滿意地被初始化,它也會回" -#~ "傳 ``NULL``。初始化函式必須把模組物件回傳給它的呼叫者,這樣它才會被插入到 " -#~ "``sys.modules`` 中。" - -#~ msgid "" -#~ "Removing entries from ``sys.modules`` or importing compiled modules into " -#~ "multiple interpreters within a process (or following a :c:func:`fork` " -#~ "without an intervening :c:func:`exec`) can create problems for some " -#~ "extension modules. Extension module authors should exercise caution when " -#~ "initializing internal data structures." -#~ msgstr "" -#~ "從 ``sys.modules`` 中移除項目,或在一個行程中將已編譯模組引入到多個直譯器" -#~ "中(或在沒有 :c:func:`exec` 介入的情況下使用 :c:func:`fork`)可能會對某些" -#~ "擴充模組造成問題。擴充模組作者在初始化內部資料結構時應特別小心。" - -#~ msgid "" -#~ "Unlike our ``spam`` example, ``xxmodule`` uses *multi-phase " -#~ "initialization* (new in Python 3.5), where a PyModuleDef structure is " -#~ "returned from ``PyInit_spam``, and creation of the module is left to the " -#~ "import machinery. For details on multi-phase initialization, see :PEP:" -#~ "`489`." -#~ msgstr "" -#~ "不像我們的 ``spam`` 範例,``xxmodule`` 使用了\\ *多階段初始化 (multi-" -#~ "phase initialization)*\\ (Python 3.5 新增),其中的 PyModuleDef 結構會從 " -#~ "``PyInit_spam`` 回傳,而模組的建立則交由引入機制來完成。關於多階段初始化的" -#~ "詳細資訊請參閱 :PEP:`489`。" diff --git a/howto/instrumentation.po b/howto/instrumentation.po index d9f39551eb..be4be21d27 100644 --- a/howto/instrumentation.po +++ b/howto/instrumentation.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-03 11:11+0800\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2023-08-17 22:17+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -574,18 +574,18 @@ msgstr "" msgid "(assuming a :ref:`debug build ` of CPython 3.6)" msgstr "(假設 CPython 3.6 的\\ :ref:`除錯建置版本 `)" -#: ../../howto/instrumentation.rst:273 +#: ../../howto/instrumentation.rst:275 msgid "Available static markers" msgstr "可用的靜態標記" -#: ../../howto/instrumentation.rst:277 +#: ../../howto/instrumentation.rst:279 msgid "" "This marker indicates that execution of a Python function has begun. It is " "only triggered for pure-Python (bytecode) functions." msgstr "" "該標記表示 Python 函式的執行已經開始。它僅針對純 Python(位元組碼)函式觸發。" -#: ../../howto/instrumentation.rst:280 +#: ../../howto/instrumentation.rst:282 msgid "" "The filename, function name, and line number are provided back to the " "tracing script as positional arguments, which must be accessed using " @@ -594,25 +594,25 @@ msgstr "" "檔案名稱、函式名稱和列號作為位置引數提供給追蹤腳本,必須使用 ``$arg1``、" "``$arg2``、``$arg3`` 來存取:" -#: ../../howto/instrumentation.rst:284 +#: ../../howto/instrumentation.rst:286 msgid "" "``$arg1`` : ``(const char *)`` filename, accessible using " "``user_string($arg1)``" msgstr "" "``$arg1`` : ``(const char *)`` 檔案名稱,可使用 ``user_string($arg1)`` 存取" -#: ../../howto/instrumentation.rst:286 +#: ../../howto/instrumentation.rst:288 msgid "" "``$arg2`` : ``(const char *)`` function name, accessible using " "``user_string($arg2)``" msgstr "" "``$arg2`` :``(const char *)`` 函式名稱,可使用 ``user_string($arg2)`` 存取" -#: ../../howto/instrumentation.rst:289 +#: ../../howto/instrumentation.rst:291 msgid "``$arg3`` : ``int`` line number" msgstr "``$arg3`` : ``int`` 列號" -#: ../../howto/instrumentation.rst:293 +#: ../../howto/instrumentation.rst:295 msgid "" "This marker is the converse of :c:func:`!function__entry`, and indicates " "that execution of a Python function has ended (either via ``return``, or via " @@ -621,11 +621,11 @@ msgstr "" "該標記與 :c:func:`!function__entry` 相反,表示 Python 函式的執行已結束(透過 " "``return`` 或透過例外)。它僅針對純 Python(位元組碼)函式觸發。" -#: ../../howto/instrumentation.rst:297 +#: ../../howto/instrumentation.rst:299 msgid "The arguments are the same as for :c:func:`!function__entry`" msgstr "引數與 :c:func:`!function__entry` 相同" -#: ../../howto/instrumentation.rst:301 +#: ../../howto/instrumentation.rst:303 msgid "" "This marker indicates a Python line is about to be executed. It is the " "equivalent of line-by-line tracing with a Python profiler. It is not " @@ -634,11 +634,11 @@ msgstr "" "該標記表示一列 Python 即將被執行。它相當於使用 Python 分析器來逐行追蹤。它不" "在 C 函式內觸發。" -#: ../../howto/instrumentation.rst:305 +#: ../../howto/instrumentation.rst:307 msgid "The arguments are the same as for :c:func:`!function__entry`." msgstr "引數與 :c:func:`!function__entry` 相同。" -#: ../../howto/instrumentation.rst:309 +#: ../../howto/instrumentation.rst:311 msgid "" "Fires when the Python interpreter starts a garbage collection cycle. " "``arg0`` is the generation to scan, like :func:`gc.collect`." @@ -646,19 +646,19 @@ msgstr "" "當 Python 直譯器開始垃圾回收 (garbage collection) 週期時觸發。``arg0`` 是要掃" "描的一代 (generation),如 :func:`gc.collect`。" -#: ../../howto/instrumentation.rst:314 +#: ../../howto/instrumentation.rst:316 msgid "" "Fires when the Python interpreter finishes a garbage collection cycle. " "``arg0`` is the number of collected objects." msgstr "當 Python 直譯器完成垃圾回收週期時觸發。``arg0`` 是收集到的物件數量。" -#: ../../howto/instrumentation.rst:319 +#: ../../howto/instrumentation.rst:321 msgid "" "Fires before :mod:`importlib` attempts to find and load the module. ``arg0`` " "is the module name." msgstr "在 :mod:`importlib` 嘗試查找並載入模組之前觸發。``arg0`` 是模組名稱。" -#: ../../howto/instrumentation.rst:326 +#: ../../howto/instrumentation.rst:328 msgid "" "Fires after :mod:`importlib`'s find_and_load function is called. ``arg0`` is " "the module name, ``arg1`` indicates if module was successfully loaded." @@ -666,7 +666,7 @@ msgstr "" "在呼叫 :mod:`importlib` 的 find_and_load 函式後觸發。 ``arg0`` 是模組名稱," "``arg1`` 代表模組是否已成功載入。" -#: ../../howto/instrumentation.rst:335 +#: ../../howto/instrumentation.rst:337 msgid "" "Fires when :func:`sys.audit` or :c:func:`PySys_Audit` is called. ``arg0`` is " "the event name as C string, ``arg1`` is a :c:type:`PyObject` pointer to a " @@ -675,11 +675,11 @@ msgstr "" "當呼叫 :func:`sys.audit` 或 :c:func:`PySys_Audit` 時觸發。``arg0`` 是 C 字串" "形式的事件名稱,``arg1`` 是指向元組 (tuple) 物件的 :c:type:`PyObject` 指標。" -#: ../../howto/instrumentation.rst:343 +#: ../../howto/instrumentation.rst:345 msgid "SystemTap Tapsets" msgstr "SystemTap Tapsets" -#: ../../howto/instrumentation.rst:345 +#: ../../howto/instrumentation.rst:347 msgid "" "The higher-level way to use the SystemTap integration is to use a " "\"tapset\": SystemTap's equivalent of a library, which hides some of the " @@ -688,11 +688,11 @@ msgstr "" "使用 SystemTap 整合的高階方法是使用 \"tapset\":SystemTap 相當於一個函式庫," "它隱藏了靜態標記的一些低階詳細資訊。" -#: ../../howto/instrumentation.rst:349 +#: ../../howto/instrumentation.rst:351 msgid "Here is a tapset file, based on a non-shared build of CPython:" msgstr "這是一個 tapset 檔案,是基於 CPython 的非共享建置版本:" -#: ../../howto/instrumentation.rst:351 +#: ../../howto/instrumentation.rst:353 msgid "" "/*\n" " Provide a higher-level wrapping around the function__entry and\n" @@ -733,7 +733,7 @@ msgstr "" " frameptr = $arg4\n" "}" -#: ../../howto/instrumentation.rst:372 +#: ../../howto/instrumentation.rst:374 msgid "" "If this file is installed in SystemTap's tapset directory (e.g. ``/usr/share/" "systemtap/tapset``), then these additional probepoints become available:" @@ -741,7 +741,7 @@ msgstr "" "如果此檔案是安裝在 SystemTap 的 tapset 目錄中(例如 ``/usr/share/systemtap/" "tapset``),則這些額外的探測點將可被使用:" -#: ../../howto/instrumentation.rst:378 +#: ../../howto/instrumentation.rst:380 msgid "" "This probe point indicates that execution of a Python function has begun. It " "is only triggered for pure-Python (bytecode) functions." @@ -749,7 +749,7 @@ msgstr "" "該探測點表示 Python 函式的執行已經開始。它僅針對純 Python(位元組碼)函式觸" "發。" -#: ../../howto/instrumentation.rst:383 +#: ../../howto/instrumentation.rst:385 msgid "" "This probe point is the converse of ``python.function.return``, and " "indicates that execution of a Python function has ended (either via " @@ -759,11 +759,11 @@ msgstr "" "這個探測點與 ``python.function.return`` 相反,表示 Python 函式的執行已經結束" "(透過 ``return`` 或者透過例外)。它僅針對純 Python(位元組碼)函式觸發。" -#: ../../howto/instrumentation.rst:390 +#: ../../howto/instrumentation.rst:392 msgid "Examples" msgstr "範例" -#: ../../howto/instrumentation.rst:391 +#: ../../howto/instrumentation.rst:393 msgid "" "This SystemTap script uses the tapset above to more cleanly implement the " "example given above of tracing the Python function-call hierarchy, without " @@ -772,7 +772,7 @@ msgstr "" "此 SystemTap 腳本使用上面的 tapset 來更清晰地實作上面給出的追蹤 Python 函式呼" "叫階層結構的範例,而無需直接命名靜態標記:" -#: ../../howto/instrumentation.rst:395 +#: ../../howto/instrumentation.rst:397 msgid "" "probe python.function.entry\n" "{\n" @@ -798,7 +798,7 @@ msgstr "" " thread_indent(-1), funcname, filename, lineno);\n" "}" -#: ../../howto/instrumentation.rst:410 +#: ../../howto/instrumentation.rst:412 msgid "" "The following script uses the tapset above to provide a top-like view of all " "running CPython code, showing the top 20 most frequently entered bytecode " @@ -807,7 +807,7 @@ msgstr "" "以下腳本使用上面的 tapset 來提供所有正在運行之 CPython 程式碼的近乎最高層視" "角,顯示整個系統中每秒最常被進入的 20 個位元組碼幀 (bytecode frame):" -#: ../../howto/instrumentation.rst:414 +#: ../../howto/instrumentation.rst:416 msgid "" "global fn_calls;\n" "\n" diff --git a/library/collections.abc.po b/library/collections.abc.po index e680b63eff..b071d8b15b 100644 --- a/library/collections.abc.po +++ b/library/collections.abc.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-22 08:51+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -580,44 +580,58 @@ msgid "" "quadratic performance and will likely need to be overridden." msgstr "" -#: ../../library/collections.abc.rst:279 -msgid "The index() method added support for *stop* and *start* arguments." +#: ../../library/collections.abc.rst:281 +msgid "Return first index of *value*." msgstr "" #: ../../library/collections.abc.rst:283 +msgid "Raises :exc:`ValueError` if the value is not present." +msgstr "" + +#: ../../library/collections.abc.rst:285 +msgid "" +"Supporting the *start* and *stop* arguments is optional, but recommended." +msgstr "" + +#: ../../library/collections.abc.rst:287 +msgid "" +"The :meth:`!index` method added support for *stop* and *start* arguments." +msgstr "" + +#: ../../library/collections.abc.rst:291 msgid "" "The :class:`ByteString` ABC has been deprecated. For use in typing, prefer a " "union, like ``bytes | bytearray``, or :class:`collections.abc.Buffer`. For " "use as an ABC, prefer :class:`Sequence` or :class:`collections.abc.Buffer`." msgstr "" -#: ../../library/collections.abc.rst:292 +#: ../../library/collections.abc.rst:300 msgid "ABCs for read-only and mutable :ref:`sets `." msgstr "" -#: ../../library/collections.abc.rst:297 +#: ../../library/collections.abc.rst:305 msgid "ABCs for read-only and mutable :term:`mappings `." msgstr "" -#: ../../library/collections.abc.rst:304 +#: ../../library/collections.abc.rst:312 msgid "" "ABCs for mapping, items, keys, and values :term:`views `." msgstr "" -#: ../../library/collections.abc.rst:308 +#: ../../library/collections.abc.rst:316 msgid "" "ABC for :term:`awaitable` objects, which can be used in :keyword:`await` " "expressions. Custom implementations must provide the :meth:`~object." "__await__` method." msgstr "" -#: ../../library/collections.abc.rst:312 +#: ../../library/collections.abc.rst:320 msgid "" ":term:`Coroutine ` objects and instances of the :class:" "`~collections.abc.Coroutine` ABC are all instances of this ABC." msgstr "" -#: ../../library/collections.abc.rst:316 +#: ../../library/collections.abc.rst:324 msgid "" "In CPython, generator-based coroutines (:term:`generators ` " "decorated with :func:`@types.coroutine `) are *awaitables*, " @@ -626,7 +640,7 @@ msgid "" "`inspect.isawaitable` to detect them." msgstr "" -#: ../../library/collections.abc.rst:326 +#: ../../library/collections.abc.rst:334 msgid "" "ABC for :term:`coroutine` compatible classes. These implement the following " "methods, defined in :ref:`coroutine-objects`: :meth:`~coroutine.send`, :meth:" @@ -635,7 +649,7 @@ msgid "" "instances are also instances of :class:`Awaitable`." msgstr "" -#: ../../library/collections.abc.rst:334 +#: ../../library/collections.abc.rst:342 msgid "" "In CPython, generator-based coroutines (:term:`generators ` " "decorated with :func:`@types.coroutine `) are *awaitables*, " @@ -644,54 +658,54 @@ msgid "" "`inspect.isawaitable` to detect them." msgstr "" -#: ../../library/collections.abc.rst:340 +#: ../../library/collections.abc.rst:348 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on using :class:" "`!Coroutine` in type annotations. The variance and order of type parameters " "correspond to those of :class:`Generator`." msgstr "" -#: ../../library/collections.abc.rst:349 +#: ../../library/collections.abc.rst:357 msgid "" "ABC for classes that provide an ``__aiter__`` method. See also the " "definition of :term:`asynchronous iterable`." msgstr "" -#: ../../library/collections.abc.rst:356 +#: ../../library/collections.abc.rst:364 msgid "" "ABC for classes that provide ``__aiter__`` and ``__anext__`` methods. See " "also the definition of :term:`asynchronous iterator`." msgstr "" -#: ../../library/collections.abc.rst:363 +#: ../../library/collections.abc.rst:371 msgid "" "ABC for :term:`asynchronous generator` classes that implement the protocol " "defined in :pep:`525` and :pep:`492`." msgstr "" -#: ../../library/collections.abc.rst:366 +#: ../../library/collections.abc.rst:374 msgid "" "See :ref:`annotating-generators-and-coroutines` for details on using :class:" "`!AsyncGenerator` in type annotations." msgstr "" -#: ../../library/collections.abc.rst:373 +#: ../../library/collections.abc.rst:381 msgid "" "ABC for classes that provide the :meth:`~object.__buffer__` method, " "implementing the :ref:`buffer protocol `. See :pep:`688`." msgstr "" -#: ../../library/collections.abc.rst:379 +#: ../../library/collections.abc.rst:387 msgid "Examples and Recipes" msgstr "" -#: ../../library/collections.abc.rst:381 +#: ../../library/collections.abc.rst:389 msgid "" "ABCs allow us to ask classes or instances if they provide particular " "functionality, for example::" msgstr "" -#: ../../library/collections.abc.rst:384 +#: ../../library/collections.abc.rst:392 msgid "" "size = None\n" "if isinstance(myvar, collections.abc.Sized):\n" @@ -701,7 +715,7 @@ msgstr "" "if isinstance(myvar, collections.abc.Sized):\n" " size = len(myvar)" -#: ../../library/collections.abc.rst:388 +#: ../../library/collections.abc.rst:396 msgid "" "Several of the ABCs are also useful as mixins that make it easier to develop " "classes supporting container APIs. For example, to write a class supporting " @@ -711,7 +725,7 @@ msgid "" "methods such as :meth:`!__and__` and :meth:`~frozenset.isdisjoint`::" msgstr "" -#: ../../library/collections.abc.rst:395 +#: ../../library/collections.abc.rst:403 msgid "" "class ListBasedSet(collections.abc.Set):\n" " ''' Alternate set implementation favoring space over speed\n" @@ -737,11 +751,11 @@ msgid "" "automatically" msgstr "" -#: ../../library/collections.abc.rst:417 +#: ../../library/collections.abc.rst:425 msgid "Notes on using :class:`Set` and :class:`MutableSet` as a mixin:" msgstr "" -#: ../../library/collections.abc.rst:420 +#: ../../library/collections.abc.rst:428 msgid "" "Since some set operations create new sets, the default mixin methods need a " "way to create new instances from an :term:`iterable`. The class constructor " @@ -754,14 +768,14 @@ msgid "" "iterable argument." msgstr "" -#: ../../library/collections.abc.rst:431 +#: ../../library/collections.abc.rst:439 msgid "" "To override the comparisons (presumably for speed, as the semantics are " "fixed), redefine :meth:`~object.__le__` and :meth:`~object.__ge__`, then the " "other operations will automatically follow suit." msgstr "" -#: ../../library/collections.abc.rst:437 +#: ../../library/collections.abc.rst:445 msgid "" "The :class:`Set` mixin provides a :meth:`!_hash` method to compute a hash " "value for the set; however, :meth:`~object.__hash__` is not defined because " @@ -770,12 +784,12 @@ msgid "" "define ``__hash__ = Set._hash``." msgstr "" -#: ../../library/collections.abc.rst:445 +#: ../../library/collections.abc.rst:453 msgid "" "`OrderedSet recipe `_ for an " "example built on :class:`MutableSet`." msgstr "" -#: ../../library/collections.abc.rst:448 +#: ../../library/collections.abc.rst:456 msgid "For more about ABCs, see the :mod:`abc` module and :pep:`3119`." msgstr "關於 ABC 的更多資訊請見 :mod:`abc` module 和 :pep:`3119`。" diff --git a/library/contextvars.po b/library/contextvars.po index 734d35fd88..781c21303f 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2024, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. msgid "" msgstr "" @@ -308,7 +308,7 @@ msgid "" "Context. Returns *callable*'s return value, or propagates an exception if " "one occurred." msgstr "" -"進入 Context,執行``callable(*args, **kwargs)``,然後退出 Context。 回傳 " +"進入 Context,執行 ``callable(*args, **kwargs)``,然後退出 Context。 回傳 " "*callable* 的回傳值,如果發生例外(exception),則傳播例外。" #: ../../library/contextvars.rst:185 @@ -403,8 +403,8 @@ msgid "" "Return the value for *var* if *var* has the value in the context object. " "Return *default* otherwise. If *default* is not given, return ``None``." msgstr "" -"如果 *var* 的值在情境物件中,則回傳 *var* 的值。 否則回傳 *default*。 如果" -"沒有 *default* 值,則回傳``None``。" +"如果 *var* 的值在情境物件中,則回傳 *var* 的值。否則回傳 *default*。如果" +"沒有 *default* 值,則回傳 ``None``。" #: ../../library/contextvars.rst:254 msgid "Return an iterator over the variables stored in the context object." diff --git a/library/curses.po b/library/curses.po index 9bb373d7b3..6983ffd45c 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-11 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -275,7 +275,7 @@ msgid "" "const:`BUTTON_ALT`." msgstr "" -#: ../../library/curses.rst:215 ../../library/curses.rst:1776 +#: ../../library/curses.rst:215 ../../library/curses.rst:1778 msgid "" "The ``BUTTON5_*`` constants are now exposed if they are provided by the " "underlying curses library." @@ -778,46 +778,46 @@ msgstr "" msgid "Window Objects" msgstr "" -#: ../../library/curses.rst:706 +#: ../../library/curses.rst:708 msgid "" "Window objects, as returned by :func:`initscr` and :func:`newwin` above, " "have the following methods and attributes:" msgstr "" -#: ../../library/curses.rst:713 +#: ../../library/curses.rst:715 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, overwriting any " "character previously painted at that location. By default, the character " "position and attributes are the current settings for the window object." msgstr "" -#: ../../library/curses.rst:719 +#: ../../library/curses.rst:721 msgid "" "Writing outside the window, subwindow, or pad raises a :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the character is printed." msgstr "" -#: ../../library/curses.rst:727 +#: ../../library/curses.rst:729 msgid "" "Paint at most *n* characters of the character string *str* at ``(y, x)`` " "with attributes *attr*, overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:735 +#: ../../library/curses.rst:737 msgid "" "Paint the character string *str* at ``(y, x)`` with attributes *attr*, " "overwriting anything previously on the display." msgstr "" -#: ../../library/curses.rst:740 +#: ../../library/curses.rst:742 msgid "" "Writing outside the window, subwindow, or pad raises :exc:`curses.error`. " "Attempting to write to the lower right corner of a window, subwindow, or pad " "will cause an exception to be raised after the string is printed." msgstr "" -#: ../../library/curses.rst:744 +#: ../../library/curses.rst:746 msgid "" "A `bug in ncurses `_, the backend for " "this Python module, can cause SegFaults when resizing windows. This is fixed " @@ -827,44 +827,44 @@ msgid "" "line." msgstr "" -#: ../../library/curses.rst:754 +#: ../../library/curses.rst:756 msgid "" "Remove attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: ../../library/curses.rst:760 +#: ../../library/curses.rst:762 msgid "" "Add attribute *attr* from the \"background\" set applied to all writes to " "the current window." msgstr "" -#: ../../library/curses.rst:766 +#: ../../library/curses.rst:768 msgid "" "Set the \"background\" set of attributes to *attr*. This set is initially " "``0`` (no attributes)." msgstr "" -#: ../../library/curses.rst:772 +#: ../../library/curses.rst:774 msgid "" "Set the background property of the window to the character *ch*, with " "attributes *attr*. The change is then applied to every character position " "in that window:" msgstr "" -#: ../../library/curses.rst:776 +#: ../../library/curses.rst:778 msgid "" "The attribute of every character in the window is changed to the new " "background attribute." msgstr "" -#: ../../library/curses.rst:779 +#: ../../library/curses.rst:781 msgid "" "Wherever the former background character appears, it is changed to the new " "background character." msgstr "" -#: ../../library/curses.rst:785 +#: ../../library/curses.rst:787 msgid "" "Set the window's background. A window's background consists of a character " "and any combination of attributes. The attribute part of the background is " @@ -875,128 +875,128 @@ msgid "" "delete line/character operations." msgstr "" -#: ../../library/curses.rst:795 +#: ../../library/curses.rst:797 msgid "" "Draw a border around the edges of the window. Each parameter specifies the " "character to use for a specific part of the border; see the table below for " "more details." msgstr "" -#: ../../library/curses.rst:801 +#: ../../library/curses.rst:803 msgid "" "A ``0`` value for any parameter will cause the default character to be used " "for that parameter. Keyword parameters can *not* be used. The defaults are " "listed in this table:" msgstr "" -#: ../../library/curses.rst:806 +#: ../../library/curses.rst:808 msgid "Parameter" msgstr "參數" -#: ../../library/curses.rst:806 +#: ../../library/curses.rst:808 msgid "Description" msgstr "描述" -#: ../../library/curses.rst:806 +#: ../../library/curses.rst:808 msgid "Default value" msgstr "" -#: ../../library/curses.rst:808 +#: ../../library/curses.rst:810 msgid "*ls*" msgstr "*ls*" -#: ../../library/curses.rst:808 +#: ../../library/curses.rst:810 msgid "Left side" msgstr "" -#: ../../library/curses.rst:808 ../../library/curses.rst:810 +#: ../../library/curses.rst:810 ../../library/curses.rst:812 msgid ":const:`ACS_VLINE`" msgstr ":const:`ACS_VLINE`" -#: ../../library/curses.rst:810 +#: ../../library/curses.rst:812 msgid "*rs*" msgstr "*rs*" -#: ../../library/curses.rst:810 +#: ../../library/curses.rst:812 msgid "Right side" msgstr "" -#: ../../library/curses.rst:812 +#: ../../library/curses.rst:814 msgid "*ts*" msgstr "*ts*" -#: ../../library/curses.rst:812 +#: ../../library/curses.rst:814 msgid "Top" msgstr "" -#: ../../library/curses.rst:812 ../../library/curses.rst:814 +#: ../../library/curses.rst:814 ../../library/curses.rst:816 msgid ":const:`ACS_HLINE`" msgstr ":const:`ACS_HLINE`" -#: ../../library/curses.rst:814 +#: ../../library/curses.rst:816 msgid "*bs*" msgstr "*bs*" -#: ../../library/curses.rst:814 +#: ../../library/curses.rst:816 msgid "Bottom" msgstr "" -#: ../../library/curses.rst:816 +#: ../../library/curses.rst:818 msgid "*tl*" msgstr "*tl*" -#: ../../library/curses.rst:816 +#: ../../library/curses.rst:818 msgid "Upper-left corner" msgstr "" -#: ../../library/curses.rst:816 +#: ../../library/curses.rst:818 msgid ":const:`ACS_ULCORNER`" msgstr ":const:`ACS_ULCORNER`" -#: ../../library/curses.rst:818 +#: ../../library/curses.rst:820 msgid "*tr*" msgstr "*tr*" -#: ../../library/curses.rst:818 +#: ../../library/curses.rst:820 msgid "Upper-right corner" msgstr "" -#: ../../library/curses.rst:818 +#: ../../library/curses.rst:820 msgid ":const:`ACS_URCORNER`" msgstr ":const:`ACS_URCORNER`" -#: ../../library/curses.rst:820 +#: ../../library/curses.rst:822 msgid "*bl*" msgstr "*bl*" -#: ../../library/curses.rst:820 +#: ../../library/curses.rst:822 msgid "Bottom-left corner" msgstr "" -#: ../../library/curses.rst:820 +#: ../../library/curses.rst:822 msgid ":const:`ACS_LLCORNER`" msgstr ":const:`ACS_LLCORNER`" -#: ../../library/curses.rst:822 +#: ../../library/curses.rst:824 msgid "*br*" msgstr "*br*" -#: ../../library/curses.rst:822 +#: ../../library/curses.rst:824 msgid "Bottom-right corner" msgstr "" -#: ../../library/curses.rst:822 +#: ../../library/curses.rst:824 msgid ":const:`ACS_LRCORNER`" msgstr ":const:`ACS_LRCORNER`" -#: ../../library/curses.rst:828 +#: ../../library/curses.rst:830 msgid "" "Similar to :meth:`border`, but both *ls* and *rs* are *vertch* and both *ts* " "and *bs* are *horch*. The default corner characters are always used by this " "function." msgstr "" -#: ../../library/curses.rst:837 +#: ../../library/curses.rst:839 msgid "" "Set the attributes of *num* characters at the current cursor position, or at " "position ``(y, x)`` if supplied. If *num* is not given or is ``-1``, the " @@ -1006,45 +1006,45 @@ msgid "" "be redisplayed by the next window refresh." msgstr "" -#: ../../library/curses.rst:847 +#: ../../library/curses.rst:849 msgid "" "Like :meth:`erase`, but also cause the whole window to be repainted upon " "next call to :meth:`refresh`." msgstr "" -#: ../../library/curses.rst:853 +#: ../../library/curses.rst:855 msgid "" "If *flag* is ``True``, the next call to :meth:`refresh` will clear the " "window completely." msgstr "" -#: ../../library/curses.rst:859 +#: ../../library/curses.rst:861 msgid "" "Erase from cursor to the end of the window: all lines below the cursor are " "deleted, and then the equivalent of :meth:`clrtoeol` is performed." msgstr "" -#: ../../library/curses.rst:865 +#: ../../library/curses.rst:867 msgid "Erase from cursor to the end of the line." msgstr "" -#: ../../library/curses.rst:870 +#: ../../library/curses.rst:872 msgid "" "Update the current cursor position of all the ancestors of the window to " "reflect the current cursor position of the window." msgstr "" -#: ../../library/curses.rst:876 +#: ../../library/curses.rst:878 msgid "Delete any character at ``(y, x)``." msgstr "" -#: ../../library/curses.rst:881 +#: ../../library/curses.rst:883 msgid "" "Delete the line under the cursor. All following lines are moved up by one " "line." msgstr "" -#: ../../library/curses.rst:887 +#: ../../library/curses.rst:889 msgid "" "An abbreviation for \"derive window\", :meth:`derwin` is the same as " "calling :meth:`subwin`, except that *begin_y* and *begin_x* are relative to " @@ -1052,13 +1052,13 @@ msgid "" "a window object for the derived window." msgstr "" -#: ../../library/curses.rst:895 +#: ../../library/curses.rst:897 msgid "" "Add character *ch* with attribute *attr*, and immediately call :meth:" "`refresh` on the window." msgstr "" -#: ../../library/curses.rst:901 +#: ../../library/curses.rst:903 msgid "" "Test whether the given pair of screen-relative character-cell coordinates " "are enclosed by the given window, returning ``True`` or ``False``. It is " @@ -1066,11 +1066,11 @@ msgid "" "location of a mouse event." msgstr "" -#: ../../library/curses.rst:906 +#: ../../library/curses.rst:908 msgid "Previously it returned ``1`` or ``0`` instead of ``True`` or ``False``." msgstr "" -#: ../../library/curses.rst:912 +#: ../../library/curses.rst:914 msgid "" "Encoding used to encode method arguments (Unicode strings and characters). " "The encoding attribute is inherited from the parent window when a subwindow " @@ -1078,19 +1078,19 @@ msgid "" "locale encoding is used (see :func:`locale.getencoding`)." msgstr "" -#: ../../library/curses.rst:922 +#: ../../library/curses.rst:924 msgid "Clear the window." msgstr "" -#: ../../library/curses.rst:927 +#: ../../library/curses.rst:929 msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." msgstr "" -#: ../../library/curses.rst:932 +#: ../../library/curses.rst:934 msgid "Return the given window's current background character/attribute pair." msgstr "" -#: ../../library/curses.rst:937 +#: ../../library/curses.rst:939 msgid "" "Get a character. Note that the integer returned does *not* have to be in " "ASCII range: function keys, keypad keys and so on are represented by numbers " @@ -1098,14 +1098,14 @@ msgid "" "otherwise wait until a key is pressed." msgstr "" -#: ../../library/curses.rst:945 +#: ../../library/curses.rst:947 msgid "" "Get a wide character. Return a character for most keys, or an integer for " "function keys, keypad keys, and other special keys. In no-delay mode, raise " "an exception if there is no input." msgstr "" -#: ../../library/curses.rst:954 +#: ../../library/curses.rst:956 msgid "" "Get a character, returning a string instead of an integer, as :meth:`getch` " "does. Function keys, keypad keys and other special keys return a multibyte " @@ -1113,35 +1113,35 @@ msgid "" "there is no input." msgstr "" -#: ../../library/curses.rst:962 +#: ../../library/curses.rst:964 msgid "Return a tuple ``(y, x)`` of the height and width of the window." msgstr "" -#: ../../library/curses.rst:967 +#: ../../library/curses.rst:969 msgid "" "Return the beginning coordinates of this window relative to its parent " "window as a tuple ``(y, x)``. Return ``(-1, -1)`` if this window has no " "parent." msgstr "" -#: ../../library/curses.rst:977 +#: ../../library/curses.rst:979 msgid "" "Read a bytes object from the user, with primitive line editing capacity." msgstr "" -#: ../../library/curses.rst:982 +#: ../../library/curses.rst:984 msgid "" "Return a tuple ``(y, x)`` of current cursor position relative to the " "window's upper-left corner." msgstr "" -#: ../../library/curses.rst:989 +#: ../../library/curses.rst:991 msgid "" "Display a horizontal line starting at ``(y, x)`` with length *n* consisting " "of the character *ch*." msgstr "" -#: ../../library/curses.rst:995 +#: ../../library/curses.rst:997 msgid "" "If *flag* is ``False``, curses no longer considers using the hardware insert/" "delete character feature of the terminal; if *flag* is ``True``, use of " @@ -1149,13 +1149,13 @@ msgid "" "initialized, use of character insert/delete is enabled by default." msgstr "" -#: ../../library/curses.rst:1003 +#: ../../library/curses.rst:1005 msgid "" "If *flag* is ``True``, :mod:`curses` will try and use hardware line editing " "facilities. Otherwise, line insertion/deletion are disabled." msgstr "" -#: ../../library/curses.rst:1009 +#: ../../library/curses.rst:1011 msgid "" "If *flag* is ``True``, any change in the window image automatically causes " "the window to be refreshed; you no longer have to call :meth:`refresh` " @@ -1163,19 +1163,19 @@ msgid "" "calls to wrefresh. This option is disabled by default." msgstr "" -#: ../../library/curses.rst:1017 +#: ../../library/curses.rst:1019 msgid "" "Return the character at the given position in the window. The bottom 8 bits " "are the character proper, and upper bits are the attributes." msgstr "" -#: ../../library/curses.rst:1024 +#: ../../library/curses.rst:1026 msgid "" "Paint character *ch* at ``(y, x)`` with attributes *attr*, moving the line " "from position *x* right by one character." msgstr "" -#: ../../library/curses.rst:1030 +#: ../../library/curses.rst:1032 msgid "" "Insert *nlines* lines into the specified window above the current line. The " "*nlines* bottom lines are lost. For negative *nlines*, delete *nlines* " @@ -1184,13 +1184,13 @@ msgid "" "remains the same." msgstr "" -#: ../../library/curses.rst:1039 +#: ../../library/curses.rst:1041 msgid "" "Insert a blank line under the cursor. All following lines are moved down by " "one line." msgstr "" -#: ../../library/curses.rst:1046 +#: ../../library/curses.rst:1048 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor, up to *n* characters. If *n* is " @@ -1200,7 +1200,7 @@ msgid "" "if specified)." msgstr "" -#: ../../library/curses.rst:1056 +#: ../../library/curses.rst:1058 msgid "" "Insert a character string (as many characters as will fit on the line) " "before the character under the cursor. All characters to the right of the " @@ -1209,7 +1209,7 @@ msgid "" "specified)." msgstr "" -#: ../../library/curses.rst:1065 +#: ../../library/curses.rst:1067 msgid "" "Return a bytes object of characters, extracted from the window starting at " "the current cursor position, or at *y*, *x* if specified. Attributes are " @@ -1217,76 +1217,76 @@ msgid "" "string at most *n* characters long (exclusive of the trailing NUL)." msgstr "" -#: ../../library/curses.rst:1073 +#: ../../library/curses.rst:1075 msgid "" "Return ``True`` if the specified line was modified since the last call to :" "meth:`refresh`; otherwise return ``False``. Raise a :exc:`curses.error` " "exception if *line* is not valid for the given window." msgstr "" -#: ../../library/curses.rst:1080 +#: ../../library/curses.rst:1082 msgid "" "Return ``True`` if the specified window was modified since the last call to :" "meth:`refresh`; otherwise return ``False``." msgstr "" -#: ../../library/curses.rst:1086 +#: ../../library/curses.rst:1088 msgid "" "If *flag* is ``True``, escape sequences generated by some keys (keypad, " "function keys) will be interpreted by :mod:`curses`. If *flag* is ``False``, " "escape sequences will be left as is in the input stream." msgstr "" -#: ../../library/curses.rst:1093 +#: ../../library/curses.rst:1095 msgid "" "If *flag* is ``True``, cursor is left where it is on update, instead of " "being at \"cursor position.\" This reduces cursor movement where possible. " "If possible the cursor will be made invisible." msgstr "" -#: ../../library/curses.rst:1097 +#: ../../library/curses.rst:1099 msgid "" "If *flag* is ``False``, cursor will always be at \"cursor position\" after " "an update." msgstr "" -#: ../../library/curses.rst:1102 +#: ../../library/curses.rst:1104 msgid "Move cursor to ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1107 +#: ../../library/curses.rst:1109 msgid "" "Move the window inside its parent window. The screen-relative parameters of " "the window are not changed. This routine is used to display different parts " "of the parent window at the same physical position on the screen." msgstr "" -#: ../../library/curses.rst:1114 +#: ../../library/curses.rst:1116 msgid "Move the window so its upper-left corner is at ``(new_y, new_x)``." msgstr "" -#: ../../library/curses.rst:1119 +#: ../../library/curses.rst:1121 msgid "If *flag* is ``True``, :meth:`getch` will be non-blocking." msgstr "" -#: ../../library/curses.rst:1124 +#: ../../library/curses.rst:1126 msgid "If *flag* is ``True``, escape sequences will not be timed out." msgstr "" -#: ../../library/curses.rst:1126 +#: ../../library/curses.rst:1128 msgid "" "If *flag* is ``False``, after a few milliseconds, an escape sequence will " "not be interpreted, and will be left in the input stream as is." msgstr "" -#: ../../library/curses.rst:1132 +#: ../../library/curses.rst:1134 msgid "" "Mark for refresh but wait. This function updates the data structure " "representing the desired state of the window, but does not force an update " "of the physical screen. To accomplish that, call :func:`doupdate`." msgstr "" -#: ../../library/curses.rst:1139 +#: ../../library/curses.rst:1141 msgid "" "Overlay the window on top of *destwin*. The windows need not be the same " "size, only the overlapping region is copied. This copy is non-destructive, " @@ -1294,7 +1294,7 @@ msgid "" "contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1144 +#: ../../library/curses.rst:1146 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overlay` can be used. *sminrow* and *smincol* are the upper-left " @@ -1302,7 +1302,7 @@ msgid "" "in the destination window." msgstr "" -#: ../../library/curses.rst:1152 +#: ../../library/curses.rst:1154 msgid "" "Overwrite the window on top of *destwin*. The windows need not be the same " "size, in which case only the overlapping region is copied. This copy is " @@ -1310,7 +1310,7 @@ msgid "" "the old contents of *destwin*." msgstr "" -#: ../../library/curses.rst:1157 +#: ../../library/curses.rst:1159 msgid "" "To get fine-grained control over the copied region, the second form of :meth:" "`overwrite` can be used. *sminrow* and *smincol* are the upper-left " @@ -1318,31 +1318,31 @@ msgid "" "the destination window." msgstr "" -#: ../../library/curses.rst:1165 +#: ../../library/curses.rst:1167 msgid "" "Write all data associated with the window into the provided file object. " "This information can be later retrieved using the :func:`getwin` function." msgstr "" -#: ../../library/curses.rst:1171 +#: ../../library/curses.rst:1173 msgid "" "Indicate that the *num* screen lines, starting at line *beg*, are corrupted " "and should be completely redrawn on the next :meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1177 +#: ../../library/curses.rst:1179 msgid "" "Touch the entire window, causing it to be completely redrawn on the next :" "meth:`refresh` call." msgstr "" -#: ../../library/curses.rst:1183 +#: ../../library/curses.rst:1185 msgid "" "Update the display immediately (sync actual screen with previous drawing/" "deleting methods)." msgstr "" -#: ../../library/curses.rst:1186 +#: ../../library/curses.rst:1188 msgid "" "The 6 optional arguments can only be specified when the window is a pad " "created with :func:`newpad`. The additional parameters are needed to " @@ -1357,7 +1357,7 @@ msgid "" "*smincol* are treated as if they were zero." msgstr "" -#: ../../library/curses.rst:1200 +#: ../../library/curses.rst:1202 msgid "" "Reallocate storage for a curses window to adjust its dimensions to the " "specified values. If either dimension is larger than the current values, " @@ -1365,11 +1365,11 @@ msgid "" "rendition (as set by :meth:`bkgdset`) merged into them." msgstr "" -#: ../../library/curses.rst:1208 +#: ../../library/curses.rst:1210 msgid "Scroll the screen or scrolling region upward by *lines* lines." msgstr "" -#: ../../library/curses.rst:1213 +#: ../../library/curses.rst:1215 msgid "" "Control what happens when the cursor of a window is moved off the edge of " "the window or scrolling region, either as a result of a newline action on " @@ -1379,54 +1379,54 @@ msgid "" "scrolling effect on the terminal, it is also necessary to call :meth:`idlok`." msgstr "" -#: ../../library/curses.rst:1223 +#: ../../library/curses.rst:1225 msgid "" "Set the scrolling region from line *top* to line *bottom*. All scrolling " "actions will take place in this region." msgstr "" -#: ../../library/curses.rst:1229 +#: ../../library/curses.rst:1231 msgid "" "Turn off the standout attribute. On some terminals this has the side effect " "of turning off all attributes." msgstr "" -#: ../../library/curses.rst:1235 +#: ../../library/curses.rst:1237 msgid "Turn on attribute *A_STANDOUT*." msgstr "" -#: ../../library/curses.rst:1241 ../../library/curses.rst:1248 +#: ../../library/curses.rst:1243 ../../library/curses.rst:1250 msgid "" "Return a sub-window, whose upper-left corner is at ``(begin_y, begin_x)``, " "and whose width/height is *ncols*/*nlines*." msgstr "" -#: ../../library/curses.rst:1251 +#: ../../library/curses.rst:1253 msgid "" "By default, the sub-window will extend from the specified position to the " "lower right corner of the window." msgstr "" -#: ../../library/curses.rst:1257 +#: ../../library/curses.rst:1259 msgid "" "Touch each location in the window that has been touched in any of its " "ancestor windows. This routine is called by :meth:`refresh`, so it should " "almost never be necessary to call it manually." msgstr "" -#: ../../library/curses.rst:1264 +#: ../../library/curses.rst:1266 msgid "" "If *flag* is ``True``, then :meth:`syncup` is called automatically whenever " "there is a change in the window." msgstr "" -#: ../../library/curses.rst:1270 +#: ../../library/curses.rst:1272 msgid "" "Touch all locations in ancestors of the window that have been changed in " "the window." msgstr "" -#: ../../library/curses.rst:1276 +#: ../../library/curses.rst:1278 msgid "" "Set blocking or non-blocking read behavior for the window. If *delay* is " "negative, blocking read is used (which will wait indefinitely for input). " @@ -1436,7 +1436,7 @@ msgid "" "still no input at the end of that time." msgstr "" -#: ../../library/curses.rst:1286 +#: ../../library/curses.rst:1288 msgid "" "Pretend *count* lines have been changed, starting with line *start*. If " "*changed* is supplied, it specifies whether the affected lines are marked as " @@ -1444,49 +1444,49 @@ msgid "" "``=False``)." msgstr "" -#: ../../library/curses.rst:1293 +#: ../../library/curses.rst:1295 msgid "" "Pretend the whole window has been changed, for purposes of drawing " "optimizations." msgstr "" -#: ../../library/curses.rst:1299 +#: ../../library/curses.rst:1301 msgid "" "Mark all lines in the window as unchanged since the last call to :meth:" "`refresh`." msgstr "" -#: ../../library/curses.rst:1306 +#: ../../library/curses.rst:1308 msgid "" "Display a vertical line starting at ``(y, x)`` with length *n* consisting of " "the character *ch* with attributes *attr*." msgstr "" -#: ../../library/curses.rst:1311 +#: ../../library/curses.rst:1313 msgid "Constants" msgstr "" -#: ../../library/curses.rst:1313 +#: ../../library/curses.rst:1315 msgid "The :mod:`curses` module defines the following data members:" msgstr ":mod:`curses` 模組定義了以下資料成員:" -#: ../../library/curses.rst:1318 +#: ../../library/curses.rst:1320 msgid "" "Some curses routines that return an integer, such as :meth:`~window." "getch`, return :const:`ERR` upon failure." msgstr "" -#: ../../library/curses.rst:1324 +#: ../../library/curses.rst:1326 msgid "" "Some curses routines that return an integer, such as :func:`napms`, " "return :const:`OK` upon success." msgstr "" -#: ../../library/curses.rst:1331 +#: ../../library/curses.rst:1333 msgid "A bytes object representing the current version of the module." msgstr "" -#: ../../library/curses.rst:1336 +#: ../../library/curses.rst:1338 msgid "" "A named tuple containing the three components of the ncurses library " "version: *major*, *minor*, and *patch*. All values are integers. The " @@ -1494,536 +1494,536 @@ msgid "" "is equivalent to ``curses.ncurses_version.major`` and so on." msgstr "" -#: ../../library/curses.rst:1341 +#: ../../library/curses.rst:1343 msgid "Availability: if the ncurses library is used." msgstr "" -#: ../../library/curses.rst:1347 +#: ../../library/curses.rst:1349 msgid "" "The maximum number of colors the terminal can support. It is defined only " "after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1352 +#: ../../library/curses.rst:1354 msgid "" "The maximum number of color pairs the terminal can support. It is defined " "only after the call to :func:`start_color`." msgstr "" -#: ../../library/curses.rst:1357 +#: ../../library/curses.rst:1359 msgid "" "The width of the screen, i.e., the number of columns. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1364 +#: ../../library/curses.rst:1366 msgid "" "The height of the screen, i.e., the number of lines. It is defined only " "after the call to :func:`initscr`. Updated by :func:`update_lines_cols`, :" "func:`resizeterm` and :func:`resize_term`." msgstr "" -#: ../../library/curses.rst:1370 +#: ../../library/curses.rst:1372 msgid "" "Some constants are available to specify character cell attributes. The exact " "constants available are system dependent." msgstr "" -#: ../../library/curses.rst:1374 +#: ../../library/curses.rst:1376 msgid "Attribute" msgstr "" -#: ../../library/curses.rst:1374 ../../library/curses.rst:1419 -#: ../../library/curses.rst:1665 ../../library/curses.rst:1757 +#: ../../library/curses.rst:1376 ../../library/curses.rst:1421 +#: ../../library/curses.rst:1667 ../../library/curses.rst:1759 msgid "Meaning" msgstr "含義" -#: ../../library/curses.rst:1376 +#: ../../library/curses.rst:1378 msgid "Alternate character set mode" msgstr "" -#: ../../library/curses.rst:1378 +#: ../../library/curses.rst:1380 msgid "Blink mode" msgstr "" -#: ../../library/curses.rst:1380 +#: ../../library/curses.rst:1382 msgid "Bold mode" msgstr "" -#: ../../library/curses.rst:1382 +#: ../../library/curses.rst:1384 msgid "Dim mode" msgstr "" -#: ../../library/curses.rst:1384 +#: ../../library/curses.rst:1386 msgid "Invisible or blank mode" msgstr "" -#: ../../library/curses.rst:1386 +#: ../../library/curses.rst:1388 msgid "Italic mode" msgstr "" -#: ../../library/curses.rst:1388 +#: ../../library/curses.rst:1390 msgid "Normal attribute" msgstr "" -#: ../../library/curses.rst:1390 +#: ../../library/curses.rst:1392 msgid "Protected mode" msgstr "" -#: ../../library/curses.rst:1392 +#: ../../library/curses.rst:1394 msgid "Reverse background and foreground colors" msgstr "" -#: ../../library/curses.rst:1395 +#: ../../library/curses.rst:1397 msgid "Standout mode" msgstr "" -#: ../../library/curses.rst:1397 +#: ../../library/curses.rst:1399 msgid "Underline mode" msgstr "" -#: ../../library/curses.rst:1399 +#: ../../library/curses.rst:1401 msgid "Horizontal highlight" msgstr "" -#: ../../library/curses.rst:1401 +#: ../../library/curses.rst:1403 msgid "Left highlight" msgstr "" -#: ../../library/curses.rst:1403 +#: ../../library/curses.rst:1405 msgid "Low highlight" msgstr "" -#: ../../library/curses.rst:1405 +#: ../../library/curses.rst:1407 msgid "Right highlight" msgstr "" -#: ../../library/curses.rst:1407 +#: ../../library/curses.rst:1409 msgid "Top highlight" msgstr "" -#: ../../library/curses.rst:1409 +#: ../../library/curses.rst:1411 msgid "Vertical highlight" msgstr "" -#: ../../library/curses.rst:1412 +#: ../../library/curses.rst:1414 msgid "``A_ITALIC`` was added." msgstr "" -#: ../../library/curses.rst:1415 +#: ../../library/curses.rst:1417 msgid "" "Several constants are available to extract corresponding attributes returned " "by some methods." msgstr "" -#: ../../library/curses.rst:1419 +#: ../../library/curses.rst:1421 msgid "Bit-mask" msgstr "" -#: ../../library/curses.rst:1421 +#: ../../library/curses.rst:1423 msgid "Bit-mask to extract attributes" msgstr "" -#: ../../library/curses.rst:1424 +#: ../../library/curses.rst:1426 msgid "Bit-mask to extract a character" msgstr "" -#: ../../library/curses.rst:1427 +#: ../../library/curses.rst:1429 msgid "Bit-mask to extract color-pair field information" msgstr "" -#: ../../library/curses.rst:1431 +#: ../../library/curses.rst:1433 msgid "" "Keys are referred to by integer constants with names starting with " "``KEY_``. The exact keycaps available are system dependent." msgstr "" -#: ../../library/curses.rst:1437 +#: ../../library/curses.rst:1439 msgid "Key constant" msgstr "" -#: ../../library/curses.rst:1437 +#: ../../library/curses.rst:1439 msgid "Key" msgstr "" -#: ../../library/curses.rst:1439 +#: ../../library/curses.rst:1441 msgid "Minimum key value" msgstr "" -#: ../../library/curses.rst:1441 +#: ../../library/curses.rst:1443 msgid "Break key (unreliable)" msgstr "" -#: ../../library/curses.rst:1443 +#: ../../library/curses.rst:1445 msgid "Down-arrow" msgstr "" -#: ../../library/curses.rst:1445 +#: ../../library/curses.rst:1447 msgid "Up-arrow" msgstr "" -#: ../../library/curses.rst:1447 +#: ../../library/curses.rst:1449 msgid "Left-arrow" msgstr "" -#: ../../library/curses.rst:1449 +#: ../../library/curses.rst:1451 msgid "Right-arrow" msgstr "" -#: ../../library/curses.rst:1451 +#: ../../library/curses.rst:1453 msgid "Home key (upward+left arrow)" msgstr "" -#: ../../library/curses.rst:1453 +#: ../../library/curses.rst:1455 msgid "Backspace (unreliable)" msgstr "" -#: ../../library/curses.rst:1455 +#: ../../library/curses.rst:1457 msgid "Function keys. Up to 64 function keys are supported." msgstr "" -#: ../../library/curses.rst:1458 +#: ../../library/curses.rst:1460 msgid "Value of function key *n*" msgstr "" -#: ../../library/curses.rst:1460 +#: ../../library/curses.rst:1462 msgid "Delete line" msgstr "" -#: ../../library/curses.rst:1462 +#: ../../library/curses.rst:1464 msgid "Insert line" msgstr "" -#: ../../library/curses.rst:1464 +#: ../../library/curses.rst:1466 msgid "Delete character" msgstr "" -#: ../../library/curses.rst:1466 +#: ../../library/curses.rst:1468 msgid "Insert char or enter insert mode" msgstr "" -#: ../../library/curses.rst:1468 +#: ../../library/curses.rst:1470 msgid "Exit insert char mode" msgstr "" -#: ../../library/curses.rst:1470 +#: ../../library/curses.rst:1472 msgid "Clear screen" msgstr "" -#: ../../library/curses.rst:1472 +#: ../../library/curses.rst:1474 msgid "Clear to end of screen" msgstr "" -#: ../../library/curses.rst:1474 +#: ../../library/curses.rst:1476 msgid "Clear to end of line" msgstr "" -#: ../../library/curses.rst:1476 +#: ../../library/curses.rst:1478 msgid "Scroll 1 line forward" msgstr "" -#: ../../library/curses.rst:1478 +#: ../../library/curses.rst:1480 msgid "Scroll 1 line backward (reverse)" msgstr "" -#: ../../library/curses.rst:1480 +#: ../../library/curses.rst:1482 msgid "Next page" msgstr "" -#: ../../library/curses.rst:1482 +#: ../../library/curses.rst:1484 msgid "Previous page" msgstr "" -#: ../../library/curses.rst:1484 +#: ../../library/curses.rst:1486 msgid "Set tab" msgstr "" -#: ../../library/curses.rst:1486 +#: ../../library/curses.rst:1488 msgid "Clear tab" msgstr "" -#: ../../library/curses.rst:1488 +#: ../../library/curses.rst:1490 msgid "Clear all tabs" msgstr "" -#: ../../library/curses.rst:1490 +#: ../../library/curses.rst:1492 msgid "Enter or send (unreliable)" msgstr "" -#: ../../library/curses.rst:1492 +#: ../../library/curses.rst:1494 msgid "Soft (partial) reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1494 +#: ../../library/curses.rst:1496 msgid "Reset or hard reset (unreliable)" msgstr "" -#: ../../library/curses.rst:1496 +#: ../../library/curses.rst:1498 msgid "Print" msgstr "" -#: ../../library/curses.rst:1498 +#: ../../library/curses.rst:1500 msgid "Home down or bottom (lower left)" msgstr "" -#: ../../library/curses.rst:1500 +#: ../../library/curses.rst:1502 msgid "Upper left of keypad" msgstr "" -#: ../../library/curses.rst:1502 +#: ../../library/curses.rst:1504 msgid "Upper right of keypad" msgstr "" -#: ../../library/curses.rst:1504 +#: ../../library/curses.rst:1506 msgid "Center of keypad" msgstr "" -#: ../../library/curses.rst:1506 +#: ../../library/curses.rst:1508 msgid "Lower left of keypad" msgstr "" -#: ../../library/curses.rst:1508 +#: ../../library/curses.rst:1510 msgid "Lower right of keypad" msgstr "" -#: ../../library/curses.rst:1510 +#: ../../library/curses.rst:1512 msgid "Back tab" msgstr "" -#: ../../library/curses.rst:1512 +#: ../../library/curses.rst:1514 msgid "Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1514 +#: ../../library/curses.rst:1516 msgid "Cancel" msgstr "" -#: ../../library/curses.rst:1516 +#: ../../library/curses.rst:1518 msgid "Close" msgstr "" -#: ../../library/curses.rst:1518 +#: ../../library/curses.rst:1520 msgid "Cmd (command)" msgstr "" -#: ../../library/curses.rst:1520 +#: ../../library/curses.rst:1522 msgid "Copy" msgstr "" -#: ../../library/curses.rst:1522 +#: ../../library/curses.rst:1524 msgid "Create" msgstr "" -#: ../../library/curses.rst:1524 +#: ../../library/curses.rst:1526 msgid "End" msgstr "" -#: ../../library/curses.rst:1526 +#: ../../library/curses.rst:1528 msgid "Exit" msgstr "" -#: ../../library/curses.rst:1528 +#: ../../library/curses.rst:1530 msgid "Find" msgstr "" -#: ../../library/curses.rst:1530 +#: ../../library/curses.rst:1532 msgid "Help" msgstr "" -#: ../../library/curses.rst:1532 +#: ../../library/curses.rst:1534 msgid "Mark" msgstr "" -#: ../../library/curses.rst:1534 +#: ../../library/curses.rst:1536 msgid "Message" msgstr "" -#: ../../library/curses.rst:1536 +#: ../../library/curses.rst:1538 msgid "Move" msgstr "" -#: ../../library/curses.rst:1538 +#: ../../library/curses.rst:1540 msgid "Next" msgstr "" -#: ../../library/curses.rst:1540 +#: ../../library/curses.rst:1542 msgid "Open" msgstr "" -#: ../../library/curses.rst:1542 +#: ../../library/curses.rst:1544 msgid "Options" msgstr "" -#: ../../library/curses.rst:1544 +#: ../../library/curses.rst:1546 msgid "Prev (previous)" msgstr "" -#: ../../library/curses.rst:1546 +#: ../../library/curses.rst:1548 msgid "Redo" msgstr "" -#: ../../library/curses.rst:1548 +#: ../../library/curses.rst:1550 msgid "Ref (reference)" msgstr "" -#: ../../library/curses.rst:1550 +#: ../../library/curses.rst:1552 msgid "Refresh" msgstr "" -#: ../../library/curses.rst:1552 +#: ../../library/curses.rst:1554 msgid "Replace" msgstr "" -#: ../../library/curses.rst:1554 +#: ../../library/curses.rst:1556 msgid "Restart" msgstr "" -#: ../../library/curses.rst:1556 +#: ../../library/curses.rst:1558 msgid "Resume" msgstr "" -#: ../../library/curses.rst:1558 +#: ../../library/curses.rst:1560 msgid "Save" msgstr "" -#: ../../library/curses.rst:1560 +#: ../../library/curses.rst:1562 msgid "Shifted Beg (beginning)" msgstr "" -#: ../../library/curses.rst:1562 +#: ../../library/curses.rst:1564 msgid "Shifted Cancel" msgstr "" -#: ../../library/curses.rst:1564 +#: ../../library/curses.rst:1566 msgid "Shifted Command" msgstr "" -#: ../../library/curses.rst:1566 +#: ../../library/curses.rst:1568 msgid "Shifted Copy" msgstr "" -#: ../../library/curses.rst:1568 +#: ../../library/curses.rst:1570 msgid "Shifted Create" msgstr "" -#: ../../library/curses.rst:1570 +#: ../../library/curses.rst:1572 msgid "Shifted Delete char" msgstr "" -#: ../../library/curses.rst:1572 +#: ../../library/curses.rst:1574 msgid "Shifted Delete line" msgstr "" -#: ../../library/curses.rst:1574 +#: ../../library/curses.rst:1576 msgid "Select" msgstr "" -#: ../../library/curses.rst:1576 +#: ../../library/curses.rst:1578 msgid "Shifted End" msgstr "" -#: ../../library/curses.rst:1578 +#: ../../library/curses.rst:1580 msgid "Shifted Clear line" msgstr "" -#: ../../library/curses.rst:1580 +#: ../../library/curses.rst:1582 msgid "Shifted Exit" msgstr "" -#: ../../library/curses.rst:1582 +#: ../../library/curses.rst:1584 msgid "Shifted Find" msgstr "" -#: ../../library/curses.rst:1584 +#: ../../library/curses.rst:1586 msgid "Shifted Help" msgstr "" -#: ../../library/curses.rst:1586 +#: ../../library/curses.rst:1588 msgid "Shifted Home" msgstr "" -#: ../../library/curses.rst:1588 +#: ../../library/curses.rst:1590 msgid "Shifted Input" msgstr "" -#: ../../library/curses.rst:1590 +#: ../../library/curses.rst:1592 msgid "Shifted Left arrow" msgstr "" -#: ../../library/curses.rst:1592 +#: ../../library/curses.rst:1594 msgid "Shifted Message" msgstr "" -#: ../../library/curses.rst:1594 +#: ../../library/curses.rst:1596 msgid "Shifted Move" msgstr "" -#: ../../library/curses.rst:1596 +#: ../../library/curses.rst:1598 msgid "Shifted Next" msgstr "" -#: ../../library/curses.rst:1598 +#: ../../library/curses.rst:1600 msgid "Shifted Options" msgstr "" -#: ../../library/curses.rst:1600 +#: ../../library/curses.rst:1602 msgid "Shifted Prev" msgstr "" -#: ../../library/curses.rst:1602 +#: ../../library/curses.rst:1604 msgid "Shifted Print" msgstr "" -#: ../../library/curses.rst:1604 +#: ../../library/curses.rst:1606 msgid "Shifted Redo" msgstr "" -#: ../../library/curses.rst:1606 +#: ../../library/curses.rst:1608 msgid "Shifted Replace" msgstr "" -#: ../../library/curses.rst:1608 +#: ../../library/curses.rst:1610 msgid "Shifted Right arrow" msgstr "" -#: ../../library/curses.rst:1610 +#: ../../library/curses.rst:1612 msgid "Shifted Resume" msgstr "" -#: ../../library/curses.rst:1612 +#: ../../library/curses.rst:1614 msgid "Shifted Save" msgstr "" -#: ../../library/curses.rst:1614 +#: ../../library/curses.rst:1616 msgid "Shifted Suspend" msgstr "" -#: ../../library/curses.rst:1616 +#: ../../library/curses.rst:1618 msgid "Shifted Undo" msgstr "" -#: ../../library/curses.rst:1618 +#: ../../library/curses.rst:1620 msgid "Suspend" msgstr "" -#: ../../library/curses.rst:1620 +#: ../../library/curses.rst:1622 msgid "Undo" msgstr "" -#: ../../library/curses.rst:1622 +#: ../../library/curses.rst:1624 msgid "Mouse event has occurred" msgstr "" -#: ../../library/curses.rst:1624 +#: ../../library/curses.rst:1626 msgid "Terminal resize event" msgstr "" -#: ../../library/curses.rst:1626 +#: ../../library/curses.rst:1628 msgid "Maximum key value" msgstr "" -#: ../../library/curses.rst:1629 +#: ../../library/curses.rst:1631 msgid "" "On VT100s and their software emulations, such as X terminal emulators, there " "are normally at least four function keys (:const:`KEY_F1 `, :const:" @@ -2035,64 +2035,64 @@ msgid "" "keypad mappings are standard:" msgstr "" -#: ../../library/curses.rst:1638 +#: ../../library/curses.rst:1640 msgid "Keycap" msgstr "" -#: ../../library/curses.rst:1638 ../../library/curses.rst:1783 -#: ../../library/curses.rst:1907 +#: ../../library/curses.rst:1640 ../../library/curses.rst:1785 +#: ../../library/curses.rst:1909 msgid "Constant" msgstr "" -#: ../../library/curses.rst:1640 +#: ../../library/curses.rst:1642 msgid ":kbd:`Insert`" msgstr ":kbd:`Insert`" -#: ../../library/curses.rst:1640 +#: ../../library/curses.rst:1642 msgid "KEY_IC" msgstr "KEY_IC" -#: ../../library/curses.rst:1642 +#: ../../library/curses.rst:1644 msgid ":kbd:`Delete`" msgstr ":kbd:`Delete`" -#: ../../library/curses.rst:1642 +#: ../../library/curses.rst:1644 msgid "KEY_DC" msgstr "KEY_DC" -#: ../../library/curses.rst:1644 +#: ../../library/curses.rst:1646 msgid ":kbd:`Home`" msgstr ":kbd:`Home`" -#: ../../library/curses.rst:1644 +#: ../../library/curses.rst:1646 msgid "KEY_HOME" msgstr "KEY_HOME" -#: ../../library/curses.rst:1646 +#: ../../library/curses.rst:1648 msgid ":kbd:`End`" msgstr ":kbd:`End`" -#: ../../library/curses.rst:1646 +#: ../../library/curses.rst:1648 msgid "KEY_END" msgstr "KEY_END" -#: ../../library/curses.rst:1648 +#: ../../library/curses.rst:1650 msgid ":kbd:`Page Up`" msgstr ":kbd:`Page Up`" -#: ../../library/curses.rst:1648 +#: ../../library/curses.rst:1650 msgid "KEY_PPAGE" msgstr "KEY_PPAGE" -#: ../../library/curses.rst:1650 +#: ../../library/curses.rst:1652 msgid ":kbd:`Page Down`" msgstr ":kbd:`Page Down`" -#: ../../library/curses.rst:1650 +#: ../../library/curses.rst:1652 msgid "KEY_NPAGE" msgstr "KEY_NPAGE" -#: ../../library/curses.rst:1655 +#: ../../library/curses.rst:1657 msgid "" "The following table lists characters from the alternate character set. These " "are inherited from the VT100 terminal, and will generally be available on " @@ -2100,268 +2100,268 @@ msgid "" "available, curses falls back on a crude printable ASCII approximation." msgstr "" -#: ../../library/curses.rst:1662 +#: ../../library/curses.rst:1664 msgid "These are available only after :func:`initscr` has been called." msgstr "" -#: ../../library/curses.rst:1665 +#: ../../library/curses.rst:1667 msgid "ACS code" msgstr "" -#: ../../library/curses.rst:1667 +#: ../../library/curses.rst:1669 msgid "alternate name for upper right corner" msgstr "" -#: ../../library/curses.rst:1669 +#: ../../library/curses.rst:1671 msgid "solid square block" msgstr "" -#: ../../library/curses.rst:1671 +#: ../../library/curses.rst:1673 msgid "board of squares" msgstr "" -#: ../../library/curses.rst:1673 +#: ../../library/curses.rst:1675 msgid "alternate name for horizontal line" msgstr "" -#: ../../library/curses.rst:1675 +#: ../../library/curses.rst:1677 msgid "alternate name for upper left corner" msgstr "" -#: ../../library/curses.rst:1677 +#: ../../library/curses.rst:1679 msgid "alternate name for top tee" msgstr "" -#: ../../library/curses.rst:1679 +#: ../../library/curses.rst:1681 msgid "bottom tee" msgstr "" -#: ../../library/curses.rst:1681 +#: ../../library/curses.rst:1683 msgid "bullet" msgstr "" -#: ../../library/curses.rst:1683 +#: ../../library/curses.rst:1685 msgid "checker board (stipple)" msgstr "" -#: ../../library/curses.rst:1685 +#: ../../library/curses.rst:1687 msgid "arrow pointing down" msgstr "" -#: ../../library/curses.rst:1687 +#: ../../library/curses.rst:1689 msgid "degree symbol" msgstr "" -#: ../../library/curses.rst:1689 +#: ../../library/curses.rst:1691 msgid "diamond" msgstr "" -#: ../../library/curses.rst:1691 +#: ../../library/curses.rst:1693 msgid "greater-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1693 +#: ../../library/curses.rst:1695 msgid "horizontal line" msgstr "" -#: ../../library/curses.rst:1695 +#: ../../library/curses.rst:1697 msgid "lantern symbol" msgstr "" -#: ../../library/curses.rst:1697 +#: ../../library/curses.rst:1699 msgid "left arrow" msgstr "" -#: ../../library/curses.rst:1699 +#: ../../library/curses.rst:1701 msgid "less-than-or-equal-to" msgstr "" -#: ../../library/curses.rst:1701 +#: ../../library/curses.rst:1703 msgid "lower left-hand corner" msgstr "" -#: ../../library/curses.rst:1703 +#: ../../library/curses.rst:1705 msgid "lower right-hand corner" msgstr "" -#: ../../library/curses.rst:1705 +#: ../../library/curses.rst:1707 msgid "left tee" msgstr "" -#: ../../library/curses.rst:1707 +#: ../../library/curses.rst:1709 msgid "not-equal sign" msgstr "" -#: ../../library/curses.rst:1709 +#: ../../library/curses.rst:1711 msgid "letter pi" msgstr "" -#: ../../library/curses.rst:1711 +#: ../../library/curses.rst:1713 msgid "plus-or-minus sign" msgstr "" -#: ../../library/curses.rst:1713 +#: ../../library/curses.rst:1715 msgid "big plus sign" msgstr "" -#: ../../library/curses.rst:1715 +#: ../../library/curses.rst:1717 msgid "right arrow" msgstr "" -#: ../../library/curses.rst:1717 +#: ../../library/curses.rst:1719 msgid "right tee" msgstr "" -#: ../../library/curses.rst:1719 +#: ../../library/curses.rst:1721 msgid "scan line 1" msgstr "" -#: ../../library/curses.rst:1721 +#: ../../library/curses.rst:1723 msgid "scan line 3" msgstr "" -#: ../../library/curses.rst:1723 +#: ../../library/curses.rst:1725 msgid "scan line 7" msgstr "" -#: ../../library/curses.rst:1725 +#: ../../library/curses.rst:1727 msgid "scan line 9" msgstr "" -#: ../../library/curses.rst:1727 +#: ../../library/curses.rst:1729 msgid "alternate name for lower right corner" msgstr "" -#: ../../library/curses.rst:1729 +#: ../../library/curses.rst:1731 msgid "alternate name for vertical line" msgstr "" -#: ../../library/curses.rst:1731 +#: ../../library/curses.rst:1733 msgid "alternate name for right tee" msgstr "" -#: ../../library/curses.rst:1733 +#: ../../library/curses.rst:1735 msgid "alternate name for lower left corner" msgstr "" -#: ../../library/curses.rst:1735 +#: ../../library/curses.rst:1737 msgid "alternate name for bottom tee" msgstr "" -#: ../../library/curses.rst:1737 +#: ../../library/curses.rst:1739 msgid "alternate name for left tee" msgstr "" -#: ../../library/curses.rst:1739 +#: ../../library/curses.rst:1741 msgid "alternate name for crossover or big plus" msgstr "" -#: ../../library/curses.rst:1741 +#: ../../library/curses.rst:1743 msgid "pound sterling" msgstr "" -#: ../../library/curses.rst:1743 +#: ../../library/curses.rst:1745 msgid "top tee" msgstr "" -#: ../../library/curses.rst:1745 +#: ../../library/curses.rst:1747 msgid "up arrow" msgstr "" -#: ../../library/curses.rst:1747 +#: ../../library/curses.rst:1749 msgid "upper left corner" msgstr "" -#: ../../library/curses.rst:1749 +#: ../../library/curses.rst:1751 msgid "upper right corner" msgstr "" -#: ../../library/curses.rst:1751 +#: ../../library/curses.rst:1753 msgid "vertical line" msgstr "" -#: ../../library/curses.rst:1754 +#: ../../library/curses.rst:1756 msgid "" "The following table lists mouse button constants used by :meth:`getmouse`:" msgstr "" -#: ../../library/curses.rst:1757 +#: ../../library/curses.rst:1759 msgid "Mouse button constant" msgstr "" -#: ../../library/curses.rst:1759 +#: ../../library/curses.rst:1761 msgid "Mouse button *n* pressed" msgstr "" -#: ../../library/curses.rst:1761 +#: ../../library/curses.rst:1763 msgid "Mouse button *n* released" msgstr "" -#: ../../library/curses.rst:1763 +#: ../../library/curses.rst:1765 msgid "Mouse button *n* clicked" msgstr "" -#: ../../library/curses.rst:1765 +#: ../../library/curses.rst:1767 msgid "Mouse button *n* double clicked" msgstr "" -#: ../../library/curses.rst:1767 +#: ../../library/curses.rst:1769 msgid "Mouse button *n* triple clicked" msgstr "" -#: ../../library/curses.rst:1769 +#: ../../library/curses.rst:1771 msgid "Shift was down during button state change" msgstr "" -#: ../../library/curses.rst:1771 ../../library/curses.rst:1773 +#: ../../library/curses.rst:1773 ../../library/curses.rst:1775 msgid "Control was down during button state change" msgstr "" -#: ../../library/curses.rst:1780 +#: ../../library/curses.rst:1782 msgid "The following table lists the predefined colors:" msgstr "" -#: ../../library/curses.rst:1783 +#: ../../library/curses.rst:1785 msgid "Color" msgstr "顏色" -#: ../../library/curses.rst:1785 +#: ../../library/curses.rst:1787 msgid "Black" msgstr "黑" -#: ../../library/curses.rst:1787 +#: ../../library/curses.rst:1789 msgid "Blue" msgstr "藍" -#: ../../library/curses.rst:1789 +#: ../../library/curses.rst:1791 msgid "Cyan (light greenish blue)" msgstr "" -#: ../../library/curses.rst:1791 +#: ../../library/curses.rst:1793 msgid "Green" msgstr "綠" -#: ../../library/curses.rst:1793 +#: ../../library/curses.rst:1795 msgid "Magenta (purplish red)" msgstr "" -#: ../../library/curses.rst:1795 +#: ../../library/curses.rst:1797 msgid "Red" msgstr "紅" -#: ../../library/curses.rst:1797 +#: ../../library/curses.rst:1799 msgid "White" msgstr "白" -#: ../../library/curses.rst:1799 +#: ../../library/curses.rst:1801 msgid "Yellow" msgstr "" -#: ../../library/curses.rst:1804 +#: ../../library/curses.rst:1806 msgid ":mod:`curses.textpad` --- Text input widget for curses programs" msgstr "" -#: ../../library/curses.rst:1812 +#: ../../library/curses.rst:1814 msgid "" "The :mod:`curses.textpad` module provides a :class:`Textbox` class that " "handles elementary text editing in a curses window, supporting a set of " @@ -2371,11 +2371,11 @@ msgid "" "purposes." msgstr "" -#: ../../library/curses.rst:1818 +#: ../../library/curses.rst:1820 msgid "The module :mod:`curses.textpad` defines the following function:" msgstr ":mod:`curses.textpad` 模組定義了以下函式:" -#: ../../library/curses.rst:1823 +#: ../../library/curses.rst:1825 msgid "" "Draw a rectangle. The first argument must be a window object; the remaining " "arguments are coordinates relative to that window. The second and third " @@ -2387,15 +2387,15 @@ msgid "" "will be drawn with ASCII dashes, vertical bars, and plus signs." msgstr "" -#: ../../library/curses.rst:1836 +#: ../../library/curses.rst:1838 msgid "Textbox objects" msgstr "" -#: ../../library/curses.rst:1838 +#: ../../library/curses.rst:1840 msgid "You can instantiate a :class:`Textbox` object as follows:" msgstr "" -#: ../../library/curses.rst:1843 +#: ../../library/curses.rst:1845 msgid "" "Return a textbox widget object. The *win* argument should be a curses :ref:" "`window ` object in which the textbox is to be " @@ -2404,11 +2404,11 @@ msgid "" "instance's :attr:`stripspaces` flag is initially on." msgstr "" -#: ../../library/curses.rst:1849 +#: ../../library/curses.rst:1851 msgid ":class:`Textbox` objects have the following methods:" msgstr "" -#: ../../library/curses.rst:1854 +#: ../../library/curses.rst:1856 msgid "" "This is the entry point you will normally use. It accepts editing " "keystrokes until one of the termination keystrokes is entered. If " @@ -2419,167 +2419,167 @@ msgid "" "`stripspaces` attribute." msgstr "" -#: ../../library/curses.rst:1865 +#: ../../library/curses.rst:1867 msgid "" "Process a single command keystroke. Here are the supported special " "keystrokes:" msgstr "" -#: ../../library/curses.rst:1869 ../../library/curses.rst:1907 +#: ../../library/curses.rst:1871 ../../library/curses.rst:1909 msgid "Keystroke" msgstr "" -#: ../../library/curses.rst:1869 +#: ../../library/curses.rst:1871 msgid "Action" msgstr "" -#: ../../library/curses.rst:1871 +#: ../../library/curses.rst:1873 msgid ":kbd:`Control-A`" msgstr ":kbd:`Control-A`" -#: ../../library/curses.rst:1871 +#: ../../library/curses.rst:1873 msgid "Go to left edge of window." msgstr "" -#: ../../library/curses.rst:1873 ../../library/curses.rst:1909 +#: ../../library/curses.rst:1875 ../../library/curses.rst:1911 msgid ":kbd:`Control-B`" msgstr ":kbd:`Control-B`" -#: ../../library/curses.rst:1873 +#: ../../library/curses.rst:1875 msgid "Cursor left, wrapping to previous line if appropriate." msgstr "" -#: ../../library/curses.rst:1876 +#: ../../library/curses.rst:1878 msgid ":kbd:`Control-D`" msgstr ":kbd:`Control-D`" -#: ../../library/curses.rst:1876 +#: ../../library/curses.rst:1878 msgid "Delete character under cursor." msgstr "" -#: ../../library/curses.rst:1878 +#: ../../library/curses.rst:1880 msgid ":kbd:`Control-E`" msgstr ":kbd:`Control-E`" -#: ../../library/curses.rst:1878 +#: ../../library/curses.rst:1880 msgid "Go to right edge (stripspaces off) or end of line (stripspaces on)." msgstr "" -#: ../../library/curses.rst:1881 ../../library/curses.rst:1911 +#: ../../library/curses.rst:1883 ../../library/curses.rst:1913 msgid ":kbd:`Control-F`" msgstr ":kbd:`Control-F`" -#: ../../library/curses.rst:1881 +#: ../../library/curses.rst:1883 msgid "Cursor right, wrapping to next line when appropriate." msgstr "" -#: ../../library/curses.rst:1884 +#: ../../library/curses.rst:1886 msgid ":kbd:`Control-G`" msgstr ":kbd:`Control-G`" -#: ../../library/curses.rst:1884 +#: ../../library/curses.rst:1886 msgid "Terminate, returning the window contents." msgstr "" -#: ../../library/curses.rst:1886 +#: ../../library/curses.rst:1888 msgid ":kbd:`Control-H`" msgstr ":kbd:`Control-H`" -#: ../../library/curses.rst:1886 +#: ../../library/curses.rst:1888 msgid "Delete character backward." msgstr "" -#: ../../library/curses.rst:1888 +#: ../../library/curses.rst:1890 msgid ":kbd:`Control-J`" msgstr ":kbd:`Control-J`" -#: ../../library/curses.rst:1888 +#: ../../library/curses.rst:1890 msgid "Terminate if the window is 1 line, otherwise insert newline." msgstr "" -#: ../../library/curses.rst:1891 +#: ../../library/curses.rst:1893 msgid ":kbd:`Control-K`" msgstr ":kbd:`Control-K`" -#: ../../library/curses.rst:1891 +#: ../../library/curses.rst:1893 msgid "If line is blank, delete it, otherwise clear to end of line." msgstr "" -#: ../../library/curses.rst:1894 +#: ../../library/curses.rst:1896 msgid ":kbd:`Control-L`" msgstr ":kbd:`Control-L`" -#: ../../library/curses.rst:1894 +#: ../../library/curses.rst:1896 msgid "Refresh screen." msgstr "" -#: ../../library/curses.rst:1896 ../../library/curses.rst:1915 +#: ../../library/curses.rst:1898 ../../library/curses.rst:1917 msgid ":kbd:`Control-N`" msgstr ":kbd:`Control-N`" -#: ../../library/curses.rst:1896 +#: ../../library/curses.rst:1898 msgid "Cursor down; move down one line." msgstr "" -#: ../../library/curses.rst:1898 +#: ../../library/curses.rst:1900 msgid ":kbd:`Control-O`" msgstr ":kbd:`Control-O`" -#: ../../library/curses.rst:1898 +#: ../../library/curses.rst:1900 msgid "Insert a blank line at cursor location." msgstr "" -#: ../../library/curses.rst:1900 ../../library/curses.rst:1913 +#: ../../library/curses.rst:1902 ../../library/curses.rst:1915 msgid ":kbd:`Control-P`" msgstr ":kbd:`Control-P`" -#: ../../library/curses.rst:1900 +#: ../../library/curses.rst:1902 msgid "Cursor up; move up one line." msgstr "" -#: ../../library/curses.rst:1903 +#: ../../library/curses.rst:1905 msgid "" "Move operations do nothing if the cursor is at an edge where the movement is " "not possible. The following synonyms are supported where possible:" msgstr "" -#: ../../library/curses.rst:1909 +#: ../../library/curses.rst:1911 msgid ":const:`~curses.KEY_LEFT`" msgstr ":const:`~curses.KEY_LEFT`" -#: ../../library/curses.rst:1911 +#: ../../library/curses.rst:1913 msgid ":const:`~curses.KEY_RIGHT`" msgstr ":const:`~curses.KEY_RIGHT`" -#: ../../library/curses.rst:1913 +#: ../../library/curses.rst:1915 msgid ":const:`~curses.KEY_UP`" msgstr ":const:`~curses.KEY_UP`" -#: ../../library/curses.rst:1915 +#: ../../library/curses.rst:1917 msgid ":const:`~curses.KEY_DOWN`" msgstr ":const:`~curses.KEY_DOWN`" -#: ../../library/curses.rst:1917 +#: ../../library/curses.rst:1919 msgid ":const:`~curses.KEY_BACKSPACE`" msgstr ":const:`~curses.KEY_BACKSPACE`" -#: ../../library/curses.rst:1917 +#: ../../library/curses.rst:1919 msgid ":kbd:`Control-h`" msgstr ":kbd:`Control-h`" -#: ../../library/curses.rst:1920 +#: ../../library/curses.rst:1922 msgid "" "All other keystrokes are treated as a command to insert the given character " "and move right (with line wrapping)." msgstr "" -#: ../../library/curses.rst:1926 +#: ../../library/curses.rst:1928 msgid "" "Return the window contents as a string; whether blanks in the window are " "included is affected by the :attr:`stripspaces` member." msgstr "" -#: ../../library/curses.rst:1932 +#: ../../library/curses.rst:1934 msgid "" "This attribute is a flag which controls the interpretation of blanks in the " "window. When it is on, trailing blanks on each line are ignored; any cursor " diff --git a/library/hmac.po b/library/hmac.po index 1fa7d828ed..dfd8a8d4d6 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-16 00:16+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2022-03-30 00:16+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -35,8 +35,9 @@ msgid "" "particular, extendable output functions such as SHAKE-128 or SHAKE-256 " "cannot be used with HMAC." msgstr "" -"此模組實作了 :rfc:`2014` 所描述的 HMAC 演算法。此介面允許使用具有\\ *固定*\\ 摘要 (digest) 長" -"度的任意雜湊函式。要特別注意的是擴充輸出函式(如 SHAKE-128 或 SHAKE-256)不能與 HMAC 一起使用。" +"此模組實作了 :rfc:`2014` 所描述的 HMAC 演算法。此介面允許使用具有\\ *固定*\\ " +"摘要 (digest) 長度的任意雜湊函式。要特別注意的是擴充輸出函式(如 SHAKE-128 " +"或 SHAKE-256)不能與 HMAC 一起使用。" #: ../../library/hmac.rst:22 msgid "" @@ -90,11 +91,11 @@ msgstr "" "作為 CPython 的實現細節,C 的優化實作只有當 *digest* 為字串並且是一個 " "OpenSSL 所支持的摘要演算法的名稱時才會被使用。" -#: ../../library/hmac.rst:53 +#: ../../library/hmac.rst:55 msgid "An HMAC object has the following methods:" msgstr "HMAC 物件具有下列方法 (method):" -#: ../../library/hmac.rst:57 +#: ../../library/hmac.rst:59 msgid "" "Update the hmac object with *msg*. Repeated calls are equivalent to a " "single call with the concatenation of all the arguments: ``m.update(a); m." @@ -103,11 +104,11 @@ msgstr "" "用 *msg* 來更新 hmac 物件。重複呼叫相當於單次呼叫並傳入所有引數的拼接結果:" "``m.update(a); m.update(b)`` 等價於 ``m.update(a + b)``。" -#: ../../library/hmac.rst:61 +#: ../../library/hmac.rst:63 msgid "Parameter *msg* can be of any type supported by :mod:`hashlib`." msgstr "參數 *msg* 可以是 :mod:`hashlib` 所支援的任何型別。" -#: ../../library/hmac.rst:67 +#: ../../library/hmac.rst:69 msgid "" "Return the digest of the bytes passed to the :meth:`update` method so far. " "This bytes object will be the same length as the *digest_size* of the digest " @@ -118,7 +119,7 @@ msgstr "" "給建構函式的摘要 *digest_size* 的長度相同。它可以包含 NUL bytes 以及 non-" "ASCII bytes。" -#: ../../library/hmac.rst:74 +#: ../../library/hmac.rst:76 msgid "" "When comparing the output of :meth:`digest` to an externally supplied digest " "during a verification routine, it is recommended to use the :func:" @@ -129,7 +130,7 @@ msgstr "" "較時,建議使用 :func:`compare_digest` 函式而不是 ``==`` 運算子以減少被定時攻" "擊時的漏洞。" -#: ../../library/hmac.rst:82 +#: ../../library/hmac.rst:84 msgid "" "Like :meth:`digest` except the digest is returned as a string twice the " "length containing only hexadecimal digits. This may be used to exchange the " @@ -138,7 +139,7 @@ msgstr "" "像是 :meth:`digest` 但摘要的回傳形式為兩倍長度的字串,且此字串只包含十六進位" "數位。這可以被用於在電子郵件或其他非二進位制環境中安全地交換數據。" -#: ../../library/hmac.rst:88 +#: ../../library/hmac.rst:90 msgid "" "When comparing the output of :meth:`hexdigest` to an externally supplied " "digest during a verification routine, it is recommended to use the :func:" @@ -149,7 +150,7 @@ msgstr "" "比較時,建議使用 :func:`compare_digest` 函式而不是 ``==`` 運算子以減少被定時" "攻擊時的漏洞。" -#: ../../library/hmac.rst:96 +#: ../../library/hmac.rst:98 msgid "" "Return a copy (\"clone\") of the hmac object. This can be used to " "efficiently compute the digests of strings that share a common initial " @@ -158,23 +159,23 @@ msgstr "" "回傳 hmac 物件的拷貝 (\"clone\")。這可以被用來有效率地計算那些共享相同初始子" "字串的字串的摘要。" -#: ../../library/hmac.rst:100 +#: ../../library/hmac.rst:102 msgid "A hash object has the following attributes:" msgstr "一個 hash 物件具有以下屬性:" -#: ../../library/hmac.rst:104 +#: ../../library/hmac.rst:106 msgid "The size of the resulting HMAC digest in bytes." msgstr "以 bytes 表示最終 HMAC 摘要的大小。" -#: ../../library/hmac.rst:108 +#: ../../library/hmac.rst:110 msgid "The internal block size of the hash algorithm in bytes." msgstr "以 bytes 表示雜湊演算法的內部區塊大小。" -#: ../../library/hmac.rst:114 +#: ../../library/hmac.rst:116 msgid "The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``." msgstr "HMAC 的正準名稱總是為小寫形式,例如 ``hmac-md5``。" -#: ../../library/hmac.rst:119 +#: ../../library/hmac.rst:121 msgid "" "Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, " "and ``HMAC.outer``." @@ -182,11 +183,11 @@ msgstr "" "未寫入文件的屬性 ``HMAC.digest_cons``,``HMAC.inner`` 和 ``HMAC.outer`` 已被" "移除。" -#: ../../library/hmac.rst:123 +#: ../../library/hmac.rst:125 msgid "This module also provides the following helper function:" msgstr "這個模組還提供了下列輔助函式:" -#: ../../library/hmac.rst:127 +#: ../../library/hmac.rst:129 msgid "" "Return ``a == b``. This function uses an approach designed to prevent " "timing analysis by avoiding content-based short circuiting behaviour, making " @@ -199,7 +200,7 @@ msgstr "" "`str`\\ (僅限 ASCII,如 :meth:`HMAC.hexdigest` 的回傳值),或者是 :term:" "`bytes-like object`。" -#: ../../library/hmac.rst:135 +#: ../../library/hmac.rst:137 msgid "" "If *a* and *b* are of different lengths, or if an error occurs, a timing " "attack could theoretically reveal information about the types and lengths of " @@ -208,15 +209,15 @@ msgstr "" "如果 *a* 和 *b* 具有不同的長度,或者如果發生了錯誤,定時攻擊在理論上可以取得" "有關 *a* 和 *b* 的型別和長度的訊息 — 但不能取得他們的值。" -#: ../../library/hmac.rst:143 +#: ../../library/hmac.rst:145 msgid "" "The function uses OpenSSL's ``CRYPTO_memcmp()`` internally when available." msgstr "此函式在可能的情況下會在內部使用 OpenSSL 的 ``CRYPTO_memcmp()``。" -#: ../../library/hmac.rst:149 +#: ../../library/hmac.rst:151 msgid "Module :mod:`hashlib`" msgstr ":mod:`hashlib` 模組" -#: ../../library/hmac.rst:150 +#: ../../library/hmac.rst:152 msgid "The Python module providing secure hash functions." msgstr "Python 模組提供安全的雜湊函式。" diff --git a/library/shutil.po b/library/shutil.po index 3b80fc49a4..75769f7b7c 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-28 00:16+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+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-" @@ -92,8 +92,8 @@ msgid "" "link will be created instead of copying the file *src* points to." msgstr "" -#: ../../library/shutil.rst:70 ../../library/shutil.rst:177 -#: ../../library/shutil.rst:208 +#: ../../library/shutil.rst:70 ../../library/shutil.rst:184 +#: ../../library/shutil.rst:215 msgid "" "Raises an :ref:`auditing event ` ``shutil.copyfile`` with " "arguments ``src``, ``dst``." @@ -113,9 +113,9 @@ msgid "" "subclass of the latter, this change is backward compatible." msgstr "" -#: ../../library/shutil.rst:81 ../../library/shutil.rst:185 -#: ../../library/shutil.rst:217 ../../library/shutil.rst:287 -#: ../../library/shutil.rst:400 +#: ../../library/shutil.rst:81 ../../library/shutil.rst:192 +#: ../../library/shutil.rst:224 ../../library/shutil.rst:294 +#: ../../library/shutil.rst:407 msgid "" "Platform-specific fast-copy syscalls may be used internally in order to copy " "the file more efficiently. See :ref:`shutil-platform-dependent-efficient-" @@ -124,11 +124,17 @@ msgstr "" #: ../../library/shutil.rst:88 msgid "" +"This exception is raised when :func:`copyfile` or :func:`copytree` attempt " +"to copy a named pipe." +msgstr "" + +#: ../../library/shutil.rst:95 +msgid "" "This exception is raised if source and destination in :func:`copyfile` are " "the same file." msgstr "" -#: ../../library/shutil.rst:96 +#: ../../library/shutil.rst:103 msgid "" "Copy the permission bits from *src* to *dst*. The file contents, owner, and " "group are unaffected. *src* and *dst* are :term:`path-like objects ` ``shutil.copymode`` with " "arguments ``src``, ``dst``." @@ -149,11 +155,11 @@ msgstr "" "引發一個附帶引數 ``src``、``dst`` 的\\ :ref:`稽核事件 ` ``shutil." "copymode``。" -#: ../../library/shutil.rst:108 +#: ../../library/shutil.rst:115 msgid "Added *follow_symlinks* argument." msgstr "新增 *follow_symlinks* 引數。" -#: ../../library/shutil.rst:113 +#: ../../library/shutil.rst:120 msgid "" "Copy the permission bits, last access time, last modification time, and " "flags from *src* to *dst*. On Linux, :func:`copystat` also copies the " @@ -162,7 +168,7 @@ msgid "" "object>` or path names given as strings." msgstr "" -#: ../../library/shutil.rst:119 +#: ../../library/shutil.rst:126 msgid "" "If *follow_symlinks* is false, and *src* and *dst* both refer to symbolic " "links, :func:`copystat` will operate on the symbolic links themselves rather " @@ -170,43 +176,43 @@ msgid "" "*src* symbolic link, and writing the information to the *dst* symbolic link." msgstr "" -#: ../../library/shutil.rst:128 +#: ../../library/shutil.rst:135 msgid "" "Not all platforms provide the ability to examine and modify symbolic links. " "Python itself can tell you what functionality is locally available." msgstr "" -#: ../../library/shutil.rst:132 +#: ../../library/shutil.rst:139 msgid "" "If ``os.chmod in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the permission bits of a symbolic link." msgstr "" -#: ../../library/shutil.rst:136 +#: ../../library/shutil.rst:143 msgid "" "If ``os.utime in os.supports_follow_symlinks`` is ``True``, :func:`copystat` " "can modify the last access and modification times of a symbolic link." msgstr "" -#: ../../library/shutil.rst:140 +#: ../../library/shutil.rst:147 msgid "" "If ``os.chflags in os.supports_follow_symlinks`` is ``True``, :func:" "`copystat` can modify the flags of a symbolic link. (``os.chflags`` is not " "available on all platforms.)" msgstr "" -#: ../../library/shutil.rst:145 +#: ../../library/shutil.rst:152 msgid "" "On platforms where some or all of this functionality is unavailable, when " "asked to modify a symbolic link, :func:`copystat` will copy everything it " "can. :func:`copystat` never returns failure." msgstr "" -#: ../../library/shutil.rst:150 +#: ../../library/shutil.rst:157 msgid "Please see :data:`os.supports_follow_symlinks` for more information." msgstr "更多資訊請見 :data:`os.supports_follow_symlinks`。" -#: ../../library/shutil.rst:153 ../../library/shutil.rst:210 +#: ../../library/shutil.rst:160 ../../library/shutil.rst:217 msgid "" "Raises an :ref:`auditing event ` ``shutil.copystat`` with " "arguments ``src``, ``dst``." @@ -214,12 +220,12 @@ msgstr "" "引發一個附帶引數 ``src``、``dst`` 的\\ :ref:`稽核事件 ` ``shutil." "copystat``。" -#: ../../library/shutil.rst:155 +#: ../../library/shutil.rst:162 msgid "" "Added *follow_symlinks* argument and support for Linux extended attributes." msgstr "" -#: ../../library/shutil.rst:160 +#: ../../library/shutil.rst:167 msgid "" "Copies the file *src* to the file or directory *dst*. *src* and *dst* " "should be :term:`path-like objects ` or strings. If *dst* " @@ -228,14 +234,14 @@ msgid "" "be replaced. Returns the path to the newly created file." msgstr "" -#: ../../library/shutil.rst:166 +#: ../../library/shutil.rst:173 msgid "" "If *follow_symlinks* is false, and *src* is a symbolic link, *dst* will be " "created as a symbolic link. If *follow_symlinks* is true and *src* is a " "symbolic link, *dst* will be a copy of the file *src* refers to." msgstr "" -#: ../../library/shutil.rst:171 +#: ../../library/shutil.rst:178 msgid "" ":func:`~shutil.copy` copies the file data and the file's permission mode " "(see :func:`os.chmod`). Other metadata, like the file's creation and " @@ -243,18 +249,18 @@ msgid "" "original, use :func:`~shutil.copy2` instead." msgstr "" -#: ../../library/shutil.rst:181 +#: ../../library/shutil.rst:188 msgid "" "Added *follow_symlinks* argument. Now returns path to the newly created file." msgstr "" -#: ../../library/shutil.rst:192 +#: ../../library/shutil.rst:199 msgid "" "Identical to :func:`~shutil.copy` except that :func:`copy2` also attempts to " "preserve file metadata." msgstr "" -#: ../../library/shutil.rst:195 +#: ../../library/shutil.rst:202 msgid "" "When *follow_symlinks* is false, and *src* is a symbolic link, :func:`copy2` " "attempts to copy all metadata from the *src* symbolic link to the newly " @@ -264,41 +270,41 @@ msgid "" "`copy2` never raises an exception because it cannot preserve file metadata." msgstr "" -#: ../../library/shutil.rst:204 +#: ../../library/shutil.rst:211 msgid "" ":func:`copy2` uses :func:`copystat` to copy the file metadata. Please see :" "func:`copystat` for more information about platform support for modifying " "symbolic link metadata." msgstr "" -#: ../../library/shutil.rst:212 +#: ../../library/shutil.rst:219 msgid "" "Added *follow_symlinks* argument, try to copy extended file system " "attributes too (currently Linux only). Now returns path to the newly created " "file." msgstr "" -#: ../../library/shutil.rst:224 +#: ../../library/shutil.rst:231 msgid "" "This factory function creates a function that can be used as a callable for :" "func:`copytree`\\'s *ignore* argument, ignoring files and directories that " "match one of the glob-style *patterns* provided. See the example below." msgstr "" -#: ../../library/shutil.rst:233 +#: ../../library/shutil.rst:240 msgid "" "Recursively copy an entire directory tree rooted at *src* to a directory " "named *dst* and return the destination directory. All intermediate " "directories needed to contain *dst* will also be created by default." msgstr "" -#: ../../library/shutil.rst:237 +#: ../../library/shutil.rst:244 msgid "" "Permissions and times of directories are copied with :func:`copystat`, " "individual files are copied using :func:`~shutil.copy2`." msgstr "" -#: ../../library/shutil.rst:240 +#: ../../library/shutil.rst:247 msgid "" "If *symlinks* is true, symbolic links in the source tree are represented as " "symbolic links in the new tree and the metadata of the original links will " @@ -306,7 +312,7 @@ msgid "" "and metadata of the linked files are copied to the new tree." msgstr "" -#: ../../library/shutil.rst:245 +#: ../../library/shutil.rst:252 msgid "" "When *symlinks* is false, if the file pointed to by the symlink doesn't " "exist, an exception will be added in the list of errors raised in an :exc:" @@ -316,7 +322,7 @@ msgid "" "support :func:`os.symlink`." msgstr "" -#: ../../library/shutil.rst:252 +#: ../../library/shutil.rst:259 msgid "" "If *ignore* is given, it must be a callable that will receive as its " "arguments the directory being visited by :func:`copytree`, and a list of its " @@ -329,12 +335,12 @@ msgid "" "ignores names based on glob-style patterns." msgstr "" -#: ../../library/shutil.rst:262 +#: ../../library/shutil.rst:269 msgid "" "If exception(s) occur, an :exc:`Error` is raised with a list of reasons." msgstr "" -#: ../../library/shutil.rst:264 +#: ../../library/shutil.rst:271 msgid "" "If *copy_function* is given, it must be a callable that will be used to copy " "each file. It will be called with the source path and the destination path " @@ -342,7 +348,7 @@ msgid "" "that supports the same signature (like :func:`~shutil.copy`) can be used." msgstr "" -#: ../../library/shutil.rst:269 +#: ../../library/shutil.rst:276 msgid "" "If *dirs_exist_ok* is false (the default) and *dst* already exists, a :exc:" "`FileExistsError` is raised. If *dirs_exist_ok* is true, the copying " @@ -351,7 +357,7 @@ msgid "" "*src* tree." msgstr "" -#: ../../library/shutil.rst:275 +#: ../../library/shutil.rst:282 msgid "" "Raises an :ref:`auditing event ` ``shutil.copytree`` with " "arguments ``src``, ``dst``." @@ -359,22 +365,22 @@ msgstr "" "引發一個附帶引數 ``src``、``dst`` 的\\ :ref:`稽核事件 ` ``shutil." "copytree``。" -#: ../../library/shutil.rst:277 +#: ../../library/shutil.rst:284 msgid "" "Added the *copy_function* argument to be able to provide a custom copy " "function. Added the *ignore_dangling_symlinks* argument to silence dangling " "symlinks errors when *symlinks* is false." msgstr "" -#: ../../library/shutil.rst:283 +#: ../../library/shutil.rst:290 msgid "Copy metadata when *symlinks* is false. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:292 +#: ../../library/shutil.rst:299 msgid "Added the *dirs_exist_ok* parameter." msgstr "新增 *dirs_exist_ok* 參數。" -#: ../../library/shutil.rst:299 +#: ../../library/shutil.rst:306 msgid "" "Delete an entire directory tree; *path* must point to a directory (but not a " "symbolic link to a directory). If *ignore_errors* is true, errors resulting " @@ -383,13 +389,13 @@ msgid "" "are omitted, exceptions are propagated to the caller." msgstr "" -#: ../../library/shutil.rst:305 +#: ../../library/shutil.rst:312 msgid "" "This function can support :ref:`paths relative to directory descriptors " "`." msgstr "" -#: ../../library/shutil.rst:310 +#: ../../library/shutil.rst:317 msgid "" "On platforms that support the necessary fd-based functions a symlink attack " "resistant version of :func:`rmtree` is used by default. On other platforms, " @@ -400,13 +406,13 @@ msgid "" "attribute to determine which case applies." msgstr "" -#: ../../library/shutil.rst:318 +#: ../../library/shutil.rst:325 msgid "" "If *onexc* is provided, it must be a callable that accepts three parameters: " "*function*, *path*, and *excinfo*." msgstr "" -#: ../../library/shutil.rst:321 +#: ../../library/shutil.rst:328 msgid "" "The first parameter, *function*, is the function which raised the exception; " "it depends on the platform and implementation. The second parameter, " @@ -415,19 +421,19 @@ msgid "" "will not be caught." msgstr "" -#: ../../library/shutil.rst:327 +#: ../../library/shutil.rst:334 msgid "" "The deprecated *onerror* is similar to *onexc*, except that the third " "parameter it receives is the tuple returned from :func:`sys.exc_info`." msgstr "" -#: ../../library/shutil.rst:331 +#: ../../library/shutil.rst:338 msgid "" ":ref:`shutil-rmtree-example` for an example of handling the removal of a " "directory tree that contains read-only files." msgstr "" -#: ../../library/shutil.rst:334 +#: ../../library/shutil.rst:341 msgid "" "Raises an :ref:`auditing event ` ``shutil.rmtree`` with arguments " "``path``, ``dir_fd``." @@ -435,60 +441,60 @@ msgstr "" "引發一個附帶引數 ``path``、``dir_fd`` 的\\ :ref:`稽核事件 ` " "``shutil.rmtree``。" -#: ../../library/shutil.rst:336 +#: ../../library/shutil.rst:343 msgid "" "Added a symlink attack resistant version that is used automatically if " "platform supports fd-based functions." msgstr "" -#: ../../library/shutil.rst:340 +#: ../../library/shutil.rst:347 msgid "" "On Windows, will no longer delete the contents of a directory junction " "before removing the junction." msgstr "" -#: ../../library/shutil.rst:344 +#: ../../library/shutil.rst:351 msgid "Added the *dir_fd* parameter." msgstr "新增 *dir_fd* 參數。" -#: ../../library/shutil.rst:347 +#: ../../library/shutil.rst:354 msgid "Added the *onexc* parameter, deprecated *onerror*." msgstr "新增 *onexc* 參數並棄用 *onerror*。" -#: ../../library/shutil.rst:350 +#: ../../library/shutil.rst:357 msgid "" ":func:`!rmtree` now ignores :exc:`FileNotFoundError` exceptions for all but " "the top-level path. Exceptions other than :exc:`OSError` and subclasses of :" "exc:`!OSError` are now always propagated to the caller." msgstr "" -#: ../../library/shutil.rst:358 +#: ../../library/shutil.rst:365 msgid "" "Indicates whether the current platform and implementation provides a symlink " "attack resistant version of :func:`rmtree`. Currently this is only true for " "platforms supporting fd-based directory access functions." msgstr "" -#: ../../library/shutil.rst:367 +#: ../../library/shutil.rst:374 msgid "" "Recursively move a file or directory (*src*) to another location and return " "the destination." msgstr "" -#: ../../library/shutil.rst:370 +#: ../../library/shutil.rst:377 msgid "" "If *dst* is an existing directory or a symlink to a directory, then *src* is " "moved inside that directory. The destination path in that directory must not " "already exist." msgstr "" -#: ../../library/shutil.rst:374 +#: ../../library/shutil.rst:381 msgid "" "If *dst* already exists but is not a directory, it may be overwritten " "depending on :func:`os.rename` semantics." msgstr "" -#: ../../library/shutil.rst:377 +#: ../../library/shutil.rst:384 msgid "" "If the destination is on the current filesystem, then :func:`os.rename` is " "used. Otherwise, *src* is copied to the destination using *copy_function* " @@ -496,7 +502,7 @@ msgid "" "of *src* will be created as the destination and *src* will be removed." msgstr "" -#: ../../library/shutil.rst:382 +#: ../../library/shutil.rst:389 msgid "" "If *copy_function* is given, it must be a callable that takes two arguments, " "*src* and the destination, and will be used to copy *src* to the destination " @@ -507,7 +513,7 @@ msgid "" "copy the metadata, at the expense of not copying any of the metadata." msgstr "" -#: ../../library/shutil.rst:390 +#: ../../library/shutil.rst:397 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." @@ -515,57 +521,57 @@ msgstr "" "引發一個附帶引數 ``src``、``dst`` 的\\ :ref:`稽核事件 ` ``shutil." "move``。" -#: ../../library/shutil.rst:392 +#: ../../library/shutil.rst:399 msgid "" "Added explicit symlink handling for foreign filesystems, thus adapting it to " "the behavior of GNU's :program:`mv`. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:397 +#: ../../library/shutil.rst:404 msgid "Added the *copy_function* keyword argument." msgstr "新增 *copy_function* 關鍵字引數。" -#: ../../library/shutil.rst:405 +#: ../../library/shutil.rst:412 msgid "Accepts a :term:`path-like object` for both *src* and *dst*." msgstr "" -#: ../../library/shutil.rst:410 +#: ../../library/shutil.rst:417 msgid "" "Return disk usage statistics about the given path as a :term:`named tuple` " "with the attributes *total*, *used* and *free*, which are the amount of " "total, used and free space, in bytes. *path* may be a file or a directory." msgstr "" -#: ../../library/shutil.rst:417 +#: ../../library/shutil.rst:424 msgid "" "On Unix filesystems, *path* must point to a path within a **mounted** " "filesystem partition. On those platforms, CPython doesn't attempt to " "retrieve disk usage information from non-mounted filesystems." msgstr "" -#: ../../library/shutil.rst:423 +#: ../../library/shutil.rst:430 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: ../../library/shutil.rst:426 ../../library/shutil.rst:440 +#: ../../library/shutil.rst:433 ../../library/shutil.rst:447 msgid "Availability" msgstr "可用性" -#: ../../library/shutil.rst:431 +#: ../../library/shutil.rst:438 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: ../../library/shutil.rst:433 +#: ../../library/shutil.rst:440 msgid "" "*user* can be a system user name or a uid; the same applies to *group*. At " "least one argument is required." msgstr "" -#: ../../library/shutil.rst:436 +#: ../../library/shutil.rst:443 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../library/shutil.rst:438 +#: ../../library/shutil.rst:445 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." @@ -573,23 +579,23 @@ msgstr "" "引發一個附帶引數 ``path``、``user``、``group`` 的\\ :ref:`稽核事件 " "` ``shutil.chown``。" -#: ../../library/shutil.rst:444 +#: ../../library/shutil.rst:451 msgid "Added *dir_fd* and *follow_symlinks* parameters." msgstr "新增 *dir_fd* 和 *follow_symlinks* 參數。" -#: ../../library/shutil.rst:450 +#: ../../library/shutil.rst:457 msgid "" "Return the path to an executable which would be run if the given *cmd* was " "called. If no *cmd* would be called, return ``None``." msgstr "" -#: ../../library/shutil.rst:453 +#: ../../library/shutil.rst:460 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and is executable." msgstr "" -#: ../../library/shutil.rst:456 +#: ../../library/shutil.rst:463 msgid "" "*path* is a \"``PATH`` string\" specifying the directories to look in, " "delimited by :data:`os.pathsep`. When no *path* is specified, the :envvar:" @@ -597,14 +603,14 @@ msgid "" "to :data:`os.defpath` if it is not set." msgstr "" -#: ../../library/shutil.rst:461 +#: ../../library/shutil.rst:468 msgid "" "If *cmd* contains a directory component, :func:`!which` only checks the " "specified path directly and does not search the directories listed in *path* " "or in the system's :envvar:`PATH` environment variable." msgstr "" -#: ../../library/shutil.rst:465 +#: ../../library/shutil.rst:472 msgid "" "On Windows, the current directory is prepended to the *path* if *mode* does " "not include ``os.X_OK``. When the *mode* does include ``os.X_OK``, the " @@ -614,7 +620,7 @@ msgid "" "environment variable ``NoDefaultCurrentDirectoryInExePath``." msgstr "" -#: ../../library/shutil.rst:472 +#: ../../library/shutil.rst:479 msgid "" "Also on Windows, the :envvar:`PATHEXT` environment variable is used to " "resolve commands that may not already include an extension. For example, if " @@ -623,7 +629,7 @@ msgid "" "directories. For example, on Windows::" msgstr "" -#: ../../library/shutil.rst:478 +#: ../../library/shutil.rst:485 msgid "" ">>> shutil.which(\"python\")\n" "'C:\\\\Python33\\\\python.EXE'" @@ -631,13 +637,13 @@ msgstr "" ">>> shutil.which(\"python\")\n" "'C:\\\\Python33\\\\python.EXE'" -#: ../../library/shutil.rst:481 +#: ../../library/shutil.rst:488 msgid "" "This is also applied when *cmd* is a path that contains a directory " "component::" msgstr "" -#: ../../library/shutil.rst:484 +#: ../../library/shutil.rst:491 msgid "" ">>> shutil.which(\"C:\\\\Python33\\\\python\")\n" "'C:\\\\Python33\\\\python.EXE'" @@ -645,13 +651,13 @@ msgstr "" ">>> shutil.which(\"C:\\\\Python33\\\\python\")\n" "'C:\\\\Python33\\\\python.EXE'" -#: ../../library/shutil.rst:489 +#: ../../library/shutil.rst:496 msgid "" "The :class:`bytes` type is now accepted. If *cmd* type is :class:`bytes`, " "the result type is also :class:`bytes`." msgstr "" -#: ../../library/shutil.rst:493 +#: ../../library/shutil.rst:500 msgid "" "On Windows, the current directory is no longer prepended to the search path " "if *mode* includes ``os.X_OK`` and WinAPI " @@ -662,18 +668,18 @@ msgid "" "now be found." msgstr "" -#: ../../library/shutil.rst:504 +#: ../../library/shutil.rst:511 msgid "" "This exception collects exceptions that are raised during a multi-file " "operation. For :func:`copytree`, the exception argument is a list of 3-" "tuples (*srcname*, *dstname*, *exception*)." msgstr "" -#: ../../library/shutil.rst:511 +#: ../../library/shutil.rst:518 msgid "Platform-dependent efficient copy operations" msgstr "" -#: ../../library/shutil.rst:513 +#: ../../library/shutil.rst:520 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -683,37 +689,37 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: ../../library/shutil.rst:521 +#: ../../library/shutil.rst:528 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: ../../library/shutil.rst:523 +#: ../../library/shutil.rst:530 msgid "On Linux :func:`os.sendfile` is used." msgstr "" -#: ../../library/shutil.rst:525 +#: ../../library/shutil.rst:532 msgid "" "On Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " "instead of 64 KiB) and a :func:`memoryview`-based variant of :func:`shutil." "copyfileobj` is used." msgstr "" -#: ../../library/shutil.rst:529 +#: ../../library/shutil.rst:536 msgid "" "If the fast-copy operation fails and no data was written in the destination " "file then shutil will silently fallback on using less efficient :func:" "`copyfileobj` function internally." msgstr "" -#: ../../library/shutil.rst:538 +#: ../../library/shutil.rst:545 msgid "copytree example" msgstr "copytree 範例" -#: ../../library/shutil.rst:540 +#: ../../library/shutil.rst:547 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../library/shutil.rst:542 +#: ../../library/shutil.rst:549 msgid "" "from shutil import copytree, ignore_patterns\n" "\n" @@ -723,17 +729,17 @@ msgstr "" "\n" "copytree(source, destination, ignore=ignore_patterns('*.pyc', 'tmp*'))" -#: ../../library/shutil.rst:546 +#: ../../library/shutil.rst:553 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../library/shutil.rst:549 +#: ../../library/shutil.rst:556 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../library/shutil.rst:551 +#: ../../library/shutil.rst:558 msgid "" "from shutil import copytree\n" "import logging\n" @@ -745,11 +751,11 @@ msgid "" "copytree(source, destination, ignore=_logpath)" msgstr "" -#: ../../library/shutil.rst:564 +#: ../../library/shutil.rst:571 msgid "rmtree example" msgstr "rmtree 範例" -#: ../../library/shutil.rst:566 +#: ../../library/shutil.rst:573 msgid "" "This example shows how to remove a directory tree on Windows where some of " "the files have their read-only bit set. It uses the onexc callback to clear " @@ -757,7 +763,7 @@ msgid "" "propagate. ::" msgstr "" -#: ../../library/shutil.rst:571 +#: ../../library/shutil.rst:578 msgid "" "import os, stat\n" "import shutil\n" @@ -770,31 +776,31 @@ msgid "" "shutil.rmtree(directory, onexc=remove_readonly)" msgstr "" -#: ../../library/shutil.rst:584 +#: ../../library/shutil.rst:591 msgid "Archiving operations" msgstr "" -#: ../../library/shutil.rst:588 +#: ../../library/shutil.rst:595 msgid "Added support for the *xztar* format." msgstr "新增 *xztar* 格式的支援。" -#: ../../library/shutil.rst:592 +#: ../../library/shutil.rst:599 msgid "" "High-level utilities to create and read compressed and archived files are " "also provided. They rely on the :mod:`zipfile` and :mod:`tarfile` modules." msgstr "" -#: ../../library/shutil.rst:597 +#: ../../library/shutil.rst:604 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../library/shutil.rst:599 +#: ../../library/shutil.rst:606 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension." msgstr "" -#: ../../library/shutil.rst:602 +#: ../../library/shutil.rst:609 msgid "" "*format* is the archive format: one of \"zip\" (if the :mod:`zlib` module is " "available), \"tar\", \"gztar\" (if the :mod:`zlib` module is available), " @@ -802,14 +808,14 @@ msgid "" "`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:607 +#: ../../library/shutil.rst:614 msgid "" "*root_dir* is a directory that will be the root directory of the archive, " "all paths in the archive will be relative to it; for example, we typically " "chdir into *root_dir* before creating the archive." msgstr "" -#: ../../library/shutil.rst:611 +#: ../../library/shutil.rst:618 msgid "" "*base_dir* is the directory where we start archiving from; i.e. *base_dir* " "will be the common prefix of all files and directories in the archive. " @@ -817,33 +823,33 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: ../../library/shutil.rst:617 +#: ../../library/shutil.rst:624 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../library/shutil.rst:619 +#: ../../library/shutil.rst:626 msgid "" "If *dry_run* is true, no archive is created, but the operations that would " "be executed are logged to *logger*." msgstr "" -#: ../../library/shutil.rst:622 +#: ../../library/shutil.rst:629 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../library/shutil.rst:625 +#: ../../library/shutil.rst:632 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../library/shutil.rst:628 +#: ../../library/shutil.rst:635 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:630 +#: ../../library/shutil.rst:637 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." @@ -851,7 +857,7 @@ msgstr "" "引發一個附帶引數 ``base_name``、``format``、``root_dir``、``base_dir`` 的\\ :" "ref:`稽核事件 ` ``shutil.make_archive``。" -#: ../../library/shutil.rst:634 +#: ../../library/shutil.rst:641 msgid "" "This function is not thread-safe when custom archivers registered with :func:" "`register_archive_format` do not support the *root_dir* argument. In this " @@ -859,60 +865,60 @@ msgid "" "*root_dir* to perform archiving." msgstr "" -#: ../../library/shutil.rst:640 +#: ../../library/shutil.rst:647 msgid "" "The modern pax (POSIX.1-2001) format is now used instead of the legacy GNU " "format for archives created with ``format=\"tar\"``." msgstr "" -#: ../../library/shutil.rst:644 +#: ../../library/shutil.rst:651 msgid "" "This function is now made thread-safe during creation of standard ``.zip`` " "and tar archives." msgstr "" -#: ../../library/shutil.rst:650 +#: ../../library/shutil.rst:657 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:653 ../../library/shutil.rst:764 +#: ../../library/shutil.rst:660 ../../library/shutil.rst:771 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:655 +#: ../../library/shutil.rst:662 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:656 +#: ../../library/shutil.rst:663 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:657 ../../library/shutil.rst:769 +#: ../../library/shutil.rst:664 ../../library/shutil.rst:776 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:658 ../../library/shutil.rst:770 +#: ../../library/shutil.rst:665 ../../library/shutil.rst:777 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:659 ../../library/shutil.rst:771 +#: ../../library/shutil.rst:666 ../../library/shutil.rst:778 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:661 +#: ../../library/shutil.rst:668 msgid "" "You can register new formats or provide your own archiver for any existing " "formats, by using :func:`register_archive_format`." msgstr "" -#: ../../library/shutil.rst:667 +#: ../../library/shutil.rst:674 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:669 +#: ../../library/shutil.rst:676 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the *base_name* of the file to create, followed by the " @@ -921,7 +927,7 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:675 +#: ../../library/shutil.rst:682 msgid "" "If *function* has the custom attribute ``function.supports_root_dir`` set to " "``True``, the *root_dir* argument is passed as a keyword argument. Otherwise " @@ -930,37 +936,37 @@ msgid "" "not thread-safe." msgstr "" -#: ../../library/shutil.rst:681 +#: ../../library/shutil.rst:688 msgid "" "If given, *extra_args* is a sequence of ``(name, value)`` pairs that will be " "used as extra keywords arguments when the archiver callable is used." msgstr "" -#: ../../library/shutil.rst:684 +#: ../../library/shutil.rst:691 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:687 +#: ../../library/shutil.rst:694 msgid "Added support for functions supporting the *root_dir* argument." msgstr "" -#: ../../library/shutil.rst:693 +#: ../../library/shutil.rst:700 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:698 +#: ../../library/shutil.rst:705 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:700 +#: ../../library/shutil.rst:707 msgid "" "*extract_dir* is the name of the target directory where the archive is " "unpacked. If not provided, the current working directory is used." msgstr "" -#: ../../library/shutil.rst:703 +#: ../../library/shutil.rst:710 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", " "\"bztar\", or \"xztar\". Or any other format registered with :func:" @@ -969,7 +975,7 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:710 +#: ../../library/shutil.rst:717 msgid "" "The keyword-only *filter* argument is passed to the underlying unpacking " "function. For zip files, *filter* is not accepted. For tar files, it is " @@ -979,7 +985,7 @@ msgid "" "Python 3.14." msgstr "" -#: ../../library/shutil.rst:718 +#: ../../library/shutil.rst:725 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." @@ -987,7 +993,7 @@ msgstr "" "引發一個附帶引數 ``filename``、``extract_dir``、``format`` 的\\ :ref:`稽核事" "件 ` ``shutil.unpack_archive``。" -#: ../../library/shutil.rst:722 +#: ../../library/shutil.rst:729 msgid "" "Never extract archives from untrusted sources without prior inspection. It " "is possible that files are created outside of the path specified in the " @@ -995,91 +1001,91 @@ msgid "" "with \"/\" or filenames with two dots \"..\"." msgstr "" -#: ../../library/shutil.rst:727 +#: ../../library/shutil.rst:734 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:730 +#: ../../library/shutil.rst:737 msgid "Added the *filter* argument." msgstr "新增 *filter* 引數。" -#: ../../library/shutil.rst:735 +#: ../../library/shutil.rst:742 msgid "" "Registers an unpack format. *name* is the name of the format and " "*extensions* is a list of extensions corresponding to the format, like ``." "zip`` for Zip files." msgstr "" -#: ../../library/shutil.rst:739 +#: ../../library/shutil.rst:746 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive:" msgstr "" -#: ../../library/shutil.rst:742 +#: ../../library/shutil.rst:749 msgid "the path of the archive, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:743 +#: ../../library/shutil.rst:750 msgid "" "the directory the archive must be extracted to, as a positional argument;" msgstr "" -#: ../../library/shutil.rst:744 +#: ../../library/shutil.rst:751 msgid "" "possibly a *filter* keyword argument, if it was given to :func:" "`unpack_archive`;" msgstr "" -#: ../../library/shutil.rst:746 +#: ../../library/shutil.rst:753 msgid "" "additional keyword arguments, specified by *extra_args* as a sequence of " "``(name, value)`` tuples." msgstr "" -#: ../../library/shutil.rst:749 +#: ../../library/shutil.rst:756 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:755 +#: ../../library/shutil.rst:762 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:760 +#: ../../library/shutil.rst:767 msgid "" "Return a list of all registered formats for unpacking. Each element of the " "returned sequence is a tuple ``(name, extensions, description)``." msgstr "" -#: ../../library/shutil.rst:766 +#: ../../library/shutil.rst:773 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:768 +#: ../../library/shutil.rst:775 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:773 +#: ../../library/shutil.rst:780 msgid "" "You can register new formats or provide your own unpacker for any existing " "formats, by using :func:`register_unpack_format`." msgstr "" -#: ../../library/shutil.rst:780 +#: ../../library/shutil.rst:787 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:782 +#: ../../library/shutil.rst:789 msgid "" "In this example, we create a gzip'ed tar-file archive containing all files " "found in the :file:`.ssh` directory of the user::" msgstr "" -#: ../../library/shutil.rst:785 +#: ../../library/shutil.rst:792 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1089,11 +1095,11 @@ msgid "" "'/Users/tarek/myarchive.tar.gz'" msgstr "" -#: ../../library/shutil.rst:792 +#: ../../library/shutil.rst:799 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:794 +#: ../../library/shutil.rst:801 msgid "" "$ tar -tzvf /Users/tarek/myarchive.tar.gz\n" "drwx------ tarek/staff 0 2010-02-01 16:23:40 ./\n" @@ -1115,18 +1121,18 @@ msgstr "" "-rw-r--r-- tarek/staff 397 2008-06-09 13:26:54 ./id_rsa.pub\n" "-rw-r--r-- tarek/staff 37192 2010-02-06 18:23:10 ./known_hosts" -#: ../../library/shutil.rst:810 +#: ../../library/shutil.rst:817 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:812 +#: ../../library/shutil.rst:819 msgid "" "In this example, similar to the `one above `_, we " "show how to use :func:`make_archive`, but this time with the usage of " "*base_dir*. We now have the following directory structure:" msgstr "" -#: ../../library/shutil.rst:816 +#: ../../library/shutil.rst:823 msgid "" "$ tree tmp\n" "tmp\n" @@ -1144,13 +1150,13 @@ msgstr "" " └── please_add.txt\n" " └── do_not_add.txt" -#: ../../library/shutil.rst:826 +#: ../../library/shutil.rst:833 msgid "" "In the final archive, :file:`please_add.txt` should be included, but :file:" "`do_not_add.txt` should not. Therefore we use the following::" msgstr "" -#: ../../library/shutil.rst:829 +#: ../../library/shutil.rst:836 msgid "" ">>> from shutil import make_archive\n" ">>> import os\n" @@ -1174,11 +1180,11 @@ msgstr "" "... )\n" "'/Users/tarek/myarchive.tar'" -#: ../../library/shutil.rst:840 +#: ../../library/shutil.rst:847 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:842 +#: ../../library/shutil.rst:849 msgid "" "$ python -m tarfile -l /Users/tarek/myarchive.tar\n" "structure/content/\n" @@ -1188,29 +1194,29 @@ msgstr "" "structure/content/\n" "structure/content/please_add.txt" -#: ../../library/shutil.rst:850 +#: ../../library/shutil.rst:857 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:854 +#: ../../library/shutil.rst:861 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:856 +#: ../../library/shutil.rst:863 msgid "" "For each of the two dimensions, the environment variable, ``COLUMNS`` and " "``LINES`` respectively, is checked. If the variable is defined and the value " "is a positive integer, it is used." msgstr "" -#: ../../library/shutil.rst:860 +#: ../../library/shutil.rst:867 msgid "" "When ``COLUMNS`` or ``LINES`` is not defined, which is the common case, the " "terminal connected to :data:`sys.__stdout__` is queried by invoking :func:" "`os.get_terminal_size`." msgstr "" -#: ../../library/shutil.rst:864 +#: ../../library/shutil.rst:871 msgid "" "If the terminal size cannot be successfully queried, either because the " "system doesn't support querying, or because we are not connected to a " @@ -1219,17 +1225,17 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:870 +#: ../../library/shutil.rst:877 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:872 +#: ../../library/shutil.rst:879 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." msgstr "" -#: ../../library/shutil.rst:877 +#: ../../library/shutil.rst:884 msgid "" "The ``fallback`` values are also used if :func:`os.get_terminal_size` " "returns zeroes." @@ -1247,10 +1253,10 @@ msgstr "copying(複製)" msgid "copying files" msgstr "copying files(複製檔案)" -#: ../../library/shutil.rst:297 +#: ../../library/shutil.rst:304 msgid "directory" msgstr "directory(目錄)" -#: ../../library/shutil.rst:297 +#: ../../library/shutil.rst:304 msgid "deleting" msgstr "deleting(刪除)" diff --git a/library/ssl.po b/library/ssl.po index a9dc4282fc..c8891609fe 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -3548,7 +3548,7 @@ msgstr "" #: ../../library/ssl.rst:2520 msgid "Memory BIO Support" -msgstr "" +msgstr "記憶體 BIO 支援" #: ../../library/ssl.rst:2524 msgid "" diff --git a/library/unittest.po b/library/unittest.po index 110f6e1d74..4fa631c5c0 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-06-27 07:36+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2022-10-16 06:03+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -266,8 +266,8 @@ msgid "" "provides a command-line interface to the test script. When run from the " "command line, the above script produces an output that looks like this::" msgstr "" -"最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令列介" -"面測試腳本。當透過命令列執行,輸出結果將會像是: ::" +"最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令列介面測" +"試腳本。當透過命令列執行,輸出結果將會像是: ::" #: ../../library/unittest.rst:133 msgid "" @@ -335,8 +335,7 @@ msgstr "命令列介面" msgid "" "The unittest module can be used from the command line to run tests from " "modules, classes or even individual test methods::" -msgstr "" -"單元測試模組可以透過命令列執行測試模組,物件甚至個別的測試方法: ::" +msgstr "單元測試模組可以透過命令列執行測試模組,物件甚至個別的測試方法: ::" #: ../../library/unittest.rst:168 msgid "" @@ -3592,11 +3591,11 @@ msgstr "" msgid "setUpModule and tearDownModule" msgstr "setUpModule 和 tearDownModule" -#: ../../library/unittest.rst:2472 +#: ../../library/unittest.rst:2476 msgid "These should be implemented as functions::" msgstr "" -#: ../../library/unittest.rst:2474 +#: ../../library/unittest.rst:2478 msgid "" "def setUpModule():\n" " createConnection()\n" @@ -3610,7 +3609,7 @@ msgstr "" "def tearDownModule():\n" " closeConnection()" -#: ../../library/unittest.rst:2480 +#: ../../library/unittest.rst:2484 msgid "" "If an exception is raised in a ``setUpModule`` then none of the tests in the " "module will be run and the ``tearDownModule`` will not be run. If the " @@ -3618,13 +3617,13 @@ msgid "" "having been skipped instead of as an error." msgstr "" -#: ../../library/unittest.rst:2485 +#: ../../library/unittest.rst:2489 msgid "" "To add cleanup code that must be run even in the case of an exception, use " "``addModuleCleanup``:" msgstr "" -#: ../../library/unittest.rst:2491 +#: ../../library/unittest.rst:2495 msgid "" "Add a function to be called after :func:`tearDownModule` to cleanup " "resources used during the test class. Functions will be called in reverse " @@ -3633,13 +3632,13 @@ msgid "" "`addModuleCleanup` when they are added." msgstr "" -#: ../../library/unittest.rst:2497 +#: ../../library/unittest.rst:2501 msgid "" "If :meth:`setUpModule` fails, meaning that :func:`tearDownModule` is not " "called, then any cleanup functions added will still be called." msgstr "" -#: ../../library/unittest.rst:2505 +#: ../../library/unittest.rst:2509 msgid "" "Enter the supplied :term:`context manager`. If successful, also add its :" "meth:`~object.__exit__` method as a cleanup function by :func:" @@ -3647,30 +3646,30 @@ msgid "" "method." msgstr "" -#: ../../library/unittest.rst:2515 +#: ../../library/unittest.rst:2519 msgid "" "This function is called unconditionally after :func:`tearDownModule`, or " "after :func:`setUpModule` if :func:`setUpModule` raises an exception." msgstr "" -#: ../../library/unittest.rst:2518 +#: ../../library/unittest.rst:2522 msgid "" "It is responsible for calling all the cleanup functions added by :func:" "`addModuleCleanup`. If you need cleanup functions to be called *prior* to :" "func:`tearDownModule` then you can call :func:`doModuleCleanups` yourself." msgstr "" -#: ../../library/unittest.rst:2523 +#: ../../library/unittest.rst:2527 msgid "" ":func:`doModuleCleanups` pops methods off the stack of cleanup functions one " "at a time, so it can be called at any time." msgstr "" -#: ../../library/unittest.rst:2530 +#: ../../library/unittest.rst:2534 msgid "Signal Handling" msgstr "" -#: ../../library/unittest.rst:2534 +#: ../../library/unittest.rst:2538 msgid "" "The :option:`-c/--catch ` command-line option to unittest, " "along with the ``catchbreak`` parameter to :func:`unittest.main`, provide " @@ -3680,7 +3679,7 @@ msgid "" "A second control-c will raise a :exc:`KeyboardInterrupt` in the usual way." msgstr "" -#: ../../library/unittest.rst:2541 +#: ../../library/unittest.rst:2545 msgid "" "The control-c handling signal handler attempts to remain compatible with " "code or tests that install their own :const:`signal.SIGINT` handler. If the " @@ -3692,48 +3691,48 @@ msgid "" "disabled the :func:`removeHandler` decorator can be used." msgstr "" -#: ../../library/unittest.rst:2550 +#: ../../library/unittest.rst:2554 msgid "" "There are a few utility functions for framework authors to enable control-c " "handling functionality within test frameworks." msgstr "" -#: ../../library/unittest.rst:2555 +#: ../../library/unittest.rst:2559 msgid "" "Install the control-c handler. When a :const:`signal.SIGINT` is received " "(usually in response to the user pressing control-c) all registered results " "have :meth:`~TestResult.stop` called." msgstr "" -#: ../../library/unittest.rst:2562 +#: ../../library/unittest.rst:2566 msgid "" "Register a :class:`TestResult` object for control-c handling. Registering a " "result stores a weak reference to it, so it doesn't prevent the result from " "being garbage collected." msgstr "" -#: ../../library/unittest.rst:2566 +#: ../../library/unittest.rst:2570 msgid "" "Registering a :class:`TestResult` object has no side-effects if control-c " "handling is not enabled, so test frameworks can unconditionally register all " "results they create independently of whether or not handling is enabled." msgstr "" -#: ../../library/unittest.rst:2573 +#: ../../library/unittest.rst:2577 msgid "" "Remove a registered result. Once a result has been removed then :meth:" "`~TestResult.stop` will no longer be called on that result object in " "response to a control-c." msgstr "" -#: ../../library/unittest.rst:2580 +#: ../../library/unittest.rst:2584 msgid "" "When called without arguments this function removes the control-c handler if " "it has been installed. This function can also be used as a test decorator to " "temporarily remove the handler while the test is being executed::" msgstr "" -#: ../../library/unittest.rst:2584 +#: ../../library/unittest.rst:2588 msgid "" "@unittest.removeHandler\n" "def test_signal_handling(self):\n" diff --git a/library/venv.po b/library/venv.po index ccf3fe897b..292b5e6d52 100644 --- a/library/venv.po +++ b/library/venv.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2024, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-18 00:17+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2025-05-23 10:20+0800\n" "Last-Translator: Dr-XYZ \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -142,15 +142,15 @@ msgid "" "file:`bin` (or :file:`Scripts` on Windows) subdirectory containing a copy or " "symlink of the Python executable (as appropriate for the platform or " "arguments used at environment creation time). It also creates a :file:`lib/" -"pythonX.Y/site-packages` subdirectory (on Windows, this is :file:`Lib\\site-" -"packages`). If an existing directory is specified, it will be re-used." +"pythonX.Y/site-packages` subdirectory (on Windows, this is :file:`Lib\\" +"\\site-packages`). If an existing directory is specified, it will be re-used." msgstr "" "執行此命令會建立目標目錄(同時也會建立任何還不存在的父目錄)並在目錄中放置一" "個名為 :file:`pyvenv.cfg` 的檔案,其中包含一個指向執行該命令的 Python 安裝路" "徑的 ``home`` 鍵。它同時會建立一個 :file:`bin` (在 Windows 上為 :file:" "`Scripts`)子目錄,其中包含一個 Python 二進位檔案的副本/符號連結(根據建立環" "境時使用的平台或引數而定)。此外,它還會建立一個 :file:`lib/pythonX.Y/site-" -"packages` 子目錄(在 Windows 上為 :file:`Lib\\site-packages`)。如果指定的目" +"packages` 子目錄(在 Windows 上為 :file:`Lib\\\\site-packages`)。如果指定的目" "錄已存在,則將重新使用該目錄。" #: ../../library/venv.rst:81 diff --git a/library/xml.sax.handler.po b/library/xml.sax.handler.po index fdc38671c3..ccd1def70d 100644 --- a/library/xml.sax.handler.po +++ b/library/xml.sax.handler.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2016-11-19 00:36+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -358,63 +358,62 @@ msgstr "" #: ../../library/xml.sax.handler.rst:249 msgid "" "The *name* parameter contains the raw XML 1.0 name of the element type as a " -"string and the *attrs* parameter holds an object of the :class:`~xml.sax." -"xmlreader.Attributes` interface (see :ref:`attributes-objects`) containing " -"the attributes of the element. The object passed as *attrs* may be re-used " -"by the parser; holding on to a reference to it is not a reliable way to keep " -"a copy of the attributes. To keep a copy of the attributes, use the :meth:" -"`copy` method of the *attrs* object." +"string and the *attrs* parameter holds an object of the :ref:`Attributes " +"` interface containing the attributes of the element. " +"The object passed as *attrs* may be re-used by the parser; holding on to a " +"reference to it is not a reliable way to keep a copy of the attributes. To " +"keep a copy of the attributes, use the :meth:`copy` method of the *attrs* " +"object." msgstr "" -#: ../../library/xml.sax.handler.rst:261 +#: ../../library/xml.sax.handler.rst:260 msgid "Signals the end of an element in non-namespace mode." msgstr "" -#: ../../library/xml.sax.handler.rst:263 +#: ../../library/xml.sax.handler.rst:262 msgid "" "The *name* parameter contains the name of the element type, just as with " "the :meth:`startElement` event." msgstr "" -#: ../../library/xml.sax.handler.rst:269 +#: ../../library/xml.sax.handler.rst:268 msgid "Signals the start of an element in namespace mode." msgstr "" -#: ../../library/xml.sax.handler.rst:271 +#: ../../library/xml.sax.handler.rst:270 msgid "" "The *name* parameter contains the name of the element type as a ``(uri, " "localname)`` tuple, the *qname* parameter contains the raw XML 1.0 name used " "in the source document, and the *attrs* parameter holds an instance of the :" -"class:`~xml.sax.xmlreader.AttributesNS` interface (see :ref:`attributes-ns-" -"objects`) containing the attributes of the element. If no namespace is " -"associated with the element, the *uri* component of *name* will be " -"``None``. The object passed as *attrs* may be re-used by the parser; " -"holding on to a reference to it is not a reliable way to keep a copy of the " -"attributes. To keep a copy of the attributes, use the :meth:`copy` method " -"of the *attrs* object." +"ref:`AttributesNS ` interface containing the " +"attributes of the element. If no namespace is associated with the element, " +"the *uri* component of *name* will be ``None``. The object passed as " +"*attrs* may be re-used by the parser; holding on to a reference to it is not " +"a reliable way to keep a copy of the attributes. To keep a copy of the " +"attributes, use the :meth:`copy` method of the *attrs* object." msgstr "" -#: ../../library/xml.sax.handler.rst:282 +#: ../../library/xml.sax.handler.rst:280 msgid "" "Parsers may set the *qname* parameter to ``None``, unless the " "``feature_namespace_prefixes`` feature is activated." msgstr "" -#: ../../library/xml.sax.handler.rst:288 +#: ../../library/xml.sax.handler.rst:286 msgid "Signals the end of an element in namespace mode." msgstr "" -#: ../../library/xml.sax.handler.rst:290 +#: ../../library/xml.sax.handler.rst:288 msgid "" "The *name* parameter contains the name of the element type, just as with " "the :meth:`startElementNS` method, likewise the *qname* parameter." msgstr "" -#: ../../library/xml.sax.handler.rst:296 +#: ../../library/xml.sax.handler.rst:294 msgid "Receive notification of character data." msgstr "" -#: ../../library/xml.sax.handler.rst:298 +#: ../../library/xml.sax.handler.rst:296 msgid "" "The Parser will call this method to report each chunk of character data. SAX " "parsers may return all contiguous character data in a single chunk, or they " @@ -423,13 +422,13 @@ msgid "" "provides useful information." msgstr "" -#: ../../library/xml.sax.handler.rst:304 +#: ../../library/xml.sax.handler.rst:302 msgid "" "*content* may be a string or bytes instance; the ``expat`` reader module " "always produces strings." msgstr "" -#: ../../library/xml.sax.handler.rst:309 +#: ../../library/xml.sax.handler.rst:307 msgid "" "The earlier SAX 1 interface provided by the Python XML Special Interest " "Group used a more Java-like interface for this method. Since most parsers " @@ -439,11 +438,11 @@ msgid "" "and *length* parameters." msgstr "" -#: ../../library/xml.sax.handler.rst:318 +#: ../../library/xml.sax.handler.rst:316 msgid "Receive notification of ignorable whitespace in element content." msgstr "" -#: ../../library/xml.sax.handler.rst:320 +#: ../../library/xml.sax.handler.rst:318 msgid "" "Validating Parsers must use this method to report each chunk of ignorable " "whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-" @@ -451,7 +450,7 @@ msgid "" "and using content models." msgstr "" -#: ../../library/xml.sax.handler.rst:325 +#: ../../library/xml.sax.handler.rst:323 msgid "" "SAX parsers may return all contiguous whitespace in a single chunk, or they " "may split it into several chunks; however, all of the characters in any " @@ -459,28 +458,28 @@ msgid "" "provides useful information." msgstr "" -#: ../../library/xml.sax.handler.rst:333 +#: ../../library/xml.sax.handler.rst:331 msgid "Receive notification of a processing instruction." msgstr "" -#: ../../library/xml.sax.handler.rst:335 +#: ../../library/xml.sax.handler.rst:333 msgid "" "The Parser will invoke this method once for each processing instruction " "found: note that processing instructions may occur before or after the main " "document element." msgstr "" -#: ../../library/xml.sax.handler.rst:339 +#: ../../library/xml.sax.handler.rst:337 msgid "" "A SAX parser should never report an XML declaration (XML 1.0, section 2.8) " "or a text declaration (XML 1.0, section 4.3.1) using this method." msgstr "" -#: ../../library/xml.sax.handler.rst:345 +#: ../../library/xml.sax.handler.rst:343 msgid "Receive notification of a skipped entity." msgstr "" -#: ../../library/xml.sax.handler.rst:347 +#: ../../library/xml.sax.handler.rst:345 msgid "" "The Parser will invoke this method once for each entity skipped. Non-" "validating processors may skip entities if they have not seen the " @@ -490,38 +489,38 @@ msgid "" "properties." msgstr "" -#: ../../library/xml.sax.handler.rst:357 +#: ../../library/xml.sax.handler.rst:355 msgid "DTDHandler Objects" msgstr "DTDHandler 物件" -#: ../../library/xml.sax.handler.rst:359 +#: ../../library/xml.sax.handler.rst:357 msgid ":class:`DTDHandler` instances provide the following methods:" msgstr "" -#: ../../library/xml.sax.handler.rst:364 +#: ../../library/xml.sax.handler.rst:362 msgid "Handle a notation declaration event." msgstr "" -#: ../../library/xml.sax.handler.rst:369 +#: ../../library/xml.sax.handler.rst:367 msgid "Handle an unparsed entity declaration event." msgstr "" -#: ../../library/xml.sax.handler.rst:375 +#: ../../library/xml.sax.handler.rst:373 msgid "EntityResolver Objects" msgstr "EntityResolver 物件" -#: ../../library/xml.sax.handler.rst:380 +#: ../../library/xml.sax.handler.rst:378 msgid "" "Resolve the system identifier of an entity and return either the system " "identifier to read from as a string, or an InputSource to read from. The " "default implementation returns *systemId*." msgstr "" -#: ../../library/xml.sax.handler.rst:388 +#: ../../library/xml.sax.handler.rst:386 msgid "ErrorHandler Objects" msgstr "ErrorHandler 物件" -#: ../../library/xml.sax.handler.rst:390 +#: ../../library/xml.sax.handler.rst:388 msgid "" "Objects with this interface are used to receive error and warning " "information from the :class:`~xml.sax.xmlreader.XMLReader`. If you create " @@ -534,7 +533,7 @@ msgid "" "the passed-in exception object." msgstr "" -#: ../../library/xml.sax.handler.rst:403 +#: ../../library/xml.sax.handler.rst:401 msgid "" "Called when the parser encounters a recoverable error. If this method does " "not raise an exception, parsing may continue, but further document " @@ -543,13 +542,13 @@ msgid "" "document." msgstr "" -#: ../../library/xml.sax.handler.rst:411 +#: ../../library/xml.sax.handler.rst:409 msgid "" "Called when the parser encounters an error it cannot recover from; parsing " "is expected to terminate when this method returns." msgstr "" -#: ../../library/xml.sax.handler.rst:417 +#: ../../library/xml.sax.handler.rst:415 msgid "" "Called when the parser presents minor warning information to the " "application. Parsing is expected to continue when this method returns, and " @@ -557,15 +556,15 @@ msgid "" "an exception in this method will cause parsing to end." msgstr "" -#: ../../library/xml.sax.handler.rst:426 +#: ../../library/xml.sax.handler.rst:424 msgid "LexicalHandler Objects" msgstr "LexicalHandler 物件" -#: ../../library/xml.sax.handler.rst:427 +#: ../../library/xml.sax.handler.rst:425 msgid "Optional SAX2 handler for lexical events." msgstr "" -#: ../../library/xml.sax.handler.rst:429 +#: ../../library/xml.sax.handler.rst:427 msgid "" "This handler is used to obtain lexical information about an XML document. " "Lexical information includes information describing the document encoding " @@ -574,38 +573,38 @@ msgid "" "used in the same manner as content handlers." msgstr "" -#: ../../library/xml.sax.handler.rst:435 +#: ../../library/xml.sax.handler.rst:433 msgid "" "Set the LexicalHandler of an XMLReader by using the setProperty method with " "the property identifier ``'http://xml.org/sax/properties/lexical-handler'``." msgstr "" -#: ../../library/xml.sax.handler.rst:442 +#: ../../library/xml.sax.handler.rst:440 msgid "" "Reports a comment anywhere in the document (including the DTD and outside " "the document element)." msgstr "" -#: ../../library/xml.sax.handler.rst:447 +#: ../../library/xml.sax.handler.rst:445 msgid "" "Reports the start of the DTD declarations if the document has an associated " "DTD." msgstr "" -#: ../../library/xml.sax.handler.rst:452 +#: ../../library/xml.sax.handler.rst:450 msgid "Reports the end of DTD declaration." msgstr "" -#: ../../library/xml.sax.handler.rst:456 +#: ../../library/xml.sax.handler.rst:454 msgid "Reports the start of a CDATA marked section." msgstr "" -#: ../../library/xml.sax.handler.rst:458 +#: ../../library/xml.sax.handler.rst:456 msgid "" "The contents of the CDATA marked section will be reported through the " "characters handler." msgstr "" -#: ../../library/xml.sax.handler.rst:463 +#: ../../library/xml.sax.handler.rst:461 msgid "Reports the end of a CDATA marked section." msgstr "" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index a60aae4a99..e195bdb909 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-08-07 00:18+0000\n" +"POT-Creation-Date: 2025-09-03 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -452,17 +452,17 @@ msgstr ":keyword:`!finally` 子句" msgid "" "If :keyword:`!finally` is present, it specifies a 'cleanup' handler. The :" "keyword:`try` clause is executed, including any :keyword:`except` and :" -"keyword:`else` clauses. If an exception occurs in any of the clauses and is " -"not handled, the exception is temporarily saved. The :keyword:`!finally` " -"clause is executed. If there is a saved exception it is re-raised at the " -"end of the :keyword:`!finally` clause. If the :keyword:`!finally` clause " -"raises another exception, the saved exception is set as the context of the " -"new exception. If the :keyword:`!finally` clause executes a :keyword:" -"`return`, :keyword:`break` or :keyword:`continue` statement, the saved " -"exception is discarded::" +"keyword:`else ` clauses. If an exception occurs in any of the " +"clauses and is not handled, the exception is temporarily saved. The :keyword:" +"`!finally` clause is executed. If there is a saved exception it is re-" +"raised at the end of the :keyword:`!finally` clause. If the :keyword:`!" +"finally` clause raises another exception, the saved exception is set as the " +"context of the new exception. If the :keyword:`!finally` clause executes a :" +"keyword:`return`, :keyword:`break` or :keyword:`continue` statement, the " +"saved exception is discarded::" msgstr "" -#: ../../reference/compound_stmts.rst:425 +#: ../../reference/compound_stmts.rst:427 msgid "" ">>> def f():\n" "... try:\n" @@ -482,13 +482,13 @@ msgstr "" ">>> f()\n" "42" -#: ../../reference/compound_stmts.rst:434 +#: ../../reference/compound_stmts.rst:436 msgid "" "The exception information is not available to the program during execution " "of the :keyword:`!finally` clause." msgstr "" -#: ../../reference/compound_stmts.rst:442 +#: ../../reference/compound_stmts.rst:444 msgid "" "When a :keyword:`return`, :keyword:`break` or :keyword:`continue` statement " "is executed in the :keyword:`try` suite of a :keyword:`!try`...\\ :keyword:`!" @@ -496,7 +496,7 @@ msgid "" "way out.'" msgstr "" -#: ../../reference/compound_stmts.rst:446 +#: ../../reference/compound_stmts.rst:448 msgid "" "The return value of a function is determined by the last :keyword:`return` " "statement executed. Since the :keyword:`!finally` clause always executes, " @@ -504,7 +504,7 @@ msgid "" "will always be the last one executed::" msgstr "" -#: ../../reference/compound_stmts.rst:451 +#: ../../reference/compound_stmts.rst:453 msgid "" ">>> def foo():\n" "... try:\n" @@ -524,17 +524,17 @@ msgstr "" ">>> foo()\n" "'finally'" -#: ../../reference/compound_stmts.rst:460 +#: ../../reference/compound_stmts.rst:462 msgid "" "Prior to Python 3.8, a :keyword:`continue` statement was illegal in the :" "keyword:`!finally` clause due to a problem with the implementation." msgstr "" -#: ../../reference/compound_stmts.rst:469 +#: ../../reference/compound_stmts.rst:471 msgid "The :keyword:`!with` statement" msgstr ":keyword:`!with` 陳述式" -#: ../../reference/compound_stmts.rst:478 +#: ../../reference/compound_stmts.rst:480 msgid "" "The :keyword:`with` statement is used to wrap the execution of a block with " "methods defined by a context manager (see section :ref:`context-managers`). " @@ -542,38 +542,38 @@ msgid "" "`finally` usage patterns to be encapsulated for convenient reuse." msgstr "" -#: ../../reference/compound_stmts.rst:488 +#: ../../reference/compound_stmts.rst:490 msgid "" "The execution of the :keyword:`with` statement with one \"item\" proceeds as " "follows:" msgstr "" -#: ../../reference/compound_stmts.rst:490 +#: ../../reference/compound_stmts.rst:492 msgid "" "The context expression (the expression given in the :token:`~python-grammar:" "with_item`) is evaluated to obtain a context manager." msgstr "" -#: ../../reference/compound_stmts.rst:493 +#: ../../reference/compound_stmts.rst:495 msgid "" "The context manager's :meth:`~object.__enter__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:495 +#: ../../reference/compound_stmts.rst:497 msgid "The context manager's :meth:`~object.__exit__` is loaded for later use." msgstr "" -#: ../../reference/compound_stmts.rst:497 +#: ../../reference/compound_stmts.rst:499 msgid "The context manager's :meth:`~object.__enter__` method is invoked." msgstr "" -#: ../../reference/compound_stmts.rst:499 +#: ../../reference/compound_stmts.rst:501 msgid "" "If a target was included in the :keyword:`with` statement, the return value " "from :meth:`~object.__enter__` is assigned to it." msgstr "" -#: ../../reference/compound_stmts.rst:504 +#: ../../reference/compound_stmts.rst:506 msgid "" "The :keyword:`with` statement guarantees that if the :meth:`~object." "__enter__` method returns without an error, then :meth:`~object.__exit__` " @@ -582,11 +582,11 @@ msgid "" "suite would be. See step 7 below." msgstr "" -#: ../../reference/compound_stmts.rst:510 +#: ../../reference/compound_stmts.rst:512 msgid "The suite is executed." msgstr "" -#: ../../reference/compound_stmts.rst:512 +#: ../../reference/compound_stmts.rst:514 msgid "" "The context manager's :meth:`~object.__exit__` method is invoked. If an " "exception caused the suite to be exited, its type, value, and traceback are " @@ -594,7 +594,7 @@ msgid "" "`None` arguments are supplied." msgstr "" -#: ../../reference/compound_stmts.rst:517 +#: ../../reference/compound_stmts.rst:519 msgid "" "If the suite was exited due to an exception, and the return value from the :" "meth:`~object.__exit__` method was false, the exception is reraised. If the " @@ -602,20 +602,20 @@ msgid "" "with the statement following the :keyword:`with` statement." msgstr "" -#: ../../reference/compound_stmts.rst:522 +#: ../../reference/compound_stmts.rst:524 msgid "" "If the suite was exited for any reason other than an exception, the return " "value from :meth:`~object.__exit__` is ignored, and execution proceeds at " "the normal location for the kind of exit that was taken." msgstr "" -#: ../../reference/compound_stmts.rst:526 -#: ../../reference/compound_stmts.rst:1549 -#: ../../reference/compound_stmts.rst:1590 +#: ../../reference/compound_stmts.rst:528 +#: ../../reference/compound_stmts.rst:1551 +#: ../../reference/compound_stmts.rst:1592 msgid "The following code::" msgstr "以下程式碼: ::" -#: ../../reference/compound_stmts.rst:528 +#: ../../reference/compound_stmts.rst:530 msgid "" "with EXPRESSION as TARGET:\n" " SUITE" @@ -623,13 +623,13 @@ msgstr "" "with EXPRESSION as TARGET:\n" " SUITE" -#: ../../reference/compound_stmts.rst:531 -#: ../../reference/compound_stmts.rst:556 -#: ../../reference/compound_stmts.rst:1595 +#: ../../reference/compound_stmts.rst:533 +#: ../../reference/compound_stmts.rst:558 +#: ../../reference/compound_stmts.rst:1597 msgid "is semantically equivalent to::" msgstr "在語義上等同於: ::" -#: ../../reference/compound_stmts.rst:533 +#: ../../reference/compound_stmts.rst:535 msgid "" "manager = (EXPRESSION)\n" "enter = type(manager).__enter__\n" @@ -665,13 +665,13 @@ msgstr "" " if not hit_except:\n" " exit(manager, None, None, None)" -#: ../../reference/compound_stmts.rst:550 +#: ../../reference/compound_stmts.rst:552 msgid "" "With more than one item, the context managers are processed as if multiple :" "keyword:`with` statements were nested::" msgstr "" -#: ../../reference/compound_stmts.rst:553 +#: ../../reference/compound_stmts.rst:555 msgid "" "with A() as a, B() as b:\n" " SUITE" @@ -679,7 +679,7 @@ msgstr "" "with A() as a, B() as b:\n" " SUITE" -#: ../../reference/compound_stmts.rst:558 +#: ../../reference/compound_stmts.rst:560 msgid "" "with A() as a:\n" " with B() as b:\n" @@ -689,13 +689,13 @@ msgstr "" " with B() as b:\n" " SUITE" -#: ../../reference/compound_stmts.rst:562 +#: ../../reference/compound_stmts.rst:564 msgid "" "You can also write multi-item context managers in multiple lines if the " "items are surrounded by parentheses. For example::" msgstr "" -#: ../../reference/compound_stmts.rst:565 +#: ../../reference/compound_stmts.rst:567 msgid "" "with (\n" " A() as a,\n" @@ -709,88 +709,88 @@ msgstr "" "):\n" " SUITE" -#: ../../reference/compound_stmts.rst:571 +#: ../../reference/compound_stmts.rst:573 msgid "Support for multiple context expressions." msgstr "" -#: ../../reference/compound_stmts.rst:574 +#: ../../reference/compound_stmts.rst:576 msgid "" "Support for using grouping parentheses to break the statement in multiple " "lines." msgstr "" -#: ../../reference/compound_stmts.rst:579 +#: ../../reference/compound_stmts.rst:581 msgid ":pep:`343` - The \"with\" statement" msgstr "" -#: ../../reference/compound_stmts.rst:580 +#: ../../reference/compound_stmts.rst:582 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/compound_stmts.rst:586 +#: ../../reference/compound_stmts.rst:588 msgid "The :keyword:`!match` statement" msgstr ":keyword:`!match` 陳述式" -#: ../../reference/compound_stmts.rst:600 +#: ../../reference/compound_stmts.rst:602 msgid "The match statement is used for pattern matching. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:609 +#: ../../reference/compound_stmts.rst:611 msgid "" "This section uses single quotes to denote :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:612 +#: ../../reference/compound_stmts.rst:614 msgid "" "Pattern matching takes a pattern as input (following ``case``) and a subject " "value (following ``match``). The pattern (which may contain subpatterns) is " "matched against the subject value. The outcomes are:" msgstr "" -#: ../../reference/compound_stmts.rst:616 +#: ../../reference/compound_stmts.rst:618 msgid "A match success or failure (also termed a pattern success or failure)." msgstr "" -#: ../../reference/compound_stmts.rst:618 +#: ../../reference/compound_stmts.rst:620 msgid "" "Possible binding of matched values to a name. The prerequisites for this " "are further discussed below." msgstr "" -#: ../../reference/compound_stmts.rst:621 +#: ../../reference/compound_stmts.rst:623 msgid "" "The ``match`` and ``case`` keywords are :ref:`soft keywords `." msgstr "" -#: ../../reference/compound_stmts.rst:625 -#: ../../reference/compound_stmts.rst:1182 +#: ../../reference/compound_stmts.rst:627 +#: ../../reference/compound_stmts.rst:1184 msgid ":pep:`634` -- Structural Pattern Matching: Specification" msgstr "" -#: ../../reference/compound_stmts.rst:626 -#: ../../reference/compound_stmts.rst:1183 +#: ../../reference/compound_stmts.rst:628 +#: ../../reference/compound_stmts.rst:1185 msgid ":pep:`636` -- Structural Pattern Matching: Tutorial" msgstr "" -#: ../../reference/compound_stmts.rst:630 +#: ../../reference/compound_stmts.rst:632 msgid "Overview" msgstr "" -#: ../../reference/compound_stmts.rst:632 +#: ../../reference/compound_stmts.rst:634 msgid "Here's an overview of the logical flow of a match statement:" msgstr "" -#: ../../reference/compound_stmts.rst:635 +#: ../../reference/compound_stmts.rst:637 msgid "" "The subject expression ``subject_expr`` is evaluated and a resulting subject " "value obtained. If the subject expression contains a comma, a tuple is " "constructed using :ref:`the standard rules `." msgstr "" -#: ../../reference/compound_stmts.rst:639 +#: ../../reference/compound_stmts.rst:641 msgid "" "Each pattern in a ``case_block`` is attempted to match with the subject " "value. The specific rules for success or failure are described below. The " @@ -800,7 +800,7 @@ msgid "" "outlive the executed block and can be used after the match statement**." msgstr "" -#: ../../reference/compound_stmts.rst:648 +#: ../../reference/compound_stmts.rst:650 msgid "" "During failed pattern matches, some subpatterns may succeed. Do not rely on " "bindings being made for a failed match. Conversely, do not rely on " @@ -809,38 +809,38 @@ msgid "" "made to allow different implementations to add optimizations." msgstr "" -#: ../../reference/compound_stmts.rst:655 +#: ../../reference/compound_stmts.rst:657 msgid "" "If the pattern succeeds, the corresponding guard (if present) is evaluated. " "In this case all name bindings are guaranteed to have happened." msgstr "" -#: ../../reference/compound_stmts.rst:658 +#: ../../reference/compound_stmts.rst:660 msgid "" "If the guard evaluates as true or is missing, the ``block`` inside " "``case_block`` is executed." msgstr "" -#: ../../reference/compound_stmts.rst:661 +#: ../../reference/compound_stmts.rst:663 msgid "Otherwise, the next ``case_block`` is attempted as described above." msgstr "" -#: ../../reference/compound_stmts.rst:663 +#: ../../reference/compound_stmts.rst:665 msgid "If there are no further case blocks, the match statement is completed." msgstr "" -#: ../../reference/compound_stmts.rst:667 +#: ../../reference/compound_stmts.rst:669 msgid "" "Users should generally never rely on a pattern being evaluated. Depending " "on implementation, the interpreter may cache values or use other " "optimizations which skip repeated evaluations." msgstr "" -#: ../../reference/compound_stmts.rst:671 +#: ../../reference/compound_stmts.rst:673 msgid "A sample match statement::" msgstr "" -#: ../../reference/compound_stmts.rst:673 +#: ../../reference/compound_stmts.rst:675 msgid "" ">>> flag = False\n" ">>> match (100, 200):\n" @@ -856,56 +856,56 @@ msgid "" "Case 3, y: 200" msgstr "" -#: ../../reference/compound_stmts.rst:687 +#: ../../reference/compound_stmts.rst:689 msgid "" "In this case, ``if flag`` is a guard. Read more about that in the next " "section." msgstr "" -#: ../../reference/compound_stmts.rst:690 +#: ../../reference/compound_stmts.rst:692 msgid "Guards" msgstr "" -#: ../../reference/compound_stmts.rst:697 +#: ../../reference/compound_stmts.rst:699 msgid "" "A ``guard`` (which is part of the ``case``) must succeed for code inside the " "``case`` block to execute. It takes the form: :keyword:`if` followed by an " "expression." msgstr "" -#: ../../reference/compound_stmts.rst:702 +#: ../../reference/compound_stmts.rst:704 msgid "The logical flow of a ``case`` block with a ``guard`` follows:" msgstr "" -#: ../../reference/compound_stmts.rst:704 +#: ../../reference/compound_stmts.rst:706 msgid "" "Check that the pattern in the ``case`` block succeeded. If the pattern " "failed, the ``guard`` is not evaluated and the next ``case`` block is " "checked." msgstr "" -#: ../../reference/compound_stmts.rst:708 +#: ../../reference/compound_stmts.rst:710 msgid "If the pattern succeeded, evaluate the ``guard``." msgstr "" -#: ../../reference/compound_stmts.rst:710 +#: ../../reference/compound_stmts.rst:712 msgid "" "If the ``guard`` condition evaluates as true, the case block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:713 +#: ../../reference/compound_stmts.rst:715 msgid "" "If the ``guard`` condition evaluates as false, the case block is not " "selected." msgstr "" -#: ../../reference/compound_stmts.rst:716 +#: ../../reference/compound_stmts.rst:718 msgid "" "If the ``guard`` raises an exception during evaluation, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:719 +#: ../../reference/compound_stmts.rst:721 msgid "" "Guards are allowed to have side effects as they are expressions. Guard " "evaluation must proceed from the first to the last case block, one at a " @@ -914,17 +914,17 @@ msgid "" "block is selected." msgstr "" -#: ../../reference/compound_stmts.rst:729 +#: ../../reference/compound_stmts.rst:731 msgid "Irrefutable Case Blocks" msgstr "" -#: ../../reference/compound_stmts.rst:733 +#: ../../reference/compound_stmts.rst:735 msgid "" "An irrefutable case block is a match-all case block. A match statement may " "have at most one irrefutable case block, and it must be last." msgstr "" -#: ../../reference/compound_stmts.rst:736 +#: ../../reference/compound_stmts.rst:738 msgid "" "A case block is considered irrefutable if it has no guard and its pattern is " "irrefutable. A pattern is considered irrefutable if we can prove from its " @@ -932,47 +932,47 @@ msgid "" "irrefutable:" msgstr "" -#: ../../reference/compound_stmts.rst:741 +#: ../../reference/compound_stmts.rst:743 msgid ":ref:`as-patterns` whose left-hand side is irrefutable" msgstr "" -#: ../../reference/compound_stmts.rst:743 +#: ../../reference/compound_stmts.rst:745 msgid ":ref:`or-patterns` containing at least one irrefutable pattern" msgstr "" -#: ../../reference/compound_stmts.rst:745 +#: ../../reference/compound_stmts.rst:747 msgid ":ref:`capture-patterns`" msgstr ":ref:`capture-patterns`" -#: ../../reference/compound_stmts.rst:747 +#: ../../reference/compound_stmts.rst:749 msgid ":ref:`wildcard-patterns`" msgstr ":ref:`wildcard-patterns`" -#: ../../reference/compound_stmts.rst:749 +#: ../../reference/compound_stmts.rst:751 msgid "parenthesized irrefutable patterns" msgstr "" -#: ../../reference/compound_stmts.rst:753 +#: ../../reference/compound_stmts.rst:755 msgid "Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:760 +#: ../../reference/compound_stmts.rst:762 msgid "This section uses grammar notations beyond standard EBNF:" msgstr "" -#: ../../reference/compound_stmts.rst:762 +#: ../../reference/compound_stmts.rst:764 msgid "the notation ``SEP.RULE+`` is shorthand for ``RULE (SEP RULE)*``" msgstr "" -#: ../../reference/compound_stmts.rst:764 +#: ../../reference/compound_stmts.rst:766 msgid "the notation ``!RULE`` is shorthand for a negative lookahead assertion" msgstr "" -#: ../../reference/compound_stmts.rst:767 +#: ../../reference/compound_stmts.rst:769 msgid "The top-level syntax for ``patterns`` is:" msgstr "" -#: ../../reference/compound_stmts.rst:781 +#: ../../reference/compound_stmts.rst:783 msgid "" "The descriptions below will include a description \"in simple terms\" of " "what a pattern does for illustration purposes (credits to Raymond Hettinger " @@ -982,70 +982,70 @@ msgid "" "forms." msgstr "" -#: ../../reference/compound_stmts.rst:791 +#: ../../reference/compound_stmts.rst:793 msgid "OR Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:793 +#: ../../reference/compound_stmts.rst:795 msgid "" "An OR pattern is two or more patterns separated by vertical bars ``|``. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:799 +#: ../../reference/compound_stmts.rst:801 msgid "" "Only the final subpattern may be :ref:`irrefutable `, and " "each subpattern must bind the same set of names to avoid ambiguity." msgstr "" -#: ../../reference/compound_stmts.rst:802 +#: ../../reference/compound_stmts.rst:804 msgid "" "An OR pattern matches each of its subpatterns in turn to the subject value, " "until one succeeds. The OR pattern is then considered successful. " "Otherwise, if none of the subpatterns succeed, the OR pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:806 +#: ../../reference/compound_stmts.rst:808 msgid "" "In simple terms, ``P1 | P2 | ...`` will try to match ``P1``, if it fails it " "will try to match ``P2``, succeeding immediately if any succeeds, failing " "otherwise." msgstr "" -#: ../../reference/compound_stmts.rst:812 +#: ../../reference/compound_stmts.rst:814 msgid "AS Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:814 +#: ../../reference/compound_stmts.rst:816 msgid "" "An AS pattern matches an OR pattern on the left of the :keyword:`as` keyword " "against a subject. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:820 +#: ../../reference/compound_stmts.rst:822 msgid "" "If the OR pattern fails, the AS pattern fails. Otherwise, the AS pattern " "binds the subject to the name on the right of the as keyword and succeeds. " "``capture_pattern`` cannot be a ``_``." msgstr "" -#: ../../reference/compound_stmts.rst:824 +#: ../../reference/compound_stmts.rst:826 msgid "" "In simple terms ``P as NAME`` will match with ``P``, and on success it will " "set ``NAME = ``." msgstr "" -#: ../../reference/compound_stmts.rst:831 +#: ../../reference/compound_stmts.rst:833 msgid "Literal Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:833 +#: ../../reference/compound_stmts.rst:835 msgid "" "A literal pattern corresponds to most :ref:`literals ` in Python. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:846 +#: ../../reference/compound_stmts.rst:848 msgid "" "The rule ``strings`` and the token ``NUMBER`` are defined in the :doc:" "`standard Python grammar <./grammar>`. Triple-quoted strings are " @@ -1053,42 +1053,42 @@ msgid "" "are not supported." msgstr "" -#: ../../reference/compound_stmts.rst:851 +#: ../../reference/compound_stmts.rst:853 msgid "" "The forms ``signed_number '+' NUMBER`` and ``signed_number '-' NUMBER`` are " "for expressing :ref:`complex numbers `; they require a real " "number on the left and an imaginary number on the right. E.g. ``3 + 4j``." msgstr "" -#: ../../reference/compound_stmts.rst:855 +#: ../../reference/compound_stmts.rst:857 msgid "" "In simple terms, ``LITERAL`` will succeed only if `` == LITERAL``. " "For the singletons ``None``, ``True`` and ``False``, the :keyword:`is` " "operator is used." msgstr "" -#: ../../reference/compound_stmts.rst:861 +#: ../../reference/compound_stmts.rst:863 msgid "Capture Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:863 +#: ../../reference/compound_stmts.rst:865 msgid "A capture pattern binds the subject value to a name. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:869 +#: ../../reference/compound_stmts.rst:871 msgid "" "A single underscore ``_`` is not a capture pattern (this is what ``!'_'`` " "expresses). It is instead treated as a :token:`~python-grammar:" "wildcard_pattern`." msgstr "" -#: ../../reference/compound_stmts.rst:873 +#: ../../reference/compound_stmts.rst:875 msgid "" "In a given pattern, a given name can only be bound once. E.g. ``case x, " "x: ...`` is invalid while ``case [x] | x: ...`` is allowed." msgstr "" -#: ../../reference/compound_stmts.rst:876 +#: ../../reference/compound_stmts.rst:878 msgid "" "Capture patterns always succeed. The binding follows scoping rules " "established by the assignment expression operator in :pep:`572`; the name " @@ -1096,55 +1096,55 @@ msgid "" "there's an applicable :keyword:`global` or :keyword:`nonlocal` statement." msgstr "" -#: ../../reference/compound_stmts.rst:881 +#: ../../reference/compound_stmts.rst:883 msgid "" "In simple terms ``NAME`` will always succeed and it will set ``NAME = " "``." msgstr "" -#: ../../reference/compound_stmts.rst:886 +#: ../../reference/compound_stmts.rst:888 msgid "Wildcard Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:888 +#: ../../reference/compound_stmts.rst:890 msgid "" "A wildcard pattern always succeeds (matches anything) and binds no name. " "Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:894 +#: ../../reference/compound_stmts.rst:896 msgid "" "``_`` is a :ref:`soft keyword ` within any pattern, but only " "within patterns. It is an identifier, as usual, even within ``match`` " "subject expressions, ``guard``\\ s, and ``case`` blocks." msgstr "" -#: ../../reference/compound_stmts.rst:898 +#: ../../reference/compound_stmts.rst:900 msgid "In simple terms, ``_`` will always succeed." msgstr "" -#: ../../reference/compound_stmts.rst:903 +#: ../../reference/compound_stmts.rst:905 msgid "Value Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:905 +#: ../../reference/compound_stmts.rst:907 msgid "A value pattern represents a named value in Python. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:913 +#: ../../reference/compound_stmts.rst:915 msgid "" "The dotted name in the pattern is looked up using standard Python :ref:`name " "resolution rules `. The pattern succeeds if the value found " "compares equal to the subject value (using the ``==`` equality operator)." msgstr "" -#: ../../reference/compound_stmts.rst:918 +#: ../../reference/compound_stmts.rst:920 msgid "" "In simple terms ``NAME1.NAME2`` will succeed only if `` == NAME1." "NAME2``" msgstr "" -#: ../../reference/compound_stmts.rst:922 +#: ../../reference/compound_stmts.rst:924 msgid "" "If the same value occurs multiple times in the same match statement, the " "interpreter may cache the first value found and reuse it rather than repeat " @@ -1152,44 +1152,44 @@ msgid "" "given match statement." msgstr "" -#: ../../reference/compound_stmts.rst:930 +#: ../../reference/compound_stmts.rst:932 msgid "Group Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:932 +#: ../../reference/compound_stmts.rst:934 msgid "" "A group pattern allows users to add parentheses around patterns to emphasize " "the intended grouping. Otherwise, it has no additional syntax. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:939 +#: ../../reference/compound_stmts.rst:941 msgid "In simple terms ``(P)`` has the same effect as ``P``." msgstr "" -#: ../../reference/compound_stmts.rst:944 +#: ../../reference/compound_stmts.rst:946 msgid "Sequence Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:946 +#: ../../reference/compound_stmts.rst:948 msgid "" "A sequence pattern contains several subpatterns to be matched against " "sequence elements. The syntax is similar to the unpacking of a list or tuple." msgstr "" -#: ../../reference/compound_stmts.rst:957 +#: ../../reference/compound_stmts.rst:959 msgid "" "There is no difference if parentheses or square brackets are used for " "sequence patterns (i.e. ``(...)`` vs ``[...]`` )." msgstr "" -#: ../../reference/compound_stmts.rst:961 +#: ../../reference/compound_stmts.rst:963 msgid "" "A single pattern enclosed in parentheses without a trailing comma (e.g. ``(3 " "| 4)``) is a :ref:`group pattern `. While a single pattern " "enclosed in square brackets (e.g. ``[3 | 4]``) is still a sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:966 +#: ../../reference/compound_stmts.rst:968 msgid "" "At most one star subpattern may be in a sequence pattern. The star " "subpattern may occur in any position. If no star subpattern is present, the " @@ -1197,40 +1197,40 @@ msgid "" "variable-length sequence pattern." msgstr "" -#: ../../reference/compound_stmts.rst:971 +#: ../../reference/compound_stmts.rst:973 msgid "" "The following is the logical flow for matching a sequence pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:974 +#: ../../reference/compound_stmts.rst:976 msgid "" "If the subject value is not a sequence [#]_, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:977 +#: ../../reference/compound_stmts.rst:979 msgid "" "If the subject value is an instance of ``str``, ``bytes`` or ``bytearray`` " "the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:980 +#: ../../reference/compound_stmts.rst:982 msgid "" "The subsequent steps depend on whether the sequence pattern is fixed or " "variable-length." msgstr "" -#: ../../reference/compound_stmts.rst:983 +#: ../../reference/compound_stmts.rst:985 msgid "If the sequence pattern is fixed-length:" msgstr "" -#: ../../reference/compound_stmts.rst:985 +#: ../../reference/compound_stmts.rst:987 msgid "" "If the length of the subject sequence is not equal to the number of " "subpatterns, the sequence pattern fails" msgstr "" -#: ../../reference/compound_stmts.rst:988 +#: ../../reference/compound_stmts.rst:990 msgid "" "Subpatterns in the sequence pattern are matched to their corresponding items " "in the subject sequence from left to right. Matching stops as soon as a " @@ -1238,118 +1238,118 @@ msgid "" "corresponding item, the sequence pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:993 +#: ../../reference/compound_stmts.rst:995 msgid "Otherwise, if the sequence pattern is variable-length:" msgstr "" -#: ../../reference/compound_stmts.rst:995 +#: ../../reference/compound_stmts.rst:997 msgid "" "If the length of the subject sequence is less than the number of non-star " "subpatterns, the sequence pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:998 +#: ../../reference/compound_stmts.rst:1000 msgid "" "The leading non-star subpatterns are matched to their corresponding items as " "for fixed-length sequences." msgstr "" -#: ../../reference/compound_stmts.rst:1001 +#: ../../reference/compound_stmts.rst:1003 msgid "" "If the previous step succeeds, the star subpattern matches a list formed of " "the remaining subject items, excluding the remaining items corresponding to " "non-star subpatterns following the star subpattern." msgstr "" -#: ../../reference/compound_stmts.rst:1005 +#: ../../reference/compound_stmts.rst:1007 msgid "" "Remaining non-star subpatterns are matched to their corresponding subject " "items, as for a fixed-length sequence." msgstr "" -#: ../../reference/compound_stmts.rst:1008 +#: ../../reference/compound_stmts.rst:1010 msgid "" "The length of the subject sequence is obtained via :func:`len` (i.e. via " "the :meth:`__len__` protocol). This length may be cached by the interpreter " "in a similar manner as :ref:`value patterns `." msgstr "" -#: ../../reference/compound_stmts.rst:1014 +#: ../../reference/compound_stmts.rst:1016 msgid "" "In simple terms ``[P1, P2, P3,`` ... ``, P]`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1017 +#: ../../reference/compound_stmts.rst:1019 msgid "check ```` is a sequence" msgstr "" -#: ../../reference/compound_stmts.rst:1018 +#: ../../reference/compound_stmts.rst:1020 msgid "``len(subject) == ``" msgstr "``len(subject) == ``" -#: ../../reference/compound_stmts.rst:1019 +#: ../../reference/compound_stmts.rst:1021 msgid "" "``P1`` matches ``[0]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:1020 +#: ../../reference/compound_stmts.rst:1022 msgid "" "``P2`` matches ``[1]`` (note that this match can also bind names)" msgstr "" -#: ../../reference/compound_stmts.rst:1021 +#: ../../reference/compound_stmts.rst:1023 msgid "... and so on for the corresponding pattern/element." msgstr "" -#: ../../reference/compound_stmts.rst:1026 +#: ../../reference/compound_stmts.rst:1028 msgid "Mapping Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:1028 +#: ../../reference/compound_stmts.rst:1030 msgid "" "A mapping pattern contains one or more key-value patterns. The syntax is " "similar to the construction of a dictionary. Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:1039 +#: ../../reference/compound_stmts.rst:1041 msgid "" "At most one double star pattern may be in a mapping pattern. The double " "star pattern must be the last subpattern in the mapping pattern." msgstr "" -#: ../../reference/compound_stmts.rst:1042 +#: ../../reference/compound_stmts.rst:1044 msgid "" "Duplicate keys in mapping patterns are disallowed. Duplicate literal keys " "will raise a :exc:`SyntaxError`. Two keys that otherwise have the same value " "will raise a :exc:`ValueError` at runtime." msgstr "" -#: ../../reference/compound_stmts.rst:1046 +#: ../../reference/compound_stmts.rst:1048 msgid "" "The following is the logical flow for matching a mapping pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:1049 +#: ../../reference/compound_stmts.rst:1051 msgid "If the subject value is not a mapping [#]_,the mapping pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:1051 +#: ../../reference/compound_stmts.rst:1053 msgid "" "If every key given in the mapping pattern is present in the subject mapping, " "and the pattern for each key matches the corresponding item of the subject " "mapping, the mapping pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:1055 +#: ../../reference/compound_stmts.rst:1057 msgid "" "If duplicate keys are detected in the mapping pattern, the pattern is " "considered invalid. A :exc:`SyntaxError` is raised for duplicate literal " "values; or a :exc:`ValueError` for named keys of the same value." msgstr "" -#: ../../reference/compound_stmts.rst:1059 +#: ../../reference/compound_stmts.rst:1061 msgid "" "Key-value pairs are matched using the two-argument form of the mapping " "subject's ``get()`` method. Matched key-value pairs must already be present " @@ -1357,256 +1357,256 @@ msgid "" "`~object.__getitem__`." msgstr "" -#: ../../reference/compound_stmts.rst:1064 +#: ../../reference/compound_stmts.rst:1066 msgid "" "In simple terms ``{KEY1: P1, KEY2: P2, ... }`` matches only if all the " "following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1067 +#: ../../reference/compound_stmts.rst:1069 msgid "check ```` is a mapping" msgstr "" -#: ../../reference/compound_stmts.rst:1068 +#: ../../reference/compound_stmts.rst:1070 msgid "``KEY1 in ``" msgstr "``KEY1 in ``" -#: ../../reference/compound_stmts.rst:1069 +#: ../../reference/compound_stmts.rst:1071 msgid "``P1`` matches ``[KEY1]``" msgstr "" -#: ../../reference/compound_stmts.rst:1070 +#: ../../reference/compound_stmts.rst:1072 msgid "... and so on for the corresponding KEY/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:1076 +#: ../../reference/compound_stmts.rst:1078 msgid "Class Patterns" msgstr "" -#: ../../reference/compound_stmts.rst:1078 +#: ../../reference/compound_stmts.rst:1080 msgid "" "A class pattern represents a class and its positional and keyword arguments " "(if any). Syntax:" msgstr "" -#: ../../reference/compound_stmts.rst:1089 +#: ../../reference/compound_stmts.rst:1091 msgid "The same keyword should not be repeated in class patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1091 +#: ../../reference/compound_stmts.rst:1093 msgid "" "The following is the logical flow for matching a class pattern against a " "subject value:" msgstr "" -#: ../../reference/compound_stmts.rst:1094 +#: ../../reference/compound_stmts.rst:1096 msgid "" "If ``name_or_attr`` is not an instance of the builtin :class:`type` , raise :" "exc:`TypeError`." msgstr "" -#: ../../reference/compound_stmts.rst:1097 +#: ../../reference/compound_stmts.rst:1099 msgid "" "If the subject value is not an instance of ``name_or_attr`` (tested via :" "func:`isinstance`), the class pattern fails." msgstr "" -#: ../../reference/compound_stmts.rst:1100 +#: ../../reference/compound_stmts.rst:1102 msgid "" "If no pattern arguments are present, the pattern succeeds. Otherwise, the " "subsequent steps depend on whether keyword or positional argument patterns " "are present." msgstr "" -#: ../../reference/compound_stmts.rst:1104 +#: ../../reference/compound_stmts.rst:1106 msgid "" "For a number of built-in types (specified below), a single positional " "subpattern is accepted which will match the entire subject; for these types " "keyword patterns also work as for other types." msgstr "" -#: ../../reference/compound_stmts.rst:1108 +#: ../../reference/compound_stmts.rst:1110 msgid "" "If only keyword patterns are present, they are processed as follows, one by " "one:" msgstr "" -#: ../../reference/compound_stmts.rst:1111 +#: ../../reference/compound_stmts.rst:1113 msgid "I. The keyword is looked up as an attribute on the subject." msgstr "" -#: ../../reference/compound_stmts.rst:1113 +#: ../../reference/compound_stmts.rst:1115 msgid "" "If this raises an exception other than :exc:`AttributeError`, the exception " "bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1116 +#: ../../reference/compound_stmts.rst:1118 msgid "If this raises :exc:`AttributeError`, the class pattern has failed." msgstr "" -#: ../../reference/compound_stmts.rst:1118 +#: ../../reference/compound_stmts.rst:1120 msgid "" "Else, the subpattern associated with the keyword pattern is matched against " "the subject's attribute value. If this fails, the class pattern fails; if " "this succeeds, the match proceeds to the next keyword." msgstr "" -#: ../../reference/compound_stmts.rst:1123 +#: ../../reference/compound_stmts.rst:1125 msgid "II. If all keyword patterns succeed, the class pattern succeeds." msgstr "" -#: ../../reference/compound_stmts.rst:1125 +#: ../../reference/compound_stmts.rst:1127 msgid "" "If any positional patterns are present, they are converted to keyword " "patterns using the :data:`~object.__match_args__` attribute on the class " "``name_or_attr`` before matching:" msgstr "" -#: ../../reference/compound_stmts.rst:1129 +#: ../../reference/compound_stmts.rst:1131 msgid "" "I. The equivalent of ``getattr(cls, \"__match_args__\", ())`` is called." msgstr "" -#: ../../reference/compound_stmts.rst:1131 +#: ../../reference/compound_stmts.rst:1133 msgid "If this raises an exception, the exception bubbles up." msgstr "" -#: ../../reference/compound_stmts.rst:1133 +#: ../../reference/compound_stmts.rst:1135 msgid "" "If the returned value is not a tuple, the conversion fails and :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1136 +#: ../../reference/compound_stmts.rst:1138 msgid "" "If there are more positional patterns than ``len(cls.__match_args__)``, :exc:" "`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1139 +#: ../../reference/compound_stmts.rst:1141 msgid "" "Otherwise, positional pattern ``i`` is converted to a keyword pattern using " "``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must be a " "string; if not :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1143 +#: ../../reference/compound_stmts.rst:1145 msgid "If there are duplicate keywords, :exc:`TypeError` is raised." msgstr "" -#: ../../reference/compound_stmts.rst:1145 +#: ../../reference/compound_stmts.rst:1147 msgid ":ref:`class-pattern-matching`" msgstr ":ref:`class-pattern-matching`" -#: ../../reference/compound_stmts.rst:1147 +#: ../../reference/compound_stmts.rst:1149 msgid "" "II. Once all positional patterns have been converted to keyword patterns," msgstr "" -#: ../../reference/compound_stmts.rst:1148 +#: ../../reference/compound_stmts.rst:1150 msgid "the match proceeds as if there were only keyword patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1150 +#: ../../reference/compound_stmts.rst:1152 msgid "" "For the following built-in types the handling of positional subpatterns is " "different:" msgstr "" -#: ../../reference/compound_stmts.rst:1153 +#: ../../reference/compound_stmts.rst:1155 msgid ":class:`bool`" msgstr ":class:`bool`" -#: ../../reference/compound_stmts.rst:1154 +#: ../../reference/compound_stmts.rst:1156 msgid ":class:`bytearray`" msgstr ":class:`bytearray`" -#: ../../reference/compound_stmts.rst:1155 +#: ../../reference/compound_stmts.rst:1157 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../reference/compound_stmts.rst:1156 +#: ../../reference/compound_stmts.rst:1158 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../reference/compound_stmts.rst:1157 +#: ../../reference/compound_stmts.rst:1159 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../reference/compound_stmts.rst:1158 +#: ../../reference/compound_stmts.rst:1160 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../reference/compound_stmts.rst:1159 +#: ../../reference/compound_stmts.rst:1161 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../reference/compound_stmts.rst:1160 -#: ../../reference/compound_stmts.rst:1880 +#: ../../reference/compound_stmts.rst:1162 +#: ../../reference/compound_stmts.rst:1882 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../reference/compound_stmts.rst:1161 +#: ../../reference/compound_stmts.rst:1163 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../reference/compound_stmts.rst:1162 +#: ../../reference/compound_stmts.rst:1164 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../reference/compound_stmts.rst:1163 -#: ../../reference/compound_stmts.rst:1883 +#: ../../reference/compound_stmts.rst:1165 +#: ../../reference/compound_stmts.rst:1885 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../reference/compound_stmts.rst:1165 +#: ../../reference/compound_stmts.rst:1167 msgid "" "These classes accept a single positional argument, and the pattern there is " "matched against the whole object rather than an attribute. For example " "``int(0|1)`` matches the value ``0``, but not the value ``0.0``." msgstr "" -#: ../../reference/compound_stmts.rst:1169 +#: ../../reference/compound_stmts.rst:1171 msgid "" "In simple terms ``CLS(P1, attr=P2)`` matches only if the following happens:" msgstr "" -#: ../../reference/compound_stmts.rst:1171 +#: ../../reference/compound_stmts.rst:1173 msgid "``isinstance(, CLS)``" msgstr "``isinstance(, CLS)``" -#: ../../reference/compound_stmts.rst:1172 +#: ../../reference/compound_stmts.rst:1174 msgid "convert ``P1`` to a keyword pattern using ``CLS.__match_args__``" msgstr "" -#: ../../reference/compound_stmts.rst:1173 +#: ../../reference/compound_stmts.rst:1175 msgid "For each keyword argument ``attr=P2``:" msgstr "" -#: ../../reference/compound_stmts.rst:1175 +#: ../../reference/compound_stmts.rst:1177 msgid "``hasattr(, \"attr\")``" msgstr "``hasattr(, \"attr\")``" -#: ../../reference/compound_stmts.rst:1176 +#: ../../reference/compound_stmts.rst:1178 msgid "``P2`` matches ``.attr``" msgstr "" -#: ../../reference/compound_stmts.rst:1178 +#: ../../reference/compound_stmts.rst:1180 msgid "... and so on for the corresponding keyword argument/pattern pair." msgstr "" -#: ../../reference/compound_stmts.rst:1193 +#: ../../reference/compound_stmts.rst:1195 msgid "Function definitions" msgstr "函式定義" -#: ../../reference/compound_stmts.rst:1208 +#: ../../reference/compound_stmts.rst:1210 msgid "" "A function definition defines a user-defined function object (see section :" "ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1230 +#: ../../reference/compound_stmts.rst:1232 msgid "" "A function definition is an executable statement. Its execution binds the " "function name in the current local namespace to a function object (a wrapper " @@ -1615,13 +1615,13 @@ msgid "" "used when the function is called." msgstr "" -#: ../../reference/compound_stmts.rst:1236 +#: ../../reference/compound_stmts.rst:1238 msgid "" "The function definition does not execute the function body; this gets " "executed only when the function is called. [#]_" msgstr "" -#: ../../reference/compound_stmts.rst:1242 +#: ../../reference/compound_stmts.rst:1244 msgid "" "A function definition may be wrapped by one or more :term:`decorator` " "expressions. Decorator expressions are evaluated when the function is " @@ -1632,7 +1632,7 @@ msgid "" "example, the following code ::" msgstr "" -#: ../../reference/compound_stmts.rst:1249 +#: ../../reference/compound_stmts.rst:1251 msgid "" "@f1(arg)\n" "@f2\n" @@ -1642,12 +1642,12 @@ msgstr "" "@f2\n" "def func(): pass" -#: ../../reference/compound_stmts.rst:1253 -#: ../../reference/compound_stmts.rst:1448 +#: ../../reference/compound_stmts.rst:1255 +#: ../../reference/compound_stmts.rst:1450 msgid "is roughly equivalent to ::" msgstr "大致等價於: ::" -#: ../../reference/compound_stmts.rst:1255 +#: ../../reference/compound_stmts.rst:1257 msgid "" "def func(): pass\n" "func = f1(arg)(f2(func))" @@ -1655,20 +1655,20 @@ msgstr "" "def func(): pass\n" "func = f1(arg)(f2(func))" -#: ../../reference/compound_stmts.rst:1258 +#: ../../reference/compound_stmts.rst:1260 msgid "" "except that the original function is not temporarily bound to the name " "``func``." msgstr "" -#: ../../reference/compound_stmts.rst:1260 +#: ../../reference/compound_stmts.rst:1262 msgid "" "Functions may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1265 +#: ../../reference/compound_stmts.rst:1267 msgid "" "A list of :ref:`type parameters ` may be given in square " "brackets between the function's name and the opening parenthesis for its " @@ -1678,12 +1678,12 @@ msgid "" "functions` for more." msgstr "" -#: ../../reference/compound_stmts.rst:1272 -#: ../../reference/compound_stmts.rst:1467 +#: ../../reference/compound_stmts.rst:1274 +#: ../../reference/compound_stmts.rst:1469 msgid "Type parameter lists are new in Python 3.12." msgstr "" -#: ../../reference/compound_stmts.rst:1280 +#: ../../reference/compound_stmts.rst:1282 msgid "" "When one or more :term:`parameters ` have the form *parameter* " "``=`` *expression*, the function is said to have \"default parameter values." @@ -1694,7 +1694,7 @@ msgid "" "syntactic restriction that is not expressed by the grammar." msgstr "" -#: ../../reference/compound_stmts.rst:1288 +#: ../../reference/compound_stmts.rst:1290 msgid "" "**Default parameter values are evaluated from left to right when the " "function definition is executed.** This means that the expression is " @@ -1707,7 +1707,7 @@ msgid "" "the default, and explicitly test for it in the body of the function, e.g.::" msgstr "" -#: ../../reference/compound_stmts.rst:1298 +#: ../../reference/compound_stmts.rst:1300 msgid "" "def whats_on_the_telly(penguin=None):\n" " if penguin is None:\n" @@ -1716,7 +1716,7 @@ msgid "" " return penguin" msgstr "" -#: ../../reference/compound_stmts.rst:1309 +#: ../../reference/compound_stmts.rst:1311 msgid "" "Function call semantics are described in more detail in section :ref:" "`calls`. A function call always assigns values to all parameters mentioned " @@ -1732,13 +1732,13 @@ msgid "" "positional arguments." msgstr "" -#: ../../reference/compound_stmts.rst:1321 +#: ../../reference/compound_stmts.rst:1323 msgid "" "The ``/`` function parameter syntax may be used to indicate positional-only " "parameters. See :pep:`570` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1330 +#: ../../reference/compound_stmts.rst:1332 msgid "" "Parameters may have an :term:`annotation ` of the form " "\"``: expression``\" following the parameter name. Any parameter may have " @@ -1757,13 +1757,13 @@ msgid "" "in the source code." msgstr "" -#: ../../reference/compound_stmts.rst:1344 +#: ../../reference/compound_stmts.rst:1346 msgid "" "Parameters of the form \"``*identifier``\" may have an annotation \"``: " "*expression``\". See :pep:`646`." msgstr "" -#: ../../reference/compound_stmts.rst:1350 +#: ../../reference/compound_stmts.rst:1352 msgid "" "It is also possible to create anonymous functions (functions not bound to a " "name), for immediate use in expressions. This uses lambda expressions, " @@ -1775,7 +1775,7 @@ msgid "" "execution of multiple statements and annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1358 +#: ../../reference/compound_stmts.rst:1360 msgid "" "**Programmer's note:** Functions are first-class objects. A \"``def``\" " "statement executed inside a function definition defines a local function " @@ -1784,61 +1784,61 @@ msgid "" "See section :ref:`naming` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1366 +#: ../../reference/compound_stmts.rst:1368 msgid ":pep:`3107` - Function Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1367 +#: ../../reference/compound_stmts.rst:1369 msgid "The original specification for function annotations." msgstr "" -#: ../../reference/compound_stmts.rst:1369 +#: ../../reference/compound_stmts.rst:1371 msgid ":pep:`484` - Type Hints" msgstr ":pep:`484` - 型別提示" -#: ../../reference/compound_stmts.rst:1370 +#: ../../reference/compound_stmts.rst:1372 msgid "Definition of a standard meaning for annotations: type hints." msgstr "定義註釋的標準意義:型別提示。" -#: ../../reference/compound_stmts.rst:1372 +#: ../../reference/compound_stmts.rst:1374 msgid ":pep:`526` - Syntax for Variable Annotations" msgstr ":pep:`526` - 變數註釋的語法" -#: ../../reference/compound_stmts.rst:1373 +#: ../../reference/compound_stmts.rst:1375 msgid "" "Ability to type hint variable declarations, including class variables and " "instance variables." msgstr "" -#: ../../reference/compound_stmts.rst:1376 +#: ../../reference/compound_stmts.rst:1378 msgid ":pep:`563` - Postponed Evaluation of Annotations" msgstr "" -#: ../../reference/compound_stmts.rst:1377 +#: ../../reference/compound_stmts.rst:1379 msgid "" "Support for forward references within annotations by preserving annotations " "in a string form at runtime instead of eager evaluation." msgstr "" -#: ../../reference/compound_stmts.rst:1380 +#: ../../reference/compound_stmts.rst:1382 msgid ":pep:`318` - Decorators for Functions and Methods" msgstr "" -#: ../../reference/compound_stmts.rst:1381 +#: ../../reference/compound_stmts.rst:1383 msgid "" "Function and method decorators were introduced. Class decorators were " "introduced in :pep:`3129`." msgstr "" -#: ../../reference/compound_stmts.rst:1387 +#: ../../reference/compound_stmts.rst:1389 msgid "Class definitions" msgstr "類別定義" -#: ../../reference/compound_stmts.rst:1402 +#: ../../reference/compound_stmts.rst:1404 msgid "A class definition defines a class object (see section :ref:`types`):" msgstr "" -#: ../../reference/compound_stmts.rst:1409 +#: ../../reference/compound_stmts.rst:1411 msgid "" "A class definition is an executable statement. The inheritance list usually " "gives a list of base classes (see :ref:`metaclasses` for more advanced " @@ -1847,7 +1847,7 @@ msgid "" "default, from the base class :class:`object`; hence, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1415 +#: ../../reference/compound_stmts.rst:1417 msgid "" "class Foo:\n" " pass" @@ -1855,11 +1855,11 @@ msgstr "" "class Foo:\n" " pass" -#: ../../reference/compound_stmts.rst:1418 +#: ../../reference/compound_stmts.rst:1420 msgid "is equivalent to ::" msgstr "" -#: ../../reference/compound_stmts.rst:1420 +#: ../../reference/compound_stmts.rst:1422 msgid "" "class Foo(object):\n" " pass" @@ -1867,7 +1867,7 @@ msgstr "" "class Foo(object):\n" " pass" -#: ../../reference/compound_stmts.rst:1423 +#: ../../reference/compound_stmts.rst:1425 msgid "" "The class's suite is then executed in a new execution frame (see :ref:" "`naming`), using a newly created local namespace and the original global " @@ -1879,7 +1879,7 @@ msgid "" "original local namespace." msgstr "" -#: ../../reference/compound_stmts.rst:1432 +#: ../../reference/compound_stmts.rst:1434 msgid "" "The order in which attributes are defined in the class body is preserved in " "the new class's :attr:`~type.__dict__`. Note that this is reliable only " @@ -1887,17 +1887,17 @@ msgid "" "using the definition syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1437 +#: ../../reference/compound_stmts.rst:1439 msgid "" "Class creation can be customized heavily using :ref:`metaclasses " "`." msgstr "" -#: ../../reference/compound_stmts.rst:1442 +#: ../../reference/compound_stmts.rst:1444 msgid "Classes can also be decorated: just like when decorating functions, ::" msgstr "" -#: ../../reference/compound_stmts.rst:1444 +#: ../../reference/compound_stmts.rst:1446 msgid "" "@f1(arg)\n" "@f2\n" @@ -1907,7 +1907,7 @@ msgstr "" "@f2\n" "class Foo: pass" -#: ../../reference/compound_stmts.rst:1450 +#: ../../reference/compound_stmts.rst:1452 msgid "" "class Foo: pass\n" "Foo = f1(arg)(f2(Foo))" @@ -1915,20 +1915,20 @@ msgstr "" "class Foo: pass\n" "Foo = f1(arg)(f2(Foo))" -#: ../../reference/compound_stmts.rst:1453 +#: ../../reference/compound_stmts.rst:1455 msgid "" "The evaluation rules for the decorator expressions are the same as for " "function decorators. The result is then bound to the class name." msgstr "" -#: ../../reference/compound_stmts.rst:1456 +#: ../../reference/compound_stmts.rst:1458 msgid "" "Classes may be decorated with any valid :token:`~python-grammar:" "assignment_expression`. Previously, the grammar was much more restrictive; " "see :pep:`614` for details." msgstr "" -#: ../../reference/compound_stmts.rst:1461 +#: ../../reference/compound_stmts.rst:1463 msgid "" "A list of :ref:`type parameters ` may be given in square " "brackets immediately after the class's name. This indicates to static type " @@ -1937,7 +1937,7 @@ msgid "" "`generic-classes` for more." msgstr "" -#: ../../reference/compound_stmts.rst:1470 +#: ../../reference/compound_stmts.rst:1472 msgid "" "**Programmer's note:** Variables defined in the class definition are class " "attributes; they are shared by instances. Instance attributes can be set in " @@ -1950,35 +1950,35 @@ msgid "" "implementation details." msgstr "" -#: ../../reference/compound_stmts.rst:1482 +#: ../../reference/compound_stmts.rst:1484 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/compound_stmts.rst:1483 +#: ../../reference/compound_stmts.rst:1485 msgid "" "The proposal that changed the declaration of metaclasses to the current " "syntax, and the semantics for how classes with metaclasses are constructed." msgstr "" -#: ../../reference/compound_stmts.rst:1487 +#: ../../reference/compound_stmts.rst:1489 msgid ":pep:`3129` - Class Decorators" msgstr ":pep:`3129` - 類別裝飾器" -#: ../../reference/compound_stmts.rst:1488 +#: ../../reference/compound_stmts.rst:1490 msgid "" "The proposal that added class decorators. Function and method decorators " "were introduced in :pep:`318`." msgstr "" -#: ../../reference/compound_stmts.rst:1495 +#: ../../reference/compound_stmts.rst:1497 msgid "Coroutines" msgstr "協程" -#: ../../reference/compound_stmts.rst:1503 +#: ../../reference/compound_stmts.rst:1505 msgid "Coroutine function definition" msgstr "協程函式定義" -#: ../../reference/compound_stmts.rst:1513 +#: ../../reference/compound_stmts.rst:1515 msgid "" "Execution of Python coroutines can be suspended and resumed at many points " "(see :term:`coroutine`). :keyword:`await` expressions, :keyword:`async for` " @@ -1986,23 +1986,23 @@ msgid "" "function." msgstr "" -#: ../../reference/compound_stmts.rst:1517 +#: ../../reference/compound_stmts.rst:1519 msgid "" "Functions defined with ``async def`` syntax are always coroutine functions, " "even if they do not contain ``await`` or ``async`` keywords." msgstr "" -#: ../../reference/compound_stmts.rst:1520 +#: ../../reference/compound_stmts.rst:1522 msgid "" "It is a :exc:`SyntaxError` to use a ``yield from`` expression inside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1523 +#: ../../reference/compound_stmts.rst:1525 msgid "An example of a coroutine function::" msgstr "一個協程函式範例: ::" -#: ../../reference/compound_stmts.rst:1525 +#: ../../reference/compound_stmts.rst:1527 msgid "" "async def func(param1, param2):\n" " do_stuff()\n" @@ -2012,30 +2012,30 @@ msgstr "" " do_stuff()\n" " await some_coroutine()" -#: ../../reference/compound_stmts.rst:1529 +#: ../../reference/compound_stmts.rst:1531 msgid "" "``await`` and ``async`` are now keywords; previously they were only treated " "as such inside the body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1537 +#: ../../reference/compound_stmts.rst:1539 msgid "The :keyword:`!async for` statement" msgstr ":keyword:`!async for` 陳述式" -#: ../../reference/compound_stmts.rst:1542 +#: ../../reference/compound_stmts.rst:1544 msgid "" "An :term:`asynchronous iterable` provides an ``__aiter__`` method that " "directly returns an :term:`asynchronous iterator`, which can call " "asynchronous code in its ``__anext__`` method." msgstr "" -#: ../../reference/compound_stmts.rst:1546 +#: ../../reference/compound_stmts.rst:1548 msgid "" "The ``async for`` statement allows convenient iteration over asynchronous " "iterables." msgstr "" -#: ../../reference/compound_stmts.rst:1551 +#: ../../reference/compound_stmts.rst:1553 msgid "" "async for TARGET in ITER:\n" " SUITE\n" @@ -2047,11 +2047,11 @@ msgstr "" "else:\n" " SUITE2" -#: ../../reference/compound_stmts.rst:1556 +#: ../../reference/compound_stmts.rst:1558 msgid "Is semantically equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:1558 +#: ../../reference/compound_stmts.rst:1560 msgid "" "iter = (ITER)\n" "iter = type(iter).__aiter__(iter)\n" @@ -2081,28 +2081,28 @@ msgstr "" "else:\n" " SUITE2" -#: ../../reference/compound_stmts.rst:1572 +#: ../../reference/compound_stmts.rst:1574 msgid "" "See also :meth:`~object.__aiter__` and :meth:`~object.__anext__` for details." msgstr "更多細節請見 :meth:`~object.__aiter__` 與 :meth:`~object.__anext__`。" -#: ../../reference/compound_stmts.rst:1574 +#: ../../reference/compound_stmts.rst:1576 msgid "" "It is a :exc:`SyntaxError` to use an ``async for`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1582 +#: ../../reference/compound_stmts.rst:1584 msgid "The :keyword:`!async with` statement" msgstr ":keyword:`!async with` 陳述式" -#: ../../reference/compound_stmts.rst:1587 +#: ../../reference/compound_stmts.rst:1589 msgid "" "An :term:`asynchronous context manager` is a :term:`context manager` that is " "able to suspend execution in its *enter* and *exit* methods." msgstr "" -#: ../../reference/compound_stmts.rst:1592 +#: ../../reference/compound_stmts.rst:1594 msgid "" "async with EXPRESSION as TARGET:\n" " SUITE" @@ -2110,7 +2110,7 @@ msgstr "" "async with EXPRESSION as TARGET:\n" " SUITE" -#: ../../reference/compound_stmts.rst:1597 +#: ../../reference/compound_stmts.rst:1599 msgid "" "manager = (EXPRESSION)\n" "aenter = type(manager).__aenter__\n" @@ -2146,44 +2146,44 @@ msgstr "" " if not hit_except:\n" " await aexit(manager, None, None, None)" -#: ../../reference/compound_stmts.rst:1614 +#: ../../reference/compound_stmts.rst:1616 msgid "" "See also :meth:`~object.__aenter__` and :meth:`~object.__aexit__` for " "details." msgstr "更多細節請見 :meth:`~object.__aenter__` 與 :meth:`~object.__aexit__`。" -#: ../../reference/compound_stmts.rst:1616 +#: ../../reference/compound_stmts.rst:1618 msgid "" "It is a :exc:`SyntaxError` to use an ``async with`` statement outside the " "body of a coroutine function." msgstr "" -#: ../../reference/compound_stmts.rst:1621 +#: ../../reference/compound_stmts.rst:1623 msgid ":pep:`492` - Coroutines with async and await syntax" msgstr "" -#: ../../reference/compound_stmts.rst:1622 +#: ../../reference/compound_stmts.rst:1624 msgid "" "The proposal that made coroutines a proper standalone concept in Python, and " "added supporting syntax." msgstr "" -#: ../../reference/compound_stmts.rst:1628 +#: ../../reference/compound_stmts.rst:1630 msgid "Type parameter lists" msgstr "" -#: ../../reference/compound_stmts.rst:1632 +#: ../../reference/compound_stmts.rst:1634 msgid "Support for default values was added (see :pep:`696`)." msgstr "" -#: ../../reference/compound_stmts.rst:1645 +#: ../../reference/compound_stmts.rst:1647 msgid "" ":ref:`Functions ` (including :ref:`coroutines `), :ref:" "`classes ` and :ref:`type aliases ` may contain a type " "parameter list::" msgstr "" -#: ../../reference/compound_stmts.rst:1649 +#: ../../reference/compound_stmts.rst:1651 msgid "" "def max[T](args: list[T]) -> T:\n" " ...\n" @@ -2215,7 +2215,7 @@ msgstr "" "\n" "type ListOrSet[T] = list[T] | set[T]" -#: ../../reference/compound_stmts.rst:1664 +#: ../../reference/compound_stmts.rst:1666 msgid "" "Semantically, this indicates that the function, class, or type alias is " "generic over a type variable. This information is primarily used by static " @@ -2223,7 +2223,7 @@ msgid "" "generic counterparts." msgstr "" -#: ../../reference/compound_stmts.rst:1669 +#: ../../reference/compound_stmts.rst:1671 msgid "" "Type parameters are declared in square brackets (``[]``) immediately after " "the name of the function, class, or type alias. The type parameters are " @@ -2235,36 +2235,36 @@ msgid "" "wraps the creation of the generic object." msgstr "" -#: ../../reference/compound_stmts.rst:1678 +#: ../../reference/compound_stmts.rst:1680 msgid "" "Generic functions, classes, and type aliases have a :attr:`~definition." "__type_params__` attribute listing their type parameters." msgstr "" -#: ../../reference/compound_stmts.rst:1681 +#: ../../reference/compound_stmts.rst:1683 msgid "Type parameters come in three kinds:" msgstr "" -#: ../../reference/compound_stmts.rst:1683 +#: ../../reference/compound_stmts.rst:1685 msgid "" ":data:`typing.TypeVar`, introduced by a plain name (e.g., ``T``). " "Semantically, this represents a single type to a type checker." msgstr "" -#: ../../reference/compound_stmts.rst:1685 +#: ../../reference/compound_stmts.rst:1687 msgid "" ":data:`typing.TypeVarTuple`, introduced by a name prefixed with a single " "asterisk (e.g., ``*Ts``). Semantically, this stands for a tuple of any " "number of types." msgstr "" -#: ../../reference/compound_stmts.rst:1688 +#: ../../reference/compound_stmts.rst:1690 msgid "" ":data:`typing.ParamSpec`, introduced by a name prefixed with two asterisks " "(e.g., ``**P``). Semantically, this stands for the parameters of a callable." msgstr "" -#: ../../reference/compound_stmts.rst:1691 +#: ../../reference/compound_stmts.rst:1693 msgid "" ":data:`typing.TypeVar` declarations can define *bounds* and *constraints* " "with a colon (``:``) followed by an expression. A single expression after " @@ -2276,7 +2276,7 @@ msgid "" "variables can only take on one of the types in the list of constraints." msgstr "" -#: ../../reference/compound_stmts.rst:1700 +#: ../../reference/compound_stmts.rst:1702 msgid "" "For :data:`!typing.TypeVar`\\ s declared using the type parameter list " "syntax, the bound and constraints are not evaluated when the generic object " @@ -2286,13 +2286,13 @@ msgid "" "`." msgstr "" -#: ../../reference/compound_stmts.rst:1706 +#: ../../reference/compound_stmts.rst:1708 msgid "" ":data:`typing.TypeVarTuple`\\ s and :data:`typing.ParamSpec`\\ s cannot have " "bounds or constraints." msgstr "" -#: ../../reference/compound_stmts.rst:1709 +#: ../../reference/compound_stmts.rst:1711 msgid "" "All three flavors of type parameters can also have a *default value*, which " "is used when the type parameter is not explicitly provided. This is added by " @@ -2305,13 +2305,13 @@ msgid "" "attribute is set to the special sentinel object :data:`typing.NoDefault`." msgstr "" -#: ../../reference/compound_stmts.rst:1719 +#: ../../reference/compound_stmts.rst:1721 msgid "" "The following example indicates the full set of allowed type parameter " "declarations::" msgstr "" -#: ../../reference/compound_stmts.rst:1721 +#: ../../reference/compound_stmts.rst:1723 msgid "" "def overly_generic[\n" " SimpleTypeVar,\n" @@ -2343,24 +2343,24 @@ msgstr "" " *e: SimpleTypeVarTuple,\n" "): ..." -#: ../../reference/compound_stmts.rst:1739 +#: ../../reference/compound_stmts.rst:1741 msgid "Generic functions" msgstr "" -#: ../../reference/compound_stmts.rst:1741 +#: ../../reference/compound_stmts.rst:1743 msgid "Generic functions are declared as follows::" msgstr "" -#: ../../reference/compound_stmts.rst:1743 +#: ../../reference/compound_stmts.rst:1745 msgid "def func[T](arg: T): ..." msgstr "def func[T](arg: T): ..." -#: ../../reference/compound_stmts.rst:1745 -#: ../../reference/compound_stmts.rst:1805 +#: ../../reference/compound_stmts.rst:1747 +#: ../../reference/compound_stmts.rst:1807 msgid "This syntax is equivalent to::" msgstr "語法大致等價於: ::" -#: ../../reference/compound_stmts.rst:1747 +#: ../../reference/compound_stmts.rst:1749 msgid "" "annotation-def TYPE_PARAMS_OF_func():\n" " T = typing.TypeVar(\"T\")\n" @@ -2376,7 +2376,7 @@ msgstr "" " return func\n" "func = TYPE_PARAMS_OF_func()" -#: ../../reference/compound_stmts.rst:1754 +#: ../../reference/compound_stmts.rst:1756 msgid "" "Here ``annotation-def`` indicates an :ref:`annotation scope `, which is not actually bound to any name at runtime. (One other " @@ -2385,20 +2385,20 @@ msgid "" "data:`typing.TypeVar` directly.)" msgstr "" -#: ../../reference/compound_stmts.rst:1760 +#: ../../reference/compound_stmts.rst:1762 msgid "" "The annotations of generic functions are evaluated within the annotation " "scope used for declaring the type parameters, but the function's defaults " "and decorators are not." msgstr "" -#: ../../reference/compound_stmts.rst:1764 +#: ../../reference/compound_stmts.rst:1766 msgid "" "The following example illustrates the scoping rules for these cases, as well " "as for additional flavors of type parameters::" msgstr "" -#: ../../reference/compound_stmts.rst:1767 +#: ../../reference/compound_stmts.rst:1769 msgid "" "@decorator\n" "def func[T: int, *Ts, **P](*args: *Ts, arg: Callable[P, T] = some_default):\n" @@ -2408,13 +2408,13 @@ msgstr "" "def func[T: int, *Ts, **P](*args: *Ts, arg: Callable[P, T] = some_default):\n" " ..." -#: ../../reference/compound_stmts.rst:1771 +#: ../../reference/compound_stmts.rst:1773 msgid "" "Except for the :ref:`lazy evaluation ` of the :class:" "`~typing.TypeVar` bound, this is equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:1774 +#: ../../reference/compound_stmts.rst:1776 msgid "" "DEFAULT_OF_arg = some_default\n" "\n" @@ -2436,25 +2436,25 @@ msgid "" "func = decorator(TYPE_PARAMS_OF_func())" msgstr "" -#: ../../reference/compound_stmts.rst:1793 +#: ../../reference/compound_stmts.rst:1795 msgid "" "The capitalized names like ``DEFAULT_OF_arg`` are not actually bound at " "runtime." msgstr "" -#: ../../reference/compound_stmts.rst:1799 +#: ../../reference/compound_stmts.rst:1801 msgid "Generic classes" msgstr "" -#: ../../reference/compound_stmts.rst:1801 +#: ../../reference/compound_stmts.rst:1803 msgid "Generic classes are declared as follows::" msgstr "" -#: ../../reference/compound_stmts.rst:1803 +#: ../../reference/compound_stmts.rst:1805 msgid "class Bag[T]: ..." msgstr "class Bag[T]: ..." -#: ../../reference/compound_stmts.rst:1807 +#: ../../reference/compound_stmts.rst:1809 msgid "" "annotation-def TYPE_PARAMS_OF_Bag():\n" " T = typing.TypeVar(\"T\")\n" @@ -2472,14 +2472,14 @@ msgstr "" " return Bag\n" "Bag = TYPE_PARAMS_OF_Bag()" -#: ../../reference/compound_stmts.rst:1815 +#: ../../reference/compound_stmts.rst:1817 msgid "" "Here again ``annotation-def`` (not a real keyword) indicates an :ref:" "`annotation scope `, and the name ``TYPE_PARAMS_OF_Bag`` " "is not actually bound at runtime." msgstr "" -#: ../../reference/compound_stmts.rst:1819 +#: ../../reference/compound_stmts.rst:1821 msgid "" "Generic classes implicitly inherit from :data:`typing.Generic`. The base " "classes and keyword arguments of generic classes are evaluated within the " @@ -2487,7 +2487,7 @@ msgid "" "that scope. This is illustrated by this example::" msgstr "" -#: ../../reference/compound_stmts.rst:1825 +#: ../../reference/compound_stmts.rst:1827 msgid "" "@decorator\n" "class Bag(Base[T], arg=T): ..." @@ -2495,11 +2495,11 @@ msgstr "" "@decorator\n" "class Bag(Base[T], arg=T): ..." -#: ../../reference/compound_stmts.rst:1828 +#: ../../reference/compound_stmts.rst:1830 msgid "This is equivalent to::" msgstr "這等價於: ::" -#: ../../reference/compound_stmts.rst:1830 +#: ../../reference/compound_stmts.rst:1832 msgid "" "annotation-def TYPE_PARAMS_OF_Bag():\n" " T = typing.TypeVar(\"T\")\n" @@ -2517,27 +2517,27 @@ msgstr "" " return Bag\n" "Bag = decorator(TYPE_PARAMS_OF_Bag())" -#: ../../reference/compound_stmts.rst:1841 +#: ../../reference/compound_stmts.rst:1843 msgid "Generic type aliases" msgstr "" -#: ../../reference/compound_stmts.rst:1843 +#: ../../reference/compound_stmts.rst:1845 msgid "" "The :keyword:`type` statement can also be used to create a generic type " "alias::" msgstr "" -#: ../../reference/compound_stmts.rst:1845 +#: ../../reference/compound_stmts.rst:1847 msgid "type ListOrSet[T] = list[T] | set[T]" msgstr "type ListOrSet[T] = list[T] | set[T]" -#: ../../reference/compound_stmts.rst:1847 +#: ../../reference/compound_stmts.rst:1849 msgid "" "Except for the :ref:`lazy evaluation ` of the value, this " "is equivalent to::" msgstr "" -#: ../../reference/compound_stmts.rst:1850 +#: ../../reference/compound_stmts.rst:1852 msgid "" "annotation-def TYPE_PARAMS_OF_ListOrSet():\n" " T = typing.TypeVar(\"T\")\n" @@ -2550,105 +2550,105 @@ msgid "" "ListOrSet = TYPE_PARAMS_OF_ListOrSet()" msgstr "" -#: ../../reference/compound_stmts.rst:1859 +#: ../../reference/compound_stmts.rst:1861 msgid "" "Here, ``annotation-def`` (not a real keyword) indicates an :ref:`annotation " "scope `. The capitalized names like " "``TYPE_PARAMS_OF_ListOrSet`` are not actually bound at runtime." msgstr "" -#: ../../reference/compound_stmts.rst:1864 +#: ../../reference/compound_stmts.rst:1866 msgid "Footnotes" msgstr "註解" -#: ../../reference/compound_stmts.rst:1865 +#: ../../reference/compound_stmts.rst:1867 msgid "" "The exception is propagated to the invocation stack unless there is a :" "keyword:`finally` clause which happens to raise another exception. That new " "exception causes the old one to be lost." msgstr "" -#: ../../reference/compound_stmts.rst:1869 +#: ../../reference/compound_stmts.rst:1871 msgid "In pattern matching, a sequence is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1871 +#: ../../reference/compound_stmts.rst:1873 msgid "a class that inherits from :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1872 +#: ../../reference/compound_stmts.rst:1874 msgid "" "a Python class that has been registered as :class:`collections.abc.Sequence`" msgstr "" -#: ../../reference/compound_stmts.rst:1873 +#: ../../reference/compound_stmts.rst:1875 msgid "" "a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_SEQUENCE` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1874 -#: ../../reference/compound_stmts.rst:1893 +#: ../../reference/compound_stmts.rst:1876 +#: ../../reference/compound_stmts.rst:1895 msgid "a class that inherits from any of the above" msgstr "" -#: ../../reference/compound_stmts.rst:1876 +#: ../../reference/compound_stmts.rst:1878 msgid "The following standard library classes are sequences:" msgstr "" -#: ../../reference/compound_stmts.rst:1878 +#: ../../reference/compound_stmts.rst:1880 msgid ":class:`array.array`" msgstr ":class:`array.array`" -#: ../../reference/compound_stmts.rst:1879 +#: ../../reference/compound_stmts.rst:1881 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../reference/compound_stmts.rst:1881 +#: ../../reference/compound_stmts.rst:1883 msgid ":class:`memoryview`" msgstr ":class:`memoryview`" -#: ../../reference/compound_stmts.rst:1882 +#: ../../reference/compound_stmts.rst:1884 msgid ":class:`range`" msgstr ":class:`range`" -#: ../../reference/compound_stmts.rst:1885 +#: ../../reference/compound_stmts.rst:1887 msgid "" "Subject values of type ``str``, ``bytes``, and ``bytearray`` do not match " "sequence patterns." msgstr "" -#: ../../reference/compound_stmts.rst:1888 +#: ../../reference/compound_stmts.rst:1890 msgid "In pattern matching, a mapping is defined as one of the following:" msgstr "" -#: ../../reference/compound_stmts.rst:1890 +#: ../../reference/compound_stmts.rst:1892 msgid "a class that inherits from :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1891 +#: ../../reference/compound_stmts.rst:1893 msgid "" "a Python class that has been registered as :class:`collections.abc.Mapping`" msgstr "" -#: ../../reference/compound_stmts.rst:1892 +#: ../../reference/compound_stmts.rst:1894 msgid "" "a builtin class that has its (CPython) :c:macro:`Py_TPFLAGS_MAPPING` bit set" msgstr "" -#: ../../reference/compound_stmts.rst:1895 +#: ../../reference/compound_stmts.rst:1897 msgid "" "The standard library classes :class:`dict` and :class:`types." "MappingProxyType` are mappings." msgstr "" -#: ../../reference/compound_stmts.rst:1898 +#: ../../reference/compound_stmts.rst:1900 msgid "" "A string literal appearing as the first statement in the function body is " "transformed into the function's :attr:`~function.__doc__` attribute and " "therefore the function's :term:`docstring`." msgstr "" -#: ../../reference/compound_stmts.rst:1902 +#: ../../reference/compound_stmts.rst:1904 msgid "" "A string literal appearing as the first statement in the class body is " "transformed into the namespace's :attr:`~type.__doc__` item and therefore " @@ -2666,14 +2666,14 @@ msgstr "compound(複合)" #: ../../reference/compound_stmts.rst:169 #: ../../reference/compound_stmts.rst:207 #: ../../reference/compound_stmts.rst:390 -#: ../../reference/compound_stmts.rst:437 -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:588 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 -#: ../../reference/compound_stmts.rst:1499 -#: ../../reference/compound_stmts.rst:1533 -#: ../../reference/compound_stmts.rst:1578 +#: ../../reference/compound_stmts.rst:439 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:590 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 +#: ../../reference/compound_stmts.rst:1501 +#: ../../reference/compound_stmts.rst:1535 +#: ../../reference/compound_stmts.rst:1580 msgid "statement" msgstr "statement(陳述式)" @@ -2709,7 +2709,7 @@ msgstr "" msgid "else" msgstr "else" -#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:590 msgid "if" msgstr "if" @@ -2719,9 +2719,9 @@ msgstr "if" #: ../../reference/compound_stmts.rst:327 #: ../../reference/compound_stmts.rst:390 #: ../../reference/compound_stmts.rst:408 -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:588 -#: ../../reference/compound_stmts.rst:1509 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:590 +#: ../../reference/compound_stmts.rst:1511 msgid "keyword" msgstr "keyword(關鍵字)" @@ -2732,21 +2732,21 @@ msgstr "elif" #: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:111 #: ../../reference/compound_stmts.rst:144 #: ../../reference/compound_stmts.rst:207 -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:588 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1325 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:590 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1327 +#: ../../reference/compound_stmts.rst:1391 msgid ": (colon)" msgstr ": (冒號)" #: ../../reference/compound_stmts.rst:86 ../../reference/compound_stmts.rst:111 #: ../../reference/compound_stmts.rst:144 #: ../../reference/compound_stmts.rst:207 -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:588 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:590 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "compound statement" msgstr "compound statement(複合陳述式)" @@ -2762,14 +2762,14 @@ msgstr "loop(迴圈)" #: ../../reference/compound_stmts.rst:129 #: ../../reference/compound_stmts.rst:169 #: ../../reference/compound_stmts.rst:390 -#: ../../reference/compound_stmts.rst:437 +#: ../../reference/compound_stmts.rst:439 msgid "break" msgstr "break" #: ../../reference/compound_stmts.rst:129 #: ../../reference/compound_stmts.rst:169 #: ../../reference/compound_stmts.rst:390 -#: ../../reference/compound_stmts.rst:437 +#: ../../reference/compound_stmts.rst:439 msgid "continue" msgstr "continue" @@ -2791,8 +2791,8 @@ msgstr "list(串列)" #: ../../reference/compound_stmts.rst:144 #: ../../reference/compound_stmts.rst:298 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "object" msgstr "object(物件)" @@ -2823,8 +2823,8 @@ msgstr "finally" #: ../../reference/compound_stmts.rst:207 #: ../../reference/compound_stmts.rst:265 -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:590 msgid "as" msgstr "as" @@ -2849,212 +2849,212 @@ msgid "except_star" msgstr "except_star" #: ../../reference/compound_stmts.rst:390 -#: ../../reference/compound_stmts.rst:437 +#: ../../reference/compound_stmts.rst:439 msgid "return" msgstr "return (回傳)" -#: ../../reference/compound_stmts.rst:471 +#: ../../reference/compound_stmts.rst:473 msgid "with" msgstr "with" -#: ../../reference/compound_stmts.rst:471 +#: ../../reference/compound_stmts.rst:473 msgid "with statement" msgstr "with statement(with 陳述式)" -#: ../../reference/compound_stmts.rst:471 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:473 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid ", (comma)" msgstr ", (逗號)" -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:590 msgid "match" msgstr "match" -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:590 msgid "case" msgstr "case" -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:590 msgid "pattern matching" msgstr "pattern matching(模式匹配)" -#: ../../reference/compound_stmts.rst:588 +#: ../../reference/compound_stmts.rst:590 msgid "match statement" msgstr "match statement(匹配陳述式)" -#: ../../reference/compound_stmts.rst:692 +#: ../../reference/compound_stmts.rst:694 msgid "guard" msgstr "guard" -#: ../../reference/compound_stmts.rst:731 +#: ../../reference/compound_stmts.rst:733 msgid "irrefutable case block" msgstr "" -#: ../../reference/compound_stmts.rst:731 +#: ../../reference/compound_stmts.rst:733 msgid "case block" msgstr "" -#: ../../reference/compound_stmts.rst:755 +#: ../../reference/compound_stmts.rst:757 msgid "! patterns" msgstr "" -#: ../../reference/compound_stmts.rst:755 +#: ../../reference/compound_stmts.rst:757 msgid "AS pattern, OR pattern, capture pattern, wildcard pattern" msgstr "" -#: ../../reference/compound_stmts.rst:1186 -#: ../../reference/compound_stmts.rst:1275 +#: ../../reference/compound_stmts.rst:1188 +#: ../../reference/compound_stmts.rst:1277 msgid "parameter" msgstr "parameter(參數)" -#: ../../reference/compound_stmts.rst:1186 -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1239 -#: ../../reference/compound_stmts.rst:1275 -#: ../../reference/compound_stmts.rst:1304 +#: ../../reference/compound_stmts.rst:1188 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1241 +#: ../../reference/compound_stmts.rst:1277 +#: ../../reference/compound_stmts.rst:1306 msgid "function definition" msgstr "function definition(函式定義)" -#: ../../reference/compound_stmts.rst:1195 +#: ../../reference/compound_stmts.rst:1197 msgid "def" msgstr "def" -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1325 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1327 msgid "function" msgstr "function (函式)" -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "definition" msgstr "definition(定義)" -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "name" msgstr "name(名稱)" -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "binding" msgstr "binding(綁定)" -#: ../../reference/compound_stmts.rst:1195 +#: ../../reference/compound_stmts.rst:1197 msgid "user-defined function" msgstr "user-defined function(使用者定義函式)" -#: ../../reference/compound_stmts.rst:1195 -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1197 +#: ../../reference/compound_stmts.rst:1391 msgid "() (parentheses)" msgstr "() (圓括號)" -#: ../../reference/compound_stmts.rst:1195 +#: ../../reference/compound_stmts.rst:1197 msgid "parameter list" msgstr "parameter list(參數列表)" -#: ../../reference/compound_stmts.rst:1239 -#: ../../reference/compound_stmts.rst:1439 +#: ../../reference/compound_stmts.rst:1241 +#: ../../reference/compound_stmts.rst:1441 msgid "@ (at)" msgstr "@ (在)" -#: ../../reference/compound_stmts.rst:1275 +#: ../../reference/compound_stmts.rst:1277 msgid "default" msgstr "default(預設)" -#: ../../reference/compound_stmts.rst:1275 +#: ../../reference/compound_stmts.rst:1277 msgid "value" msgstr "value(值)" -#: ../../reference/compound_stmts.rst:1275 +#: ../../reference/compound_stmts.rst:1277 msgid "argument" msgstr "argument(引數)" -#: ../../reference/compound_stmts.rst:1275 +#: ../../reference/compound_stmts.rst:1277 msgid "= (equals)" msgstr "= (等號)" -#: ../../reference/compound_stmts.rst:1304 +#: ../../reference/compound_stmts.rst:1306 msgid "/ (slash)" msgstr "/ (斜線)" -#: ../../reference/compound_stmts.rst:1304 +#: ../../reference/compound_stmts.rst:1306 msgid "* (asterisk)" msgstr "* (星號)" -#: ../../reference/compound_stmts.rst:1304 +#: ../../reference/compound_stmts.rst:1306 msgid "**" msgstr "**" -#: ../../reference/compound_stmts.rst:1325 +#: ../../reference/compound_stmts.rst:1327 msgid "annotations" msgstr "annotations(註釋)" -#: ../../reference/compound_stmts.rst:1325 +#: ../../reference/compound_stmts.rst:1327 msgid "->" msgstr "->" -#: ../../reference/compound_stmts.rst:1325 +#: ../../reference/compound_stmts.rst:1327 msgid "function annotations" msgstr "function annotations(函式註釋)" -#: ../../reference/compound_stmts.rst:1348 +#: ../../reference/compound_stmts.rst:1350 msgid "lambda" msgstr "lambda" -#: ../../reference/compound_stmts.rst:1348 +#: ../../reference/compound_stmts.rst:1350 msgid "expression" msgstr "expression(運算式)" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "class" msgstr "class(類別)" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "execution" msgstr "execution(執行)" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "frame" msgstr "frame" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "inheritance" msgstr "inheritance(繼承)" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "docstring" msgstr "docstring(說明字串)" -#: ../../reference/compound_stmts.rst:1389 -#: ../../reference/compound_stmts.rst:1439 +#: ../../reference/compound_stmts.rst:1391 +#: ../../reference/compound_stmts.rst:1441 msgid "class definition" msgstr "class definition(類別定義)" -#: ../../reference/compound_stmts.rst:1389 +#: ../../reference/compound_stmts.rst:1391 msgid "expression list" msgstr "expression list(表達式列表)" -#: ../../reference/compound_stmts.rst:1499 +#: ../../reference/compound_stmts.rst:1501 msgid "async def" msgstr "async def" -#: ../../reference/compound_stmts.rst:1509 +#: ../../reference/compound_stmts.rst:1511 msgid "async" msgstr "async" -#: ../../reference/compound_stmts.rst:1509 +#: ../../reference/compound_stmts.rst:1511 msgid "await" msgstr "await" -#: ../../reference/compound_stmts.rst:1533 +#: ../../reference/compound_stmts.rst:1535 msgid "async for" msgstr "async for" -#: ../../reference/compound_stmts.rst:1578 +#: ../../reference/compound_stmts.rst:1580 msgid "async with" msgstr "async with" -#: ../../reference/compound_stmts.rst:1635 +#: ../../reference/compound_stmts.rst:1637 msgid "type parameters" msgstr "type parameter(型別參數)" diff --git a/reference/datamodel.po b/reference/datamodel.po index 116f7e7b84..3d60bf3cca 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-27 00:16+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2024-09-24 19:03+0900\n" "Last-Translator: Kisaragi Hiu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -66,8 +66,8 @@ msgid "" msgstr "" "一個物件的型別決定了該物件所支援的操作(例如「它有長度嗎?」),也同時定義該" "型別的物件能夠擁有的數值。:func:`type` 函式會回傳一個物件的型別(而該型別本身" -"也是一個物件)。如同它的識別性,一個物件的型別 (:dfn:`type`) 也是不可變的。" -"\\ [#]_" +"也是一個物件)。如同它的識別性,一個物件的型別 (:dfn:`type`) 也是不可變" +"的。\\ [#]_" #: ../../reference/datamodel.rst:50 msgid "" @@ -137,9 +137,9 @@ msgid "" "is garbage-collected, but since garbage collection is not guaranteed to " "happen, such objects also provide an explicit way to release the external " "resource, usually a :meth:`!close` method. Programs are strongly recommended " -"to explicitly close such objects. The :keyword:`try`..." -"\\ :keyword:`finally` statement and the :keyword:`with` statement provide " -"convenient ways to do this." +"to explicitly close such objects. The :keyword:`try`...\\ :keyword:" +"`finally` statement and the :keyword:`with` statement provide convenient " +"ways to do this." msgstr "" "某些物件包含對於「外部」資源的參照,像是開啟的檔案或是視窗。基本上這些資源會" "在物件被回收時釋放,但因為垃圾回收不保證會發生,這種物件也會提供明確釋放外部" @@ -241,10 +241,10 @@ msgid "" "will then try the reflected operation, or some other fallback, depending on " "the operator.) It should not be evaluated in a boolean context." msgstr "" -"這個型別只有一個數值。只有一個物件有這個數值。這個物件由內建名" -"稱 :data:`NotImplemented` 存取。數字方法和 rich comparison 方法應該在沒有為所" -"提供的運算元實作該操作的時候回傳這個數值。(直譯器接下來則會依運算子嘗試反轉" -"的操作或是其他的後備方案。)它不應該在預期布林值的情境中被計算。" +"這個型別只有一個數值。只有一個物件有這個數值。這個物件由內建名稱 :data:" +"`NotImplemented` 存取。數字方法和 rich comparison 方法應該在沒有為所提供的運" +"算元實作該操作的時候回傳這個數值。(直譯器接下來則會依運算子嘗試反轉的操作或" +"是其他的後備方案。)它不應該在預期布林值的情境中被計算。" #: ../../reference/datamodel.rst:172 msgid "See :ref:`implementing-the-arithmetic-operations` for more details." @@ -288,8 +288,8 @@ msgstr "" #: ../../reference/datamodel.rst:204 msgid "" -"The string representations of the numeric classes, computed " -"by :meth:`~object.__repr__` and :meth:`~object.__str__`, have the following " +"The string representations of the numeric classes, computed by :meth:" +"`~object.__repr__` and :meth:`~object.__str__`, have the following " "properties:" msgstr "" @@ -463,9 +463,9 @@ msgid "" "The built-in function :func:`ord` converts a code point from its string form " "to an integer in the range ``0 - 10FFFF``; :func:`chr` converts an integer " "in the range ``0 - 10FFFF`` to the corresponding length ``1`` string " -"object. :meth:`str.encode` can be used to convert a :class:`str` " -"to :class:`bytes` using the given text encoding, and :meth:`bytes.decode` " -"can be used to achieve the opposite." +"object. :meth:`str.encode` can be used to convert a :class:`str` to :class:" +"`bytes` using the given text encoding, and :meth:`bytes.decode` can be used " +"to achieve the opposite." msgstr "" #: ../../reference/datamodel.rst:362 @@ -491,8 +491,8 @@ msgid "" "A bytes object is an immutable array. The items are 8-bit bytes, " "represented by integers in the range 0 <= x < 256. Bytes literals (like " "``b'abc'``) and the built-in :func:`bytes` constructor can be used to create " -"bytes objects. Also, bytes objects can be decoded to strings via " -"the :meth:`~bytes.decode` method." +"bytes objects. Also, bytes objects can be decoded to strings via the :meth:" +"`~bytes.decode` method." msgstr "" #: ../../reference/datamodel.rst:386 @@ -502,8 +502,8 @@ msgstr "可變序列" #: ../../reference/datamodel.rst:395 msgid "" "Mutable sequences can be changed after they are created. The subscription " -"and slicing notations can be used as the target of assignment " -"and :keyword:`del` (delete) statements." +"and slicing notations can be used as the target of assignment and :keyword:" +"`del` (delete) statements." msgstr "" #: ../../reference/datamodel.rst:403 @@ -533,8 +533,8 @@ msgstr "位元組陣列" #: ../../reference/datamodel.rst:418 msgid "" -"A bytearray object is a mutable array. They are created by the built-" -"in :func:`bytearray` constructor. Aside from being mutable (and hence " +"A bytearray object is a mutable array. They are created by the built-in :" +"func:`bytearray` constructor. Aside from being mutable (and hence " "unhashable), byte arrays otherwise provide the same interface and " "functionality as immutable :class:`bytes` objects." msgstr "" @@ -572,8 +572,8 @@ msgstr "Set(集合)" #: ../../reference/datamodel.rst:449 msgid "" "These represent a mutable set. They are created by the built-in :func:`set` " -"constructor and can be modified afterwards by several methods, such " -"as :meth:`~set.add`." +"constructor and can be modified afterwards by several methods, such as :meth:" +"`~set.add`." msgstr "" #: ../../reference/datamodel.rst:454 @@ -582,10 +582,9 @@ msgstr "Frozen set(凍結集合)" #: ../../reference/datamodel.rst:457 msgid "" -"These represent an immutable set. They are created by the built-" -"in :func:`frozenset` constructor. As a frozenset is immutable " -"and :term:`hashable`, it can be used again as an element of another set, or " -"as a dictionary key." +"These represent an immutable set. They are created by the built-in :func:" +"`frozenset` constructor. As a frozenset is immutable and :term:`hashable`, " +"it can be used again as an element of another set, or as a dictionary key." msgstr "" #: ../../reference/datamodel.rst:464 @@ -654,8 +653,8 @@ msgstr "可呼叫型別" #: ../../reference/datamodel.rst:525 msgid "" -"These are the types to which the function call operation (see " -"section :ref:`calls`) can be applied:" +"These are the types to which the function call operation (see section :ref:" +"`calls`) can be applied:" msgstr "" #: ../../reference/datamodel.rst:532 @@ -686,9 +685,9 @@ msgstr "含義" #: ../../reference/datamodel.rst:559 msgid "" -"A reference to the :class:`dictionary ` that holds the " -"function's :ref:`global variables ` -- the global namespace of the " -"module in which the function was defined." +"A reference to the :class:`dictionary ` that holds the function's :ref:" +"`global variables ` -- the global namespace of the module in which " +"the function was defined." msgstr "" #: ../../reference/datamodel.rst:564 @@ -718,8 +717,8 @@ msgstr "函式的文件字串,若不可用則為 ``None``。" #: ../../reference/datamodel.rst:597 msgid "" -"The function's name. See also: :attr:`__name__ attributes " -"`." +"The function's name. See also: :attr:`__name__ attributes `." msgstr "" #: ../../reference/datamodel.rst:601 @@ -749,28 +748,28 @@ msgstr "代表編譯函式主體的\\ :ref:`程式碼物件 `。" #: ../../reference/datamodel.rst:620 msgid "" -"The namespace supporting arbitrary function attributes. See " -"also: :attr:`__dict__ attributes `." +"The namespace supporting arbitrary function attributes. See also: :attr:" +"`__dict__ attributes `." msgstr "" #: ../../reference/datamodel.rst:624 msgid "" "A :class:`dictionary ` containing annotations of :term:`parameters " "`. The keys of the dictionary are the parameter names, and " -"``'return'`` for the return annotation, if provided. See " -"also: :ref:`annotations-howto`." +"``'return'`` for the return annotation, if provided. See also: :ref:" +"`annotations-howto`." msgstr "" #: ../../reference/datamodel.rst:631 msgid "" -"A :class:`dictionary ` containing defaults for keyword-" -"only :term:`parameters `." +"A :class:`dictionary ` containing defaults for keyword-only :term:" +"`parameters `." msgstr "" #: ../../reference/datamodel.rst:635 msgid "" -"A :class:`tuple` containing the :ref:`type parameters ` of " -"a :ref:`generic function `." +"A :class:`tuple` containing the :ref:`type parameters ` of a :" +"ref:`generic function `." msgstr "" #: ../../reference/datamodel.rst:640 @@ -790,8 +789,8 @@ msgstr "" #: ../../reference/datamodel.rst:651 msgid "" "Additional information about a function's definition can be retrieved from " -"its :ref:`code object ` (accessible via " -"the :attr:`~function.__code__` attribute)." +"its :ref:`code object ` (accessible via the :attr:`~function." +"__code__` attribute)." msgstr "" #: ../../reference/datamodel.rst:659 @@ -820,15 +819,15 @@ msgstr "" #: ../../reference/datamodel.rst:688 msgid "" -"The method's documentation (same as :attr:`method.__func__.__doc__ " -"`). A :class:`string ` if the original function had a " +"The method's documentation (same as :attr:`method.__func__.__doc__ `). A :class:`string ` if the original function had a " "docstring, else ``None``." msgstr "" #: ../../reference/datamodel.rst:694 msgid "" -"The name of the method (same as :attr:`method.__func__.__name__ " -"`)" +"The name of the method (same as :attr:`method.__func__.__name__ `)" msgstr "" #: ../../reference/datamodel.rst:698 @@ -846,44 +845,43 @@ msgstr "" msgid "" "User-defined method objects may be created when getting an attribute of a " "class (perhaps via an instance of that class), if that attribute is a user-" -"defined :ref:`function object ` or " -"a :class:`classmethod` object." +"defined :ref:`function object ` or a :class:" +"`classmethod` object." msgstr "" #: ../../reference/datamodel.rst:711 msgid "" -"When an instance method object is created by retrieving a user-" -"defined :ref:`function object ` from a class via one of " -"its instances, its :attr:`~method.__self__` attribute is the instance, and " -"the method object is said to be *bound*. The new " -"method's :attr:`~method.__func__` attribute is the original function object." +"When an instance method object is created by retrieving a user-defined :ref:" +"`function object ` from a class via one of its " +"instances, its :attr:`~method.__self__` attribute is the instance, and the " +"method object is said to be *bound*. The new method's :attr:`~method." +"__func__` attribute is the original function object." msgstr "" #: ../../reference/datamodel.rst:717 msgid "" -"When an instance method object is created by retrieving " -"a :class:`classmethod` object from a class or instance, " -"its :attr:`~method.__self__` attribute is the class itself, and " -"its :attr:`~method.__func__` attribute is the function object underlying the " -"class method." +"When an instance method object is created by retrieving a :class:" +"`classmethod` object from a class or instance, its :attr:`~method.__self__` " +"attribute is the class itself, and its :attr:`~method.__func__` attribute is " +"the function object underlying the class method." msgstr "" #: ../../reference/datamodel.rst:722 msgid "" -"When an instance method object is called, the underlying function " -"(:attr:`~method.__func__`) is called, inserting the class instance " -"(:attr:`~method.__self__`) in front of the argument list. For instance, " -"when :class:`!C` is a class which contains a definition for a " -"function :meth:`!f`, and ``x`` is an instance of :class:`!C`, calling " -"``x.f(1)`` is equivalent to calling ``C.f(x, 1)``." +"When an instance method object is called, the underlying function (:attr:" +"`~method.__func__`) is called, inserting the class instance (:attr:`~method." +"__self__`) in front of the argument list. For instance, when :class:`!C` is " +"a class which contains a definition for a function :meth:`!f`, and ``x`` is " +"an instance of :class:`!C`, calling ``x.f(1)`` is equivalent to calling ``C." +"f(x, 1)``." msgstr "" #: ../../reference/datamodel.rst:729 msgid "" "When an instance method object is derived from a :class:`classmethod` " "object, the \"class instance\" stored in :attr:`~method.__self__` will " -"actually be the class itself, so that calling either ``x.f(1)`` or " -"``C.f(1)`` is equivalent to calling ``f(C,1)`` where ``f`` is the underlying " +"actually be the class itself, so that calling either ``x.f(1)`` or ``C." +"f(1)`` is equivalent to calling ``f(C,1)`` where ``f`` is the underlying " "function." msgstr "" @@ -900,15 +898,15 @@ msgstr "產生器函式" #: ../../reference/datamodel.rst:747 msgid "" -"A function or method which uses the :keyword:`yield` statement (see " -"section :ref:`yield`) is called a :dfn:`generator function`. Such a " -"function, when called, always returns an :term:`iterator` object which can " -"be used to execute the body of the function: calling the " -"iterator's :meth:`iterator.__next__` method will cause the function to " -"execute until it provides a value using the :keyword:`!yield` statement. " -"When the function executes a :keyword:`return` statement or falls off the " -"end, a :exc:`StopIteration` exception is raised and the iterator will have " -"reached the end of the set of values to be returned." +"A function or method which uses the :keyword:`yield` statement (see section :" +"ref:`yield`) is called a :dfn:`generator function`. Such a function, when " +"called, always returns an :term:`iterator` object which can be used to " +"execute the body of the function: calling the iterator's :meth:`iterator." +"__next__` method will cause the function to execute until it provides a " +"value using the :keyword:`!yield` statement. When the function executes a :" +"keyword:`return` statement or falls off the end, a :exc:`StopIteration` " +"exception is raised and the iterator will have reached the end of the set of " +"values to be returned." msgstr "" #: ../../reference/datamodel.rst:759 @@ -918,10 +916,10 @@ msgstr "Coroutine(協程)函式" #: ../../reference/datamodel.rst:764 msgid "" "A function or method which is defined using :keyword:`async def` is called " -"a :dfn:`coroutine function`. Such a function, when called, returns " -"a :term:`coroutine` object. It may contain :keyword:`await` expressions, as " -"well as :keyword:`async with` and :keyword:`async for` statements. See also " -"the :ref:`coroutine-objects` section." +"a :dfn:`coroutine function`. Such a function, when called, returns a :term:" +"`coroutine` object. It may contain :keyword:`await` expressions, as well " +"as :keyword:`async with` and :keyword:`async for` statements. See also the :" +"ref:`coroutine-objects` section." msgstr "" #: ../../reference/datamodel.rst:772 @@ -939,13 +937,13 @@ msgstr "" #: ../../reference/datamodel.rst:784 msgid "" -"Calling the asynchronous iterator's :meth:`aiterator.__anext__ " -"` method will return an :term:`awaitable` which when " -"awaited will execute until it provides a value using the :keyword:`yield` " -"expression. When the function executes an empty :keyword:`return` statement " -"or falls off the end, a :exc:`StopAsyncIteration` exception is raised and " -"the asynchronous iterator will have reached the end of the set of values to " -"be yielded." +"Calling the asynchronous iterator's :meth:`aiterator.__anext__ ` method will return an :term:`awaitable` which when awaited will " +"execute until it provides a value using the :keyword:`yield` expression. " +"When the function executes an empty :keyword:`return` statement or falls off " +"the end, a :exc:`StopAsyncIteration` exception is raised and the " +"asynchronous iterator will have reached the end of the set of values to be " +"yielded." msgstr "" #: ../../reference/datamodel.rst:797 @@ -959,17 +957,17 @@ msgid "" "standard built-in module). The number and type of the arguments are " "determined by the C function. Special read-only attributes:" msgstr "" -"一個內建函式物件是一個 C 函式的 wrapper。內建函式的範例有 :func:`len` " -"和 :func:`math.sin`\\ (\\ :mod:`math` 是一個標準的內建模組)。內建函式的引數" -"數量與其型別由其包裝的 C 函式所決定。特殊唯讀屬性:" +"一個內建函式物件是一個 C 函式的 wrapper。內建函式的範例有 :func:`len` 和 :" +"func:`math.sin`\\ (\\ :mod:`math` 是一個標準的內建模組)。內建函式的引數數量" +"與其型別由其包裝的 C 函式所決定。特殊唯讀屬性:" #: ../../reference/datamodel.rst:809 msgid "" ":attr:`!__doc__` is the function's documentation string, or ``None`` if " "unavailable. See :attr:`function.__doc__`." msgstr "" -":attr:`!__doc__` 是函式的文件字串,若不可用則為 ``None``。請" -"見 :attr:`function.__doc__`。" +":attr:`!__doc__` 是函式的文件字串,若不可用則為 ``None``。請見 :attr:" +"`function.__doc__`。" #: ../../reference/datamodel.rst:811 msgid "" @@ -995,10 +993,10 @@ msgid "" "This is really a different disguise of a built-in function, this time " "containing an object passed to the C function as an implicit extra " "argument. An example of a built-in method is ``alist.append()``, assuming " -"*alist* is a list object. In this case, the special read-only " -"attribute :attr:`!__self__` is set to the object denoted by *alist*. (The " -"attribute has the same semantics as it does with :attr:`other instance " -"methods `.)" +"*alist* is a list object. In this case, the special read-only attribute :" +"attr:`!__self__` is set to the object denoted by *alist*. (The attribute has " +"the same semantics as it does with :attr:`other instance methods `.)" msgstr "" #: ../../reference/datamodel.rst:838 @@ -1009,8 +1007,8 @@ msgstr "" msgid "" "Classes are callable. These objects normally act as factories for new " "instances of themselves, but variations are possible for class types that " -"override :meth:`~object.__new__`. The arguments of the call are passed " -"to :meth:`!__new__` and, in the typical case, to :meth:`~object.__init__` to " +"override :meth:`~object.__new__`. The arguments of the call are passed to :" +"meth:`!__new__` and, in the typical case, to :meth:`~object.__init__` to " "initialize the new instance." msgstr "" @@ -1020,8 +1018,8 @@ msgstr "類別實例" #: ../../reference/datamodel.rst:850 msgid "" -"Instances of arbitrary classes can be made callable by defining " -"a :meth:`~object.__call__` method in their class." +"Instances of arbitrary classes can be made callable by defining a :meth:" +"`~object.__call__` method in their class." msgstr "" #: ../../reference/datamodel.rst:857 @@ -1031,16 +1029,16 @@ msgstr "模組" #: ../../reference/datamodel.rst:863 msgid "" "Modules are a basic organizational unit of Python code, and are created by " -"the :ref:`import system ` as invoked either by " -"the :keyword:`import` statement, or by calling functions such " -"as :func:`importlib.import_module` and built-in :func:`__import__`. A " -"module object has a namespace implemented by a :class:`dictionary ` " -"object (this is the dictionary referenced by " -"the :attr:`~function.__globals__` attribute of functions defined in the " -"module). Attribute references are translated to lookups in this dictionary, " -"e.g., ``m.x`` is equivalent to ``m.__dict__[\"x\"]``. A module object does " -"not contain the code object used to initialize the module (since it isn't " -"needed once the initialization is done)." +"the :ref:`import system ` as invoked either by the :keyword:" +"`import` statement, or by calling functions such as :func:`importlib." +"import_module` and built-in :func:`__import__`. A module object has a " +"namespace implemented by a :class:`dictionary ` object (this is the " +"dictionary referenced by the :attr:`~function.__globals__` attribute of " +"functions defined in the module). Attribute references are translated to " +"lookups in this dictionary, e.g., ``m.x`` is equivalent to ``m." +"__dict__[\"x\"]``. A module object does not contain the code object used to " +"initialize the module (since it isn't needed once the initialization is " +"done)." msgstr "" #: ../../reference/datamodel.rst:876 @@ -1104,8 +1102,8 @@ msgstr "" #: ../../reference/datamodel.rst:935 msgid "" "This attribute must be set to the fully qualified name of the module. It is " -"expected to match the value of :attr:`module.__spec__.name " -"`." +"expected to match the value of :attr:`module.__spec__.name `." msgstr "" #: ../../reference/datamodel.rst:941 @@ -1126,9 +1124,9 @@ msgstr "" msgid "" "If the module is top-level (that is, not a part of any specific package) " "then the attribute should be set to ``''`` (the empty string). Otherwise, it " -"should be set to the name of the module's package (which can be equal " -"to :attr:`module.__name__` if the module itself is a package). " -"See :pep:`366` for further details." +"should be set to the name of the module's package (which can be equal to :" +"attr:`module.__name__` if the module itself is a package). See :pep:`366` " +"for further details." msgstr "" #: ../../reference/datamodel.rst:958 @@ -1143,9 +1141,9 @@ msgstr "" #: ../../reference/datamodel.rst:964 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.parent " -"` instead of :attr:`!" -"module.__package__`. :attr:`__package__` is now only used as a fallback " -"if :attr:`!__spec__.parent` is not set, and this fallback path is deprecated." +"` instead of :attr:`!module." +"__package__`. :attr:`__package__` is now only used as a fallback if :attr:`!" +"__spec__.parent` is not set, and this fallback path is deprecated." msgstr "" #: ../../reference/datamodel.rst:970 ../../reference/datamodel.rst:1011 @@ -1157,18 +1155,17 @@ msgstr "" #: ../../reference/datamodel.rst:975 msgid "" -"The value of :attr:`!__package__` is expected to be the same " -"as :attr:`__spec__.parent " -"`. :attr:`__package__` is now only " -"used as a fallback during import resolution if :attr:`!__spec__.parent` is " -"not defined." +"The value of :attr:`!__package__` is expected to be the same as :attr:" +"`__spec__.parent `. :attr:" +"`__package__` is now only used as a fallback during import resolution if :" +"attr:`!__spec__.parent` is not defined." msgstr "" #: ../../reference/datamodel.rst:981 msgid "" ":exc:`ImportWarning` is raised if an import resolution falls back to :attr:`!" -"__package__` instead of :attr:`__spec__.parent " -"`." +"__package__` instead of :attr:`__spec__.parent `." msgstr "" #: ../../reference/datamodel.rst:986 @@ -1198,16 +1195,16 @@ msgstr "" #: ../../reference/datamodel.rst:1002 msgid "" ":attr:`!__loader__` defaults to ``None`` for modules created dynamically " -"using the :class:`types.ModuleType` constructor; " -"use :func:`importlib.util.module_from_spec` instead to ensure the attribute " -"is set to a :term:`loader` object." +"using the :class:`types.ModuleType` constructor; use :func:`importlib.util." +"module_from_spec` instead to ensure the attribute is set to a :term:`loader` " +"object." msgstr "" #: ../../reference/datamodel.rst:1007 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.loader " -"` instead of :attr:`!" -"module.__loader__`." +"` instead of :attr:`!module." +"__loader__`." msgstr "" #: ../../reference/datamodel.rst:1016 @@ -1231,10 +1228,9 @@ msgstr "" #: ../../reference/datamodel.rst:1029 msgid "" -"It is **strongly** recommended that you " -"use :attr:`module.__spec__.submodule_search_locations " -"` instead " -"of :attr:`!module.__path__`." +"It is **strongly** recommended that you use :attr:`module.__spec__." +"submodule_search_locations ` instead of :attr:`!module.__path__`." msgstr "" #: ../../reference/datamodel.rst:1036 @@ -1267,18 +1263,18 @@ msgstr "" #: ../../reference/datamodel.rst:1054 msgid "" "Note that :attr:`!__cached__` may be set even if :attr:`!__file__` is not " -"set. However, that scenario is quite atypical. Ultimately, " -"the :term:`loader` is what makes use of the module spec provided by " -"the :term:`finder` (from which :attr:`!__file__` and :attr:`!__cached__` are " -"derived). So if a loader can load from a cached module but otherwise does " -"not load from a file, that atypical scenario may be appropriate." +"set. However, that scenario is quite atypical. Ultimately, the :term:" +"`loader` is what makes use of the module spec provided by the :term:`finder` " +"(from which :attr:`!__file__` and :attr:`!__cached__` are derived). So if a " +"loader can load from a cached module but otherwise does not load from a " +"file, that atypical scenario may be appropriate." msgstr "" #: ../../reference/datamodel.rst:1061 msgid "" "It is **strongly** recommended that you use :attr:`module.__spec__.cached " -"` instead of :attr:`!" -"module.__cached__`." +"` instead of :attr:`!module." +"__cached__`." msgstr "" #: ../../reference/datamodel.rst:1065 @@ -1301,8 +1297,8 @@ msgstr "" #: ../../reference/datamodel.rst:1079 msgid "" -"The module's documentation string, or ``None`` if unavailable. See " -"also: :attr:`__doc__ attributes `." +"The module's documentation string, or ``None`` if unavailable. See also: :" +"attr:`__doc__ attributes `." msgstr "" "模組的文件字串,若不可用則為 ``None``。請見 :attr:`__doc__ attributes " "`。" @@ -1310,8 +1306,8 @@ msgstr "" #: ../../reference/datamodel.rst:1084 msgid "" "A dictionary containing :term:`variable annotations ` " -"collected during module body execution. For best practices on working " -"with :attr:`__annotations__`, please see :ref:`annotations-howto`." +"collected during module body execution. For best practices on working with :" +"attr:`__annotations__`, please see :ref:`annotations-howto`." msgstr "" #: ../../reference/datamodel.rst:1090 @@ -1343,25 +1339,25 @@ msgstr "" #: ../../reference/datamodel.rst:1114 msgid "" -"Custom class types are typically created by class definitions (see " -"section :ref:`class`). A class has a namespace implemented by a dictionary " -"object. Class attribute references are translated to lookups in this " -"dictionary, e.g., ``C.x`` is translated to ``C.__dict__[\"x\"]`` (although " -"there are a number of hooks which allow for other means of locating " -"attributes). When the attribute name is not found there, the attribute " -"search continues in the base classes. This search of the base classes uses " -"the C3 method resolution order which behaves correctly even in the presence " -"of 'diamond' inheritance structures where there are multiple inheritance " -"paths leading back to a common ancestor. Additional details on the C3 MRO " -"used by Python can be found at :ref:`python_2.3_mro`." +"Custom class types are typically created by class definitions (see section :" +"ref:`class`). A class has a namespace implemented by a dictionary object. " +"Class attribute references are translated to lookups in this dictionary, e." +"g., ``C.x`` is translated to ``C.__dict__[\"x\"]`` (although there are a " +"number of hooks which allow for other means of locating attributes). When " +"the attribute name is not found there, the attribute search continues in the " +"base classes. This search of the base classes uses the C3 method resolution " +"order which behaves correctly even in the presence of 'diamond' inheritance " +"structures where there are multiple inheritance paths leading back to a " +"common ancestor. Additional details on the C3 MRO used by Python can be " +"found at :ref:`python_2.3_mro`." msgstr "" #: ../../reference/datamodel.rst:1135 msgid "" "When a class attribute reference (for class :class:`!C`, say) would yield a " -"class method object, it is transformed into an instance method object " -"whose :attr:`~method.__self__` attribute is :class:`!C`. When it would yield " -"a :class:`staticmethod` object, it is transformed into the object wrapped by " +"class method object, it is transformed into an instance method object whose :" +"attr:`~method.__self__` attribute is :class:`!C`. When it would yield a :" +"class:`staticmethod` object, it is transformed into the object wrapped by " "the static method object. See section :ref:`descriptors` for another way in " "which attributes retrieved from a class may differ from those actually " "contained in its :attr:`~object.__dict__`." @@ -1385,8 +1381,8 @@ msgstr "特殊屬性" #: ../../reference/datamodel.rst:1174 msgid "" -"The class's name. See also: :attr:`__name__ attributes " -"`." +"The class's name. See also: :attr:`__name__ attributes `." msgstr "" #: ../../reference/datamodel.rst:1178 @@ -1402,8 +1398,8 @@ msgstr "" #: ../../reference/datamodel.rst:1185 msgid "" "A :class:`mapping proxy ` providing a read-only view " -"of the class's namespace. See also: :attr:`__dict__ attributes " -"`." +"of the class's namespace. See also: :attr:`__dict__ attributes `." msgstr "" #: ../../reference/datamodel.rst:1190 @@ -1422,22 +1418,22 @@ msgstr "" #: ../../reference/datamodel.rst:1199 msgid "" "A dictionary containing :term:`variable annotations ` " -"collected during class body execution. For best practices on working " -"with :attr:`!__annotations__`, please see :ref:`annotations-howto`." +"collected during class body execution. For best practices on working with :" +"attr:`!__annotations__`, please see :ref:`annotations-howto`." msgstr "" #: ../../reference/datamodel.rst:1206 msgid "" "Accessing the :attr:`!__annotations__` attribute of a class object directly " "may yield incorrect results in the presence of metaclasses. In addition, the " -"attribute may not exist for some classes. " -"Use :func:`inspect.get_annotations` to retrieve class annotations safely." +"attribute may not exist for some classes. Use :func:`inspect." +"get_annotations` to retrieve class annotations safely." msgstr "" #: ../../reference/datamodel.rst:1213 msgid "" -"A :class:`tuple` containing the :ref:`type parameters ` of " -"a :ref:`generic class `." +"A :class:`tuple` containing the :ref:`type parameters ` of a :" +"ref:`generic class `." msgstr "" #: ../../reference/datamodel.rst:1219 @@ -1512,16 +1508,16 @@ msgid "" "\"Classes\". See section :ref:`descriptors` for another way in which " "attributes of a class retrieved via its instances may differ from the " "objects actually stored in the class's :attr:`~object.__dict__`. If no " -"class attribute is found, and the object's class has " -"a :meth:`~object.__getattr__` method, that is called to satisfy the lookup." +"class attribute is found, and the object's class has a :meth:`~object." +"__getattr__` method, that is called to satisfy the lookup." msgstr "" #: ../../reference/datamodel.rst:1287 msgid "" "Attribute assignments and deletions update the instance's dictionary, never " -"a class's dictionary. If the class has a :meth:`~object.__setattr__` " -"or :meth:`~object.__delattr__` method, this is called instead of updating " -"the instance dictionary directly." +"a class's dictionary. If the class has a :meth:`~object.__setattr__` or :" +"meth:`~object.__delattr__` method, this is called instead of updating the " +"instance dictionary directly." msgstr "" #: ../../reference/datamodel.rst:1297 @@ -1549,9 +1545,9 @@ msgstr "" msgid "" "A :term:`file object` represents an open file. Various shortcuts are " "available to create file objects: the :func:`open` built-in function, and " -"also :func:`os.popen`, :func:`os.fdopen`, and " -"the :meth:`~socket.socket.makefile` method of socket objects (and perhaps by " -"other functions or methods provided by extension modules)." +"also :func:`os.popen`, :func:`os.fdopen`, and the :meth:`~socket.socket." +"makefile` method of socket objects (and perhaps by other functions or " +"methods provided by extension modules)." msgstr "" #: ../../reference/datamodel.rst:1340 @@ -1579,15 +1575,14 @@ msgstr "程式碼物件" #: ../../reference/datamodel.rst:1366 msgid "" -"Code objects represent *byte-compiled* executable Python code, " -"or :term:`bytecode`. The difference between a code object and a function " -"object is that the function object contains an explicit reference to the " -"function's globals (the module in which it was defined), while a code object " -"contains no context; also the default argument values are stored in the " -"function object, not in the code object (because they represent values " -"calculated at run-time). Unlike function objects, code objects are " -"immutable and contain no references (directly or indirectly) to mutable " -"objects." +"Code objects represent *byte-compiled* executable Python code, or :term:" +"`bytecode`. The difference between a code object and a function object is " +"that the function object contains an explicit reference to the function's " +"globals (the module in which it was defined), while a code object contains " +"no context; also the default argument values are stored in the function " +"object, not in the code object (because they represent values calculated at " +"run-time). Unlike function objects, code objects are immutable and contain " +"no references (directly or indirectly) to mutable objects." msgstr "" #: ../../reference/datamodel.rst:1400 @@ -1700,17 +1695,17 @@ msgid "" "``0x04`` is set if the function uses the ``*arguments`` syntax to accept an " "arbitrary number of positional arguments; bit ``0x08`` is set if the " "function uses the ``**keywords`` syntax to accept arbitrary keyword " -"arguments; bit ``0x20`` is set if the function is a generator. " -"See :ref:`inspect-module-co-flags` for details on the semantics of each " -"flags that might be present." +"arguments; bit ``0x20`` is set if the function is a generator. See :ref:" +"`inspect-module-co-flags` for details on the semantics of each flags that " +"might be present." msgstr "" #: ../../reference/datamodel.rst:1482 msgid "" "Future feature declarations (for example, ``from __future__ import " "division``) also use bits in :attr:`~codeobject.co_flags` to indicate " -"whether a code object was compiled with a particular feature enabled. " -"See :attr:`~__future__._Feature.compiler_flag`." +"whether a code object was compiled with a particular feature enabled. See :" +"attr:`~__future__._Feature.compiler_flag`." msgstr "" #: ../../reference/datamodel.rst:1486 @@ -1720,9 +1715,9 @@ msgstr "" #: ../../reference/datamodel.rst:1490 msgid "" -"If a code object represents a function, the first item " -"in :attr:`~codeobject.co_consts` is the documentation string of the " -"function, or ``None`` if undefined." +"If a code object represents a function, the first item in :attr:`~codeobject." +"co_consts` is the documentation string of the function, or ``None`` if " +"undefined." msgstr "" #: ../../reference/datamodel.rst:1495 @@ -1785,9 +1780,9 @@ msgstr "" #: ../../reference/datamodel.rst:1532 msgid "" -"Returns an iterator that yields information about successive ranges " -"of :term:`bytecode`\\s. Each item yielded is a ``(start, end, " -"lineno)`` :class:`tuple`:" +"Returns an iterator that yields information about successive ranges of :term:" +"`bytecode`\\s. Each item yielded is a ``(start, end, lineno)`` :class:" +"`tuple`:" msgstr "" #: ../../reference/datamodel.rst:1536 @@ -1804,9 +1799,9 @@ msgstr "" #: ../../reference/datamodel.rst:1540 msgid "" -"``lineno`` is an :class:`int` representing the line number of " -"the :term:`bytecode` range, or ``None`` if the bytecodes in the given range " -"have no line number" +"``lineno`` is an :class:`int` representing the line number of the :term:" +"`bytecode` range, or ``None`` if the bytecodes in the given range have no " +"line number" msgstr "" #: ../../reference/datamodel.rst:1544 @@ -1830,8 +1825,8 @@ msgstr "" #: ../../reference/datamodel.rst:1551 msgid "" -"The last :class:`tuple` yielded will have ``end`` equal to the size of " -"the :term:`bytecode`." +"The last :class:`tuple` yielded will have ``end`` equal to the size of the :" +"term:`bytecode`." msgstr "" #: ../../reference/datamodel.rst:1554 @@ -1879,8 +1874,8 @@ msgstr "" #: ../../reference/datamodel.rst:1603 msgid "" "The :ref:`code object ` being executed in this frame. " -"Accessing this attribute raises an :ref:`auditing event ` " -"``object.__getattr__`` with arguments ``obj`` and ``\"f_code\"``." +"Accessing this attribute raises an :ref:`auditing event ` ``object." +"__getattr__`` with arguments ``obj`` and ``\"f_code\"``." msgstr "" "在這個 frame 中執行的\\ :ref:`程式碼物件 (code object) `。存取" "這個屬性會引發一個附帶引數 ``obj`` 與 ``\"f_code\"`` 的\\ :ref:`稽核事件 " @@ -1910,8 +1905,8 @@ msgstr "" #: ../../reference/datamodel.rst:1625 msgid "" -"The \"precise instruction\" of the frame object (this is an index into " -"the :term:`bytecode` string of the :ref:`code object `)" +"The \"precise instruction\" of the frame object (this is an index into the :" +"term:`bytecode` string of the :ref:`code object `)" msgstr "" #: ../../reference/datamodel.rst:1641 @@ -1991,18 +1986,18 @@ msgid "" "For implicitly created tracebacks, when the search for an exception handler " "unwinds the execution stack, at each unwound level a traceback object is " "inserted in front of the current traceback. When an exception handler is " -"entered, the stack trace is made available to the program. (See " -"section :ref:`try`.) It is accessible as the third item of the tuple " -"returned by :func:`sys.exc_info`, and as " -"the :attr:`~BaseException.__traceback__` attribute of the caught exception." +"entered, the stack trace is made available to the program. (See section :ref:" +"`try`.) It is accessible as the third item of the tuple returned by :func:" +"`sys.exc_info`, and as the :attr:`~BaseException.__traceback__` attribute of " +"the caught exception." msgstr "" #: ../../reference/datamodel.rst:1717 msgid "" "When the program contains no suitable handler, the stack trace is written " "(nicely formatted) to the standard error stream; if the interpreter is " -"interactive, it is also made available to the user " -"as :data:`sys.last_traceback`." +"interactive, it is also made available to the user as :data:`sys." +"last_traceback`." msgstr "" #: ../../reference/datamodel.rst:1722 @@ -2019,8 +2014,8 @@ msgstr "" #: ../../reference/datamodel.rst:1740 msgid "" -"Accessing this attribute raises an :ref:`auditing event ` " -"``object.__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." +"Accessing this attribute raises an :ref:`auditing event ` ``object." +"__getattr__`` with arguments ``obj`` and ``\"tb_frame\"``." msgstr "" "存取此屬性會引發一個附帶引數 ``obj`` 與 ``\"tb_frame\"`` 的\\ :ref:`稽核事件 " "` ``object.__getattr__``。" @@ -2064,9 +2059,9 @@ msgstr "" #: ../../reference/datamodel.rst:1783 msgid "" -"Special read-only attributes: :attr:`~slice.start` is the lower " -"bound; :attr:`~slice.stop` is the upper bound; :attr:`~slice.step` is the " -"step value; each is ``None`` if omitted. These attributes can have any type." +"Special read-only attributes: :attr:`~slice.start` is the lower bound; :attr:" +"`~slice.stop` is the upper bound; :attr:`~slice.step` is the step value; " +"each is ``None`` if omitted. These attributes can have any type." msgstr "" #: ../../reference/datamodel.rst:1787 @@ -2108,8 +2103,8 @@ msgid "" "another object that alters the way in which that object is retrieved from " "classes and class instances. The behaviour of class method objects upon such " "retrieval is described above, under :ref:`\"instance methods\" `. Class method objects are created by the built-" -"in :func:`classmethod` constructor." +"methods>`. Class method objects are created by the built-in :func:" +"`classmethod` constructor." msgstr "" #: ../../reference/datamodel.rst:1824 @@ -2122,21 +2117,21 @@ msgid "" "(such as arithmetic operations or subscripting and slicing) by defining " "methods with special names. This is Python's approach to :dfn:`operator " "overloading`, allowing classes to define their own behavior with respect to " -"language operators. For instance, if a class defines a method " -"named :meth:`~object.__getitem__`, and ``x`` is an instance of this class, " -"then ``x[i]`` is roughly equivalent to ``type(x).__getitem__(x, i)``. " -"Except where mentioned, attempts to execute an operation raise an exception " -"when no appropriate method is defined (typically :exc:`AttributeError` " -"or :exc:`TypeError`)." +"language operators. For instance, if a class defines a method named :meth:" +"`~object.__getitem__`, and ``x`` is an instance of this class, then ``x[i]`` " +"is roughly equivalent to ``type(x).__getitem__(x, i)``. Except where " +"mentioned, attempts to execute an operation raise an exception when no " +"appropriate method is defined (typically :exc:`AttributeError` or :exc:" +"`TypeError`)." msgstr "" #: ../../reference/datamodel.rst:1841 msgid "" "Setting a special method to ``None`` indicates that the corresponding " -"operation is not available. For example, if a class " -"sets :meth:`~object.__iter__` to ``None``, the class is not iterable, so " -"calling :func:`iter` on its instances will raise a :exc:`TypeError` (without " -"falling back to :meth:`~object.__getitem__`). [#]_" +"operation is not available. For example, if a class sets :meth:`~object." +"__iter__` to ``None``, the class is not iterable, so calling :func:`iter` on " +"its instances will raise a :exc:`TypeError` (without falling back to :meth:" +"`~object.__getitem__`). [#]_" msgstr "" #: ../../reference/datamodel.rst:1847 @@ -2215,10 +2210,10 @@ msgstr "" #: ../../reference/datamodel.rst:1913 msgid "" "Called when the instance is about to be destroyed. This is also called a " -"finalizer or (improperly) a destructor. If a base class has " -"a :meth:`__del__` method, the derived class's :meth:`__del__` method, if " -"any, must explicitly call it to ensure proper deletion of the base class " -"part of the instance." +"finalizer or (improperly) a destructor. If a base class has a :meth:" +"`__del__` method, the derived class's :meth:`__del__` method, if any, must " +"explicitly call it to ensure proper deletion of the base class part of the " +"instance." msgstr "" #: ../../reference/datamodel.rst:1919 @@ -2273,8 +2268,8 @@ msgid "" ":meth:`__del__` can be invoked when arbitrary code is being executed, " "including from any arbitrary thread. If :meth:`__del__` needs to take a " "lock or invoke any other blocking resource, it may deadlock as the resource " -"may already be taken by the code that gets interrupted to " -"execute :meth:`__del__`." +"may already be taken by the code that gets interrupted to execute :meth:" +"`__del__`." msgstr "" #: ../../reference/datamodel.rst:1962 @@ -2295,10 +2290,9 @@ msgid "" "like a valid Python expression that could be used to recreate an object with " "the same value (given an appropriate environment). If this is not possible, " "a string of the form ``<...some useful description...>`` should be returned. " -"The return value must be a string object. If a class " -"defines :meth:`__repr__` but not :meth:`__str__`, then :meth:`__repr__` is " -"also used when an \"informal\" string representation of instances of that " -"class is required." +"The return value must be a string object. If a class defines :meth:" +"`__repr__` but not :meth:`__str__`, then :meth:`__repr__` is also used when " +"an \"informal\" string representation of instances of that class is required." msgstr "" #: ../../reference/datamodel.rst:1986 @@ -2332,8 +2326,8 @@ msgstr "" #: ../../reference/datamodel.rst:2017 msgid "" "Called by :ref:`bytes ` to compute a byte-string representation " -"of an object. This should return a :class:`bytes` object. " -"The :class:`object` class itself does not provide this method." +"of an object. This should return a :class:`bytes` object. The :class:" +"`object` class itself does not provide this method." msgstr "" #: ../../reference/datamodel.rst:2029 @@ -2378,10 +2372,10 @@ msgstr "" #: ../../reference/datamodel.rst:2066 msgid "" "These are the so-called \"rich comparison\" methods. The correspondence " -"between operator symbols and method names is as follows: ``xy`` calls " -"``x.__gt__(y)``, and ``x>=y`` calls ``x.__ge__(y)``." +"between operator symbols and method names is as follows: ``xy`` calls ``x.__gt__(y)``, and ``x>=y`` " +"calls ``x.__ge__(y)``." msgstr "" #: ../../reference/datamodel.rst:2072 @@ -2397,15 +2391,14 @@ msgstr "" #: ../../reference/datamodel.rst:2079 msgid "" -"By default, ``object`` implements :meth:`__eq__` by using ``is``, " -"returning :data:`NotImplemented` in the case of a false comparison: ``True " -"if x is y else NotImplemented``. For :meth:`__ne__`, by default it delegates " -"to :meth:`__eq__` and inverts the result unless it is :data:`!" -"NotImplemented`. There are no other implied relationships among the " -"comparison operators or default implementations; for example, the truth of " -"``(x` and :func:`@classmethod `) are implemented as " @@ -2922,49 +2914,49 @@ msgid "" "from other instances of the same class." msgstr "" -#: ../../reference/datamodel.rst:2505 +#: ../../reference/datamodel.rst:2510 msgid "" "The :func:`property` function is implemented as a data descriptor. " "Accordingly, instances cannot override the behavior of a property." msgstr "" -#: ../../reference/datamodel.rst:2512 +#: ../../reference/datamodel.rst:2517 msgid "__slots__" msgstr "__slots__" -#: ../../reference/datamodel.rst:2514 +#: ../../reference/datamodel.rst:2519 msgid "" "*__slots__* allow us to explicitly declare data members (like properties) " "and deny the creation of :attr:`~object.__dict__` and *__weakref__* (unless " "explicitly declared in *__slots__* or available in a parent.)" msgstr "" -#: ../../reference/datamodel.rst:2518 +#: ../../reference/datamodel.rst:2523 msgid "" "The space saved over using :attr:`~object.__dict__` can be significant. " "Attribute lookup speed can be significantly improved as well." msgstr "" -#: ../../reference/datamodel.rst:2523 +#: ../../reference/datamodel.rst:2528 msgid "" "This class variable can be assigned a string, iterable, or sequence of " "strings with variable names used by instances. *__slots__* reserves space " -"for the declared variables and prevents the automatic creation " -"of :attr:`~object.__dict__` and *__weakref__* for each instance." +"for the declared variables and prevents the automatic creation of :attr:" +"`~object.__dict__` and *__weakref__* for each instance." msgstr "" -#: ../../reference/datamodel.rst:2532 +#: ../../reference/datamodel.rst:2537 msgid "Notes on using *__slots__*:" msgstr "" -#: ../../reference/datamodel.rst:2534 +#: ../../reference/datamodel.rst:2539 msgid "" -"When inheriting from a class without *__slots__*, " -"the :attr:`~object.__dict__` and *__weakref__* attribute of the instances " -"will always be accessible." +"When inheriting from a class without *__slots__*, the :attr:`~object." +"__dict__` and *__weakref__* attribute of the instances will always be " +"accessible." msgstr "" -#: ../../reference/datamodel.rst:2538 +#: ../../reference/datamodel.rst:2543 msgid "" "Without a :attr:`~object.__dict__` variable, instances cannot be assigned " "new variables not listed in the *__slots__* definition. Attempts to assign " @@ -2973,7 +2965,7 @@ msgid "" "sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2545 +#: ../../reference/datamodel.rst:2550 msgid "" "Without a *__weakref__* variable for each instance, classes defining " "*__slots__* do not support :mod:`weak references ` to its " @@ -2981,7 +2973,7 @@ msgid "" "to the sequence of strings in the *__slots__* declaration." msgstr "" -#: ../../reference/datamodel.rst:2551 +#: ../../reference/datamodel.rst:2556 msgid "" "*__slots__* are implemented at the class level by creating :ref:`descriptors " "` for each variable name. As a result, class attributes cannot " @@ -2989,7 +2981,7 @@ msgid "" "otherwise, the class attribute would overwrite the descriptor assignment." msgstr "" -#: ../../reference/datamodel.rst:2557 +#: ../../reference/datamodel.rst:2562 msgid "" "The action of a *__slots__* declaration is not limited to the class where it " "is defined. *__slots__* declared in parents are available in child classes. " @@ -2998,7 +2990,7 @@ msgid "" "only contain names of any *additional* slots)." msgstr "" -#: ../../reference/datamodel.rst:2563 +#: ../../reference/datamodel.rst:2568 msgid "" "If a class defines a slot also defined in a base class, the instance " "variable defined by the base class slot is inaccessible (except by " @@ -3007,33 +2999,33 @@ msgid "" "prevent this." msgstr "" -#: ../../reference/datamodel.rst:2568 +#: ../../reference/datamodel.rst:2573 msgid "" ":exc:`TypeError` will be raised if nonempty *__slots__* are defined for a " "class derived from a :c:member:`\"variable-length\" built-in type " -"` such as :class:`int`, :class:`bytes`, " -"and :class:`tuple`." +"` such as :class:`int`, :class:`bytes`, and :class:" +"`tuple`." msgstr "" -#: ../../reference/datamodel.rst:2573 +#: ../../reference/datamodel.rst:2578 msgid "Any non-string :term:`iterable` may be assigned to *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2575 +#: ../../reference/datamodel.rst:2580 msgid "" "If a :class:`dictionary ` is used to assign *__slots__*, the " "dictionary keys will be used as the slot names. The values of the dictionary " -"can be used to provide per-attribute docstrings that will be recognised " -"by :func:`inspect.getdoc` and displayed in the output of :func:`help`." +"can be used to provide per-attribute docstrings that will be recognised by :" +"func:`inspect.getdoc` and displayed in the output of :func:`help`." msgstr "" -#: ../../reference/datamodel.rst:2580 +#: ../../reference/datamodel.rst:2585 msgid "" ":attr:`~object.__class__` assignment works only if both classes have the " "same *__slots__*." msgstr "" -#: ../../reference/datamodel.rst:2583 +#: ../../reference/datamodel.rst:2588 msgid "" ":ref:`Multiple inheritance ` with multiple slotted parent " "classes can be used, but only one parent is allowed to have attributes " @@ -3041,36 +3033,35 @@ msgid "" "raise :exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:2589 +#: ../../reference/datamodel.rst:2594 msgid "" "If an :term:`iterator` is used for *__slots__* then a :term:`descriptor` is " "created for each of the iterator's values. However, the *__slots__* " "attribute will be an empty iterator." msgstr "" -#: ../../reference/datamodel.rst:2597 +#: ../../reference/datamodel.rst:2602 msgid "Customizing class creation" msgstr "" -#: ../../reference/datamodel.rst:2599 +#: ../../reference/datamodel.rst:2604 msgid "" -"Whenever a class inherits from another " -"class, :meth:`~object.__init_subclass__` is called on the parent class. This " -"way, it is possible to write classes which change the behavior of " -"subclasses. This is closely related to class decorators, but where class " -"decorators only affect the specific class they're applied to, " -"``__init_subclass__`` solely applies to future subclasses of the class " -"defining the method." +"Whenever a class inherits from another class, :meth:`~object." +"__init_subclass__` is called on the parent class. This way, it is possible " +"to write classes which change the behavior of subclasses. This is closely " +"related to class decorators, but where class decorators only affect the " +"specific class they're applied to, ``__init_subclass__`` solely applies to " +"future subclasses of the class defining the method." msgstr "" -#: ../../reference/datamodel.rst:2608 +#: ../../reference/datamodel.rst:2613 msgid "" "This method is called whenever the containing class is subclassed. *cls* is " "then the new subclass. If defined as a normal instance method, this method " "is implicitly converted to a class method." msgstr "" -#: ../../reference/datamodel.rst:2612 +#: ../../reference/datamodel.rst:2617 msgid "" "Keyword arguments which are given to a new class are passed to the parent " "class's ``__init_subclass__``. For compatibility with other classes using " @@ -3078,7 +3069,7 @@ msgid "" "pass the others over to the base class, as in::" msgstr "" -#: ../../reference/datamodel.rst:2618 +#: ../../reference/datamodel.rst:2623 msgid "" "class Philosopher:\n" " def __init_subclass__(cls, /, default_name, **kwargs):\n" @@ -3096,13 +3087,13 @@ msgstr "" "class AustralianPhilosopher(Philosopher, default_name=\"Bruce\"):\n" " pass" -#: ../../reference/datamodel.rst:2626 +#: ../../reference/datamodel.rst:2631 msgid "" "The default implementation ``object.__init_subclass__`` does nothing, but " "raises an error if it is called with any arguments." msgstr "" -#: ../../reference/datamodel.rst:2631 +#: ../../reference/datamodel.rst:2636 msgid "" "The metaclass hint ``metaclass`` is consumed by the rest of the type " "machinery, and is never passed to ``__init_subclass__`` implementations. The " @@ -3110,19 +3101,19 @@ msgid "" "``type(cls)``." msgstr "" -#: ../../reference/datamodel.rst:2639 +#: ../../reference/datamodel.rst:2644 msgid "" "When a class is created, :meth:`type.__new__` scans the class variables and " "makes callbacks to those with a :meth:`~object.__set_name__` hook." msgstr "" -#: ../../reference/datamodel.rst:2644 +#: ../../reference/datamodel.rst:2649 msgid "" "Automatically called at the time the owning class *owner* is created. The " "object has been assigned to *name* in that class::" msgstr "" -#: ../../reference/datamodel.rst:2647 +#: ../../reference/datamodel.rst:2652 msgid "" "class A:\n" " x = C() # Automatically calls: x.__set_name__(A, 'x')" @@ -3130,14 +3121,14 @@ msgstr "" "class A:\n" " x = C() # 自動呼叫:x.__set_name__(A, 'x')" -#: ../../reference/datamodel.rst:2650 +#: ../../reference/datamodel.rst:2655 msgid "" -"If the class variable is assigned after the class is " -"created, :meth:`__set_name__` will not be called automatically. If " -"needed, :meth:`__set_name__` can be called directly::" +"If the class variable is assigned after the class is created, :meth:" +"`__set_name__` will not be called automatically. If needed, :meth:" +"`__set_name__` can be called directly::" msgstr "" -#: ../../reference/datamodel.rst:2654 +#: ../../reference/datamodel.rst:2659 msgid "" "class A:\n" " pass\n" @@ -3147,22 +3138,22 @@ msgid "" "c.__set_name__(A, 'x') # Manually invoke the hook" msgstr "" -#: ../../reference/datamodel.rst:2661 +#: ../../reference/datamodel.rst:2666 msgid "See :ref:`class-object-creation` for more details." msgstr "更多細節請見 :ref:`class-object-creation`。" -#: ../../reference/datamodel.rst:2669 +#: ../../reference/datamodel.rst:2674 msgid "Metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2676 +#: ../../reference/datamodel.rst:2681 msgid "" "By default, classes are constructed using :func:`type`. The class body is " "executed in a new namespace and the class name is bound locally to the " "result of ``type(name, bases, namespace)``." msgstr "" -#: ../../reference/datamodel.rst:2680 +#: ../../reference/datamodel.rst:2685 msgid "" "The class creation process can be customized by passing the ``metaclass`` " "keyword argument in the class definition line, or by inheriting from an " @@ -3170,7 +3161,7 @@ msgid "" "both ``MyClass`` and ``MySubclass`` are instances of ``Meta``::" msgstr "" -#: ../../reference/datamodel.rst:2685 +#: ../../reference/datamodel.rst:2690 msgid "" "class Meta(type):\n" " pass\n" @@ -3190,105 +3181,105 @@ msgstr "" "class MySubclass(MyClass):\n" " pass" -#: ../../reference/datamodel.rst:2694 +#: ../../reference/datamodel.rst:2699 msgid "" "Any other keyword arguments that are specified in the class definition are " "passed through to all metaclass operations described below." msgstr "" -#: ../../reference/datamodel.rst:2697 +#: ../../reference/datamodel.rst:2702 msgid "When a class definition is executed, the following steps occur:" msgstr "" -#: ../../reference/datamodel.rst:2699 +#: ../../reference/datamodel.rst:2704 msgid "MRO entries are resolved;" msgstr "" -#: ../../reference/datamodel.rst:2700 +#: ../../reference/datamodel.rst:2705 msgid "the appropriate metaclass is determined;" msgstr "" -#: ../../reference/datamodel.rst:2701 +#: ../../reference/datamodel.rst:2706 msgid "the class namespace is prepared;" msgstr "" -#: ../../reference/datamodel.rst:2702 +#: ../../reference/datamodel.rst:2707 msgid "the class body is executed;" msgstr "" -#: ../../reference/datamodel.rst:2703 +#: ../../reference/datamodel.rst:2708 msgid "the class object is created." msgstr "" -#: ../../reference/datamodel.rst:2707 +#: ../../reference/datamodel.rst:2712 msgid "Resolving MRO entries" msgstr "" -#: ../../reference/datamodel.rst:2711 +#: ../../reference/datamodel.rst:2716 msgid "" -"If a base that appears in a class definition is not an instance " -"of :class:`type`, then an :meth:`!__mro_entries__` method is searched on the " -"base. If an :meth:`!__mro_entries__` method is found, the base is " -"substituted with the result of a call to :meth:`!__mro_entries__` when " -"creating the class. The method is called with the original bases tuple " -"passed to the *bases* parameter, and must return a tuple of classes that " -"will be used instead of the base. The returned tuple may be empty: in these " -"cases, the original base is ignored." +"If a base that appears in a class definition is not an instance of :class:" +"`type`, then an :meth:`!__mro_entries__` method is searched on the base. If " +"an :meth:`!__mro_entries__` method is found, the base is substituted with " +"the result of a call to :meth:`!__mro_entries__` when creating the class. " +"The method is called with the original bases tuple passed to the *bases* " +"parameter, and must return a tuple of classes that will be used instead of " +"the base. The returned tuple may be empty: in these cases, the original base " +"is ignored." msgstr "" -#: ../../reference/datamodel.rst:2722 +#: ../../reference/datamodel.rst:2727 msgid ":func:`types.resolve_bases`" msgstr ":func:`types.resolve_bases`" -#: ../../reference/datamodel.rst:2723 +#: ../../reference/datamodel.rst:2728 msgid "Dynamically resolve bases that are not instances of :class:`type`." msgstr "" -#: ../../reference/datamodel.rst:2725 +#: ../../reference/datamodel.rst:2730 msgid ":func:`types.get_original_bases`" msgstr ":func:`types.get_original_bases`" -#: ../../reference/datamodel.rst:2726 +#: ../../reference/datamodel.rst:2731 msgid "" -"Retrieve a class's \"original bases\" prior to modifications " -"by :meth:`~object.__mro_entries__`." +"Retrieve a class's \"original bases\" prior to modifications by :meth:" +"`~object.__mro_entries__`." msgstr "" -#: ../../reference/datamodel.rst:2729 +#: ../../reference/datamodel.rst:2734 msgid ":pep:`560`" msgstr ":pep:`560`" -#: ../../reference/datamodel.rst:2730 +#: ../../reference/datamodel.rst:2735 msgid "Core support for typing module and generic types." msgstr "" -#: ../../reference/datamodel.rst:2734 +#: ../../reference/datamodel.rst:2739 msgid "Determining the appropriate metaclass" msgstr "" -#: ../../reference/datamodel.rst:2738 +#: ../../reference/datamodel.rst:2743 msgid "" "The appropriate metaclass for a class definition is determined as follows:" msgstr "" -#: ../../reference/datamodel.rst:2740 +#: ../../reference/datamodel.rst:2745 msgid "" "if no bases and no explicit metaclass are given, then :func:`type` is used;" msgstr "" -#: ../../reference/datamodel.rst:2741 +#: ../../reference/datamodel.rst:2746 msgid "" -"if an explicit metaclass is given and it is *not* an instance " -"of :func:`type`, then it is used directly as the metaclass;" +"if an explicit metaclass is given and it is *not* an instance of :func:" +"`type`, then it is used directly as the metaclass;" msgstr "" -#: ../../reference/datamodel.rst:2743 +#: ../../reference/datamodel.rst:2748 msgid "" "if an instance of :func:`type` is given as the explicit metaclass, or bases " "are defined, then the most derived metaclass is used." msgstr "" -#: ../../reference/datamodel.rst:2746 +#: ../../reference/datamodel.rst:2751 msgid "" "The most derived metaclass is selected from the explicitly specified " "metaclass (if any) and the metaclasses (i.e. ``type(cls)``) of all specified " @@ -3297,11 +3288,11 @@ msgid "" "that criterion, then the class definition will fail with ``TypeError``." msgstr "" -#: ../../reference/datamodel.rst:2756 +#: ../../reference/datamodel.rst:2761 msgid "Preparing the class namespace" msgstr "" -#: ../../reference/datamodel.rst:2761 +#: ../../reference/datamodel.rst:2766 msgid "" "Once the appropriate metaclass has been identified, then the class namespace " "is prepared. If the metaclass has a ``__prepare__`` attribute, it is called " @@ -3313,25 +3304,25 @@ msgid "" "copied into a new ``dict``." msgstr "" -#: ../../reference/datamodel.rst:2770 +#: ../../reference/datamodel.rst:2775 msgid "" "If the metaclass has no ``__prepare__`` attribute, then the class namespace " "is initialised as an empty ordered mapping." msgstr "" -#: ../../reference/datamodel.rst:2775 +#: ../../reference/datamodel.rst:2780 msgid ":pep:`3115` - Metaclasses in Python 3000" msgstr "" -#: ../../reference/datamodel.rst:2776 +#: ../../reference/datamodel.rst:2781 msgid "Introduced the ``__prepare__`` namespace hook" msgstr "" -#: ../../reference/datamodel.rst:2780 +#: ../../reference/datamodel.rst:2785 msgid "Executing the class body" msgstr "" -#: ../../reference/datamodel.rst:2785 +#: ../../reference/datamodel.rst:2790 msgid "" "The class body is executed (approximately) as ``exec(body, globals(), " "namespace)``. The key difference from a normal call to :func:`exec` is that " @@ -3340,7 +3331,7 @@ msgid "" "inside a function." msgstr "" -#: ../../reference/datamodel.rst:2791 +#: ../../reference/datamodel.rst:2796 msgid "" "However, even when the class definition occurs inside the function, methods " "defined inside the class still cannot see names defined at the class scope. " @@ -3349,11 +3340,11 @@ msgid "" "reference described in the next section." msgstr "" -#: ../../reference/datamodel.rst:2800 +#: ../../reference/datamodel.rst:2805 msgid "Creating the class object" msgstr "" -#: ../../reference/datamodel.rst:2807 +#: ../../reference/datamodel.rst:2812 msgid "" "Once the class namespace has been populated by executing the class body, the " "class object is created by calling ``metaclass(name, bases, namespace, " @@ -3361,18 +3352,18 @@ msgid "" "to ``__prepare__``)." msgstr "" -#: ../../reference/datamodel.rst:2812 +#: ../../reference/datamodel.rst:2817 msgid "" "This class object is the one that will be referenced by the zero-argument " "form of :func:`super`. ``__class__`` is an implicit closure reference " "created by the compiler if any methods in a class body refer to either " -"``__class__`` or ``super``. This allows the zero argument form " -"of :func:`super` to correctly identify the class being defined based on " -"lexical scoping, while the class or instance that was used to make the " -"current call is identified based on the first argument passed to the method." +"``__class__`` or ``super``. This allows the zero argument form of :func:" +"`super` to correctly identify the class being defined based on lexical " +"scoping, while the class or instance that was used to make the current call " +"is identified based on the first argument passed to the method." msgstr "" -#: ../../reference/datamodel.rst:2822 +#: ../../reference/datamodel.rst:2827 msgid "" "In CPython 3.6 and later, the ``__class__`` cell is passed to the metaclass " "as a ``__classcell__`` entry in the class namespace. If present, this must " @@ -3381,39 +3372,39 @@ msgid "" "in Python 3.8." msgstr "" -#: ../../reference/datamodel.rst:2828 +#: ../../reference/datamodel.rst:2833 msgid "" "When using the default metaclass :class:`type`, or any metaclass that " "ultimately calls ``type.__new__``, the following additional customization " "steps are invoked after creating the class object:" msgstr "" -#: ../../reference/datamodel.rst:2832 +#: ../../reference/datamodel.rst:2837 msgid "" "The ``type.__new__`` method collects all of the attributes in the class " "namespace that define a :meth:`~object.__set_name__` method;" msgstr "" -#: ../../reference/datamodel.rst:2834 +#: ../../reference/datamodel.rst:2839 msgid "" "Those ``__set_name__`` methods are called with the class being defined and " "the assigned name of that particular attribute;" msgstr "" -#: ../../reference/datamodel.rst:2836 +#: ../../reference/datamodel.rst:2841 msgid "" "The :meth:`~object.__init_subclass__` hook is called on the immediate parent " "of the new class in its method resolution order." msgstr "" -#: ../../reference/datamodel.rst:2839 +#: ../../reference/datamodel.rst:2844 msgid "" "After the class object is created, it is passed to the class decorators " "included in the class definition (if any) and the resulting object is bound " "in the local namespace as the defined class." msgstr "" -#: ../../reference/datamodel.rst:2843 +#: ../../reference/datamodel.rst:2848 msgid "" "When a new class is created by ``type.__new__``, the object provided as the " "namespace parameter is copied to a new ordered mapping and the original " @@ -3421,19 +3412,19 @@ msgid "" "becomes the :attr:`~type.__dict__` attribute of the class object." msgstr "" -#: ../../reference/datamodel.rst:2850 +#: ../../reference/datamodel.rst:2855 msgid ":pep:`3135` - New super" msgstr "" -#: ../../reference/datamodel.rst:2851 +#: ../../reference/datamodel.rst:2856 msgid "Describes the implicit ``__class__`` closure reference" msgstr "" -#: ../../reference/datamodel.rst:2855 +#: ../../reference/datamodel.rst:2860 msgid "Uses for metaclasses" msgstr "" -#: ../../reference/datamodel.rst:2857 +#: ../../reference/datamodel.rst:2862 msgid "" "The potential uses for metaclasses are boundless. Some ideas that have been " "explored include enum, logging, interface checking, automatic delegation, " @@ -3441,17 +3432,17 @@ msgid "" "locking/synchronization." msgstr "" -#: ../../reference/datamodel.rst:2864 +#: ../../reference/datamodel.rst:2869 msgid "Customizing instance and subclass checks" msgstr "" -#: ../../reference/datamodel.rst:2866 +#: ../../reference/datamodel.rst:2871 msgid "" -"The following methods are used to override the default behavior of " -"the :func:`isinstance` and :func:`issubclass` built-in functions." +"The following methods are used to override the default behavior of the :func:" +"`isinstance` and :func:`issubclass` built-in functions." msgstr "" -#: ../../reference/datamodel.rst:2869 +#: ../../reference/datamodel.rst:2874 msgid "" "In particular, the metaclass :class:`abc.ABCMeta` implements these methods " "in order to allow the addition of Abstract Base Classes (ABCs) as \"virtual " @@ -3459,21 +3450,21 @@ msgid "" "other ABCs." msgstr "" -#: ../../reference/datamodel.rst:2876 +#: ../../reference/datamodel.rst:2881 msgid "" "Return true if *instance* should be considered a (direct or indirect) " "instance of *class*. If defined, called to implement ``isinstance(instance, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2883 +#: ../../reference/datamodel.rst:2888 msgid "" "Return true if *subclass* should be considered a (direct or indirect) " "subclass of *class*. If defined, called to implement ``issubclass(subclass, " "class)``." msgstr "" -#: ../../reference/datamodel.rst:2888 +#: ../../reference/datamodel.rst:2893 msgid "" "Note that these methods are looked up on the type (metaclass) of a class. " "They cannot be defined as class methods in the actual class. This is " @@ -3481,24 +3472,24 @@ msgid "" "only in this case the instance is itself a class." msgstr "" -#: ../../reference/datamodel.rst:2895 +#: ../../reference/datamodel.rst:2900 msgid ":pep:`3119` - Introducing Abstract Base Classes" msgstr "" -#: ../../reference/datamodel.rst:2896 +#: ../../reference/datamodel.rst:2901 msgid "" -"Includes the specification for customizing :func:`isinstance` " -"and :func:`issubclass` behavior through :meth:`~type.__instancecheck__` " -"and :meth:`~type.__subclasscheck__`, with motivation for this functionality " -"in the context of adding Abstract Base Classes (see the :mod:`abc` module) " -"to the language." +"Includes the specification for customizing :func:`isinstance` and :func:" +"`issubclass` behavior through :meth:`~type.__instancecheck__` and :meth:" +"`~type.__subclasscheck__`, with motivation for this functionality in the " +"context of adding Abstract Base Classes (see the :mod:`abc` module) to the " +"language." msgstr "" -#: ../../reference/datamodel.rst:2904 +#: ../../reference/datamodel.rst:2909 msgid "Emulating generic types" msgstr "" -#: ../../reference/datamodel.rst:2906 +#: ../../reference/datamodel.rst:2911 msgid "" "When using :term:`type annotations`, it is often useful to " "*parameterize* a :term:`generic type` using Python's square-brackets " @@ -3506,75 +3497,74 @@ msgid "" "a :class:`list` in which all the elements are of type :class:`int`." msgstr "" -#: ../../reference/datamodel.rst:2913 +#: ../../reference/datamodel.rst:2918 msgid ":pep:`484` - Type Hints" msgstr ":pep:`484` - 型別提示" -#: ../../reference/datamodel.rst:2914 +#: ../../reference/datamodel.rst:2919 msgid "Introducing Python's framework for type annotations" msgstr "引入 Python 的型別註釋框架" -#: ../../reference/datamodel.rst:2916 +#: ../../reference/datamodel.rst:2921 msgid ":ref:`Generic Alias Types`" msgstr ":ref:`泛型別名型別 `" -#: ../../reference/datamodel.rst:2917 +#: ../../reference/datamodel.rst:2922 msgid "Documentation for objects representing parameterized generic classes" msgstr "" -#: ../../reference/datamodel.rst:2919 +#: ../../reference/datamodel.rst:2924 msgid "" -":ref:`Generics`, :ref:`user-defined generics` " -"and :class:`typing.Generic`" +":ref:`Generics`, :ref:`user-defined generics` and :" +"class:`typing.Generic`" msgstr "" -#: ../../reference/datamodel.rst:2920 +#: ../../reference/datamodel.rst:2925 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../reference/datamodel.rst:2923 +#: ../../reference/datamodel.rst:2928 msgid "" "A class can *generally* only be parameterized if it defines the special " "class method ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2928 +#: ../../reference/datamodel.rst:2933 msgid "" "Return an object representing the specialization of a generic class by type " "arguments found in *key*." msgstr "" -#: ../../reference/datamodel.rst:2931 +#: ../../reference/datamodel.rst:2936 msgid "" "When defined on a class, ``__class_getitem__()`` is automatically a class " -"method. As such, there is no need for it to be decorated " -"with :func:`@classmethod` when it is defined." +"method. As such, there is no need for it to be decorated with :func:" +"`@classmethod` when it is defined." msgstr "" -#: ../../reference/datamodel.rst:2937 +#: ../../reference/datamodel.rst:2942 msgid "The purpose of *__class_getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2939 +#: ../../reference/datamodel.rst:2944 msgid "" "The purpose of :meth:`~object.__class_getitem__` is to allow runtime " "parameterization of standard-library generic classes in order to more easily " "apply :term:`type hints` to these classes." msgstr "" -#: ../../reference/datamodel.rst:2943 +#: ../../reference/datamodel.rst:2948 msgid "" "To implement custom generic classes that can be parameterized at runtime and " "understood by static type-checkers, users should either inherit from a " -"standard library class that already " -"implements :meth:`~object.__class_getitem__`, or inherit " -"from :class:`typing.Generic`, which has its own implementation of " -"``__class_getitem__()``." +"standard library class that already implements :meth:`~object." +"__class_getitem__`, or inherit from :class:`typing.Generic`, which has its " +"own implementation of ``__class_getitem__()``." msgstr "" -#: ../../reference/datamodel.rst:2949 +#: ../../reference/datamodel.rst:2954 msgid "" "Custom implementations of :meth:`~object.__class_getitem__` on classes " "defined outside of the standard library may not be understood by third-party " @@ -3582,11 +3572,11 @@ msgid "" "purposes other than type hinting is discouraged." msgstr "" -#: ../../reference/datamodel.rst:2959 +#: ../../reference/datamodel.rst:2964 msgid "*__class_getitem__* versus *__getitem__*" msgstr "" -#: ../../reference/datamodel.rst:2961 +#: ../../reference/datamodel.rst:2966 msgid "" "Usually, the :ref:`subscription` of an object using square " "brackets will call the :meth:`~object.__getitem__` instance method defined " @@ -3596,15 +3586,14 @@ msgid "" "genericalias>` object if it is properly defined." msgstr "" -#: ../../reference/datamodel.rst:2968 +#: ../../reference/datamodel.rst:2973 msgid "" "Presented with the :term:`expression` ``obj[x]``, the Python interpreter " -"follows something like the following process to decide " -"whether :meth:`~object.__getitem__` or :meth:`~object.__class_getitem__` " -"should be called::" +"follows something like the following process to decide whether :meth:" +"`~object.__getitem__` or :meth:`~object.__class_getitem__` should be called::" msgstr "" -#: ../../reference/datamodel.rst:2973 +#: ../../reference/datamodel.rst:2978 msgid "" "from inspect import isclass\n" "\n" @@ -3630,17 +3619,17 @@ msgid "" " )" msgstr "" -#: ../../reference/datamodel.rst:2996 +#: ../../reference/datamodel.rst:3001 msgid "" "In Python, all classes are themselves instances of other classes. The class " "of a class is known as that class's :term:`metaclass`, and most classes have " -"the :class:`type` class as their metaclass. :class:`type` does not " -"define :meth:`~object.__getitem__`, meaning that expressions such as " -"``list[int]``, ``dict[str, float]`` and ``tuple[str, bytes]`` all result " -"in :meth:`~object.__class_getitem__` being called::" +"the :class:`type` class as their metaclass. :class:`type` does not define :" +"meth:`~object.__getitem__`, meaning that expressions such as ``list[int]``, " +"``dict[str, float]`` and ``tuple[str, bytes]`` all result in :meth:`~object." +"__class_getitem__` being called::" msgstr "" -#: ../../reference/datamodel.rst:3003 +#: ../../reference/datamodel.rst:3008 msgid "" ">>> # list has class \"type\" as its metaclass, like most classes:\n" ">>> type(list)\n" @@ -3655,15 +3644,14 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3015 +#: ../../reference/datamodel.rst:3020 msgid "" -"However, if a class has a custom metaclass that " -"defines :meth:`~object.__getitem__`, subscribing the class may result in " -"different behaviour. An example of this can be found in the :mod:`enum` " -"module::" +"However, if a class has a custom metaclass that defines :meth:`~object." +"__getitem__`, subscribing the class may result in different behaviour. An " +"example of this can be found in the :mod:`enum` module::" msgstr "" -#: ../../reference/datamodel.rst:3019 +#: ../../reference/datamodel.rst:3024 msgid "" ">>> from enum import Enum\n" ">>> class Menu(Enum):\n" @@ -3683,70 +3671,70 @@ msgid "" "" msgstr "" -#: ../../reference/datamodel.rst:3038 +#: ../../reference/datamodel.rst:3043 msgid ":pep:`560` - Core Support for typing module and generic types" msgstr "" -#: ../../reference/datamodel.rst:3039 +#: ../../reference/datamodel.rst:3044 msgid "" -"Introducing :meth:`~object.__class_getitem__`, and outlining when " -"a :ref:`subscription` results in ``__class_getitem__()`` " -"being called instead of :meth:`~object.__getitem__`" +"Introducing :meth:`~object.__class_getitem__`, and outlining when a :ref:" +"`subscription` results in ``__class_getitem__()`` being " +"called instead of :meth:`~object.__getitem__`" msgstr "" -#: ../../reference/datamodel.rst:3047 +#: ../../reference/datamodel.rst:3052 msgid "Emulating callable objects" msgstr "" -#: ../../reference/datamodel.rst:3054 +#: ../../reference/datamodel.rst:3059 msgid "" "Called when the instance is \"called\" as a function; if this method is " "defined, ``x(arg1, arg2, ...)`` roughly translates to ``type(x).__call__(x, " "arg1, ...)``. The :class:`object` class itself does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3062 +#: ../../reference/datamodel.rst:3067 msgid "Emulating container types" msgstr "" -#: ../../reference/datamodel.rst:3064 +#: ../../reference/datamodel.rst:3069 msgid "" "The following methods can be defined to implement container objects. None of " "them are provided by the :class:`object` class itself. Containers usually " -"are :term:`sequences ` (such as :class:`lists ` " -"or :class:`tuples `) or :term:`mappings ` " -"(like :term:`dictionaries `), but can represent other containers " -"as well. The first set of methods is used either to emulate a sequence or " -"to emulate a mapping; the difference is that for a sequence, the allowable " -"keys should be the integers *k* for which ``0 <= k < N`` where *N* is the " -"length of the sequence, or :class:`slice` objects, which define a range of " -"items. It is also recommended that mappings provide the methods :meth:`!" -"keys`, :meth:`!values`, :meth:`!items`, :meth:`!get`, :meth:`!" -"clear`, :meth:`!setdefault`, :meth:`!pop`, :meth:`!popitem`, :meth:`!copy`, " -"and :meth:`!update` behaving similar to those for Python's " -"standard :class:`dictionary ` objects. The :mod:`collections.abc` " -"module provides a :class:`~collections.abc.MutableMapping` :term:`abstract " -"base class` to help create those methods from a base set " -"of :meth:`~object.__getitem__`, :meth:`~object.__setitem__`, :meth:`~object.__delitem__`, " -"and :meth:`!keys`. Mutable sequences should provide methods :meth:`!" -"append`, :meth:`!count`, :meth:`!index`, :meth:`!extend`, :meth:`!" -"insert`, :meth:`!pop`, :meth:`!remove`, :meth:`!reverse` and :meth:`!sort`, " -"like Python standard :class:`list` objects. Finally, sequence types should " -"implement addition (meaning concatenation) and multiplication (meaning " -"repetition) by defining the " -"methods :meth:`~object.__add__`, :meth:`~object.__radd__`, :meth:`~object.__iadd__`, :meth:`~object.__mul__`, :meth:`~object.__rmul__` " -"and :meth:`~object.__imul__` described below; they should not define other " -"numerical operators. It is recommended that both mappings and sequences " -"implement the :meth:`~object.__contains__` method to allow efficient use of " -"the ``in`` operator; for mappings, ``in`` should search the mapping's keys; " -"for sequences, it should search through the values. It is further " -"recommended that both mappings and sequences implement " -"the :meth:`~object.__iter__` method to allow efficient iteration through the " -"container; for mappings, :meth:`!__iter__` should iterate through the " -"object's keys; for sequences, it should iterate through the values." -msgstr "" - -#: ../../reference/datamodel.rst:3106 +"are :term:`sequences ` (such as :class:`lists ` or :class:" +"`tuples `) or :term:`mappings ` (like :term:`dictionaries " +"`), but can represent other containers as well. The first set " +"of methods is used either to emulate a sequence or to emulate a mapping; the " +"difference is that for a sequence, the allowable keys should be the integers " +"*k* for which ``0 <= k < N`` where *N* is the length of the sequence, or :" +"class:`slice` objects, which define a range of items. It is also " +"recommended that mappings provide the methods :meth:`!keys`, :meth:`!" +"values`, :meth:`!items`, :meth:`!get`, :meth:`!clear`, :meth:`!setdefault`, :" +"meth:`!pop`, :meth:`!popitem`, :meth:`!copy`, and :meth:`!update` behaving " +"similar to those for Python's standard :class:`dictionary ` objects. " +"The :mod:`collections.abc` module provides a :class:`~collections.abc." +"MutableMapping` :term:`abstract base class` to help create those methods " +"from a base set of :meth:`~object.__getitem__`, :meth:`~object." +"__setitem__`, :meth:`~object.__delitem__`, and :meth:`!keys`. Mutable " +"sequences should provide methods :meth:`!append`, :meth:`!count`, :meth:`!" +"index`, :meth:`!extend`, :meth:`!insert`, :meth:`!pop`, :meth:`!remove`, :" +"meth:`!reverse` and :meth:`!sort`, like Python standard :class:`list` " +"objects. Finally, sequence types should implement addition (meaning " +"concatenation) and multiplication (meaning repetition) by defining the " +"methods :meth:`~object.__add__`, :meth:`~object.__radd__`, :meth:`~object." +"__iadd__`, :meth:`~object.__mul__`, :meth:`~object.__rmul__` and :meth:" +"`~object.__imul__` described below; they should not define other numerical " +"operators. It is recommended that both mappings and sequences implement " +"the :meth:`~object.__contains__` method to allow efficient use of the ``in`` " +"operator; for mappings, ``in`` should search the mapping's keys; for " +"sequences, it should search through the values. It is further recommended " +"that both mappings and sequences implement the :meth:`~object.__iter__` " +"method to allow efficient iteration through the container; for mappings, :" +"meth:`!__iter__` should iterate through the object's keys; for sequences, it " +"should iterate through the values." +msgstr "" + +#: ../../reference/datamodel.rst:3111 msgid "" "Called to implement the built-in function :func:`len`. Should return the " "length of the object, an integer ``>=`` 0. Also, an object that doesn't " @@ -3754,97 +3742,96 @@ msgid "" "returns zero is considered to be false in a Boolean context." msgstr "" -#: ../../reference/datamodel.rst:3113 +#: ../../reference/datamodel.rst:3118 msgid "" "In CPython, the length is required to be at most :data:`sys.maxsize`. If the " -"length is larger than :data:`!sys.maxsize` some features (such " -"as :func:`len`) may raise :exc:`OverflowError`. To prevent raising :exc:`!" -"OverflowError` by truth value testing, an object must define " -"a :meth:`~object.__bool__` method." +"length is larger than :data:`!sys.maxsize` some features (such as :func:" +"`len`) may raise :exc:`OverflowError`. To prevent raising :exc:`!" +"OverflowError` by truth value testing, an object must define a :meth:" +"`~object.__bool__` method." msgstr "" -#: ../../reference/datamodel.rst:3122 +#: ../../reference/datamodel.rst:3127 msgid "" "Called to implement :func:`operator.length_hint`. Should return an estimated " "length for the object (which may be greater or less than the actual length). " -"The length must be an integer ``>=`` 0. The return value may also " -"be :data:`NotImplemented`, which is treated the same as if the " -"``__length_hint__`` method didn't exist at all. This method is purely an " -"optimization and is never required for correctness." +"The length must be an integer ``>=`` 0. The return value may also be :data:" +"`NotImplemented`, which is treated the same as if the ``__length_hint__`` " +"method didn't exist at all. This method is purely an optimization and is " +"never required for correctness." msgstr "" -#: ../../reference/datamodel.rst:3136 +#: ../../reference/datamodel.rst:3141 msgid "" "Slicing is done exclusively with the following three methods. A call like ::" msgstr "" -#: ../../reference/datamodel.rst:3138 +#: ../../reference/datamodel.rst:3143 msgid "a[1:2] = b" msgstr "a[1:2] = b" -#: ../../reference/datamodel.rst:3140 +#: ../../reference/datamodel.rst:3145 msgid "is translated to ::" msgstr "" -#: ../../reference/datamodel.rst:3142 +#: ../../reference/datamodel.rst:3147 msgid "a[slice(1, 2, None)] = b" msgstr "a[slice(1, 2, None)] = b" -#: ../../reference/datamodel.rst:3144 +#: ../../reference/datamodel.rst:3149 msgid "and so forth. Missing slice items are always filled in with ``None``." msgstr "" -#: ../../reference/datamodel.rst:3149 +#: ../../reference/datamodel.rst:3154 msgid "" "Called to implement evaluation of ``self[key]``. For :term:`sequence` types, " -"the accepted keys should be integers. Optionally, they may " -"support :class:`slice` objects as well. Negative index support is also " -"optional. If *key* is of an inappropriate type, :exc:`TypeError` may be " -"raised; if *key* is a value outside the set of indexes for the sequence " -"(after any special interpretation of negative values), :exc:`IndexError` " -"should be raised. For :term:`mapping` types, if *key* is missing (not in the " -"container), :exc:`KeyError` should be raised." +"the accepted keys should be integers. Optionally, they may support :class:" +"`slice` objects as well. Negative index support is also optional. If *key* " +"is of an inappropriate type, :exc:`TypeError` may be raised; if *key* is a " +"value outside the set of indexes for the sequence (after any special " +"interpretation of negative values), :exc:`IndexError` should be raised. For :" +"term:`mapping` types, if *key* is missing (not in the container), :exc:" +"`KeyError` should be raised." msgstr "" -#: ../../reference/datamodel.rst:3161 +#: ../../reference/datamodel.rst:3166 msgid "" ":keyword:`for` loops expect that an :exc:`IndexError` will be raised for " "illegal indexes to allow proper detection of the end of the sequence." msgstr "" -#: ../../reference/datamodel.rst:3166 +#: ../../reference/datamodel.rst:3171 msgid "" -"When :ref:`subscripting` a *class*, the special class " -"method :meth:`~object.__class_getitem__` may be called instead of " -"``__getitem__()``. See :ref:`classgetitem-versus-getitem` for more details." +"When :ref:`subscripting` a *class*, the special class method :" +"meth:`~object.__class_getitem__` may be called instead of ``__getitem__()``. " +"See :ref:`classgetitem-versus-getitem` for more details." msgstr "" -#: ../../reference/datamodel.rst:3174 +#: ../../reference/datamodel.rst:3179 msgid "" -"Called to implement assignment to ``self[key]``. Same note as " -"for :meth:`__getitem__`. This should only be implemented for mappings if " -"the objects support changes to the values for keys, or if new keys can be " -"added, or for sequences if elements can be replaced. The same exceptions " -"should be raised for improper *key* values as for the :meth:`__getitem__` " -"method." +"Called to implement assignment to ``self[key]``. Same note as for :meth:" +"`__getitem__`. This should only be implemented for mappings if the objects " +"support changes to the values for keys, or if new keys can be added, or for " +"sequences if elements can be replaced. The same exceptions should be raised " +"for improper *key* values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3183 +#: ../../reference/datamodel.rst:3188 msgid "" -"Called to implement deletion of ``self[key]``. Same note as " -"for :meth:`__getitem__`. This should only be implemented for mappings if " -"the objects support removal of keys, or for sequences if elements can be " -"removed from the sequence. The same exceptions should be raised for " -"improper *key* values as for the :meth:`__getitem__` method." +"Called to implement deletion of ``self[key]``. Same note as for :meth:" +"`__getitem__`. This should only be implemented for mappings if the objects " +"support removal of keys, or for sequences if elements can be removed from " +"the sequence. The same exceptions should be raised for improper *key* " +"values as for the :meth:`__getitem__` method." msgstr "" -#: ../../reference/datamodel.rst:3192 +#: ../../reference/datamodel.rst:3197 msgid "" "Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` " "for dict subclasses when key is not in the dictionary." msgstr "" -#: ../../reference/datamodel.rst:3198 +#: ../../reference/datamodel.rst:3203 msgid "" "This method is called when an :term:`iterator` is required for a container. " "This method should return a new iterator object that can iterate over all " @@ -3852,23 +3839,23 @@ msgid "" "of the container." msgstr "" -#: ../../reference/datamodel.rst:3206 +#: ../../reference/datamodel.rst:3211 msgid "" "Called (if present) by the :func:`reversed` built-in to implement reverse " "iteration. It should return a new iterator object that iterates over all " "the objects in the container in reverse order." msgstr "" -#: ../../reference/datamodel.rst:3210 +#: ../../reference/datamodel.rst:3215 msgid "" "If the :meth:`__reversed__` method is not provided, the :func:`reversed` " -"built-in will fall back to using the sequence protocol (:meth:`__len__` " -"and :meth:`__getitem__`). Objects that support the sequence protocol should " -"only provide :meth:`__reversed__` if they can provide an implementation that " -"is more efficient than the one provided by :func:`reversed`." +"built-in will fall back to using the sequence protocol (:meth:`__len__` and :" +"meth:`__getitem__`). Objects that support the sequence protocol should only " +"provide :meth:`__reversed__` if they can provide an implementation that is " +"more efficient than the one provided by :func:`reversed`." msgstr "" -#: ../../reference/datamodel.rst:3217 +#: ../../reference/datamodel.rst:3222 msgid "" "The membership test operators (:keyword:`in` and :keyword:`not in`) are " "normally implemented as an iteration through a container. However, container " @@ -3876,14 +3863,14 @@ msgid "" "implementation, which also does not require the object be iterable." msgstr "" -#: ../../reference/datamodel.rst:3224 +#: ../../reference/datamodel.rst:3229 msgid "" "Called to implement membership test operators. Should return true if *item* " "is in *self*, false otherwise. For mapping objects, this should consider " "the keys of the mapping rather than the values or the key-item pairs." msgstr "" -#: ../../reference/datamodel.rst:3228 +#: ../../reference/datamodel.rst:3233 msgid "" "For objects that don't define :meth:`__contains__`, the membership test " "first tries iteration via :meth:`__iter__`, then the old sequence iteration " @@ -3891,11 +3878,11 @@ msgid "" "reference `." msgstr "" -#: ../../reference/datamodel.rst:3237 +#: ../../reference/datamodel.rst:3242 msgid "Emulating numeric types" msgstr "" -#: ../../reference/datamodel.rst:3239 +#: ../../reference/datamodel.rst:3244 msgid "" "The following methods can be defined to emulate numeric objects. Methods " "corresponding to operations that are not supported by the particular kind of " @@ -3903,46 +3890,46 @@ msgid "" "should be left undefined." msgstr "" -#: ../../reference/datamodel.rst:3265 +#: ../../reference/datamodel.rst:3270 msgid "" "These methods are called to implement the binary arithmetic operations " -"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, " -"``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|" -"``). For instance, to evaluate the expression ``x + y``, where *x* is an " -"instance of a class that has an :meth:`__add__` method, ``type(x).__add__(x, " -"y)`` is called. The :meth:`__divmod__` method should be the equivalent to " -"using :meth:`__floordiv__` and :meth:`__mod__`; it should not be related " -"to :meth:`__truediv__`. Note that :meth:`__pow__` should be defined to " -"accept an optional third argument if the ternary version of the built-" -"in :func:`pow` function is to be supported." +"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" +"`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``). For instance, to " +"evaluate the expression ``x + y``, where *x* is an instance of a class that " +"has an :meth:`__add__` method, ``type(x).__add__(x, y)`` is called. The :" +"meth:`__divmod__` method should be the equivalent to using :meth:" +"`__floordiv__` and :meth:`__mod__`; it should not be related to :meth:" +"`__truediv__`. Note that :meth:`__pow__` should be defined to accept an " +"optional third argument if the ternary version of the built-in :func:`pow` " +"function is to be supported." msgstr "" -#: ../../reference/datamodel.rst:3276 +#: ../../reference/datamodel.rst:3281 msgid "" "If one of those methods does not support the operation with the supplied " "arguments, it should return :data:`NotImplemented`." msgstr "" -#: ../../reference/datamodel.rst:3299 +#: ../../reference/datamodel.rst:3304 msgid "" "These methods are called to implement the binary arithmetic operations " -"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, " -"``%``, :func:`divmod`, :func:`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|" -"``) with reflected (swapped) operands. These functions are only called if " -"the left operand does not support the corresponding operation [#]_ and the " -"operands are of different types. [#]_ For instance, to evaluate the " -"expression ``x - y``, where *y* is an instance of a class that has " -"an :meth:`__rsub__` method, ``type(y).__rsub__(y, x)`` is called if " -"``type(x).__sub__(x, y)`` returns :data:`NotImplemented`." +"(``+``, ``-``, ``*``, ``@``, ``/``, ``//``, ``%``, :func:`divmod`, :func:" +"`pow`, ``**``, ``<<``, ``>>``, ``&``, ``^``, ``|``) with reflected (swapped) " +"operands. These functions are only called if the left operand does not " +"support the corresponding operation [#]_ and the operands are of different " +"types. [#]_ For instance, to evaluate the expression ``x - y``, where *y* is " +"an instance of a class that has an :meth:`__rsub__` method, ``type(y)." +"__rsub__(y, x)`` is called if ``type(x).__sub__(x, y)`` returns :data:" +"`NotImplemented`." msgstr "" -#: ../../reference/datamodel.rst:3311 +#: ../../reference/datamodel.rst:3316 msgid "" "Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the " "coercion rules would become too complicated)." msgstr "" -#: ../../reference/datamodel.rst:3316 +#: ../../reference/datamodel.rst:3321 msgid "" "If the right operand's type is a subclass of the left operand's type and " "that subclass provides a different implementation of the reflected method " @@ -3951,7 +3938,7 @@ msgid "" "ancestors' operations." msgstr "" -#: ../../reference/datamodel.rst:3337 +#: ../../reference/datamodel.rst:3342 msgid "" "These methods are called to implement the augmented arithmetic assignments " "(``+=``, ``-=``, ``*=``, ``@=``, ``/=``, ``//=``, ``%=``, ``**=``, ``<<=``, " @@ -3960,28 +3947,28 @@ msgid "" "but does not have to be, *self*). If a specific method is not defined, or " "if that method returns :data:`NotImplemented`, the augmented assignment " "falls back to the normal methods. For instance, if *x* is an instance of a " -"class with an :meth:`__iadd__` method, ``x += y`` is equivalent to ``x = " -"x.__iadd__(y)`` . If :meth:`__iadd__` does not exist, or if " -"``x.__iadd__(y)`` returns :data:`!NotImplemented`, ``x.__add__(y)`` and " -"``y.__radd__(x)`` are considered, as with the evaluation of ``x + y``. In " -"certain situations, augmented assignment can result in unexpected errors " -"(see :ref:`faq-augmented-assignment-tuple-error`), but this behavior is in " -"fact part of the data model." +"class with an :meth:`__iadd__` method, ``x += y`` is equivalent to ``x = x." +"__iadd__(y)`` . If :meth:`__iadd__` does not exist, or if ``x.__iadd__(y)`` " +"returns :data:`!NotImplemented`, ``x.__add__(y)`` and ``y.__radd__(x)`` are " +"considered, as with the evaluation of ``x + y``. In certain situations, " +"augmented assignment can result in unexpected errors (see :ref:`faq-" +"augmented-assignment-tuple-error`), but this behavior is in fact part of the " +"data model." msgstr "" -#: ../../reference/datamodel.rst:3360 +#: ../../reference/datamodel.rst:3365 msgid "" -"Called to implement the unary arithmetic operations (``-``, " -"``+``, :func:`abs` and ``~``)." +"Called to implement the unary arithmetic operations (``-``, ``+``, :func:" +"`abs` and ``~``)." msgstr "" -#: ../../reference/datamodel.rst:3373 +#: ../../reference/datamodel.rst:3378 msgid "" -"Called to implement the built-in functions :func:`complex`, :func:`int` " -"and :func:`float`. Should return a value of the appropriate type." +"Called to implement the built-in functions :func:`complex`, :func:`int` and :" +"func:`float`. Should return a value of the appropriate type." msgstr "" -#: ../../reference/datamodel.rst:3380 +#: ../../reference/datamodel.rst:3385 msgid "" "Called to implement :func:`operator.index`, and whenever Python needs to " "losslessly convert the numeric object to an integer object (such as in " @@ -3990,14 +3977,14 @@ msgid "" "integer type. Must return an integer." msgstr "" -#: ../../reference/datamodel.rst:3386 +#: ../../reference/datamodel.rst:3391 msgid "" "If :meth:`__int__`, :meth:`__float__` and :meth:`__complex__` are not " "defined then corresponding built-in functions :func:`int`, :func:`float` " "and :func:`complex` fall back to :meth:`__index__`." msgstr "" -#: ../../reference/datamodel.rst:3398 +#: ../../reference/datamodel.rst:3403 msgid "" "Called to implement the built-in function :func:`round` and :mod:`math` " "functions :func:`~math.trunc`, :func:`~math.floor` and :func:`~math.ceil`. " @@ -4006,21 +3993,21 @@ msgid "" "(typically an :class:`int`)." msgstr "" -#: ../../reference/datamodel.rst:3404 +#: ../../reference/datamodel.rst:3409 msgid "" "The built-in function :func:`int` falls back to :meth:`__trunc__` if " "neither :meth:`__int__` nor :meth:`__index__` is defined." msgstr "" -#: ../../reference/datamodel.rst:3407 +#: ../../reference/datamodel.rst:3412 msgid "The delegation of :func:`int` to :meth:`__trunc__` is deprecated." msgstr "" -#: ../../reference/datamodel.rst:3414 +#: ../../reference/datamodel.rst:3419 msgid "With Statement Context Managers" msgstr "With 陳述式的情境管理器" -#: ../../reference/datamodel.rst:3416 +#: ../../reference/datamodel.rst:3421 msgid "" "A :dfn:`context manager` is an object that defines the runtime context to be " "established when executing a :keyword:`with` statement. The context manager " @@ -4030,34 +4017,34 @@ msgid "" "can also be used by directly invoking their methods." msgstr "" -#: ../../reference/datamodel.rst:3427 +#: ../../reference/datamodel.rst:3432 msgid "" "Typical uses of context managers include saving and restoring various kinds " "of global state, locking and unlocking resources, closing opened files, etc." msgstr "" -#: ../../reference/datamodel.rst:3430 +#: ../../reference/datamodel.rst:3435 msgid "" "For more information on context managers, see :ref:`typecontextmanager`. " "The :class:`object` class itself does not provide the context manager " "methods." msgstr "" -#: ../../reference/datamodel.rst:3436 +#: ../../reference/datamodel.rst:3441 msgid "" "Enter the runtime context related to this object. The :keyword:`with` " "statement will bind this method's return value to the target(s) specified in " "the :keyword:`!as` clause of the statement, if any." msgstr "" -#: ../../reference/datamodel.rst:3443 +#: ../../reference/datamodel.rst:3448 msgid "" "Exit the runtime context related to this object. The parameters describe the " "exception that caused the context to be exited. If the context was exited " "without an exception, all three arguments will be :const:`None`." msgstr "" -#: ../../reference/datamodel.rst:3447 +#: ../../reference/datamodel.rst:3452 msgid "" "If an exception is supplied, and the method wishes to suppress the exception " "(i.e., prevent it from being propagated), it should return a true value. " @@ -4065,27 +4052,27 @@ msgid "" "method." msgstr "" -#: ../../reference/datamodel.rst:3451 +#: ../../reference/datamodel.rst:3456 msgid "" "Note that :meth:`~object.__exit__` methods should not reraise the passed-in " "exception; this is the caller's responsibility." msgstr "" -#: ../../reference/datamodel.rst:3457 +#: ../../reference/datamodel.rst:3462 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - \"with\" 陳述式" -#: ../../reference/datamodel.rst:3458 +#: ../../reference/datamodel.rst:3463 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3465 +#: ../../reference/datamodel.rst:3470 msgid "Customizing positional arguments in class pattern matching" msgstr "" -#: ../../reference/datamodel.rst:3467 +#: ../../reference/datamodel.rst:3472 msgid "" "When using a class name in a pattern, positional arguments in the pattern " "are not allowed by default, i.e. ``case MyClass(x, y)`` is typically invalid " @@ -4093,7 +4080,7 @@ msgid "" "pattern, the class needs to define a *__match_args__* attribute." msgstr "" -#: ../../reference/datamodel.rst:3474 +#: ../../reference/datamodel.rst:3479 msgid "" "This class variable can be assigned a tuple of strings. When this class is " "used in a class pattern with positional arguments, each positional argument " @@ -4102,29 +4089,29 @@ msgid "" "to setting it to ``()``." msgstr "" -#: ../../reference/datamodel.rst:3480 +#: ../../reference/datamodel.rst:3485 msgid "" "For example, if ``MyClass.__match_args__`` is ``(\"left\", \"center\", " "\"right\")`` that means that ``case MyClass(x, y)`` is equivalent to ``case " "MyClass(left=x, center=y)``. Note that the number of arguments in the " "pattern must be smaller than or equal to the number of elements in " -"*__match_args__*; if it is larger, the pattern match attempt will raise " -"a :exc:`TypeError`." +"*__match_args__*; if it is larger, the pattern match attempt will raise a :" +"exc:`TypeError`." msgstr "" -#: ../../reference/datamodel.rst:3490 +#: ../../reference/datamodel.rst:3495 msgid ":pep:`634` - Structural Pattern Matching" msgstr "" -#: ../../reference/datamodel.rst:3491 +#: ../../reference/datamodel.rst:3496 msgid "The specification for the Python ``match`` statement." msgstr "" -#: ../../reference/datamodel.rst:3497 +#: ../../reference/datamodel.rst:3502 msgid "Emulating buffer types" msgstr "" -#: ../../reference/datamodel.rst:3499 +#: ../../reference/datamodel.rst:3504 msgid "" "The :ref:`buffer protocol ` provides a way for Python objects " "to expose efficient access to a low-level memory array. This protocol is " @@ -4132,54 +4119,53 @@ msgid "" "and third-party libraries may define additional buffer types." msgstr "" -#: ../../reference/datamodel.rst:3504 +#: ../../reference/datamodel.rst:3509 msgid "" "While buffer types are usually implemented in C, it is also possible to " "implement the protocol in Python." msgstr "" -#: ../../reference/datamodel.rst:3509 +#: ../../reference/datamodel.rst:3514 msgid "" -"Called when a buffer is requested from *self* (for example, by " -"the :class:`memoryview` constructor). The *flags* argument is an integer " -"representing the kind of buffer requested, affecting for example whether the " -"returned buffer is read-only or writable. :class:`inspect.BufferFlags` " -"provides a convenient way to interpret the flags. The method must return " -"a :class:`memoryview` object." +"Called when a buffer is requested from *self* (for example, by the :class:" +"`memoryview` constructor). The *flags* argument is an integer representing " +"the kind of buffer requested, affecting for example whether the returned " +"buffer is read-only or writable. :class:`inspect.BufferFlags` provides a " +"convenient way to interpret the flags. The method must return a :class:" +"`memoryview` object." msgstr "" -#: ../../reference/datamodel.rst:3518 +#: ../../reference/datamodel.rst:3523 msgid "" -"Called when a buffer is no longer needed. The *buffer* argument is " -"a :class:`memoryview` object that was previously returned " -"by :meth:`~object.__buffer__`. The method must release any resources " -"associated with the buffer. This method should return ``None``. Buffer " -"objects that do not need to perform any cleanup are not required to " -"implement this method." +"Called when a buffer is no longer needed. The *buffer* argument is a :class:" +"`memoryview` object that was previously returned by :meth:`~object." +"__buffer__`. The method must release any resources associated with the " +"buffer. This method should return ``None``. Buffer objects that do not need " +"to perform any cleanup are not required to implement this method." msgstr "" -#: ../../reference/datamodel.rst:3529 +#: ../../reference/datamodel.rst:3534 msgid ":pep:`688` - Making the buffer protocol accessible in Python" msgstr "" -#: ../../reference/datamodel.rst:3530 +#: ../../reference/datamodel.rst:3535 msgid "" "Introduces the Python ``__buffer__`` and ``__release_buffer__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3532 +#: ../../reference/datamodel.rst:3537 msgid ":class:`collections.abc.Buffer`" msgstr ":class:`collections.abc.Buffer`" -#: ../../reference/datamodel.rst:3533 +#: ../../reference/datamodel.rst:3538 msgid "ABC for buffer types." msgstr "" -#: ../../reference/datamodel.rst:3538 +#: ../../reference/datamodel.rst:3543 msgid "Special method lookup" msgstr "" -#: ../../reference/datamodel.rst:3540 +#: ../../reference/datamodel.rst:3545 msgid "" "For custom classes, implicit invocations of special methods are only " "guaranteed to work correctly if defined on an object's type, not in the " @@ -4187,7 +4173,7 @@ msgid "" "following code raises an exception::" msgstr "" -#: ../../reference/datamodel.rst:3545 +#: ../../reference/datamodel.rst:3550 msgid "" ">>> class C:\n" "... pass\n" @@ -4209,7 +4195,7 @@ msgstr "" " File \"\", line 1, in \n" "TypeError: object of type 'C' has no len()" -#: ../../reference/datamodel.rst:3555 +#: ../../reference/datamodel.rst:3560 msgid "" "The rationale behind this behaviour lies with a number of special methods " "such as :meth:`~object.__hash__` and :meth:`~object.__repr__` that are " @@ -4218,7 +4204,7 @@ msgid "" "invoked on the type object itself::" msgstr "" -#: ../../reference/datamodel.rst:3562 +#: ../../reference/datamodel.rst:3567 msgid "" ">>> 1 .__hash__() == hash(1)\n" "True\n" @@ -4234,14 +4220,14 @@ msgstr "" " File \"\", line 1, in \n" "TypeError: descriptor '__hash__' of 'int' object needs an argument" -#: ../../reference/datamodel.rst:3569 +#: ../../reference/datamodel.rst:3574 msgid "" "Incorrectly attempting to invoke an unbound method of a class in this way is " "sometimes referred to as 'metaclass confusion', and is avoided by bypassing " "the instance when looking up special methods::" msgstr "" -#: ../../reference/datamodel.rst:3573 +#: ../../reference/datamodel.rst:3578 msgid "" ">>> type(1).__hash__(1) == hash(1)\n" "True\n" @@ -4253,14 +4239,14 @@ msgstr "" ">>> type(int).__hash__(int) == hash(int)\n" "True" -#: ../../reference/datamodel.rst:3578 +#: ../../reference/datamodel.rst:3583 msgid "" "In addition to bypassing any instance attributes in the interest of " -"correctness, implicit special method lookup generally also bypasses " -"the :meth:`~object.__getattribute__` method even of the object's metaclass::" +"correctness, implicit special method lookup generally also bypasses the :" +"meth:`~object.__getattribute__` method even of the object's metaclass::" msgstr "" -#: ../../reference/datamodel.rst:3582 +#: ../../reference/datamodel.rst:3587 msgid "" ">>> class Meta(type):\n" "... def __getattribute__(*args):\n" @@ -4285,7 +4271,7 @@ msgid "" "10" msgstr "" -#: ../../reference/datamodel.rst:3604 +#: ../../reference/datamodel.rst:3609 msgid "" "Bypassing the :meth:`~object.__getattribute__` machinery in this fashion " "provides significant scope for speed optimisations within the interpreter, " @@ -4294,106 +4280,103 @@ msgid "" "consistently invoked by the interpreter)." msgstr "" -#: ../../reference/datamodel.rst:3615 +#: ../../reference/datamodel.rst:3620 msgid "Coroutines" msgstr "協程" -#: ../../reference/datamodel.rst:3619 +#: ../../reference/datamodel.rst:3624 msgid "Awaitable Objects" msgstr "" -#: ../../reference/datamodel.rst:3621 +#: ../../reference/datamodel.rst:3626 msgid "" -"An :term:`awaitable` object generally implements " -"an :meth:`~object.__await__` method. :term:`Coroutine objects ` " -"returned from :keyword:`async def` functions are awaitable." +"An :term:`awaitable` object generally implements an :meth:`~object." +"__await__` method. :term:`Coroutine objects ` returned from :" +"keyword:`async def` functions are awaitable." msgstr "" -#: ../../reference/datamodel.rst:3627 +#: ../../reference/datamodel.rst:3632 msgid "" "The :term:`generator iterator` objects returned from generators decorated " -"with :func:`types.coroutine` are also awaitable, but they do not " -"implement :meth:`~object.__await__`." +"with :func:`types.coroutine` are also awaitable, but they do not implement :" +"meth:`~object.__await__`." msgstr "" -#: ../../reference/datamodel.rst:3633 +#: ../../reference/datamodel.rst:3638 msgid "" -"Must return an :term:`iterator`. Should be used to " -"implement :term:`awaitable` objects. For instance, :class:`asyncio.Future` " -"implements this method to be compatible with the :keyword:`await` " -"expression. The :class:`object` class itself is not awaitable and does not " -"provide this method." +"Must return an :term:`iterator`. Should be used to implement :term:" +"`awaitable` objects. For instance, :class:`asyncio.Future` implements this " +"method to be compatible with the :keyword:`await` expression. The :class:" +"`object` class itself is not awaitable and does not provide this method." msgstr "" -#: ../../reference/datamodel.rst:3641 +#: ../../reference/datamodel.rst:3646 msgid "" "The language doesn't place any restriction on the type or value of the " "objects yielded by the iterator returned by ``__await__``, as this is " -"specific to the implementation of the asynchronous execution framework " -"(e.g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." +"specific to the implementation of the asynchronous execution framework (e." +"g. :mod:`asyncio`) that will be managing the :term:`awaitable` object." msgstr "" -#: ../../reference/datamodel.rst:3649 +#: ../../reference/datamodel.rst:3654 msgid ":pep:`492` for additional information about awaitable objects." msgstr "" -#: ../../reference/datamodel.rst:3655 +#: ../../reference/datamodel.rst:3660 msgid "Coroutine Objects" msgstr "協程物件" -#: ../../reference/datamodel.rst:3657 +#: ../../reference/datamodel.rst:3662 msgid "" ":term:`Coroutine objects ` are :term:`awaitable` objects. A " "coroutine's execution can be controlled by calling :meth:`~object.__await__` " "and iterating over the result. When the coroutine has finished executing " -"and returns, the iterator raises :exc:`StopIteration`, and the " -"exception's :attr:`~StopIteration.value` attribute holds the return value. " -"If the coroutine raises an exception, it is propagated by the iterator. " -"Coroutines should not directly raise unhandled :exc:`StopIteration` " -"exceptions." +"and returns, the iterator raises :exc:`StopIteration`, and the exception's :" +"attr:`~StopIteration.value` attribute holds the return value. If the " +"coroutine raises an exception, it is propagated by the iterator. Coroutines " +"should not directly raise unhandled :exc:`StopIteration` exceptions." msgstr "" -#: ../../reference/datamodel.rst:3665 +#: ../../reference/datamodel.rst:3670 msgid "" "Coroutines also have the methods listed below, which are analogous to those " "of generators (see :ref:`generator-methods`). However, unlike generators, " "coroutines do not directly support iteration." msgstr "" -#: ../../reference/datamodel.rst:3669 +#: ../../reference/datamodel.rst:3674 msgid "It is a :exc:`RuntimeError` to await on a coroutine more than once." msgstr "" -#: ../../reference/datamodel.rst:3675 +#: ../../reference/datamodel.rst:3680 msgid "" "Starts or resumes execution of the coroutine. If *value* is ``None``, this " -"is equivalent to advancing the iterator returned " -"by :meth:`~object.__await__`. If *value* is not ``None``, this method " -"delegates to the :meth:`~generator.send` method of the iterator that caused " -"the coroutine to suspend. The result (return value, :exc:`StopIteration`, " -"or other exception) is the same as when iterating over the :meth:`!" -"__await__` return value, described above." +"is equivalent to advancing the iterator returned by :meth:`~object." +"__await__`. If *value* is not ``None``, this method delegates to the :meth:" +"`~generator.send` method of the iterator that caused the coroutine to " +"suspend. The result (return value, :exc:`StopIteration`, or other " +"exception) is the same as when iterating over the :meth:`!__await__` return " +"value, described above." msgstr "" -#: ../../reference/datamodel.rst:3686 +#: ../../reference/datamodel.rst:3691 msgid "" "Raises the specified exception in the coroutine. This method delegates to " "the :meth:`~generator.throw` method of the iterator that caused the " "coroutine to suspend, if it has such a method. Otherwise, the exception is " -"raised at the suspension point. The result (return " -"value, :exc:`StopIteration`, or other exception) is the same as when " -"iterating over the :meth:`~object.__await__` return value, described above. " -"If the exception is not caught in the coroutine, it propagates back to the " -"caller." +"raised at the suspension point. The result (return value, :exc:" +"`StopIteration`, or other exception) is the same as when iterating over the :" +"meth:`~object.__await__` return value, described above. If the exception is " +"not caught in the coroutine, it propagates back to the caller." msgstr "" -#: ../../reference/datamodel.rst:3697 +#: ../../reference/datamodel.rst:3702 msgid "" "The second signature \\(type\\[, value\\[, traceback\\]\\]\\) is deprecated " "and may be removed in a future version of Python." msgstr "" -#: ../../reference/datamodel.rst:3702 +#: ../../reference/datamodel.rst:3707 msgid "" "Causes the coroutine to clean itself up and exit. If the coroutine is " "suspended, this method first delegates to the :meth:`~generator.close` " @@ -4403,46 +4386,46 @@ msgid "" "is marked as having finished executing, even if it was never started." msgstr "" -#: ../../reference/datamodel.rst:3710 +#: ../../reference/datamodel.rst:3715 msgid "" "Coroutine objects are automatically closed using the above process when they " "are about to be destroyed." msgstr "" -#: ../../reference/datamodel.rst:3716 +#: ../../reference/datamodel.rst:3721 msgid "Asynchronous Iterators" msgstr "" -#: ../../reference/datamodel.rst:3718 +#: ../../reference/datamodel.rst:3723 msgid "" "An *asynchronous iterator* can call asynchronous code in its ``__anext__`` " "method." msgstr "" -#: ../../reference/datamodel.rst:3721 +#: ../../reference/datamodel.rst:3726 msgid "" "Asynchronous iterators can be used in an :keyword:`async for` statement." msgstr "" -#: ../../reference/datamodel.rst:3723 ../../reference/datamodel.rst:3772 +#: ../../reference/datamodel.rst:3728 ../../reference/datamodel.rst:3777 msgid "The :class:`object` class itself does not provide these methods." msgstr "" -#: ../../reference/datamodel.rst:3728 +#: ../../reference/datamodel.rst:3733 msgid "Must return an *asynchronous iterator* object." msgstr "" -#: ../../reference/datamodel.rst:3732 +#: ../../reference/datamodel.rst:3737 msgid "" "Must return an *awaitable* resulting in a next value of the iterator. " "Should raise a :exc:`StopAsyncIteration` error when the iteration is over." msgstr "" -#: ../../reference/datamodel.rst:3735 +#: ../../reference/datamodel.rst:3740 msgid "An example of an asynchronous iterable object::" msgstr "" -#: ../../reference/datamodel.rst:3737 +#: ../../reference/datamodel.rst:3742 msgid "" "class Reader:\n" " async def readline(self):\n" @@ -4470,53 +4453,53 @@ msgstr "" " raise StopAsyncIteration\n" " return val" -#: ../../reference/datamodel.rst:3752 +#: ../../reference/datamodel.rst:3757 msgid "" "Prior to Python 3.7, :meth:`~object.__aiter__` could return an *awaitable* " "that would resolve to an :term:`asynchronous iterator `." msgstr "" -#: ../../reference/datamodel.rst:3757 +#: ../../reference/datamodel.rst:3762 msgid "" "Starting with Python 3.7, :meth:`~object.__aiter__` must return an " -"asynchronous iterator object. Returning anything else will result in " -"a :exc:`TypeError` error." +"asynchronous iterator object. Returning anything else will result in a :exc:" +"`TypeError` error." msgstr "" -#: ../../reference/datamodel.rst:3765 +#: ../../reference/datamodel.rst:3770 msgid "Asynchronous Context Managers" msgstr "" -#: ../../reference/datamodel.rst:3767 +#: ../../reference/datamodel.rst:3772 msgid "" "An *asynchronous context manager* is a *context manager* that is able to " "suspend execution in its ``__aenter__`` and ``__aexit__`` methods." msgstr "" -#: ../../reference/datamodel.rst:3770 +#: ../../reference/datamodel.rst:3775 msgid "" "Asynchronous context managers can be used in an :keyword:`async with` " "statement." msgstr "" -#: ../../reference/datamodel.rst:3776 +#: ../../reference/datamodel.rst:3781 msgid "" "Semantically similar to :meth:`~object.__enter__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3781 +#: ../../reference/datamodel.rst:3786 msgid "" "Semantically similar to :meth:`~object.__exit__`, the only difference being " "that it must return an *awaitable*." msgstr "" -#: ../../reference/datamodel.rst:3784 +#: ../../reference/datamodel.rst:3789 msgid "An example of an asynchronous context manager class::" msgstr "" -#: ../../reference/datamodel.rst:3786 +#: ../../reference/datamodel.rst:3791 msgid "" "class AsyncContextManager:\n" " async def __aenter__(self):\n" @@ -4532,26 +4515,27 @@ msgstr "" " async def __aexit__(self, exc_type, exc, tb):\n" " await log('exiting context')" -#: ../../reference/datamodel.rst:3797 +#: ../../reference/datamodel.rst:3802 msgid "Footnotes" msgstr "註解" -#: ../../reference/datamodel.rst:3798 +#: ../../reference/datamodel.rst:3803 msgid "" "It *is* possible in some cases to change an object's type, under certain " "controlled conditions. It generally isn't a good idea though, since it can " "lead to some very strange behaviour if it is handled incorrectly." msgstr "" -#: ../../reference/datamodel.rst:3802 +#: ../../reference/datamodel.rst:3807 msgid "" -"The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object.__reversed__`, :meth:`~object.__contains__`, :meth:`~object.__class_getitem__` " -"and :meth:`~os.PathLike.__fspath__` methods have special handling for this. " -"Others will still raise a :exc:`TypeError`, but may do so by relying on the " -"behavior that ``None`` is not callable." +"The :meth:`~object.__hash__`, :meth:`~object.__iter__`, :meth:`~object." +"__reversed__`, :meth:`~object.__contains__`, :meth:`~object." +"__class_getitem__` and :meth:`~os.PathLike.__fspath__` methods have special " +"handling for this. Others will still raise a :exc:`TypeError`, but may do so " +"by relying on the behavior that ``None`` is not callable." msgstr "" -#: ../../reference/datamodel.rst:3809 +#: ../../reference/datamodel.rst:3814 msgid "" "\"Does not support\" here means that the class has no such method, or the " "method returns :data:`NotImplemented`. Do not set the method to ``None`` if " @@ -4559,7 +4543,7 @@ msgid "" "instead have the opposite effect of explicitly *blocking* such fallback." msgstr "" -#: ../../reference/datamodel.rst:3815 +#: ../../reference/datamodel.rst:3820 msgid "" "For operands of the same type, it is assumed that if the non-reflected " "method -- such as :meth:`~object.__add__` -- fails then the overall " @@ -4582,7 +4566,7 @@ msgstr "" #: ../../reference/datamodel.rst:1265 ../../reference/datamodel.rst:1292 #: ../../reference/datamodel.rst:1364 ../../reference/datamodel.rst:1472 #: ../../reference/datamodel.rst:1579 ../../reference/datamodel.rst:1689 -#: ../../reference/datamodel.rst:2114 ../../reference/datamodel.rst:3132 +#: ../../reference/datamodel.rst:2114 ../../reference/datamodel.rst:3137 msgid "object" msgstr "object(物件)" @@ -4595,11 +4579,11 @@ msgstr "data(資料)" #: ../../reference/datamodel.rst:466 ../../reference/datamodel.rst:799 #: ../../reference/datamodel.rst:1321 ../../reference/datamodel.rst:1772 #: ../../reference/datamodel.rst:2015 ../../reference/datamodel.rst:2021 -#: ../../reference/datamodel.rst:2114 ../../reference/datamodel.rst:2671 -#: ../../reference/datamodel.rst:3102 ../../reference/datamodel.rst:3260 -#: ../../reference/datamodel.rst:3295 ../../reference/datamodel.rst:3309 -#: ../../reference/datamodel.rst:3358 ../../reference/datamodel.rst:3368 -#: ../../reference/datamodel.rst:3396 +#: ../../reference/datamodel.rst:2114 ../../reference/datamodel.rst:2676 +#: ../../reference/datamodel.rst:3107 ../../reference/datamodel.rst:3265 +#: ../../reference/datamodel.rst:3300 ../../reference/datamodel.rst:3314 +#: ../../reference/datamodel.rst:3363 ../../reference/datamodel.rst:3373 +#: ../../reference/datamodel.rst:3401 msgid "built-in function" msgstr "built-in function(內建函式)" @@ -4608,7 +4592,7 @@ msgid "id" msgstr "id" #: ../../reference/datamodel.rst:23 ../../reference/datamodel.rst:126 -#: ../../reference/datamodel.rst:2671 +#: ../../reference/datamodel.rst:2676 msgid "type" msgstr "type(型別)" @@ -4732,12 +4716,12 @@ msgstr "number(數字)" msgid "Java" msgstr "Java" -#: ../../reference/datamodel.rst:283 ../../reference/datamodel.rst:3368 +#: ../../reference/datamodel.rst:283 ../../reference/datamodel.rst:3373 msgid "complex" msgstr "complex(複數)" #: ../../reference/datamodel.rst:296 ../../reference/datamodel.rst:427 -#: ../../reference/datamodel.rst:466 ../../reference/datamodel.rst:3102 +#: ../../reference/datamodel.rst:466 ../../reference/datamodel.rst:3107 msgid "len" msgstr "len" @@ -4830,7 +4814,7 @@ msgstr "assignment(賦值)" #: ../../reference/datamodel.rst:388 ../../reference/datamodel.rst:859 #: ../../reference/datamodel.rst:1726 ../../reference/datamodel.rst:1908 -#: ../../reference/datamodel.rst:3423 +#: ../../reference/datamodel.rst:3428 msgid "statement" msgstr "statement(陳述式)" @@ -4890,7 +4874,7 @@ msgid "function" msgstr "function (函式)" #: ../../reference/datamodel.rst:519 ../../reference/datamodel.rst:1126 -#: ../../reference/datamodel.rst:1149 ../../reference/datamodel.rst:3052 +#: ../../reference/datamodel.rst:1149 ../../reference/datamodel.rst:3057 msgid "call" msgstr "call(呼叫)" @@ -4998,7 +4982,7 @@ msgstr "generator(產生器)" msgid "iterator" msgstr "itorator(疊代器)" -#: ../../reference/datamodel.rst:761 ../../reference/datamodel.rst:3611 +#: ../../reference/datamodel.rst:761 ../../reference/datamodel.rst:3616 msgid "coroutine" msgstr "coroutine(協程)" @@ -5064,7 +5048,7 @@ msgstr "__dict__ (模組屬性)" #: ../../reference/datamodel.rst:1126 ../../reference/datamodel.rst:1144 #: ../../reference/datamodel.rst:1265 ../../reference/datamodel.rst:1891 -#: ../../reference/datamodel.rst:2782 +#: ../../reference/datamodel.rst:2787 msgid "class" msgstr "class(類別)" @@ -5074,7 +5058,7 @@ msgid "class instance" msgstr "class instance(類別實例)" #: ../../reference/datamodel.rst:1126 ../../reference/datamodel.rst:1265 -#: ../../reference/datamodel.rst:3052 +#: ../../reference/datamodel.rst:3057 msgid "instance" msgstr "instance(實例)" @@ -5370,7 +5354,7 @@ msgstr "try" msgid "tb_next (traceback attribute)" msgstr "tb_next (traceback 屬性)" -#: ../../reference/datamodel.rst:1772 ../../reference/datamodel.rst:3132 +#: ../../reference/datamodel.rst:1772 ../../reference/datamodel.rst:3137 msgid "slice" msgstr "slice(切片)" @@ -5478,71 +5462,71 @@ msgstr "__dir__ (模組屬性)" msgid "__class__ (module attribute)" msgstr "__class__ (模組屬性)" -#: ../../reference/datamodel.rst:2671 +#: ../../reference/datamodel.rst:2676 msgid "metaclass" msgstr "metaclass(元類別)" -#: ../../reference/datamodel.rst:2671 +#: ../../reference/datamodel.rst:2676 msgid "= (equals)" msgstr "= (等號)" -#: ../../reference/datamodel.rst:2671 +#: ../../reference/datamodel.rst:2676 msgid "class definition" msgstr "class definition(類別定義)" -#: ../../reference/datamodel.rst:2735 +#: ../../reference/datamodel.rst:2740 msgid "metaclass hint" msgstr "metaclass hint(元類別提示)" -#: ../../reference/datamodel.rst:2758 +#: ../../reference/datamodel.rst:2763 msgid "__prepare__ (metaclass method)" msgstr "__prepare__ (元類別方法)" -#: ../../reference/datamodel.rst:2782 +#: ../../reference/datamodel.rst:2787 msgid "body" msgstr "body" -#: ../../reference/datamodel.rst:2802 +#: ../../reference/datamodel.rst:2807 msgid "__class__ (method cell)" msgstr "__class__ (方法 cell)" -#: ../../reference/datamodel.rst:2802 +#: ../../reference/datamodel.rst:2807 msgid "__classcell__ (class namespace entry)" msgstr "__classcell__ (類別命名空間項目)" -#: ../../reference/datamodel.rst:3102 +#: ../../reference/datamodel.rst:3107 msgid "__bool__() (object method)" msgstr "__bool__() (物件方法)" -#: ../../reference/datamodel.rst:3260 ../../reference/datamodel.rst:3295 +#: ../../reference/datamodel.rst:3265 ../../reference/datamodel.rst:3300 msgid "divmod" msgstr "divmod" -#: ../../reference/datamodel.rst:3260 ../../reference/datamodel.rst:3295 -#: ../../reference/datamodel.rst:3309 +#: ../../reference/datamodel.rst:3265 ../../reference/datamodel.rst:3300 +#: ../../reference/datamodel.rst:3314 msgid "pow" msgstr "pow" -#: ../../reference/datamodel.rst:3358 +#: ../../reference/datamodel.rst:3363 msgid "abs" msgstr "abs" -#: ../../reference/datamodel.rst:3368 +#: ../../reference/datamodel.rst:3373 msgid "int" msgstr "int" -#: ../../reference/datamodel.rst:3368 +#: ../../reference/datamodel.rst:3373 msgid "float" msgstr "float" -#: ../../reference/datamodel.rst:3396 +#: ../../reference/datamodel.rst:3401 msgid "round" msgstr "round" -#: ../../reference/datamodel.rst:3423 +#: ../../reference/datamodel.rst:3428 msgid "with" msgstr "with" -#: ../../reference/datamodel.rst:3423 +#: ../../reference/datamodel.rst:3428 msgid "context manager" msgstr "context manager(情境管理器)" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index d54049a3af..b53658c58e 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-12-03 00:15+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:17+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -203,9 +203,9 @@ msgid "" "must yield an integer. If it is negative, the sequence's length is added to " "it. The resulting value must be a nonnegative integer less than the " "sequence's length, and the sequence is asked to assign the assigned object " -"to its item with that index. If the index is out of " -"range, :exc:`IndexError` is raised (assignment to a subscripted sequence " -"cannot add new items to a list)." +"to its item with that index. If the index is out of range, :exc:" +"`IndexError` is raised (assignment to a subscripted sequence cannot add new " +"items to a list)." msgstr "" #: ../../reference/simple_stmts.rst:211 @@ -381,8 +381,8 @@ msgid "" "If the right hand side is present, an annotated assignment performs the " "actual assignment before evaluating annotations (where applicable). If the " "right hand side is not present for an expression target, then the " -"interpreter evaluates the target except for the " -"last :meth:`~object.__setitem__` or :meth:`~object.__setattr__` call." +"interpreter evaluates the target except for the last :meth:`~object." +"__setitem__` or :meth:`~object.__setattr__` call." msgstr "" #: ../../reference/simple_stmts.rst:361 @@ -455,11 +455,11 @@ msgid "" "refer to the built-in variables with those names. In the current " "implementation, the built-in variable ``__debug__`` is ``True`` under normal " "circumstances, ``False`` when optimization is requested (command line " -"option :option:`-O`). The current code generator emits no code for " -"an :keyword:`assert` statement when optimization is requested at compile " -"time. Note that it is unnecessary to include the source code for the " -"expression that failed in the error message; it will be displayed as part of " -"the stack trace." +"option :option:`-O`). The current code generator emits no code for an :" +"keyword:`assert` statement when optimization is requested at compile time. " +"Note that it is unnecessary to include the source code for the expression " +"that failed in the error message; it will be displayed as part of the stack " +"trace." msgstr "" #: ../../reference/simple_stmts.rst:416 @@ -506,8 +506,8 @@ msgstr "" msgid "" "Deletion of a name removes the binding of that name from the local or global " "namespace, depending on whether the name occurs in a :keyword:`global` " -"statement in the same code block. If the name is unbound, " -"a :exc:`NameError` exception will be raised." +"statement in the same code block. If the name is unbound, a :exc:" +"`NameError` exception will be raised." msgstr "" #: ../../reference/simple_stmts.rst:471 @@ -557,17 +557,16 @@ msgstr "" msgid "" "In a generator function, the :keyword:`return` statement indicates that the " "generator is done and will cause :exc:`StopIteration` to be raised. The " -"returned value (if any) is used as an argument to " -"construct :exc:`StopIteration` and becomes the :attr:`StopIteration.value` " -"attribute." +"returned value (if any) is used as an argument to construct :exc:" +"`StopIteration` and becomes the :attr:`StopIteration.value` attribute." msgstr "" #: ../../reference/simple_stmts.rst:513 msgid "" "In an asynchronous generator function, an empty :keyword:`return` statement " -"indicates that the asynchronous generator is done and will " -"cause :exc:`StopAsyncIteration` to be raised. A non-empty :keyword:`!" -"return` statement is a syntax error in an asynchronous generator function." +"indicates that the asynchronous generator is done and will cause :exc:" +"`StopAsyncIteration` to be raised. A non-empty :keyword:`!return` statement " +"is a syntax error in an asynchronous generator function." msgstr "" #: ../../reference/simple_stmts.rst:521 @@ -604,8 +603,8 @@ msgstr "" #: ../../reference/simple_stmts.rst:546 msgid "" -"Yield expressions and statements are only used when defining " -"a :term:`generator` function, and are only used in the body of the generator " +"Yield expressions and statements are only used when defining a :term:" +"`generator` function, and are only used in the body of the generator " "function. Using :keyword:`yield` in a function definition is sufficient to " "cause that definition to create a generator function instead of a normal " "function." @@ -613,8 +612,8 @@ msgstr "" #: ../../reference/simple_stmts.rst:551 msgid "" -"For full details of :keyword:`yield` semantics, refer to " -"the :ref:`yieldexpr` section." +"For full details of :keyword:`yield` semantics, refer to the :ref:" +"`yieldexpr` section." msgstr "" #: ../../reference/simple_stmts.rst:557 @@ -632,15 +631,15 @@ msgstr "" #: ../../reference/simple_stmts.rst:573 msgid "" "Otherwise, :keyword:`raise` evaluates the first expression as the exception " -"object. It must be either a subclass or an instance " -"of :class:`BaseException`. If it is a class, the exception instance will be " -"obtained when needed by instantiating the class with no arguments." +"object. It must be either a subclass or an instance of :class:" +"`BaseException`. If it is a class, the exception instance will be obtained " +"when needed by instantiating the class with no arguments." msgstr "" #: ../../reference/simple_stmts.rst:578 msgid "" -"The :dfn:`type` of the exception is the exception instance's class, " -"the :dfn:`value` is the instance itself." +"The :dfn:`type` of the exception is the exception instance's class, the :dfn:" +"`value` is the instance itself." msgstr "" #: ../../reference/simple_stmts.rst:583 @@ -710,8 +709,8 @@ msgstr "" #: ../../reference/simple_stmts.rst:624 msgid "" "A similar mechanism works implicitly if a new exception is raised when an " -"exception is already being handled. An exception may be handled when " -"an :keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " +"exception is already being handled. An exception may be handled when an :" +"keyword:`except` or :keyword:`finally` clause, or a :keyword:`with` " "statement, is used. The previous exception is then attached as the new " "exception's :attr:`~BaseException.__context__` attribute:" msgstr "" @@ -782,9 +781,9 @@ msgstr "" #: ../../reference/simple_stmts.rst:664 msgid "" -"Additional information on exceptions can be found in " -"section :ref:`exceptions`, and information about handling exceptions is in " -"section :ref:`try`." +"Additional information on exceptions can be found in section :ref:" +"`exceptions`, and information about handling exceptions is in section :ref:" +"`try`." msgstr "" #: ../../reference/simple_stmts.rst:667 @@ -811,8 +810,8 @@ msgstr ":keyword:`!break` 陳述式" #: ../../reference/simple_stmts.rst:693 msgid "" -":keyword:`break` may only occur syntactically nested in a :keyword:`for` " -"or :keyword:`while` loop, but not nested in a function or class definition " +":keyword:`break` may only occur syntactically nested in a :keyword:`for` or :" +"keyword:`while` loop, but not nested in a function or class definition " "within that loop." msgstr "" @@ -870,8 +869,8 @@ msgstr "" #: ../../reference/simple_stmts.rst:766 msgid "" -"define a name or names in the local namespace for the scope where " -"the :keyword:`import` statement occurs." +"define a name or names in the local namespace for the scope where the :" +"keyword:`import` statement occurs." msgstr "" #: ../../reference/simple_stmts.rst:769 @@ -900,8 +899,8 @@ msgstr "" #: ../../reference/simple_stmts.rst:787 msgid "" -"If the module name is followed by :keyword:`!as`, then the name " -"following :keyword:`!as` is bound directly to the imported module." +"If the module name is followed by :keyword:`!as`, then the name following :" +"keyword:`!as` is bound directly to the imported module." msgstr "" #: ../../reference/simple_stmts.rst:789 @@ -963,10 +962,10 @@ msgid "" "import foo # foo imported and bound locally\n" "import foo.bar.baz # foo, foo.bar, and foo.bar.baz imported, foo " "bound locally\n" -"import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz imported, " -"foo.bar.baz bound as fbb\n" -"from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, " -"foo.bar.baz bound as baz\n" +"import foo.bar.baz as fbb # foo, foo.bar, and foo.bar.baz imported, foo.bar." +"baz bound as fbb\n" +"from foo.bar import baz # foo, foo.bar, and foo.bar.baz imported, foo.bar." +"baz bound as baz\n" "from foo import attr # foo imported and foo.attr bound as attr" msgstr "" @@ -977,7 +976,7 @@ msgid "" "the :keyword:`import` statement occurs." msgstr "" -#: ../../reference/simple_stmts.rst:832 +#: ../../reference/simple_stmts.rst:835 msgid "" "The *public names* defined by a module are determined by checking the " "module's namespace for a variable named ``__all__``; if defined, it must be " @@ -990,14 +989,14 @@ msgid "" "API (such as library modules which were imported and used within the module)." msgstr "" -#: ../../reference/simple_stmts.rst:842 +#: ../../reference/simple_stmts.rst:845 msgid "" "The wild card form of import --- ``from module import *`` --- is only " "allowed at the module level. Attempting to use it in class or function " "definitions will raise a :exc:`SyntaxError`." msgstr "" -#: ../../reference/simple_stmts.rst:849 +#: ../../reference/simple_stmts.rst:852 msgid "" "When specifying what module to import you do not have to specify the " "absolute name of the module. When a module or package is contained within " @@ -1014,33 +1013,33 @@ msgid "" "the :ref:`relativeimports` section." msgstr "" -#: ../../reference/simple_stmts.rst:863 +#: ../../reference/simple_stmts.rst:866 msgid "" ":func:`importlib.import_module` is provided to support applications that " "determine dynamically the modules to be loaded." msgstr "" -#: ../../reference/simple_stmts.rst:866 +#: ../../reference/simple_stmts.rst:869 msgid "" "Raises an :ref:`auditing event ` ``import`` with arguments " -"``module``, ``filename``, ``sys.path``, ``sys.meta_path``, " -"``sys.path_hooks``." +"``module``, ``filename``, ``sys.path``, ``sys.meta_path``, ``sys." +"path_hooks``." msgstr "" "引發一個附帶引數 ``module``、``filename``、``sys.path``、``sys.meta_path``、" "``sys.path_hooks`` 的\\ :ref:`稽核事件 ` ``import``。" -#: ../../reference/simple_stmts.rst:871 +#: ../../reference/simple_stmts.rst:874 msgid "Future statements" msgstr "" -#: ../../reference/simple_stmts.rst:877 +#: ../../reference/simple_stmts.rst:880 msgid "" "A :dfn:`future statement` is a directive to the compiler that a particular " "module should be compiled using syntax or semantics that will be available " "in a specified future release of Python where the feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:881 +#: ../../reference/simple_stmts.rst:884 msgid "" "The future statement is intended to ease migration to future versions of " "Python that introduce incompatible changes to the language. It allows use " @@ -1048,35 +1047,35 @@ msgid "" "feature becomes standard." msgstr "" -#: ../../reference/simple_stmts.rst:893 +#: ../../reference/simple_stmts.rst:896 msgid "" "A future statement must appear near the top of the module. The only lines " "that can appear before a future statement are:" msgstr "" -#: ../../reference/simple_stmts.rst:896 +#: ../../reference/simple_stmts.rst:899 msgid "the module docstring (if any)," msgstr "" -#: ../../reference/simple_stmts.rst:897 +#: ../../reference/simple_stmts.rst:900 msgid "comments," msgstr "" -#: ../../reference/simple_stmts.rst:898 +#: ../../reference/simple_stmts.rst:901 msgid "blank lines, and" msgstr "" -#: ../../reference/simple_stmts.rst:899 +#: ../../reference/simple_stmts.rst:902 msgid "other future statements." msgstr "" -#: ../../reference/simple_stmts.rst:901 +#: ../../reference/simple_stmts.rst:904 msgid "" "The only feature that requires using the future statement is ``annotations`` " "(see :pep:`563`)." msgstr "" -#: ../../reference/simple_stmts.rst:904 +#: ../../reference/simple_stmts.rst:907 msgid "" "All historical features enabled by the future statement are still recognized " "by Python 3. The list includes ``absolute_import``, ``division``, " @@ -1086,7 +1085,7 @@ msgid "" "compatibility." msgstr "" -#: ../../reference/simple_stmts.rst:911 +#: ../../reference/simple_stmts.rst:914 msgid "" "A future statement is recognized and treated specially at compile time: " "Changes to the semantics of core constructs are often implemented by " @@ -1096,50 +1095,50 @@ msgid "" "cannot be pushed off until runtime." msgstr "" -#: ../../reference/simple_stmts.rst:918 +#: ../../reference/simple_stmts.rst:921 msgid "" "For any given release, the compiler knows which feature names have been " "defined, and raises a compile-time error if a future statement contains a " "feature not known to it." msgstr "" -#: ../../reference/simple_stmts.rst:922 +#: ../../reference/simple_stmts.rst:925 msgid "" "The direct runtime semantics are the same as for any import statement: there " "is a standard module :mod:`__future__`, described later, and it will be " "imported in the usual way at the time the future statement is executed." msgstr "" -#: ../../reference/simple_stmts.rst:926 +#: ../../reference/simple_stmts.rst:929 msgid "" "The interesting runtime semantics depend on the specific feature enabled by " "the future statement." msgstr "" -#: ../../reference/simple_stmts.rst:929 +#: ../../reference/simple_stmts.rst:932 msgid "Note that there is nothing special about the statement::" msgstr "" -#: ../../reference/simple_stmts.rst:931 +#: ../../reference/simple_stmts.rst:934 msgid "import __future__ [as name]" msgstr "import __future__ [as name]" -#: ../../reference/simple_stmts.rst:933 +#: ../../reference/simple_stmts.rst:936 msgid "" "That is not a future statement; it's an ordinary import statement with no " "special semantics or syntax restrictions." msgstr "" -#: ../../reference/simple_stmts.rst:936 +#: ../../reference/simple_stmts.rst:939 msgid "" -"Code compiled by calls to the built-in functions :func:`exec` " -"and :func:`compile` that occur in a module :mod:`!M` containing a future " -"statement will, by default, use the new syntax or semantics associated with " -"the future statement. This can be controlled by optional arguments " -"to :func:`compile` --- see the documentation of that function for details." +"Code compiled by calls to the built-in functions :func:`exec` and :func:" +"`compile` that occur in a module :mod:`!M` containing a future statement " +"will, by default, use the new syntax or semantics associated with the future " +"statement. This can be controlled by optional arguments to :func:`compile` " +"--- see the documentation of that function for details." msgstr "" -#: ../../reference/simple_stmts.rst:942 +#: ../../reference/simple_stmts.rst:945 msgid "" "A future statement typed at an interactive interpreter prompt will take " "effect for the rest of the interpreter session. If an interpreter is " @@ -1148,19 +1147,19 @@ msgid "" "interactive session started after the script is executed." msgstr "" -#: ../../reference/simple_stmts.rst:950 +#: ../../reference/simple_stmts.rst:953 msgid ":pep:`236` - Back to the __future__" msgstr "" -#: ../../reference/simple_stmts.rst:951 +#: ../../reference/simple_stmts.rst:954 msgid "The original proposal for the __future__ mechanism." msgstr "" -#: ../../reference/simple_stmts.rst:957 +#: ../../reference/simple_stmts.rst:960 msgid "The :keyword:`!global` statement" msgstr ":keyword:`!global` 陳述式" -#: ../../reference/simple_stmts.rst:967 +#: ../../reference/simple_stmts.rst:970 msgid "" "The :keyword:`global` statement causes the listed identifiers to be " "interpreted as globals. It would be impossible to assign to a global " @@ -1168,14 +1167,14 @@ msgid "" "globals without being declared global." msgstr "" -#: ../../reference/simple_stmts.rst:972 +#: ../../reference/simple_stmts.rst:975 msgid "" "The :keyword:`global` statement applies to the entire scope of a function or " "class body. A :exc:`SyntaxError` is raised if a variable is used or assigned " "to prior to its global declaration in the scope." msgstr "" -#: ../../reference/simple_stmts.rst:981 +#: ../../reference/simple_stmts.rst:984 msgid "" "**Programmer's note:** :keyword:`global` is a directive to the parser. It " "applies only to code parsed at the same time as the :keyword:`!global` " @@ -1183,15 +1182,15 @@ msgid "" "string or code object supplied to the built-in :func:`exec` function does " "not affect the code block *containing* the function call, and code contained " "in such a string is unaffected by :keyword:`!global` statements in the code " -"containing the function call. The same applies to the :func:`eval` " -"and :func:`compile` functions." +"containing the function call. The same applies to the :func:`eval` and :" +"func:`compile` functions." msgstr "" -#: ../../reference/simple_stmts.rst:993 +#: ../../reference/simple_stmts.rst:996 msgid "The :keyword:`!nonlocal` statement" msgstr ":keyword:`!nonlocal` 陳述式" -#: ../../reference/simple_stmts.rst:1001 +#: ../../reference/simple_stmts.rst:1004 msgid "" "When the definition of a function or class is nested (enclosed) within the " "definitions of other functions, its nonlocal scopes are the local scopes of " @@ -1199,91 +1198,91 @@ msgid "" "identifiers to refer to names previously bound in nonlocal scopes. It allows " "encapsulated code to rebind such nonlocal identifiers. If a name is bound " "in more than one nonlocal scope, the nearest binding is used. If a name is " -"not bound in any nonlocal scope, or if there is no nonlocal scope, " -"a :exc:`SyntaxError` is raised." +"not bound in any nonlocal scope, or if there is no nonlocal scope, a :exc:" +"`SyntaxError` is raised." msgstr "" -#: ../../reference/simple_stmts.rst:1010 +#: ../../reference/simple_stmts.rst:1013 msgid "" "The :keyword:`nonlocal` statement applies to the entire scope of a function " "or class body. A :exc:`SyntaxError` is raised if a variable is used or " "assigned to prior to its nonlocal declaration in the scope." msgstr "" -#: ../../reference/simple_stmts.rst:1016 +#: ../../reference/simple_stmts.rst:1019 msgid ":pep:`3104` - Access to Names in Outer Scopes" msgstr "" -#: ../../reference/simple_stmts.rst:1017 +#: ../../reference/simple_stmts.rst:1020 msgid "The specification for the :keyword:`nonlocal` statement." msgstr "" -#: ../../reference/simple_stmts.rst:1019 +#: ../../reference/simple_stmts.rst:1022 msgid "" "**Programmer's note:** :keyword:`nonlocal` is a directive to the parser and " -"applies only to code parsed along with it. See the note for " -"the :keyword:`global` statement." +"applies only to code parsed along with it. See the note for the :keyword:" +"`global` statement." msgstr "" -#: ../../reference/simple_stmts.rst:1027 +#: ../../reference/simple_stmts.rst:1030 msgid "The :keyword:`!type` statement" msgstr ":keyword:`!type` 陳述式" -#: ../../reference/simple_stmts.rst:1034 +#: ../../reference/simple_stmts.rst:1037 msgid "" "The :keyword:`!type` statement declares a type alias, which is an instance " "of :class:`typing.TypeAliasType`." msgstr "" -#: ../../reference/simple_stmts.rst:1037 +#: ../../reference/simple_stmts.rst:1040 msgid "For example, the following statement creates a type alias::" msgstr "" -#: ../../reference/simple_stmts.rst:1039 +#: ../../reference/simple_stmts.rst:1042 msgid "type Point = tuple[float, float]" msgstr "" -#: ../../reference/simple_stmts.rst:1041 +#: ../../reference/simple_stmts.rst:1044 msgid "This code is roughly equivalent to::" msgstr "" -#: ../../reference/simple_stmts.rst:1043 +#: ../../reference/simple_stmts.rst:1046 msgid "" "annotation-def VALUE_OF_Point():\n" " return tuple[float, float]\n" "Point = typing.TypeAliasType(\"Point\", VALUE_OF_Point())" msgstr "" -#: ../../reference/simple_stmts.rst:1047 +#: ../../reference/simple_stmts.rst:1050 msgid "" "``annotation-def`` indicates an :ref:`annotation scope `, " "which behaves mostly like a function, but with several small differences." msgstr "" -#: ../../reference/simple_stmts.rst:1050 +#: ../../reference/simple_stmts.rst:1053 msgid "" "The value of the type alias is evaluated in the annotation scope. It is not " "evaluated when the type alias is created, but only when the value is " -"accessed through the type alias's :attr:`!__value__` attribute " -"(see :ref:`lazy-evaluation`). This allows the type alias to refer to names " -"that are not yet defined." +"accessed through the type alias's :attr:`!__value__` attribute (see :ref:" +"`lazy-evaluation`). This allows the type alias to refer to names that are " +"not yet defined." msgstr "" -#: ../../reference/simple_stmts.rst:1056 +#: ../../reference/simple_stmts.rst:1059 msgid "" "Type aliases may be made generic by adding a :ref:`type parameter list ` after the name. See :ref:`generic-type-aliases` for more." msgstr "" -#: ../../reference/simple_stmts.rst:1059 +#: ../../reference/simple_stmts.rst:1062 msgid ":keyword:`!type` is a :ref:`soft keyword `." msgstr "" -#: ../../reference/simple_stmts.rst:1065 +#: ../../reference/simple_stmts.rst:1068 msgid ":pep:`695` - Type Parameter Syntax" msgstr "" -#: ../../reference/simple_stmts.rst:1066 +#: ../../reference/simple_stmts.rst:1069 msgid "" "Introduced the :keyword:`!type` statement and syntax for generic classes and " "functions." @@ -1300,9 +1299,9 @@ msgstr "" #: ../../reference/simple_stmts.rst:460 ../../reference/simple_stmts.rst:486 #: ../../reference/simple_stmts.rst:523 ../../reference/simple_stmts.rst:559 #: ../../reference/simple_stmts.rst:684 ../../reference/simple_stmts.rst:718 -#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:873 -#: ../../reference/simple_stmts.rst:959 ../../reference/simple_stmts.rst:995 -#: ../../reference/simple_stmts.rst:1029 +#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:876 +#: ../../reference/simple_stmts.rst:962 ../../reference/simple_stmts.rst:998 +#: ../../reference/simple_stmts.rst:1032 msgid "statement" msgstr "statement(陳述式)" @@ -1316,7 +1315,7 @@ msgstr "" msgid "list" msgstr "list(串列)" -#: ../../reference/simple_stmts.rst:56 ../../reference/simple_stmts.rst:976 +#: ../../reference/simple_stmts.rst:56 ../../reference/simple_stmts.rst:979 msgid "built-in function" msgstr "built-in function(內建函式)" @@ -1382,13 +1381,13 @@ msgid "assignment" msgstr "assignment(賦值)" #: ../../reference/simple_stmts.rst:75 ../../reference/simple_stmts.rst:743 -#: ../../reference/simple_stmts.rst:798 ../../reference/simple_stmts.rst:959 +#: ../../reference/simple_stmts.rst:798 ../../reference/simple_stmts.rst:962 msgid "binding" msgstr "binding(繫結)" #: ../../reference/simple_stmts.rst:75 ../../reference/simple_stmts.rst:460 #: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:798 -#: ../../reference/simple_stmts.rst:959 +#: ../../reference/simple_stmts.rst:962 msgid "name" msgstr "name(名稱)" @@ -1411,8 +1410,8 @@ msgid "target" msgstr "target" #: ../../reference/simple_stmts.rst:116 ../../reference/simple_stmts.rst:382 -#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:959 -#: ../../reference/simple_stmts.rst:995 +#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:962 +#: ../../reference/simple_stmts.rst:998 msgid ", (comma)" msgstr ", (逗號)" @@ -1586,7 +1585,7 @@ msgstr "del" msgid "deletion" msgstr "deletion(刪除)" -#: ../../reference/simple_stmts.rst:460 ../../reference/simple_stmts.rst:959 +#: ../../reference/simple_stmts.rst:460 ../../reference/simple_stmts.rst:962 msgid "global" msgstr "global" @@ -1693,7 +1692,7 @@ msgstr "loop control(迴圈控制)" msgid "continue" msgstr "continue" -#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:846 +#: ../../reference/simple_stmts.rst:743 ../../reference/simple_stmts.rst:849 msgid "import" msgstr "import(引入)" @@ -1726,42 +1725,42 @@ msgstr "import statement(引入陳述式)" msgid "__all__ (optional module attribute)" msgstr "__all__(可選模組屬性)" -#: ../../reference/simple_stmts.rst:846 +#: ../../reference/simple_stmts.rst:849 msgid "relative" msgstr "relative(相對)" -#: ../../reference/simple_stmts.rst:873 +#: ../../reference/simple_stmts.rst:876 msgid "future" msgstr "future" -#: ../../reference/simple_stmts.rst:873 +#: ../../reference/simple_stmts.rst:876 msgid "__future__" msgstr "__future__" -#: ../../reference/simple_stmts.rst:873 +#: ../../reference/simple_stmts.rst:876 msgid "future statement" msgstr "future statement(future 陳述式)" -#: ../../reference/simple_stmts.rst:959 ../../reference/simple_stmts.rst:995 +#: ../../reference/simple_stmts.rst:962 ../../reference/simple_stmts.rst:998 msgid "identifier list" msgstr "identifier list(識別符號清單)" -#: ../../reference/simple_stmts.rst:976 +#: ../../reference/simple_stmts.rst:979 msgid "exec" msgstr "exec" -#: ../../reference/simple_stmts.rst:976 +#: ../../reference/simple_stmts.rst:979 msgid "eval" msgstr "eval" -#: ../../reference/simple_stmts.rst:976 +#: ../../reference/simple_stmts.rst:979 msgid "compile" msgstr "compile(編譯)" -#: ../../reference/simple_stmts.rst:995 +#: ../../reference/simple_stmts.rst:998 msgid "nonlocal" msgstr "nonlocal" -#: ../../reference/simple_stmts.rst:1029 +#: ../../reference/simple_stmts.rst:1032 msgid "type" msgstr "" diff --git a/using/windows.po b/using/windows.po index 6b1c4c3ad0..ac07405a72 100644 --- a/using/windows.po +++ b/using/windows.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-12 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+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-" @@ -828,7 +828,7 @@ msgstr "" #: ../../using/windows.rst:409 msgid "" "At runtime, Python will use a private copy of well-known Windows folders and " -"the registry. For example, if the environment variable :envvar:`%APPDATA%` " +"the registry. For example, if the environment variable :envvar:`!%APPDATA%` " "is :file:`c:\\\\Users\\\\\\\\AppData\\\\`, then when writing to :file:" "`C:\\\\Users\\\\\\\\AppData\\\\Local` will write to :file:`C:\\" "\\Users\\\\\\\\AppData\\\\Local\\\\Packages\\" @@ -1706,9 +1706,9 @@ msgid "" "program, which performs a :envvar:`PATH` search. If an executable matching " "the first argument after the ``env`` command cannot be found, but the " "argument starts with ``python``, it will be handled as described for the " -"other virtual commands. The environment variable :envvar:" -"`PYLAUNCHER_NO_SEARCH_PATH` may be set (to any value) to skip this search " -"of :envvar:`PATH`." +"other virtual commands. The environment variable :envvar:`!" +"PYLAUNCHER_NO_SEARCH_PATH` may be set (to any value) to skip this search of :" +"envvar:`PATH`." msgstr "" #: ../../using/windows.rst:973 @@ -1807,7 +1807,7 @@ msgstr "" #: ../../using/windows.rst:1036 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 " +"envvar:`!PY_PYTHON` can be set to specify the default version qualifier. If " "it is not set, the default is \"3\". The variable can specify any value that " "may be passed on the command line, such as \"3\", \"3.7\", \"3.7-32\" or " "\"3.7-64\". (Note that the \"-64\" option is only available with the " @@ -1924,12 +1924,13 @@ msgstr "" #: ../../using/windows.rst:1110 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 " -"console). While this information manages to be simultaneously verbose *and* " -"terse, it should allow you to see what versions of Python were located, why " -"a particular version was chosen and the exact command-line used to execute " -"the target Python. It is primarily intended for testing and debugging." +"If an environment variable :envvar:`!PYLAUNCHER_DEBUG` is set (to any " +"value), the launcher will print diagnostic information to stderr (i.e. to " +"the console). While this information manages to be simultaneously verbose " +"*and* terse, it should allow you to see what versions of Python were " +"located, why a particular version was chosen and the exact command-line used " +"to execute the target Python. It is primarily intended for testing and " +"debugging." msgstr "" #: ../../using/windows.rst:1118 @@ -1938,7 +1939,7 @@ msgstr "" #: ../../using/windows.rst:1120 msgid "" -"If an environment variable :envvar:`PYLAUNCHER_DRYRUN` is set (to any " +"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 " "actually launch Python. This may be useful for tools that want to use the " "launcher to detect and then launch Python directly. Note that the command " @@ -1952,19 +1953,19 @@ msgstr "安裝隨選" #: ../../using/windows.rst:1130 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 " -"on the Microsoft Store, the launcher will attempt to install it. This may " -"require user interaction to complete, and you may need to run the command " -"again." +"If an environment variable :envvar:`!PYLAUNCHER_ALLOW_INSTALL` is set (to " +"any value), and the requested Python version is not installed but is " +"available on the Microsoft Store, the launcher will attempt to install it. " +"This may require user interaction to complete, and you may need to run the " +"command again." msgstr "" #: ../../using/windows.rst:1135 msgid "" -"An additional :envvar:`PYLAUNCHER_ALWAYS_INSTALL` variable causes the " +"An additional :envvar:`!PYLAUNCHER_ALWAYS_INSTALL` variable causes the " "launcher to always try to install Python, even if it is detected. This is " -"mainly intended for testing (and should be used with :envvar:" -"`PYLAUNCHER_DRYRUN`)." +"mainly intended for testing (and should be used with :envvar:`!" +"PYLAUNCHER_DRYRUN`)." msgstr "" #: ../../using/windows.rst:1140 diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 6d004c8a49..3beb33ffce 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-19 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -39,11 +39,11 @@ msgstr "" msgid "" "Numeric handling has been improved in many ways, for both floating-point " "numbers and for the :class:`~decimal.Decimal` class. There are some useful " -"additions to the standard library, such as a greatly " -"enhanced :mod:`unittest` module, the :mod:`argparse` module for parsing " -"command-line options, convenient :class:`~collections.OrderedDict` " -"and :class:`~collections.Counter` classes in the :mod:`collections` module, " -"and many other improvements." +"additions to the standard library, such as a greatly enhanced :mod:" +"`unittest` module, the :mod:`argparse` module for parsing command-line " +"options, convenient :class:`~collections.OrderedDict` and :class:" +"`~collections.Counter` classes in the :mod:`collections` module, and many " +"other improvements." msgstr "" #: ../../whatsnew/2.7.rst:63 @@ -59,9 +59,9 @@ msgid "" "features, but instead provides a convenient overview. For full details, you " "should refer to the documentation for Python 2.7 at https://docs.python.org. " "If you want to understand the rationale for the design and implementation, " -"refer to the PEP for a particular new feature or the issue on https://" -"bugs.python.org in which a change was discussed. Whenever possible, " -"\"What's New in Python\" links to the bug/patch item for each change." +"refer to the PEP for a particular new feature or the issue on https://bugs." +"python.org in which a change was discussed. Whenever possible, \"What's New " +"in Python\" links to the bug/patch item for each change." msgstr "" #: ../../whatsnew/2.7.rst:80 @@ -168,11 +168,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:151 msgid "" "However, there are increasingly many users of Python-based applications who " -"are not directly involved in the development of those " -"applications. :exc:`DeprecationWarning` messages are irrelevant to such " -"users, making them worry about an application that's actually working " -"correctly and burdening application developers with responding to these " -"concerns." +"are not directly involved in the development of those applications. :exc:" +"`DeprecationWarning` messages are irrelevant to such users, making them " +"worry about an application that's actually working correctly and burdening " +"application developers with responding to these concerns." msgstr "" #: ../../whatsnew/2.7.rst:158 @@ -249,8 +248,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:192 msgid "" -"Float-to-string and string-to-float conversions are correctly rounded. " -"The :func:`round` function is also now correctly rounded." +"Float-to-string and string-to-float conversions are correctly rounded. The :" +"func:`round` function is also now correctly rounded." msgstr "" #: ../../whatsnew/2.7.rst:194 @@ -288,8 +287,8 @@ msgid "" "Regular Python dictionaries iterate over key/value pairs in arbitrary order. " "Over the years, a number of authors have written alternative implementations " "that remember the order that the keys were originally inserted. Based on " -"the experiences from those implementations, 2.7 introduces a " -"new :class:`~collections.OrderedDict` class in the :mod:`collections` module." +"the experiences from those implementations, 2.7 introduces a new :class:" +"`~collections.OrderedDict` class in the :mod:`collections` module." msgstr "" #: ../../whatsnew/2.7.rst:222 @@ -441,9 +440,9 @@ msgstr "" #: ../../whatsnew/2.7.rst:294 msgid "" -"The :meth:`~collections.somenamedtuple._asdict` method " -"for :func:`collections.namedtuple` now returns an ordered dictionary with " -"the values appearing in the same order as the underlying tuple indices." +"The :meth:`~collections.somenamedtuple._asdict` method for :func:" +"`collections.namedtuple` now returns an ordered dictionary with the values " +"appearing in the same order as the underlying tuple indices." msgstr "" #: ../../whatsnew/2.7.rst:298 @@ -532,14 +531,14 @@ msgstr "" #: ../../whatsnew/2.7.rst:355 msgid "" "This means Python now supports three different modules for parsing command-" -"line arguments: :mod:`getopt`, :mod:`optparse`, and :mod:`argparse`. " -"The :mod:`getopt` module closely resembles the C library's :c:func:`!getopt` " +"line arguments: :mod:`getopt`, :mod:`optparse`, and :mod:`argparse`. The :" +"mod:`getopt` module closely resembles the C library's :c:func:`!getopt` " "function, so it remains useful if you're writing a Python prototype that " "will eventually be rewritten in C. :mod:`optparse` becomes redundant, but " "there are no plans to remove it because there are many scripts still using " -"it, and there's no automated way to update these scripts. (Making " -"the :mod:`argparse` API consistent with :mod:`optparse`'s interface was " -"discussed but rejected as too messy and difficult.)" +"it, and there's no automated way to update these scripts. (Making the :mod:" +"`argparse` API consistent with :mod:`optparse`'s interface was discussed but " +"rejected as too messy and difficult.)" msgstr "" #: ../../whatsnew/2.7.rst:366 @@ -654,9 +653,9 @@ msgid "" "passing ``'*'``, 1 or more by passing ``'+'``, or an optional argument with " "``'?'``. A top-level parser can contain sub-parsers to define subcommands " "that have different sets of switches, as in ``svn commit``, ``svn " -"checkout``, etc. You can specify an argument's type " -"as :class:`~argparse.FileType`, which will automatically open files for you " -"and understands that ``'-'`` means standard input or output." +"checkout``, etc. You can specify an argument's type as :class:`~argparse." +"FileType`, which will automatically open files for you and understands that " +"``'-'`` means standard input or output." msgstr "" #: ../../whatsnew/2.7.rst:437 @@ -673,8 +672,8 @@ msgstr ":ref:`upgrading-optparse-code`" #: ../../whatsnew/2.7.rst:441 msgid "" -"Part of the Python documentation, describing how to convert code that " -"uses :mod:`optparse`." +"Part of the Python documentation, describing how to convert code that uses :" +"mod:`optparse`." msgstr "" #: ../../whatsnew/2.7.rst:444 @@ -701,10 +700,10 @@ msgstr "" msgid "" "All this flexibility can require a lot of configuration. You can write " "Python statements to create objects and set their properties, but a complex " -"set-up requires verbose but boring code. :mod:`logging` also supports " -"a :func:`~logging.config.fileConfig` function that parses a file, but the " -"file format doesn't support configuring filters, and it's messier to " -"generate programmatically." +"set-up requires verbose but boring code. :mod:`logging` also supports a :" +"func:`~logging.config.fileConfig` function that parses a file, but the file " +"format doesn't support configuring filters, and it's messier to generate " +"programmatically." msgstr "" #: ../../whatsnew/2.7.rst:462 @@ -780,8 +779,8 @@ msgstr "" msgid "" "The :class:`~logging.handlers.SysLogHandler` class now supports syslogging " "over TCP. The constructor has a *socktype* parameter giving the type of " -"socket to use, either :const:`socket.SOCK_DGRAM` for UDP " -"or :const:`socket.SOCK_STREAM` for TCP. The default protocol remains UDP." +"socket to use, either :const:`socket.SOCK_DGRAM` for UDP or :const:`socket." +"SOCK_STREAM` for TCP. The default protocol remains UDP." msgstr "" #: ../../whatsnew/2.7.rst:529 @@ -789,16 +788,15 @@ msgid "" ":class:`~logging.Logger` instances gained a :meth:`~logging.Logger.getChild` " "method that retrieves a descendant logger using a relative path. For " "example, once you retrieve a logger by doing ``log = getLogger('app')``, " -"calling ``log.getChild('network.listen')`` is equivalent to " -"``getLogger('app.network.listen')``." +"calling ``log.getChild('network.listen')`` is equivalent to ``getLogger('app." +"network.listen')``." msgstr "" #: ../../whatsnew/2.7.rst:535 msgid "" -"The :class:`~logging.LoggerAdapter` class gained " -"an :meth:`~logging.Logger.isEnabledFor` method that takes a *level* and " -"returns whether the underlying logger would process a message of that level " -"of importance." +"The :class:`~logging.LoggerAdapter` class gained an :meth:`~logging.Logger." +"isEnabledFor` method that takes a *level* and returns whether the underlying " +"logger would process a message of that level of importance." msgstr "" #: ../../whatsnew/2.7.rst:544 @@ -815,18 +813,17 @@ msgstr "" #: ../../whatsnew/2.7.rst:550 msgid "" -"The dictionary methods :meth:`~dict.keys`, :meth:`~dict.values`, " -"and :meth:`~dict.items` are different in Python 3.x. They return an object " -"called a :dfn:`view` instead of a fully materialized list." +"The dictionary methods :meth:`~dict.keys`, :meth:`~dict.values`, and :meth:" +"`~dict.items` are different in Python 3.x. They return an object called a :" +"dfn:`view` instead of a fully materialized list." msgstr "" #: ../../whatsnew/2.7.rst:554 msgid "" -"It's not possible to change the return values " -"of :meth:`~dict.keys`, :meth:`~dict.values`, and :meth:`~dict.items` in " -"Python 2.7 because too much code would break. Instead the 3.x versions were " -"added under the new names :meth:`!viewkeys`, :meth:`!viewvalues`, " -"and :meth:`!viewitems`." +"It's not possible to change the return values of :meth:`~dict.keys`, :meth:" +"`~dict.values`, and :meth:`~dict.items` in Python 2.7 because too much code " +"would break. Instead the 3.x versions were added under the new names :meth:" +"`!viewkeys`, :meth:`!viewvalues`, and :meth:`!viewitems`." msgstr "" #: ../../whatsnew/2.7.rst:562 @@ -912,8 +909,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:599 msgid "" "You can use the view methods in Python 2.x code, and the 2to3 converter will " -"change them to the standard :meth:`~dict.keys`, :meth:`~dict.values`, " -"and :meth:`~dict.items` methods." +"change them to the standard :meth:`~dict.keys`, :meth:`~dict.values`, and :" +"meth:`~dict.items` methods." msgstr "" #: ../../whatsnew/2.7.rst:605 @@ -922,8 +919,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:606 msgid "" -"PEP written by Guido van Rossum. Backported to 2.7 by Alexandre " -"Vassalotti; :issue:`1967`." +"PEP written by Guido van Rossum. Backported to 2.7 by Alexandre Vassalotti; :" +"issue:`1967`." msgstr "" #: ../../whatsnew/2.7.rst:611 @@ -1098,12 +1095,11 @@ msgstr "" msgid "" "Conversions between floating-point numbers and strings are now correctly " "rounded on most platforms. These conversions occur in many different " -"places: :func:`str` on floats and complex numbers; the :class:`float` " -"and :class:`complex` constructors; numeric formatting; serializing and " -"deserializing floats and complex numbers using " -"the :mod:`marshal`, :mod:`pickle` and :mod:`json` modules; parsing of float " -"and imaginary literals in Python code; and :class:`~decimal.Decimal`-to-" -"float conversion." +"places: :func:`str` on floats and complex numbers; the :class:`float` and :" +"class:`complex` constructors; numeric formatting; serializing and " +"deserializing floats and complex numbers using the :mod:`marshal`, :mod:" +"`pickle` and :mod:`json` modules; parsing of float and imaginary literals in " +"Python code; and :class:`~decimal.Decimal`-to-float conversion." msgstr "" #: ../../whatsnew/2.7.rst:741 @@ -1126,8 +1122,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:757 msgid "" -"Implemented by Eric Smith and Mark Dickinson, using David " -"Gay's :file:`dtoa.c` library; :issue:`7117`." +"Implemented by Eric Smith and Mark Dickinson, using David Gay's :file:`dtoa." +"c` library; :issue:`7117`." msgstr "" #: ../../whatsnew/2.7.rst:760 @@ -1238,9 +1234,9 @@ msgstr "" #: ../../whatsnew/2.7.rst:818 msgid "" -"A low-level change: the :meth:`object.__format__` method now triggers " -"a :exc:`PendingDeprecationWarning` if it's passed a format string, because " -"the :meth:`!__format__` method for :class:`object` converts the object to a " +"A low-level change: the :meth:`object.__format__` method now triggers a :exc:" +"`PendingDeprecationWarning` if it's passed a format string, because the :" +"meth:`!__format__` method for :class:`object` converts the object to a " "string representation and formats that. Previously the method silently " "applied the format string to the string representation, but that could hide " "mistakes in Python code. If you're supplying formatting information such as " @@ -1293,15 +1289,15 @@ msgstr "" #: ../../whatsnew/2.7.rst:851 msgid "" "It's now possible for a subclass of the built-in :class:`!unicode` type to " -"override the :meth:`!__unicode__` method. (Implemented by Victor " -"Stinner; :issue:`1583863`.)" +"override the :meth:`!__unicode__` method. (Implemented by Victor Stinner; :" +"issue:`1583863`.)" msgstr "" #: ../../whatsnew/2.7.rst:855 msgid "" "The :class:`bytearray` type's :meth:`~bytearray.translate` method now " -"accepts ``None`` as its first argument. (Fixed by Georg " -"Brandl; :issue:`4759`.)" +"accepts ``None`` as its first argument. (Fixed by Georg Brandl; :issue:" +"`4759`.)" msgstr "" #: ../../whatsnew/2.7.rst:861 @@ -1324,8 +1320,8 @@ msgstr "" msgid "" "Two new encodings are now supported: \"cp720\", used primarily for Arabic " "text; and \"cp858\", a variant of CP 850 that adds the euro symbol. (CP720 " -"contributed by Alexander Belchenko and Amaury Forgeot d'Arc " -"in :issue:`1616979`; CP858 contributed by Tim Hatch in :issue:`8016`.)" +"contributed by Alexander Belchenko and Amaury Forgeot d'Arc in :issue:" +"`1616979`; CP858 contributed by Tim Hatch in :issue:`8016`.)" msgstr "" #: ../../whatsnew/2.7.rst:879 @@ -1334,14 +1330,14 @@ msgid "" "the :exc:`IOError` exception when trying to open a directory on POSIX " "platforms (noted by Jan Kaliszewski; :issue:`4764`), and now explicitly " "checks for and forbids writing to read-only file objects instead of trusting " -"the C library to catch and report the error (fixed by Stefan " -"Krah; :issue:`5677`)." +"the C library to catch and report the error (fixed by Stefan Krah; :issue:" +"`5677`)." msgstr "" #: ../../whatsnew/2.7.rst:886 msgid "" -"The Python tokenizer now translates line endings itself, so " -"the :func:`compile` built-in function now accepts code using any line-ending " +"The Python tokenizer now translates line endings itself, so the :func:" +"`compile` built-in function now accepts code using any line-ending " "convention. Additionally, it no longer requires that the code end in a " "newline." msgstr "" @@ -1357,15 +1353,15 @@ msgstr "" #: ../../whatsnew/2.7.rst:896 msgid "" "It's now possible to create weak references to old-style class objects. New-" -"style classes were always weak-referenceable. (Fixed by Antoine " -"Pitrou; :issue:`8268`.)" +"style classes were always weak-referenceable. (Fixed by Antoine Pitrou; :" +"issue:`8268`.)" msgstr "" #: ../../whatsnew/2.7.rst:900 msgid "" "When a module object is garbage-collected, the module's dictionary is now " -"only cleared if no one else is holding a reference to the dictionary " -"(:issue:`7140`)." +"only cleared if no one else is holding a reference to the dictionary (:issue:" +"`7140`)." msgstr "" #: ../../whatsnew/2.7.rst:909 @@ -1403,8 +1399,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:934 msgid "" "A new opcode was added to perform the initial setup for :keyword:`with` " -"statements, looking up the :meth:`~object.__enter__` " -"and :meth:`~object.__exit__` methods. (Contributed by Benjamin Peterson.)" +"statements, looking up the :meth:`~object.__enter__` and :meth:`~object." +"__exit__` methods. (Contributed by Benjamin Peterson.)" msgstr "" #: ../../whatsnew/2.7.rst:938 @@ -1494,8 +1490,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:999 msgid "" "List comprehensions with an ``if`` condition are compiled into faster " -"bytecode. (Patch by Antoine Pitrou, back-ported to 2.7 by Jeffrey " -"Yasskin; :issue:`4715`.)" +"bytecode. (Patch by Antoine Pitrou, back-ported to 2.7 by Jeffrey Yasskin; :" +"issue:`4715`.)" msgstr "" #: ../../whatsnew/2.7.rst:1003 @@ -1524,8 +1520,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1020 msgid "" "The :mod:`!cPickle` module now special-cases dictionaries, nearly halving " -"the time required to pickle them. (Contributed by Collin " -"Winter; :issue:`5670`.)" +"the time required to pickle them. (Contributed by Collin Winter; :issue:" +"`5670`.)" msgstr "" #: ../../whatsnew/2.7.rst:1027 @@ -1547,8 +1543,8 @@ msgid "" "feature for skipping modules. The constructor now takes an iterable " "containing glob-style patterns such as ``django.*``; the debugger will not " "step into stack frames from a module that matches one of these patterns. " -"(Contributed by Maru Newby after a suggestion by Senthil " -"Kumaran; :issue:`5142`.)" +"(Contributed by Maru Newby after a suggestion by Senthil Kumaran; :issue:" +"`5142`.)" msgstr "" #: ../../whatsnew/2.7.rst:1043 @@ -1615,13 +1611,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1081 msgid "" -"There are three additional :class:`~collections.Counter` " -"methods. :meth:`~collections.Counter.most_common` returns the N most common " -"elements and their counts. :meth:`~collections.Counter.elements` returns an " -"iterator over the contained elements, repeating each element as many times " -"as its count. :meth:`~collections.Counter.subtract` takes an iterable and " -"subtracts one for each element instead of adding; if the argument is a " -"dictionary or another :class:`Counter`, the counts are subtracted. ::" +"There are three additional :class:`~collections.Counter` methods. :meth:" +"`~collections.Counter.most_common` returns the N most common elements and " +"their counts. :meth:`~collections.Counter.elements` returns an iterator " +"over the contained elements, repeating each element as many times as its " +"count. :meth:`~collections.Counter.subtract` takes an iterable and subtracts " +"one for each element instead of adding; if the argument is a dictionary or " +"another :class:`Counter`, the counts are subtracted. ::" msgstr "" #: ../../whatsnew/2.7.rst:1091 @@ -1652,13 +1648,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1111 msgid "" -"New method: The :class:`~collections.deque` data type now has " -"a :meth:`~collections.deque.count` method that returns the number of " -"contained elements equal to the supplied argument *x*, and " -"a :meth:`~collections.deque.reverse` method that reverses the elements of " -"the deque in-place. :class:`~collections.deque` also exposes its maximum " -"length as the read-only :attr:`~collections.deque.maxlen` attribute. (Both " -"features added by Raymond Hettinger.)" +"New method: The :class:`~collections.deque` data type now has a :meth:" +"`~collections.deque.count` method that returns the number of contained " +"elements equal to the supplied argument *x*, and a :meth:`~collections.deque." +"reverse` method that reverses the elements of the deque in-place. :class:" +"`~collections.deque` also exposes its maximum length as the read-only :attr:" +"`~collections.deque.maxlen` attribute. (Both features added by Raymond " +"Hettinger.)" msgstr "" #: ../../whatsnew/2.7.rst:1119 @@ -1736,30 +1732,28 @@ msgstr "" #: ../../whatsnew/2.7.rst:1174 msgid "" "The :mod:`ctypes` module now always converts ``None`` to a C ``NULL`` " -"pointer for arguments declared as pointers. (Changed by Thomas " -"Heller; :issue:`4606`.) The underlying `libffi library `__ has been updated to version 3.0.9, containing " -"various fixes for different platforms. (Updated by Matthias " -"Klose; :issue:`8142`.)" +"pointer for arguments declared as pointers. (Changed by Thomas Heller; :" +"issue:`4606`.) The underlying `libffi library `__ has been updated to version 3.0.9, containing various fixes for " +"different platforms. (Updated by Matthias Klose; :issue:`8142`.)" msgstr "" #: ../../whatsnew/2.7.rst:1181 msgid "" "New method: the :mod:`datetime` module's :class:`~datetime.timedelta` class " "gained a :meth:`~datetime.timedelta.total_seconds` method that returns the " -"number of seconds in the duration. (Contributed by Brian " -"Quinlan; :issue:`5788`.)" +"number of seconds in the duration. (Contributed by Brian Quinlan; :issue:" +"`5788`.)" msgstr "" #: ../../whatsnew/2.7.rst:1185 msgid "" -"New method: the :class:`~decimal.Decimal` class gained " -"a :meth:`~decimal.Decimal.from_float` class method that performs an exact " -"conversion of a floating-point number to a :class:`!Decimal`. This exact " -"conversion strives for the closest decimal approximation to the floating-" -"point representation's value; the resulting decimal value will therefore " -"still include the inaccuracy, if any. For example, " -"``Decimal.from_float(0.1)`` returns " +"New method: the :class:`~decimal.Decimal` class gained a :meth:`~decimal." +"Decimal.from_float` class method that performs an exact conversion of a " +"floating-point number to a :class:`!Decimal`. This exact conversion strives " +"for the closest decimal approximation to the floating-point representation's " +"value; the resulting decimal value will therefore still include the " +"inaccuracy, if any. For example, ``Decimal.from_float(0.1)`` returns " "``Decimal('0.1000000000000000055511151231257827021181583404541015625')``. " "(Implemented by Raymond Hettinger; :issue:`4796`.)" msgstr "" @@ -1780,33 +1774,32 @@ msgstr "" msgid "" "The constructor for :class:`~decimal.Decimal` now accepts floating-point " "numbers (added by Raymond Hettinger; :issue:`8257`) and non-European Unicode " -"characters such as Arabic-Indic digits (contributed by Mark " -"Dickinson; :issue:`6595`)." +"characters such as Arabic-Indic digits (contributed by Mark Dickinson; :" +"issue:`6595`)." msgstr "" #: ../../whatsnew/2.7.rst:1210 msgid "" "Most of the methods of the :class:`~decimal.Context` class now accept " "integers as well as :class:`~decimal.Decimal` instances; the only exceptions " -"are the :meth:`~decimal.Context.canonical` " -"and :meth:`~decimal.Context.is_canonical` methods. (Patch by Juan José " -"Conti; :issue:`7633`.)" +"are the :meth:`~decimal.Context.canonical` and :meth:`~decimal.Context." +"is_canonical` methods. (Patch by Juan José Conti; :issue:`7633`.)" msgstr "" #: ../../whatsnew/2.7.rst:1215 msgid "" -"When using :class:`~decimal.Decimal` instances with a " -"string's :meth:`~str.format` method, the default alignment was previously " -"left-alignment. This has been changed to right-alignment, which is more " -"sensible for numeric types. (Changed by Mark Dickinson; :issue:`6857`.)" +"When using :class:`~decimal.Decimal` instances with a string's :meth:`~str." +"format` method, the default alignment was previously left-alignment. This " +"has been changed to right-alignment, which is more sensible for numeric " +"types. (Changed by Mark Dickinson; :issue:`6857`.)" msgstr "" #: ../../whatsnew/2.7.rst:1220 ../../whatsnew/2.7.rst:2484 msgid "" -"Comparisons involving a signaling NaN value (or ``sNAN``) now " -"signal :const:`~decimal.InvalidOperation` instead of silently returning a " -"true or false value depending on the comparison operator. Quiet NaN values " -"(or ``NaN``) are now hashable. (Fixed by Mark Dickinson; :issue:`7279`.)" +"Comparisons involving a signaling NaN value (or ``sNAN``) now signal :const:" +"`~decimal.InvalidOperation` instead of silently returning a true or false " +"value depending on the comparison operator. Quiet NaN values (or ``NaN``) " +"are now hashable. (Fixed by Mark Dickinson; :issue:`7279`.)" msgstr "" #: ../../whatsnew/2.7.rst:1226 @@ -1836,16 +1829,16 @@ msgstr "" msgid "" "The :mod:`email` module's :class:`~email.message.Message` class will now " "accept a Unicode-valued payload, automatically converting the payload to the " -"encoding specified by :attr:`!output_charset`. (Added by R. David " -"Murray; :issue:`1368247`.)" +"encoding specified by :attr:`!output_charset`. (Added by R. David Murray; :" +"issue:`1368247`.)" msgstr "" #: ../../whatsnew/2.7.rst:1247 msgid "" -"The :class:`~fractions.Fraction` class now accepts a single float " -"or :class:`~decimal.Decimal` instance, or two rational numbers, as arguments " -"to its constructor. (Implemented by Mark Dickinson; rationals added " -"in :issue:`5812`, and float/decimal in :issue:`8294`.)" +"The :class:`~fractions.Fraction` class now accepts a single float or :class:" +"`~decimal.Decimal` instance, or two rational numbers, as arguments to its " +"constructor. (Implemented by Mark Dickinson; rationals added in :issue:" +"`5812`, and float/decimal in :issue:`8294`.)" msgstr "" #: ../../whatsnew/2.7.rst:1253 @@ -1859,37 +1852,36 @@ msgstr "" msgid "" "New class: :class:`~ftplib.FTP_TLS` in the :mod:`ftplib` module provides " "secure FTP connections using TLS encapsulation of authentication as well as " -"subsequent control and data transfers. (Contributed by Giampaolo " -"Rodola; :issue:`2054`.)" +"subsequent control and data transfers. (Contributed by Giampaolo Rodola; :" +"issue:`2054`.)" msgstr "" #: ../../whatsnew/2.7.rst:1266 msgid "" "The :meth:`~ftplib.FTP.storbinary` method for binary uploads can now restart " -"uploads thanks to an added *rest* parameter (patch by Pablo " -"Mouzo; :issue:`6845`.)" +"uploads thanks to an added *rest* parameter (patch by Pablo Mouzo; :issue:" +"`6845`.)" msgstr "" #: ../../whatsnew/2.7.rst:1270 msgid "" -"New class decorator: :func:`~functools.total_ordering` in " -"the :mod:`functools` module takes a class that defines " -"an :meth:`~object.__eq__` method and one " -"of :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:`~object.__gt__`, " -"or :meth:`~object.__ge__`, and generates the missing comparison methods. " -"Since the :meth:`!__cmp__` method is being deprecated in Python 3.x, this " -"decorator makes it easier to define ordered classes. (Added by Raymond " -"Hettinger; :issue:`5479`.)" +"New class decorator: :func:`~functools.total_ordering` in the :mod:" +"`functools` module takes a class that defines an :meth:`~object.__eq__` " +"method and one of :meth:`~object.__lt__`, :meth:`~object.__le__`, :meth:" +"`~object.__gt__`, or :meth:`~object.__ge__`, and generates the missing " +"comparison methods. Since the :meth:`!__cmp__` method is being deprecated " +"in Python 3.x, this decorator makes it easier to define ordered classes. " +"(Added by Raymond Hettinger; :issue:`5479`.)" msgstr "" #: ../../whatsnew/2.7.rst:1278 msgid "" "New function: :func:`~functools.cmp_to_key` will take an old-style " "comparison function that expects two arguments and return a new callable " -"that can be used as the *key* parameter to functions such " -"as :func:`sorted`, :func:`min` and :func:`max`, etc. The primary intended " -"use is to help with making code compatible with Python 3.x. (Added by " -"Raymond Hettinger.)" +"that can be used as the *key* parameter to functions such as :func:" +"`sorted`, :func:`min` and :func:`max`, etc. The primary intended use is to " +"help with making code compatible with Python 3.x. (Added by Raymond " +"Hettinger.)" msgstr "" #: ../../whatsnew/2.7.rst:1285 @@ -1903,12 +1895,12 @@ msgstr "" msgid "" "The :mod:`gzip` module's :class:`~gzip.GzipFile` now supports the context " "management protocol, so you can write ``with gzip.GzipFile(...) as f:`` " -"(contributed by Hagen Fürstenau; :issue:`3860`), and it now implements " -"the :class:`io.BufferedIOBase` ABC, so you can wrap it " -"with :class:`io.BufferedReader` for faster processing (contributed by Nir " -"Aides; :issue:`7471`). It's also now possible to override the modification " -"time recorded in a gzipped file by providing an optional timestamp to the " -"constructor. (Contributed by Jacques Frechet; :issue:`4272`.)" +"(contributed by Hagen Fürstenau; :issue:`3860`), and it now implements the :" +"class:`io.BufferedIOBase` ABC, so you can wrap it with :class:`io." +"BufferedReader` for faster processing (contributed by Nir Aides; :issue:" +"`7471`). It's also now possible to override the modification time recorded " +"in a gzipped file by providing an optional timestamp to the constructor. " +"(Contributed by Jacques Frechet; :issue:`4272`.)" msgstr "" #: ../../whatsnew/2.7.rst:1299 @@ -1928,19 +1920,18 @@ msgstr "" #: ../../whatsnew/2.7.rst:1309 msgid "" -"The default :class:`~http.client.HTTPResponse` class used by " -"the :mod:`httplib ` module now supports buffering, resulting in much " -"faster reading of HTTP responses. (Contributed by Kristján Valur " -"Jónsson; :issue:`4879`.)" +"The default :class:`~http.client.HTTPResponse` class used by the :mod:" +"`httplib ` module now supports buffering, resulting in much faster " +"reading of HTTP responses. (Contributed by Kristján Valur Jónsson; :issue:" +"`4879`.)" msgstr "" #: ../../whatsnew/2.7.rst:1313 msgid "" -"The :class:`~http.client.HTTPConnection` " -"and :class:`~http.client.HTTPSConnection` classes now support a " -"*source_address* parameter, a ``(host, port)`` 2-tuple giving the source " -"address that will be used for the connection. (Contributed by Eldon " -"Ziegler; :issue:`3972`.)" +"The :class:`~http.client.HTTPConnection` and :class:`~http.client." +"HTTPSConnection` classes now support a *source_address* parameter, a " +"``(host, port)`` 2-tuple giving the source address that will be used for the " +"connection. (Contributed by Eldon Ziegler; :issue:`3972`.)" msgstr "" #: ../../whatsnew/2.7.rst:1318 @@ -1995,8 +1986,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1353 msgid "" -"One minor resulting change: the :class:`io.TextIOBase` class now has " -"an :attr:`~io.TextIOBase.errors` attribute giving the error setting used for " +"One minor resulting change: the :class:`io.TextIOBase` class now has an :" +"attr:`~io.TextIOBase.errors` attribute giving the error setting used for " "encoding and decoding errors (one of ``'strict'``, ``'replace'``, " "``'ignore'``)." msgstr "" @@ -2004,10 +1995,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:1358 msgid "" "The :class:`io.FileIO` class now raises an :exc:`OSError` when passed an " -"invalid file descriptor. (Implemented by Benjamin " -"Peterson; :issue:`4991`.) The :meth:`~io.IOBase.truncate` method now " -"preserves the file position; previously it would change the file position to " -"the end of the new file. (Fixed by Pascal Chambon; :issue:`6939`.)" +"invalid file descriptor. (Implemented by Benjamin Peterson; :issue:" +"`4991`.) The :meth:`~io.IOBase.truncate` method now preserves the file " +"position; previously it would change the file position to the end of the new " +"file. (Fixed by Pascal Chambon; :issue:`6939`.)" msgstr "" #: ../../whatsnew/2.7.rst:1364 @@ -2048,9 +2039,9 @@ msgstr "" msgid "" "The :func:`itertools.count` function now has a *step* argument that allows " "incrementing by values other than 1. :func:`~itertools.count` also now " -"allows keyword arguments, and using non-integer values such as floats " -"or :class:`~decimal.Decimal` instances. (Implemented by Raymond " -"Hettinger; :issue:`5032`.)" +"allows keyword arguments, and using non-integer values such as floats or :" +"class:`~decimal.Decimal` instances. (Implemented by Raymond Hettinger; :" +"issue:`5032`.)" msgstr "" #: ../../whatsnew/2.7.rst:1391 @@ -2087,13 +2078,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1412 msgid "" -"New functions: the :mod:`math` module gained :func:`~math.erf` " -"and :func:`~math.erfc` for the error function and the complementary error " -"function, :func:`~math.expm1` which computes ``e**x - 1`` with more " -"precision than using :func:`~math.exp` and subtracting " -"1, :func:`~math.gamma` for the Gamma function, and :func:`~math.lgamma` for " -"the natural log of the Gamma function. (Contributed by Mark Dickinson and " -"nirinA raseliarison; :issue:`3366`.)" +"New functions: the :mod:`math` module gained :func:`~math.erf` and :func:" +"`~math.erfc` for the error function and the complementary error function, :" +"func:`~math.expm1` which computes ``e**x - 1`` with more precision than " +"using :func:`~math.exp` and subtracting 1, :func:`~math.gamma` for the Gamma " +"function, and :func:`~math.lgamma` for the natural log of the Gamma " +"function. (Contributed by Mark Dickinson and nirinA raseliarison; :issue:" +"`3366`.)" msgstr "" #: ../../whatsnew/2.7.rst:1420 @@ -2122,14 +2113,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1437 msgid "" -"New functions: the :mod:`os` module wraps the following POSIX system " -"calls: :func:`~os.getresgid` and :func:`~os.getresuid`, which return the " -"real, effective, and saved GIDs and UIDs; :func:`~os.setresgid` " -"and :func:`~os.setresuid`, which set real, effective, and saved GIDs and " -"UIDs to new values; :func:`~os.initgroups`, which initialize the group " -"access list for the current process. (GID/UID functions contributed by " -"Travis H.; :issue:`6508`. Support for initgroups added by Jean-Paul " -"Calderone; :issue:`7333`.)" +"New functions: the :mod:`os` module wraps the following POSIX system calls: :" +"func:`~os.getresgid` and :func:`~os.getresuid`, which return the real, " +"effective, and saved GIDs and UIDs; :func:`~os.setresgid` and :func:`~os." +"setresuid`, which set real, effective, and saved GIDs and UIDs to new " +"values; :func:`~os.initgroups`, which initialize the group access list for " +"the current process. (GID/UID functions contributed by Travis H.; :issue:" +"`6508`. Support for initgroups added by Jean-Paul Calderone; :issue:`7333`.)" msgstr "" #: ../../whatsnew/2.7.rst:1447 @@ -2141,12 +2131,11 @@ msgstr "" #: ../../whatsnew/2.7.rst:1451 msgid "" -"In the :mod:`os.path` module, the :func:`~os.path.normpath` " -"and :func:`~os.path.abspath` functions now preserve Unicode; if their input " -"path is a Unicode string, the return value is also a Unicode string. " -"(:meth:`~os.path.normpath` fixed by Matt Giuca " -"in :issue:`5827`; :meth:`~os.path.abspath` fixed by Ezio Melotti " -"in :issue:`3426`.)" +"In the :mod:`os.path` module, the :func:`~os.path.normpath` and :func:`~os." +"path.abspath` functions now preserve Unicode; if their input path is a " +"Unicode string, the return value is also a Unicode string. (:meth:`~os.path." +"normpath` fixed by Matt Giuca in :issue:`5827`; :meth:`~os.path.abspath` " +"fixed by Ezio Melotti in :issue:`3426`.)" msgstr "" #: ../../whatsnew/2.7.rst:1457 @@ -2158,26 +2147,24 @@ msgstr "" #: ../../whatsnew/2.7.rst:1461 msgid "" -"The :mod:`re` module's :func:`~re.split`, :func:`~re.sub`, " -"and :func:`~re.subn` now accept an optional *flags* argument, for " -"consistency with the other functions in the module. (Added by Gregory P. " -"Smith.)" +"The :mod:`re` module's :func:`~re.split`, :func:`~re.sub`, and :func:`~re." +"subn` now accept an optional *flags* argument, for consistency with the " +"other functions in the module. (Added by Gregory P. Smith.)" msgstr "" #: ../../whatsnew/2.7.rst:1465 msgid "" "New function: :func:`~runpy.run_path` in the :mod:`runpy` module will " "execute the code at a provided *path* argument. *path* can be the path of a " -"Python source file (:file:`example.py`), a compiled bytecode file " -"(:file:`example.pyc`), a directory (:file:`./package/`), or a zip archive " -"(:file:`example.zip`). If a directory or zip path is provided, it will be " -"added to the front of ``sys.path`` and the module :mod:`__main__` will be " -"imported. It's expected that the directory or zip contains " -"a :file:`__main__.py`; if it doesn't, some other :file:`__main__.py` might " -"be imported from a location later in ``sys.path``. This makes more of the " -"machinery of :mod:`runpy` available to scripts that want to mimic the way " -"Python's command line processes an explicit path name. (Added by Nick " -"Coghlan; :issue:`6816`.)" +"Python source file (:file:`example.py`), a compiled bytecode file (:file:" +"`example.pyc`), a directory (:file:`./package/`), or a zip archive (:file:" +"`example.zip`). If a directory or zip path is provided, it will be added to " +"the front of ``sys.path`` and the module :mod:`__main__` will be imported. " +"It's expected that the directory or zip contains a :file:`__main__.py`; if " +"it doesn't, some other :file:`__main__.py` might be imported from a location " +"later in ``sys.path``. This makes more of the machinery of :mod:`runpy` " +"available to scripts that want to mimic the way Python's command line " +"processes an explicit path name. (Added by Nick Coghlan; :issue:`6816`.)" msgstr "" #: ../../whatsnew/2.7.rst:1479 @@ -2201,28 +2188,27 @@ msgstr "" msgid "" "The :mod:`signal` module no longer re-installs the signal handler unless " "this is truly necessary, which fixes a bug that could make it impossible to " -"catch the EINTR signal robustly. (Fixed by Charles-Francois " -"Natali; :issue:`8354`.)" +"catch the EINTR signal robustly. (Fixed by Charles-Francois Natali; :issue:" +"`8354`.)" msgstr "" #: ../../whatsnew/2.7.rst:1495 msgid "" "New functions: in the :mod:`site` module, three new functions return various " "site- and user-specific paths. :func:`~site.getsitepackages` returns a list " -"containing all global site-packages " -"directories, :func:`~site.getusersitepackages` returns the path of the " -"user's site-packages directory, and :func:`~site.getuserbase` returns the " -"value of the :data:`~site.USER_BASE` environment variable, giving the path " -"to a directory that can be used to store data. (Contributed by Tarek " -"Ziadé; :issue:`6693`.)" +"containing all global site-packages directories, :func:`~site." +"getusersitepackages` returns the path of the user's site-packages directory, " +"and :func:`~site.getuserbase` returns the value of the :data:`~site." +"USER_BASE` environment variable, giving the path to a directory that can be " +"used to store data. (Contributed by Tarek Ziadé; :issue:`6693`.)" msgstr "" #: ../../whatsnew/2.7.rst:1506 msgid "" -"The :mod:`site` module now reports exceptions occurring when " -"the :mod:`sitecustomize` module is imported, and will no longer catch and " -"swallow the :exc:`KeyboardInterrupt` exception. (Fixed by Victor " -"Stinner; :issue:`3137`.)" +"The :mod:`site` module now reports exceptions occurring when the :mod:" +"`sitecustomize` module is imported, and will no longer catch and swallow " +"the :exc:`KeyboardInterrupt` exception. (Fixed by Victor Stinner; :issue:" +"`3137`.)" msgstr "" #: ../../whatsnew/2.7.rst:1511 @@ -2234,27 +2220,25 @@ msgstr "" #: ../../whatsnew/2.7.rst:1516 msgid "" -"The :meth:`~socket.socket.recv_into` " -"and :meth:`~socket.socket.recvfrom_into` methods will now write into objects " -"that support the buffer API, most usefully the :class:`bytearray` " -"and :class:`memoryview` objects. (Implemented by Antoine " -"Pitrou; :issue:`8104`.)" +"The :meth:`~socket.socket.recv_into` and :meth:`~socket.socket." +"recvfrom_into` methods will now write into objects that support the buffer " +"API, most usefully the :class:`bytearray` and :class:`memoryview` objects. " +"(Implemented by Antoine Pitrou; :issue:`8104`.)" msgstr "" #: ../../whatsnew/2.7.rst:1521 msgid "" -"The :mod:`SocketServer ` " -"module's :class:`~socketserver.TCPServer` class now supports socket timeouts " -"and disabling the Nagle algorithm. The :attr:`!disable_nagle_algorithm` " -"class attribute defaults to ``False``; if overridden to be true, new request " -"connections will have the TCP_NODELAY option set to prevent buffering many " -"small sends into a single TCP packet. " -"The :attr:`~socketserver.BaseServer.timeout` class attribute can hold a " -"timeout in seconds that will be applied to the request socket; if no request " -"is received within that " -"time, :meth:`~socketserver.BaseServer.handle_timeout` will be called " -"and :meth:`~socketserver.BaseServer.handle_request` will return. " -"(Contributed by Kristján Valur Jónsson; :issue:`6192` and :issue:`6267`.)" +"The :mod:`SocketServer ` module's :class:`~socketserver." +"TCPServer` class now supports socket timeouts and disabling the Nagle " +"algorithm. The :attr:`!disable_nagle_algorithm` class attribute defaults to " +"``False``; if overridden to be true, new request connections will have the " +"TCP_NODELAY option set to prevent buffering many small sends into a single " +"TCP packet. The :attr:`~socketserver.BaseServer.timeout` class attribute can " +"hold a timeout in seconds that will be applied to the request socket; if no " +"request is received within that time, :meth:`~socketserver.BaseServer." +"handle_timeout` will be called and :meth:`~socketserver.BaseServer." +"handle_request` will return. (Contributed by Kristján Valur Jónsson; :issue:" +"`6192` and :issue:`6267`.)" msgstr "" #: ../../whatsnew/2.7.rst:1533 @@ -2263,19 +2247,19 @@ msgid "" "of the `pysqlite package `__. Version " "2.6.0 includes a number of bugfixes, and adds the ability to load SQLite " "extensions from shared libraries. Call the ``enable_load_extension(True)`` " -"method to enable extensions, and then " -"call :meth:`~sqlite3.Connection.load_extension` to load a particular shared " -"library. (Updated by Gerhard Häring.)" +"method to enable extensions, and then call :meth:`~sqlite3.Connection." +"load_extension` to load a particular shared library. (Updated by Gerhard " +"Häring.)" msgstr "" #: ../../whatsnew/2.7.rst:1540 msgid "" "The :mod:`ssl` module's :class:`~ssl.SSLSocket` objects now support the " -"buffer API, which fixed a test suite failure (fix by Antoine " -"Pitrou; :issue:`7133`) and automatically set OpenSSL's :c:macro:`!" -"SSL_MODE_AUTO_RETRY`, which will prevent an error code being returned " -"from :meth:`recv` operations that trigger an SSL renegotiation (fix by " -"Antoine Pitrou; :issue:`8222`)." +"buffer API, which fixed a test suite failure (fix by Antoine Pitrou; :issue:" +"`7133`) and automatically set OpenSSL's :c:macro:`!SSL_MODE_AUTO_RETRY`, " +"which will prevent an error code being returned from :meth:`!recv` " +"operations that trigger an SSL renegotiation (fix by Antoine Pitrou; :issue:" +"`8222`)." msgstr "" #: ../../whatsnew/2.7.rst:1547 @@ -2297,11 +2281,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:1560 msgid "" -"The version of OpenSSL being used is now available as the module " -"attributes :const:`ssl.OPENSSL_VERSION` (a " -"string), :const:`ssl.OPENSSL_VERSION_INFO` (a 5-tuple), " -"and :const:`ssl.OPENSSL_VERSION_NUMBER` (an integer). (Added by Antoine " -"Pitrou; :issue:`8321`.)" +"The version of OpenSSL being used is now available as the module attributes :" +"const:`ssl.OPENSSL_VERSION` (a string), :const:`ssl.OPENSSL_VERSION_INFO` (a " +"5-tuple), and :const:`ssl.OPENSSL_VERSION_NUMBER` (an integer). (Added by " +"Antoine Pitrou; :issue:`8321`.)" msgstr "" #: ../../whatsnew/2.7.rst:1566 @@ -2317,11 +2300,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:1575 msgid "" -"New function: the :mod:`subprocess` " -"module's :func:`~subprocess.check_output` runs a command with a specified " -"set of arguments and returns the command's output as a string when the " -"command runs without error, or raises " -"a :exc:`~subprocess.CalledProcessError` exception otherwise." +"New function: the :mod:`subprocess` module's :func:`~subprocess." +"check_output` runs a command with a specified set of arguments and returns " +"the command's output as a string when the command runs without error, or " +"raises a :exc:`~subprocess.CalledProcessError` exception otherwise." msgstr "" #: ../../whatsnew/2.7.rst:1582 @@ -2349,10 +2331,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:1596 msgid "" -"New function: :func:`~symtable.Symbol.is_declared_global` in " -"the :mod:`symtable` module returns true for variables that are explicitly " -"declared to be global, false for ones that are implicitly global. " -"(Contributed by Jeremy Hylton.)" +"New function: :func:`~symtable.Symbol.is_declared_global` in the :mod:" +"`symtable` module returns true for variables that are explicitly declared to " +"be global, false for ones that are implicitly global. (Contributed by Jeremy " +"Hylton.)" msgstr "" #: ../../whatsnew/2.7.rst:1601 ../../whatsnew/2.7.rst:2500 @@ -2372,8 +2354,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1610 msgid "" ":func:`sys.getwindowsversion` also returns a named tuple, with attributes " -"named :attr:`!major`, :attr:`!minor`, :attr:`!build`, :attr:`!" -"platform`, :attr:`!service_pack`, :attr:`!service_pack_major`, :attr:`!" +"named :attr:`!major`, :attr:`!minor`, :attr:`!build`, :attr:`!platform`, :" +"attr:`!service_pack`, :attr:`!service_pack_major`, :attr:`!" "service_pack_minor`, :attr:`!suite_mask`, and :attr:`!product_type`. " "(Contributed by Brian Curtin; :issue:`7766`.)" msgstr "" @@ -2398,8 +2380,8 @@ msgid "" "file will be excluded from the resulting archive. This is more powerful " "than the existing *exclude* argument, which has therefore been deprecated. " "(Added by Lars Gustäbel; :issue:`6856`.) The :class:`~tarfile.TarFile` class " -"also now supports the context management protocol. (Added by Lars " -"Gustäbel; :issue:`7232`.)" +"also now supports the context management protocol. (Added by Lars Gustäbel; :" +"issue:`7232`.)" msgstr "" #: ../../whatsnew/2.7.rst:1636 @@ -2416,10 +2398,10 @@ msgstr "" msgid "" "The Unicode database provided by the :mod:`unicodedata` module is now used " "internally to determine which characters are numeric, whitespace, or " -"represent line breaks. The database also includes information from " -"the :file:`Unihan.txt` data file (patch by Anders Chrigström and Amaury " -"Forgeot d'Arc; :issue:`1571184`) and has been updated to version 5.2.0 " -"(updated by Florent Xicluna; :issue:`8024`)." +"represent line breaks. The database also includes information from the :" +"file:`Unihan.txt` data file (patch by Anders Chrigström and Amaury Forgeot " +"d'Arc; :issue:`1571184`) and has been updated to version 5.2.0 (updated by " +"Florent Xicluna; :issue:`8024`)." msgstr "" #: ../../whatsnew/2.7.rst:1651 ../../whatsnew/2.7.rst:2512 @@ -2459,8 +2441,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1678 msgid "" "The :mod:`urlparse ` module also supports IPv6 literal " -"addresses as defined by :rfc:`2732` (contributed by Senthil " -"Kumaran; :issue:`2987`)." +"addresses as defined by :rfc:`2732` (contributed by Senthil Kumaran; :issue:" +"`2987`)." msgstr "" #: ../../whatsnew/2.7.rst:1681 @@ -2469,6 +2451,9 @@ msgid "" "ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',\n" " path='/foo', params='', query='', fragment='')" msgstr "" +">>> urlparse.urlparse('http://[1080::8:800:200C:417A]/foo')\n" +"ParseResult(scheme='http', netloc='[1080::8:800:200C:417A]',\n" +" path='/foo', params='', query='', fragment='')" #: ../../whatsnew/2.7.rst:1688 msgid "" @@ -2489,13 +2474,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1700 msgid "" -"The XML-RPC client and server, provided by the :mod:`xmlrpclib " -"` and :mod:`SimpleXMLRPCServer ` modules, have " +"The XML-RPC client and server, provided by the :mod:`xmlrpclib ` and :mod:`SimpleXMLRPCServer ` modules, have " "improved performance by supporting HTTP/1.1 keep-alive and by optionally " "using gzip encoding to compress the XML being exchanged. The gzip " -"compression is controlled by the :attr:`!encode_threshold` attribute " -"of :class:`~xmlrpc.server.SimpleXMLRPCRequestHandler`, which contains a size " -"in bytes; responses larger than this will be compressed. (Contributed by " +"compression is controlled by the :attr:`!encode_threshold` attribute of :" +"class:`~xmlrpc.server.SimpleXMLRPCRequestHandler`, which contains a size in " +"bytes; responses larger than this will be compressed. (Contributed by " "Kristján Valur Jónsson; :issue:`6267`.)" msgstr "" @@ -2510,9 +2495,9 @@ msgstr "" msgid "" ":mod:`zipfile` now also supports archiving empty directories and extracts " "them correctly. (Fixed by Kuba Wieczorek; :issue:`4710`.) Reading files out " -"of an archive is faster, and interleaving :meth:`read() " -"` and :meth:`readline() ` now " -"works correctly. (Contributed by Nir Aides; :issue:`7610`.)" +"of an archive is faster, and interleaving :meth:`read() ` and :meth:`readline() ` now works correctly. " +"(Contributed by Nir Aides; :issue:`7610`.)" msgstr "" #: ../../whatsnew/2.7.rst:1720 @@ -2532,7 +2517,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1737 msgid "New module: importlib" -msgstr "" +msgstr "新模組:importlib" #: ../../whatsnew/2.7.rst:1739 msgid "" @@ -2541,8 +2526,8 @@ msgid "" "useful for implementers of Python interpreters and to users who wish to " "write new importers that can participate in the import process. Python 2.7 " "doesn't contain the complete :mod:`importlib` package, but instead has a " -"tiny subset that contains a single " -"function, :func:`~importlib.import_module`." +"tiny subset that contains a single function, :func:`~importlib." +"import_module`." msgstr "" #: ../../whatsnew/2.7.rst:1747 @@ -2580,7 +2565,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1772 msgid "New module: sysconfig" -msgstr "" +msgstr "新模組:sysconfig" #: ../../whatsnew/2.7.rst:1774 msgid "" @@ -2658,16 +2643,16 @@ msgstr "" #: ../../whatsnew/2.7.rst:1818 msgid "" -"The :mod:`tkinter.ttk` module was written by Guilherme Polo and added " -"in :issue:`2983`. An alternate version called ``Tile.py``, written by " -"Martin Franklin and maintained by Kevin Walzer, was proposed for inclusion " -"in :issue:`2618`, but the authors argued that Guilherme Polo's work was more " +"The :mod:`tkinter.ttk` module was written by Guilherme Polo and added in :" +"issue:`2983`. An alternate version called ``Tile.py``, written by Martin " +"Franklin and maintained by Kevin Walzer, was proposed for inclusion in :" +"issue:`2618`, but the authors argued that Guilherme Polo's work was more " "comprehensive." msgstr "" #: ../../whatsnew/2.7.rst:1828 msgid "Updated module: unittest" -msgstr "" +msgstr "改進模組:unittest" #: ../../whatsnew/2.7.rst:1830 msgid "" @@ -2733,8 +2718,8 @@ msgstr "" msgid "" ":option:`-f ` or :option:`!--failfast` makes test execution " "stop immediately when a test fails instead of continuing to execute further " -"tests. (Suggested by Cliff Dyer and implemented by Michael " -"Foord; :issue:`8074`.)" +"tests. (Suggested by Cliff Dyer and implemented by Michael Foord; :issue:" +"`8074`.)" msgstr "" #: ../../whatsnew/2.7.rst:1874 @@ -2752,13 +2737,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1881 msgid "" -"The error messages " -"for :meth:`~unittest.TestCase.assertEqual`, :meth:`~unittest.TestCase.assertTrue`, " -"and :meth:`~unittest.TestCase.assertFalse` failures now provide more " -"information. If you set the :attr:`~unittest.TestCase.longMessage` " -"attribute of your :class:`~unittest.TestCase` classes to true, both the " -"standard error message and any additional message you provide will be " -"printed for failures. (Added by Michael Foord; :issue:`5663`.)" +"The error messages for :meth:`~unittest.TestCase.assertEqual`, :meth:" +"`~unittest.TestCase.assertTrue`, and :meth:`~unittest.TestCase.assertFalse` " +"failures now provide more information. If you set the :attr:`~unittest." +"TestCase.longMessage` attribute of your :class:`~unittest.TestCase` classes " +"to true, both the standard error message and any additional message you " +"provide will be printed for failures. (Added by Michael Foord; :issue:" +"`5663`.)" msgstr "" #: ../../whatsnew/2.7.rst:1888 @@ -2773,6 +2758,8 @@ msgid "" "with self.assertRaises(KeyError):\n" " {}['foo']" msgstr "" +"with self.assertRaises(KeyError):\n" +" {}['foo']" #: ../../whatsnew/2.7.rst:1895 msgid "(Implemented by Antoine Pitrou; :issue:`4444`.)" @@ -2781,24 +2768,22 @@ msgstr "(由 Antoine Pitrou 實作;:issue:`4444`。)" #: ../../whatsnew/2.7.rst:1899 msgid "" "Module- and class-level setup and teardown fixtures are now supported. " -"Modules can contain :func:`~unittest.setUpModule` " -"and :func:`~unittest.tearDownModule` functions. Classes can " -"have :meth:`~unittest.TestCase.setUpClass` " -"and :meth:`~unittest.TestCase.tearDownClass` methods that must be defined as " -"class methods (using ``@classmethod`` or equivalent). These functions and " -"methods are invoked when the test runner switches to a test case in a " -"different module or class." +"Modules can contain :func:`~unittest.setUpModule` and :func:`~unittest." +"tearDownModule` functions. Classes can have :meth:`~unittest.TestCase." +"setUpClass` and :meth:`~unittest.TestCase.tearDownClass` methods that must " +"be defined as class methods (using ``@classmethod`` or equivalent). These " +"functions and methods are invoked when the test runner switches to a test " +"case in a different module or class." msgstr "" #: ../../whatsnew/2.7.rst:1907 msgid "" -"The methods :meth:`~unittest.TestCase.addCleanup` " -"and :meth:`~unittest.TestCase.doCleanups` were " -"added. :meth:`~unittest.TestCase.addCleanup` lets you add cleanup functions " -"that will be called unconditionally (after :meth:`~unittest.TestCase.setUp` " -"if :meth:`~unittest.TestCase.setUp` fails, otherwise " -"after :meth:`~unittest.TestCase.tearDown`). This allows for much simpler " -"resource allocation and deallocation during tests (:issue:`5679`)." +"The methods :meth:`~unittest.TestCase.addCleanup` and :meth:`~unittest." +"TestCase.doCleanups` were added. :meth:`~unittest.TestCase.addCleanup` lets " +"you add cleanup functions that will be called unconditionally (after :meth:" +"`~unittest.TestCase.setUp` if :meth:`~unittest.TestCase.setUp` fails, " +"otherwise after :meth:`~unittest.TestCase.tearDown`). This allows for much " +"simpler resource allocation and deallocation during tests (:issue:`5679`)." msgstr "" #: ../../whatsnew/2.7.rst:1915 @@ -2811,31 +2796,31 @@ msgstr "" #: ../../whatsnew/2.7.rst:1920 msgid "" -":meth:`~unittest.TestCase.assertIsNone` " -"and :meth:`~unittest.TestCase.assertIsNotNone` take one expression and " -"verify that the result is or is not ``None``." +":meth:`~unittest.TestCase.assertIsNone` and :meth:`~unittest.TestCase." +"assertIsNotNone` take one expression and verify that the result is or is not " +"``None``." msgstr "" #: ../../whatsnew/2.7.rst:1923 msgid "" -":meth:`~unittest.TestCase.assertIs` " -"and :meth:`~unittest.TestCase.assertIsNot` take two values and check whether " -"the two values evaluate to the same object or not. (Added by Michael " -"Foord; :issue:`2578`.)" +":meth:`~unittest.TestCase.assertIs` and :meth:`~unittest.TestCase." +"assertIsNot` take two values and check whether the two values evaluate to " +"the same object or not. (Added by Michael Foord; :issue:`2578`.)" msgstr "" #: ../../whatsnew/2.7.rst:1927 msgid "" -":meth:`~unittest.TestCase.assertIsInstance` " -"and :meth:`~unittest.TestCase.assertNotIsInstance` check whether the " -"resulting object is an instance of a particular class, or of one of a tuple " -"of classes. (Added by Georg Brandl; :issue:`7031`.)" +":meth:`~unittest.TestCase.assertIsInstance` and :meth:`~unittest.TestCase." +"assertNotIsInstance` check whether the resulting object is an instance of a " +"particular class, or of one of a tuple of classes. (Added by Georg Brandl; :" +"issue:`7031`.)" msgstr "" #: ../../whatsnew/2.7.rst:1932 msgid "" -":meth:`~unittest.TestCase.assertGreater`, :meth:`~unittest.TestCase.assertGreaterEqual`, :meth:`~unittest.TestCase.assertLess`, " -"and :meth:`~unittest.TestCase.assertLessEqual` compare two quantities." +":meth:`~unittest.TestCase.assertGreater`, :meth:`~unittest.TestCase." +"assertGreaterEqual`, :meth:`~unittest.TestCase.assertLess`, and :meth:" +"`~unittest.TestCase.assertLessEqual` compare two quantities." msgstr "" #: ../../whatsnew/2.7.rst:1936 @@ -2848,10 +2833,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:1941 msgid "" -":meth:`assertRegexpMatches() ` " -"and :meth:`assertNotRegexpMatches() ` " -"checks whether the first argument is a string matching or not matching the " -"regular expression provided as the second argument (:issue:`8038`)." +":meth:`assertRegexpMatches() ` and :meth:" +"`assertNotRegexpMatches() ` checks whether " +"the first argument is a string matching or not matching the regular " +"expression provided as the second argument (:issue:`8038`)." msgstr "" #: ../../whatsnew/2.7.rst:1946 @@ -2864,9 +2849,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:1951 msgid "" -":meth:`~unittest.TestCase.assertIn` " -"and :meth:`~unittest.TestCase.assertNotIn` tests whether *first* is or is " -"not in *second*." +":meth:`~unittest.TestCase.assertIn` and :meth:`~unittest.TestCase." +"assertNotIn` tests whether *first* is or is not in *second*." msgstr "" #: ../../whatsnew/2.7.rst:1954 @@ -2883,14 +2867,13 @@ msgstr "" #: ../../whatsnew/2.7.rst:1960 msgid "" -"Similarly, :meth:`~unittest.TestCase.assertListEqual` " -"and :meth:`~unittest.TestCase.assertTupleEqual` compare the specified types " -"and explain any differences without necessarily printing their full values; " -"these methods are now used by default when comparing lists and tuples " -"using :meth:`~unittest.TestCase.assertEqual`. More " -"generally, :meth:`~unittest.TestCase.assertSequenceEqual` compares two " -"sequences and can optionally check whether both sequences are of a " -"particular type." +"Similarly, :meth:`~unittest.TestCase.assertListEqual` and :meth:`~unittest." +"TestCase.assertTupleEqual` compare the specified types and explain any " +"differences without necessarily printing their full values; these methods " +"are now used by default when comparing lists and tuples using :meth:" +"`~unittest.TestCase.assertEqual`. More generally, :meth:`~unittest.TestCase." +"assertSequenceEqual` compares two sequences and can optionally check whether " +"both sequences are of a particular type." msgstr "" #: ../../whatsnew/2.7.rst:1968 @@ -2904,47 +2887,45 @@ msgstr "" #: ../../whatsnew/2.7.rst:1973 msgid "" -":meth:`~unittest.TestCase.assertAlmostEqual` " -"and :meth:`~unittest.TestCase.assertNotAlmostEqual` test whether *first* and " -"*second* are approximately equal. This method can either round their " -"difference to an optionally specified number of *places* (the default is 7) " -"and compare it to zero, or require the difference to be smaller than a " -"supplied *delta* value." +":meth:`~unittest.TestCase.assertAlmostEqual` and :meth:`~unittest.TestCase." +"assertNotAlmostEqual` test whether *first* and *second* are approximately " +"equal. This method can either round their difference to an optionally " +"specified number of *places* (the default is 7) and compare it to zero, or " +"require the difference to be smaller than a supplied *delta* value." msgstr "" #: ../../whatsnew/2.7.rst:1979 msgid "" -":meth:`~unittest.TestLoader.loadTestsFromName` properly honors " -"the :attr:`~unittest.TestLoader.suiteClass` attribute of " -"the :class:`~unittest.TestLoader`. (Fixed by Mark Roddy; :issue:`6866`.)" +":meth:`~unittest.TestLoader.loadTestsFromName` properly honors the :attr:" +"`~unittest.TestLoader.suiteClass` attribute of the :class:`~unittest." +"TestLoader`. (Fixed by Mark Roddy; :issue:`6866`.)" msgstr "" #: ../../whatsnew/2.7.rst:1983 msgid "" "A new hook lets you extend the :meth:`~unittest.TestCase.assertEqual` method " -"to handle new data types. " -"The :meth:`~unittest.TestCase.addTypeEqualityFunc` method takes a type " -"object and a function. The function will be used when both of the objects " -"being compared are of the specified type. This function should compare the " -"two objects and raise an exception if they don't match; it's a good idea for " -"the function to provide additional information about why the two objects " -"aren't matching, much as the new sequence comparison methods do." +"to handle new data types. The :meth:`~unittest.TestCase." +"addTypeEqualityFunc` method takes a type object and a function. The function " +"will be used when both of the objects being compared are of the specified " +"type. This function should compare the two objects and raise an exception " +"if they don't match; it's a good idea for the function to provide additional " +"information about why the two objects aren't matching, much as the new " +"sequence comparison methods do." msgstr "" #: ../../whatsnew/2.7.rst:1992 msgid "" -":func:`unittest.main` now takes an optional ``exit`` argument. If " -"false, :func:`~unittest.main` doesn't call :func:`sys.exit`, " -"allowing :func:`~unittest.main` to be used from the interactive interpreter. " -"(Contributed by J. Pablo Fernández; :issue:`3379`.)" +":func:`unittest.main` now takes an optional ``exit`` argument. If false, :" +"func:`~unittest.main` doesn't call :func:`sys.exit`, allowing :func:" +"`~unittest.main` to be used from the interactive interpreter. (Contributed " +"by J. Pablo Fernández; :issue:`3379`.)" msgstr "" #: ../../whatsnew/2.7.rst:1997 msgid "" -":class:`~unittest.TestResult` has " -"new :meth:`~unittest.TestResult.startTestRun` " -"and :meth:`~unittest.TestResult.stopTestRun` methods that are called " -"immediately before and after a test run. (Contributed by Robert " +":class:`~unittest.TestResult` has new :meth:`~unittest.TestResult." +"startTestRun` and :meth:`~unittest.TestResult.stopTestRun` methods that are " +"called immediately before and after a test run. (Contributed by Robert " "Collins; :issue:`5728`.)" msgstr "" @@ -2972,7 +2953,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:2015 msgid "Updated module: ElementTree 1.3" -msgstr "" +msgstr "改進模組:ElementTree 1.3" #: ../../whatsnew/2.7.rst:2017 msgid "" @@ -2992,6 +2973,8 @@ msgid "" "p = ET.XMLParser(encoding='utf-8')\n" "t = ET.XML(\"\"\"\"\"\", parser=p)" msgstr "" +"p = ET.XMLParser(encoding='utf-8')\n" +"t = ET.XML(\"\"\"\"\"\", parser=p)" #: ../../whatsnew/2.7.rst:2027 msgid "" @@ -3003,16 +2986,16 @@ msgstr "" #: ../../whatsnew/2.7.rst:2031 msgid "" "ElementTree's code for converting trees to a string has been significantly " -"reworked, making it roughly twice as fast in many cases. " -"The :meth:`ElementTree.write() ` " -"and :meth:`Element.write` methods now have a *method* parameter that can be " +"reworked, making it roughly twice as fast in many cases. The :meth:" +"`ElementTree.write() ` and :meth:`!" +"Element.write` methods now have a *method* parameter that can be " "\"xml\" (the default), \"html\", or \"text\". HTML mode will output empty " "elements as ```` instead of ````, and text mode will " -"skip over elements and only output the text chunks. If you set " -"the :attr:`~xml.etree.ElementTree.Element.tag` attribute of an element to " -"``None`` but leave its children in place, the element will be omitted when " -"the tree is written out, so you don't need to do more extensive " -"rearrangement to remove a single element." +"skip over elements and only output the text chunks. If you set the :attr:" +"`~xml.etree.ElementTree.Element.tag` attribute of an element to ``None`` but " +"leave its children in place, the element will be omitted when the tree is " +"written out, so you don't need to do more extensive rearrangement to remove " +"a single element." msgstr "" #: ../../whatsnew/2.7.rst:2044 @@ -3020,18 +3003,17 @@ msgid "" "Namespace handling has also been improved. All ``xmlns:`` " "declarations are now output on the root element, not scattered throughout " "the resulting XML. You can set the default namespace for a tree by setting " -"the :attr:`default_namespace` attribute and can register new prefixes " -"with :meth:`~xml.etree.ElementTree.register_namespace`. In XML mode, you " -"can use the true/false *xml_declaration* parameter to suppress the XML " -"declaration." +"the :attr:`!default_namespace` attribute and can register new prefixes with :" +"meth:`~xml.etree.ElementTree.register_namespace`. In XML mode, you can use " +"the true/false *xml_declaration* parameter to suppress the XML declaration." msgstr "" #: ../../whatsnew/2.7.rst:2052 msgid "" -"New :class:`~xml.etree.ElementTree.Element` " -"method: :meth:`~xml.etree.ElementTree.Element.extend` appends the items from " -"a sequence to the element's children. Elements themselves behave like " -"sequences, so it's easy to move children from one element to another::" +"New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." +"ElementTree.Element.extend` appends the items from a sequence to the " +"element's children. Elements themselves behave like sequences, so it's easy " +"to move children from one element to another::" msgstr "" #: ../../whatsnew/2.7.rst:2058 @@ -3047,22 +3029,32 @@ msgid "" "# Outputs 1...\n" "print ET.tostring(new)" msgstr "" +"from xml.etree import ElementTree as ET\n" +"\n" +"t = ET.XML(\"\"\"\n" +" 1 2 3\n" +"\"\"\")\n" +"new = ET.XML('')\n" +"new.extend(t)\n" +"\n" +"# 輸出 1...\n" +"print ET.tostring(new)" #: ../../whatsnew/2.7.rst:2069 msgid "" -"New :class:`~xml.etree.ElementTree.Element` " -"method: :meth:`~xml.etree.ElementTree.Element.iter` yields the children of " -"the element as a generator. It's also possible to write ``for child in " -"elem:`` to loop over an element's children. The existing method :meth:`!" -"getiterator` is now deprecated, as is :meth:`!getchildren` which constructs " -"and returns a list of children." +"New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." +"ElementTree.Element.iter` yields the children of the element as a " +"generator. It's also possible to write ``for child in elem:`` to loop over " +"an element's children. The existing method :meth:`!getiterator` is now " +"deprecated, as is :meth:`!getchildren` which constructs and returns a list " +"of children." msgstr "" #: ../../whatsnew/2.7.rst:2076 msgid "" -"New :class:`~xml.etree.ElementTree.Element` " -"method: :meth:`~xml.etree.ElementTree.Element.itertext` yields all chunks of " -"text that are descendants of the element. For example::" +"New :class:`~xml.etree.ElementTree.Element` method: :meth:`~xml.etree." +"ElementTree.Element.itertext` yields all chunks of text that are descendants " +"of the element. For example::" msgstr "" #: ../../whatsnew/2.7.rst:2080 @@ -3074,6 +3066,12 @@ msgid "" "# Outputs ['\\n ', '1', ' ', '2', ' ', '3', '\\n']\n" "print list(t.itertext())" msgstr "" +"t = ET.XML(\"\"\"\n" +" 1 2 3\n" +"\"\"\")\n" +"\n" +"# 輸出 ['\\n ', '1', ' ', '2', ' ', '3', '\\n']\n" +"print list(t.itertext())" #: ../../whatsnew/2.7.rst:2087 msgid "" @@ -3088,8 +3086,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:2095 msgid "" "Fredrik Lundh develops ElementTree and produced the 1.3 version; you can " -"read his article describing 1.3 at https://web.archive.org/web/" -"20200703234532/http://effbot.org/zone/elementtree-13-intro.htm. Florent " +"read his article describing 1.3 at https://web.archive.org/" +"web/20200703234532/http://effbot.org/zone/elementtree-13-intro.htm. Florent " "Xicluna updated the version included with Python, after discussions on " "python-dev and in :issue:`6472`.)" msgstr "" @@ -3128,8 +3126,8 @@ msgstr "" msgid "" ":c:func:`Py_AddPendingCall` is now thread-safe, letting any worker thread " "submit notifications to the main Python thread. This is particularly useful " -"for asynchronous IO operations. (Contributed by Kristján Valur " -"Jónsson; :issue:`4293`.)" +"for asynchronous IO operations. (Contributed by Kristján Valur Jónsson; :" +"issue:`4293`.)" msgstr "" #: ../../whatsnew/2.7.rst:2131 @@ -3160,12 +3158,11 @@ msgstr "" #: ../../whatsnew/2.7.rst:2150 msgid "" -"New functions: :c:func:`PyLong_AsLongAndOverflow` " -"and :c:func:`PyLong_AsLongLongAndOverflow` approximates a Python long " -"integer as a C :c:expr:`long` or :c:expr:`long long`. If the number is too " -"large to fit into the output type, an *overflow* flag is set and returned to " -"the caller. (Contributed by Case Van Horsen; :issue:`7528` " -"and :issue:`7767`.)" +"New functions: :c:func:`PyLong_AsLongAndOverflow` and :c:func:" +"`PyLong_AsLongLongAndOverflow` approximates a Python long integer as a C :c:" +"expr:`long` or :c:expr:`long long`. If the number is too large to fit into " +"the output type, an *overflow* flag is set and returned to the caller. " +"(Contributed by Case Van Horsen; :issue:`7528` and :issue:`7767`.)" msgstr "" #: ../../whatsnew/2.7.rst:2157 @@ -3211,12 +3208,14 @@ msgstr "" #: ../../whatsnew/2.7.rst:2183 msgid "" -"New macros: the Python header files now define the following " -"macros: :c:macro:`Py_ISALNUM`, :c:macro:`Py_ISALPHA`, :c:macro:`Py_ISDIGIT`, :c:macro:`Py_ISLOWER`, :c:macro:`Py_ISSPACE`, :c:macro:`Py_ISUPPER`, :c:macro:`Py_ISXDIGIT`, :c:macro:`Py_TOLOWER`, " -"and :c:macro:`Py_TOUPPER`. All of these functions are analogous to the C " -"standard macros for classifying characters, but ignore the current locale " -"setting, because in several places Python needs to analyze characters in a " -"locale-independent way. (Added by Eric Smith; :issue:`5793`.)" +"New macros: the Python header files now define the following macros: :c:" +"macro:`!Py_ISALNUM`, :c:macro:`!Py_ISALPHA`, :c:macro:`!Py_ISDIGIT`, :c:" +"macro:`!Py_ISLOWER`, :c:macro:`!Py_ISSPACE`, :c:macro:`!Py_ISUPPER`, :c:" +"macro:`!Py_ISXDIGIT`, :c:macro:`!Py_TOLOWER`, and :c:macro:`!Py_TOUPPER`. " +"All of these functions are analogous to the C standard macros for " +"classifying characters, but ignore the current locale setting, because in " +"several places Python needs to analyze characters in a locale-independent " +"way. (Added by Eric Smith; :issue:`5793`.)" msgstr "" #: ../../whatsnew/2.7.rst:2201 @@ -3261,17 +3260,16 @@ msgstr "" #: ../../whatsnew/2.7.rst:2230 msgid "" -"The :c:func:`Py_Finalize` function now calls the internal :func:`!" -"threading._shutdown` function; this prevents some exceptions from being " -"raised when an interpreter shuts down. (Patch by Adam " -"Olsen; :issue:`1722344`.)" +"The :c:func:`Py_Finalize` function now calls the internal :func:`!threading." +"_shutdown` function; this prevents some exceptions from being raised when an " +"interpreter shuts down. (Patch by Adam Olsen; :issue:`1722344`.)" msgstr "" #: ../../whatsnew/2.7.rst:2235 msgid "" "When using the :c:type:`PyMemberDef` structure to define attributes of a " -"type, Python will no longer let you try to delete or set " -"a :c:macro:`T_STRING_INPLACE` attribute." +"type, Python will no longer let you try to delete or set a :c:macro:`!" +"T_STRING_INPLACE` attribute." msgstr "" #: ../../whatsnew/2.7.rst:2241 @@ -3284,8 +3282,8 @@ msgstr "" msgid "" "New configure option: the :option:`!--with-system-expat` switch allows " "building the :mod:`pyexpat ` module to use the system " -"Expat library. (Contributed by Arfrever Frehtes Taifersar " -"Arahesis; :issue:`7609`.)" +"Expat library. (Contributed by Arfrever Frehtes Taifersar Arahesis; :issue:" +"`7609`.)" msgstr "" #: ../../whatsnew/2.7.rst:2249 @@ -3293,8 +3291,8 @@ msgid "" "New configure option: the :option:`!--with-valgrind` option will now disable " "the pymalloc allocator, which is difficult for the Valgrind memory-error " "detector to analyze correctly. Valgrind will therefore be better at " -"detecting memory leaks and overruns. (Contributed by James " -"Henstridge; :issue:`2422`.)" +"detecting memory leaks and overruns. (Contributed by James Henstridge; :" +"issue:`2422`.)" msgstr "" #: ../../whatsnew/2.7.rst:2256 @@ -3307,17 +3305,17 @@ msgstr "" #: ../../whatsnew/2.7.rst:2261 msgid "" "The :program:`configure` script now checks for floating-point rounding bugs " -"on certain 32-bit Intel chips and defines a :c:macro:`X87_DOUBLE_ROUNDING` " +"on certain 32-bit Intel chips and defines a :c:macro:`!X87_DOUBLE_ROUNDING` " "preprocessor definition. No code currently uses this definition, but it's " -"available if anyone wishes to use it. (Added by Mark " -"Dickinson; :issue:`2937`.)" +"available if anyone wishes to use it. (Added by Mark Dickinson; :issue:" +"`2937`.)" msgstr "" #: ../../whatsnew/2.7.rst:2267 msgid "" -":program:`configure` also now sets a :envvar:`LDCXXSHARED` Makefile variable " -"for supporting C++ linking. (Contributed by Arfrever Frehtes Taifersar " -"Arahesis; :issue:`1222585`.)" +":program:`configure` also now sets a :envvar:`!LDCXXSHARED` Makefile " +"variable for supporting C++ linking. (Contributed by Arfrever Frehtes " +"Taifersar Arahesis; :issue:`1222585`.)" msgstr "" #: ../../whatsnew/2.7.rst:2271 @@ -3340,12 +3338,12 @@ msgstr "" msgid "" "Python 3.1 adds a new C datatype, :c:type:`PyCapsule`, for providing a C API " "to an extension module. A capsule is essentially the holder of a C ``void " -"*`` pointer, and is made available as a module attribute; for example, " -"the :mod:`socket` module's API is exposed as ``socket.CAPI``, " -"and :mod:`unicodedata` exposes ``ucnhash_CAPI``. Other extensions can " -"import the module, access its dictionary to get the capsule object, and then " -"get the ``void *`` pointer, which will usually point to an array of pointers " -"to the module's various API functions." +"*`` pointer, and is made available as a module attribute; for example, the :" +"mod:`socket` module's API is exposed as ``socket.CAPI``, and :mod:" +"`unicodedata` exposes ``ucnhash_CAPI``. Other extensions can import the " +"module, access its dictionary to get the capsule object, and then get the " +"``void *`` pointer, which will usually point to an array of pointers to the " +"module's various API functions." msgstr "" #: ../../whatsnew/2.7.rst:2292 @@ -3383,8 +3381,8 @@ msgid "" "Python 2.7 now uses capsules internally to provide various extension-module " "APIs, but the :c:func:`!PyCObject_AsVoidPtr` was modified to handle " "capsules, preserving compile-time compatibility with the :c:type:`!" -"PyCObject` interface. Use of :c:func:`!PyCObject_AsVoidPtr` will signal " -"a :exc:`PendingDeprecationWarning`, which is silent by default." +"PyCObject` interface. Use of :c:func:`!PyCObject_AsVoidPtr` will signal a :" +"exc:`PendingDeprecationWarning`, which is silent by default." msgstr "" #: ../../whatsnew/2.7.rst:2322 @@ -3399,11 +3397,11 @@ msgstr "" #: ../../whatsnew/2.7.rst:2331 msgid "" -"The :mod:`msvcrt` module now contains some constants from " -"the :file:`crtassem.h` header " -"file: :data:`~msvcrt.CRT_ASSEMBLY_VERSION`, :data:`~msvcrt.VC_ASSEMBLY_PUBLICKEYTOKEN`, " -"and :data:`~msvcrt.LIBRARIES_ASSEMBLY_NAME_PREFIX`. (Contributed by David " -"Cournapeau; :issue:`4365`.)" +"The :mod:`msvcrt` module now contains some constants from the :file:" +"`crtassem.h` header file: :data:`~msvcrt.CRT_ASSEMBLY_VERSION`, :data:" +"`~msvcrt.VC_ASSEMBLY_PUBLICKEYTOKEN`, and :data:`~msvcrt." +"LIBRARIES_ASSEMBLY_NAME_PREFIX`. (Contributed by David Cournapeau; :issue:" +"`4365`.)" msgstr "" #: ../../whatsnew/2.7.rst:2338 @@ -3411,10 +3409,9 @@ msgid "" "The :mod:`_winreg ` module for accessing the registry now implements " "the :func:`~winreg.CreateKeyEx` and :func:`~winreg.DeleteKeyEx` functions, " "extended versions of previously supported functions that take several extra " -"arguments. " -"The :func:`~winreg.DisableReflectionKey`, :func:`~winreg.EnableReflectionKey`, " -"and :func:`~winreg.QueryReflectionKey` were also tested and documented. " -"(Implemented by Brian Curtin: :issue:`7347`.)" +"arguments. The :func:`~winreg.DisableReflectionKey`, :func:`~winreg." +"EnableReflectionKey`, and :func:`~winreg.QueryReflectionKey` were also " +"tested and documented. (Implemented by Brian Curtin: :issue:`7347`.)" msgstr "" #: ../../whatsnew/2.7.rst:2346 @@ -3427,12 +3424,11 @@ msgstr "" #: ../../whatsnew/2.7.rst:2350 msgid "" "The :func:`os.kill` function now works on Windows. The signal value can be " -"the " -"constants :const:`~signal.CTRL_C_EVENT`, :const:`~signal.CTRL_BREAK_EVENT`, " -"or any integer. The first two constants will send :kbd:`Control-C` " -"and :kbd:`Control-Break` keystroke events to subprocesses; any other value " -"will use the :c:func:`!TerminateProcess` API. (Contributed by Miki " -"Tebeka; :issue:`1220212`.)" +"the constants :const:`~signal.CTRL_C_EVENT`, :const:`~signal." +"CTRL_BREAK_EVENT`, or any integer. The first two constants will send :kbd:" +"`Control-C` and :kbd:`Control-Break` keystroke events to subprocesses; any " +"other value will use the :c:func:`!TerminateProcess` API. (Contributed by " +"Miki Tebeka; :issue:`1220212`.)" msgstr "" #: ../../whatsnew/2.7.rst:2357 @@ -3453,10 +3449,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:2369 msgid "" -"The path ``/Library/Python/2.7/site-packages`` is now appended to " -"``sys.path``, in order to share added packages between the system " -"installation and a user-installed copy of the same version. (Changed by " -"Ronald Oussoren; :issue:`4865`.)" +"The path ``/Library/Python/2.7/site-packages`` is now appended to ``sys." +"path``, in order to share added packages between the system installation and " +"a user-installed copy of the same version. (Changed by Ronald Oussoren; :" +"issue:`4865`.)" msgstr "" #: ../../whatsnew/2.7.rst:2376 @@ -3477,11 +3473,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:2389 msgid "" -"FreeBSD 7.1's :const:`!SO_SETFIB` constant, used with " -"the :func:`~socket.socket` " -"methods :func:`~socket.socket.getsockopt`/:func:`~socket.socket.setsockopt` " -"to select an alternate routing table, is now available in the :mod:`socket` " -"module. (Added by Kyle VanderBeek; :issue:`8235`.)" +"FreeBSD 7.1's :const:`!SO_SETFIB` constant, used with the :func:`~socket." +"socket` methods :func:`~socket.socket.getsockopt`/:func:`~socket.socket." +"setsockopt` to select an alternate routing table, is now available in the :" +"mod:`socket` module. (Added by Kyle VanderBeek; :issue:`8235`.)" msgstr "" #: ../../whatsnew/2.7.rst:2395 @@ -3500,8 +3495,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:2405 msgid "" -"The :file:`Tools/i18n/msgfmt.py` script now understands plural forms " -"in :file:`.po` files. (Fixed by Martin von Löwis; :issue:`5464`.)" +"The :file:`Tools/i18n/msgfmt.py` script now understands plural forms in :" +"file:`.po` files. (Fixed by Martin von Löwis; :issue:`5464`.)" msgstr "" #: ../../whatsnew/2.7.rst:2409 @@ -3517,9 +3512,9 @@ msgstr "" #: ../../whatsnew/2.7.rst:2416 msgid "" "The :file:`regrtest.py` script now takes a :option:`!--randseed=` switch " -"that takes an integer that will be used as the random seed for " -"the :option:`!-r` option that executes tests in random order. The :option:`!-" -"r` option also reports the seed that was used (Added by Collin Winter.)" +"that takes an integer that will be used as the random seed for the :option:" +"`!-r` option that executes tests in random order. The :option:`!-r` option " +"also reports the seed that was used (Added by Collin Winter.)" msgstr "" #: ../../whatsnew/2.7.rst:2422 @@ -3561,8 +3556,8 @@ msgstr "" msgid "" "The string :meth:`format` method changed the default precision used for " "floating-point and complex numbers from 6 decimal places to 12, which " -"matches the precision used by :func:`str`. (Changed by Eric " -"Smith; :issue:`5920`.)" +"matches the precision used by :func:`str`. (Changed by Eric Smith; :issue:" +"`5920`.)" msgstr "" #: ../../whatsnew/2.7.rst:2454 @@ -3576,31 +3571,31 @@ msgstr "" #: ../../whatsnew/2.7.rst:2460 msgid "" -"Due to a bug in Python 2.6, the *exc_value* parameter " -"to :meth:`~object.__exit__` methods was often the string representation of " -"the exception, not an instance. This was fixed in 2.7, so *exc_value* will " -"be an instance as expected. (Fixed by Florent Xicluna; :issue:`7853`.)" +"Due to a bug in Python 2.6, the *exc_value* parameter to :meth:`~object." +"__exit__` methods was often the string representation of the exception, not " +"an instance. This was fixed in 2.7, so *exc_value* will be an instance as " +"expected. (Fixed by Florent Xicluna; :issue:`7853`.)" msgstr "" #: ../../whatsnew/2.7.rst:2470 msgid "In the standard library:" -msgstr "" +msgstr "標準函式庫中:" #: ../../whatsnew/2.7.rst:2472 msgid "" "Operations with :class:`~datetime.datetime` instances that resulted in a " -"year falling outside the supported range didn't always " -"raise :exc:`OverflowError`. Such errors are now checked more carefully and " -"will now raise the exception. (Reported by Mark Leander, patch by Anand B. " -"Pillai and Alexander Belopolsky; :issue:`7150`.)" +"year falling outside the supported range didn't always raise :exc:" +"`OverflowError`. Such errors are now checked more carefully and will now " +"raise the exception. (Reported by Mark Leander, patch by Anand B. Pillai and " +"Alexander Belopolsky; :issue:`7150`.)" msgstr "" #: ../../whatsnew/2.7.rst:2478 msgid "" -"When using :class:`~decimal.Decimal` instances with a " -"string's :meth:`format` method, the default alignment was previously left-" -"alignment. This has been changed to right-alignment, which might change the " -"output of your programs. (Changed by Mark Dickinson; :issue:`6857`.)" +"When using :class:`~decimal.Decimal` instances with a string's :meth:" +"`format` method, the default alignment was previously left-alignment. This " +"has been changed to right-alignment, which might change the output of your " +"programs. (Changed by Mark Dickinson; :issue:`6857`.)" msgstr "" #: ../../whatsnew/2.7.rst:2490 @@ -3631,9 +3626,9 @@ msgstr "" #: ../../whatsnew/2.7.rst:2545 msgid "" -"Use the new :c:func:`PyOS_string_to_double` function instead of the " -"old :c:func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions, " -"which are now deprecated." +"Use the new :c:func:`PyOS_string_to_double` function instead of the old :c:" +"func:`!PyOS_ascii_strtod` and :c:func:`!PyOS_ascii_atof` functions, which " +"are now deprecated." msgstr "" #: ../../whatsnew/2.7.rst:2549 @@ -3671,12 +3666,12 @@ msgstr "" #: ../../whatsnew/2.7.rst:2578 msgid "Two new environment variables for debug mode" -msgstr "" +msgstr "偵錯模式下的兩個新環境變數" #: ../../whatsnew/2.7.rst:2580 msgid "" -"In debug mode, the ``[xxx refs]`` statistic is not written by default, " -"the :envvar:`!PYTHONSHOWREFCOUNT` environment variable now must also be set. " +"In debug mode, the ``[xxx refs]`` statistic is not written by default, the :" +"envvar:`!PYTHONSHOWREFCOUNT` environment variable now must also be set. " "(Contributed by Victor Stinner; :issue:`31733`.)" msgstr "" @@ -3685,8 +3680,8 @@ msgid "" "When Python is compiled with ``COUNT_ALLOC`` defined, allocation counts are " "no longer dumped by default anymore: the :envvar:`!PYTHONSHOWALLOCCOUNT` " "environment variable must now also be set. Moreover, allocation counts are " -"now dumped into stderr, rather than stdout. (Contributed by Victor " -"Stinner; :issue:`31692`.)" +"now dumped into stderr, rather than stdout. (Contributed by Victor Stinner; :" +"issue:`31692`.)" msgstr "" #: ../../whatsnew/2.7.rst:2593 @@ -3749,8 +3744,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:2626 msgid "" "OpenSSL 1.0.1h was upgraded for the official Windows installers published on " -"python.org. (Contributed by Zachary Ware in :issue:`21671` " -"for :cve:`2014-0224`.)" +"python.org. (Contributed by Zachary Ware in :issue:`21671` for :cve:" +"`2014-0224`.)" msgstr "" #: ../../whatsnew/2.7.rst:2629 @@ -3780,10 +3775,10 @@ msgstr "" #: ../../whatsnew/2.7.rst:2643 msgid "" -":data:`hashlib.algorithms_guaranteed` " -"and :data:`hashlib.algorithms_available` were backported from Python 3 to " -"make it easier for Python 2 applications to select the strongest available " -"hash algorithm. (Contributed by Alex Gaynor in :issue:`21307`)" +":data:`hashlib.algorithms_guaranteed` and :data:`hashlib." +"algorithms_available` were backported from Python 3 to make it easier for " +"Python 2 applications to select the strongest available hash algorithm. " +"(Contributed by Alex Gaynor in :issue:`21307`)" msgstr "" #: ../../whatsnew/2.7.rst:2650 @@ -3862,8 +3857,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:2700 msgid "" "However, as this migration is currently still incomplete, the legacy " -"versions of those guides remaining available as :ref:`install-index` " -"and :ref:`setuptools-index`." +"versions of those guides remaining available as :ref:`install-index` and :" +"ref:`setuptools-index`." msgstr "" #: ../../whatsnew/2.7.rst:2706 @@ -3883,9 +3878,9 @@ msgstr "" #: ../../whatsnew/2.7.rst:2713 msgid "" -":pep:`476` updated :mod:`httplib ` and modules which use it, such " -"as :mod:`urllib2 ` and :mod:`xmlrpclib `, to " -"now verify that the server presents a certificate which is signed by a " +":pep:`476` updated :mod:`httplib ` and modules which use it, such as :" +"mod:`urllib2 ` and :mod:`xmlrpclib `, to now " +"verify that the server presents a certificate which is signed by a " "Certificate Authority in the platform trust store and whose hostname matches " "the hostname being requested by default, significantly improving security " "for many applications. This change was made in the Python 2.7.9 release." @@ -3968,8 +3963,8 @@ msgstr "" #: ../../whatsnew/2.7.rst:2772 msgid "" -"More selective regeneration targets are also defined - " -"see :source:`Makefile.pre.in` for details." +"More selective regeneration targets are also defined - see :source:`Makefile." +"pre.in` for details." msgstr "" #: ../../whatsnew/2.7.rst:2775 ../../whatsnew/2.7.rst:2788 @@ -3978,7 +3973,7 @@ msgstr "(由 Victor Stinner 於 :issue:`23404` 中貢獻。)" #: ../../whatsnew/2.7.rst:2781 msgid "Removal of ``make touch`` build target" -msgstr "" +msgstr "移除 ``make touch`` 建置目標" #: ../../whatsnew/2.7.rst:2783 msgid "" @@ -3989,7 +3984,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:2786 msgid "It has been replaced by the new ``make regen-all`` target." -msgstr "" +msgstr "已被新的 ``make regen-all`` 目標取代。" #: ../../whatsnew/2.7.rst:2797 msgid "Acknowledgements" diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 354052c2b3..dcf57c4c93 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-06-27 07:36+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2023-06-26 03:02+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1674,11 +1674,10 @@ msgstr "asyncio" #: ../../whatsnew/3.10.rst:904 msgid "" -"Add missing :meth:`~asyncio.events.AbstractEventLoop." -"connect_accepted_socket` method. (Contributed by Alex Grönholm in :issue:" -"`41332`.)" +"Add missing :meth:`~asyncio.loop.connect_accepted_socket` method. " +"(Contributed by Alex Grönholm in :issue:`41332`.)" msgstr "" -"新增缺少的 :meth:`~asyncio.events.AbstractEventLoop.connect_accepted_socket` " +"新增缺少的 :meth:`~asyncio.loop.connect_accepted_socket` " "方法。(由 Alex Grönholm 在 :issue:`41332` 中貢獻。)" #: ../../whatsnew/3.10.rst:909 @@ -1740,10 +1739,10 @@ msgstr "bdb" #: ../../whatsnew/3.10.rst:936 msgid "" -"Add :meth:`~bdb.Breakpoint.clearBreakpoints` to reset all set breakpoints. " -"(Contributed by Irit Katriel in :issue:`24160`.)" +"Add :meth:`!clearBreakpoints` to reset all set breakpoints. (Contributed by " +"Irit Katriel in :issue:`24160`.)" msgstr "" -"新增 :meth:`~bdb.Breakpoint.clearBreakpoints` 來重置所有設定的斷點。(由 " +"新增 :meth:`!clearBreakpoints` 來重置所有設定的斷點。(由 " "Irit Katriel 在 :issue:`24160` 中貢獻。)" #: ../../whatsnew/3.10.rst:940 @@ -2151,9 +2150,9 @@ msgid "" "the future PBKDF2-HMAC will only be available when Python has been built " "with OpenSSL support. (Contributed by Christian Heimes in :issue:`43880`.)" msgstr "" -"純 Python 的 :func:`~hashlib.pbkdf2_hmac` 後備 (fallback) 已被棄用。將來只有在" -"有 OpenSSL 支援的建置 Python 中才能夠使用 PBKDF2-HMAC。(由 Christian Heimes 在 " -":issue:`43880` 中貢獻。)" +"純 Python 的 :func:`~hashlib.pbkdf2_hmac` 後備 (fallback) 已被棄用。將來只有" +"在有 OpenSSL 支援的建置 Python 中才能夠使用 PBKDF2-HMAC。(由 Christian " +"Heimes 在 :issue:`43880` 中貢獻。)" #: ../../whatsnew/3.10.rst:1147 msgid "hmac" @@ -2658,11 +2657,11 @@ msgstr "sqlite3" #: ../../whatsnew/3.10.rst:1401 msgid "" -"Add audit events for :func:`~sqlite3.connect/handle`, :meth:`~sqlite3." -"Connection.enable_load_extension`, and :meth:`~sqlite3.Connection." -"load_extension`. (Contributed by Erlend E. Aasland in :issue:`43762`.)" +"Add audit events for :func:`~sqlite3.connect`, :meth:`~sqlite3.Connection." +"enable_load_extension`, and :meth:`~sqlite3.Connection.load_extension`. " +"(Contributed by Erlend E. Aasland in :issue:`43762`.)" msgstr "" -"新增 :func:`~sqlite3.connect/handle`、:meth:`~sqlite3.Connection." +"新增 :func:`~sqlite3.connect`、:meth:`~sqlite3.Connection." "enable_load_extension` 和 :meth:`~sqlite3.Connection.load_extension` 的稽核事" "件。(由 Erlend E. Aasland 在 :issue:`43762` 中貢獻。)" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index 10b8535db4..ed803e0367 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-03 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,8 +116,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:87 msgid "" -"Better unicode handling in the :ref:`email ` module " -"(:term:`provisional `)." +"Better unicode handling in the :ref:`email ` module (:term:" +"`provisional `)." msgstr "" #: ../../whatsnew/3.3.rst:90 @@ -171,8 +171,8 @@ msgstr "" msgid "" "Native support for package directories that don't require ``__init__.py`` " "marker files and can automatically span multiple path segments (inspired by " -"various third party approaches to namespace packages, as described " -"in :pep:`420`)" +"various third party approaches to namespace packages, as described in :pep:" +"`420`)" msgstr "" #: ../../whatsnew/3.3.rst:132 @@ -498,20 +498,18 @@ msgstr "" #: ../../whatsnew/3.3.rst:332 msgid "" "You don't have to worry anymore about choosing the appropriate exception " -"type " -"between :exc:`OSError`, :exc:`IOError`, :exc:`EnvironmentError`, :exc:`WindowsError`, :exc:`mmap.error`, :exc:`socket.error` " -"or :exc:`select.error`. All these exception types are now only " -"one: :exc:`OSError`. The other names are kept as aliases for compatibility " -"reasons." +"type between :exc:`OSError`, :exc:`IOError`, :exc:`EnvironmentError`, :exc:" +"`WindowsError`, :exc:`!mmap.error`, :exc:`socket.error` or :exc:`select." +"error`. All these exception types are now only one: :exc:`OSError`. The " +"other names are kept as aliases for compatibility reasons." msgstr "" #: ../../whatsnew/3.3.rst:339 msgid "" "Also, it is now easier to catch a specific error condition. Instead of " "inspecting the ``errno`` attribute (or ``args[0]``) for a particular " -"constant from the :mod:`errno` module, you can catch the " -"adequate :exc:`OSError` subclass. The available subclasses are the " -"following:" +"constant from the :mod:`errno` module, you can catch the adequate :exc:" +"`OSError` subclass. The available subclasses are the following:" msgstr "" #: ../../whatsnew/3.3.rst:344 @@ -599,6 +597,18 @@ msgid "" " else:\n" " raise" msgstr "" +"from errno import ENOENT, EACCES, EPERM\n" +"\n" +"try:\n" +" with open(\"document.txt\") as f:\n" +" content = f.read()\n" +"except IOError as err:\n" +" if err.errno == ENOENT:\n" +" print(\"document.txt file is missing\")\n" +" elif err.errno in (EACCES, EPERM):\n" +" print(\"You are not allowed to read document.txt\")\n" +" else:\n" +" raise" #: ../../whatsnew/3.3.rst:379 msgid "" @@ -616,6 +626,13 @@ msgid "" "except PermissionError:\n" " print(\"You are not allowed to read document.txt\")" msgstr "" +"try:\n" +" with open(\"document.txt\") as f:\n" +" content = f.read()\n" +"except FileNotFoundError:\n" +" print(\"document.txt file is missing\")\n" +"except PermissionError:\n" +" print(\"You are not allowed to read document.txt\")" #: ../../whatsnew/3.3.rst:392 msgid ":pep:`3151` - Reworking the OS and IO Exception Hierarchy" @@ -879,10 +896,10 @@ msgstr "" msgid "" "Functions and class objects have a new :attr:`~definition.__qualname__` " "attribute representing the \"path\" from the module top-level to their " -"definition. For global functions and classes, this is the same " -"as :attr:`~definition.__name__`. For other functions and classes, it " -"provides better information about where they were actually defined, and how " -"they might be accessible from the global scope." +"definition. For global functions and classes, this is the same as :attr:" +"`~definition.__name__`. For other functions and classes, it provides better " +"information about where they were actually defined, and how they might be " +"accessible from the global scope." msgstr "" #: ../../whatsnew/3.3.rst:560 @@ -1023,11 +1040,10 @@ msgstr "PEP 362:函式簽名物件" msgid "" "A new function :func:`inspect.signature` makes introspection of python " "callables easy and straightforward. A broad range of callables is " -"supported: python functions, decorated or not, classes, " -"and :func:`functools.partial` objects. New " -"classes :class:`inspect.Signature`, :class:`inspect.Parameter` " -"and :class:`inspect.BoundArguments` hold information about the call " -"signatures, such as, annotations, default values, parameters kinds, and " +"supported: python functions, decorated or not, classes, and :func:`functools." +"partial` objects. New classes :class:`inspect.Signature`, :class:`inspect." +"Parameter` and :class:`inspect.BoundArguments` hold information about the " +"call signatures, such as, annotations, default values, parameters kinds, and " "bound arguments, which considerably simplifies writing decorators and any " "code that validates or amends calling signatures or arguments." msgstr "" @@ -1083,10 +1099,10 @@ msgstr "SimpleNamespace" msgid "" "The implementation of ``sys.implementation`` also introduces a new type to " "Python: :class:`types.SimpleNamespace`. In contrast to a mapping-based " -"namespace, like :class:`dict`, ``SimpleNamespace`` is attribute-based, " -"like :class:`object`. However, unlike ``object``, ``SimpleNamespace`` " -"instances are writable. This means that you can add, remove, and modify the " -"namespace through normal attribute access." +"namespace, like :class:`dict`, ``SimpleNamespace`` is attribute-based, like :" +"class:`object`. However, unlike ``object``, ``SimpleNamespace`` instances " +"are writable. This means that you can add, remove, and modify the namespace " +"through normal attribute access." msgstr "" #: ../../whatsnew/3.3.rst:681 @@ -1111,15 +1127,14 @@ msgstr "" #: ../../whatsnew/3.3.rst:694 msgid "" -"The :func:`__import__` function is now powered " -"by :func:`importlib.__import__`. This work leads to the completion of " -"\"phase 2\" of :pep:`302`. There are multiple benefits to this change. " -"First, it has allowed for more of the machinery powering import to be " -"exposed instead of being implicit and hidden within the C code. It also " -"provides a single implementation for all Python VMs supporting Python 3.3 to " -"use, helping to end any VM-specific deviations in import semantics. And " -"finally it eases the maintenance of import, allowing for future growth to " -"occur." +"The :func:`__import__` function is now powered by :func:`importlib." +"__import__`. This work leads to the completion of \"phase 2\" of :pep:`302`. " +"There are multiple benefits to this change. First, it has allowed for more " +"of the machinery powering import to be exposed instead of being implicit and " +"hidden within the C code. It also provides a single implementation for all " +"Python VMs supporting Python 3.3 to use, helping to end any VM-specific " +"deviations in import semantics. And finally it eases the maintenance of " +"import, allowing for future growth to occur." msgstr "" #: ../../whatsnew/3.3.rst:703 @@ -1145,11 +1160,11 @@ msgstr "" msgid "" "The abstract base classes defined in :mod:`importlib.abc` have been expanded " "to properly delineate between :term:`meta path finders ` " -"and :term:`path entry finders ` by " -"introducing :class:`importlib.abc.MetaPathFinder` " -"and :class:`importlib.abc.PathEntryFinder`, respectively. The old ABC " -"of :class:`!importlib.abc.Finder` is now only provided for backwards-" -"compatibility and does not enforce any method requirements." +"and :term:`path entry finders ` by introducing :class:" +"`importlib.abc.MetaPathFinder` and :class:`importlib.abc.PathEntryFinder`, " +"respectively. The old ABC of :class:`!importlib.abc.Finder` is now only " +"provided for backwards-compatibility and does not enforce any method " +"requirements." msgstr "" #: ../../whatsnew/3.3.rst:722 @@ -1163,11 +1178,10 @@ msgstr "" msgid "" "For loaders, the new abstract base class :class:`importlib.abc.FileLoader` " "helps write a loader that uses the file system as the storage mechanism for " -"a module's code. The loader for source files " -"(:class:`importlib.machinery.SourceFileLoader`), sourceless bytecode files " -"(:class:`importlib.machinery.SourcelessFileLoader`), and extension modules " -"(:class:`importlib.machinery.ExtensionFileLoader`) are now available for " -"direct use." +"a module's code. The loader for source files (:class:`importlib.machinery." +"SourceFileLoader`), sourceless bytecode files (:class:`importlib.machinery." +"SourcelessFileLoader`), and extension modules (:class:`importlib.machinery." +"ExtensionFileLoader`) are now available for direct use." msgstr "" #: ../../whatsnew/3.3.rst:734 @@ -1198,9 +1212,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:749 msgid "" "Beyond the expanse of what :mod:`importlib` now exposes, there are other " -"visible changes to import. The biggest is that :data:`sys.meta_path` " -"and :data:`sys.path_hooks` now store all of the meta path finders and path " -"entry hooks used by import. Previously the finders were implicit and hidden " +"visible changes to import. The biggest is that :data:`sys.meta_path` and :" +"data:`sys.path_hooks` now store all of the meta path finders and path entry " +"hooks used by import. Previously the finders were implicit and hidden " "within the C code of import instead of being directly exposed. This means " "that one can now easily remove or change the order of the various finders to " "fit one's needs." @@ -1218,10 +1232,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:762 msgid "" -"Loaders are also now expected to set the ``__package__`` attribute " -"from :pep:`366`. Once again, import itself is already setting this on all " -"loaders from :mod:`importlib` and import itself is setting the attribute " -"post-load." +"Loaders are also now expected to set the ``__package__`` attribute from :pep:" +"`366`. Once again, import itself is already setting this on all loaders " +"from :mod:`importlib` and import itself is setting the attribute post-load." msgstr "" #: ../../whatsnew/3.3.rst:766 @@ -1253,9 +1266,9 @@ msgstr "對核心 Python 語言所做的一些較小的更改包括:" #: ../../whatsnew/3.3.rst:783 msgid "" -"Added support for Unicode name aliases and named sequences. " -"Both :func:`unicodedata.lookup` and ``'\\N{...}'`` now resolve name aliases, " -"and :func:`unicodedata.lookup` resolves named sequences too." +"Added support for Unicode name aliases and named sequences. Both :func:" +"`unicodedata.lookup` and ``'\\N{...}'`` now resolve name aliases, and :func:" +"`unicodedata.lookup` resolves named sequences too." msgstr "" #: ../../whatsnew/3.3.rst:787 @@ -1269,8 +1282,8 @@ msgstr "Unicode 資料庫更新至 UCD 版本 6.1.0" #: ../../whatsnew/3.3.rst:791 msgid "" "Equality comparisons on :func:`range` objects now return a result reflecting " -"the equality of the underlying sequences generated by those range objects. " -"(:issue:`13201`)" +"the equality of the underlying sequences generated by those range objects. (:" +"issue:`13201`)" msgstr "" #: ../../whatsnew/3.3.rst:795 @@ -1294,9 +1307,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:805 msgid "" "New methods have been added to :class:`list` and :class:`bytearray`: " -"``copy()`` and ``clear()`` (:issue:`10516`). " -"Consequently, :class:`~collections.abc.MutableSequence` now also defines " -"a :meth:`~collections.abc.MutableSequence.clear` method (:issue:`11388`)." +"``copy()`` and ``clear()`` (:issue:`10516`). Consequently, :class:" +"`~collections.abc.MutableSequence` now also defines a :meth:`!clear` method " +"(:issue:`11388`)." msgstr "" #: ../../whatsnew/3.3.rst:810 @@ -1337,8 +1350,8 @@ msgid "" "Previous versions of CPython have always relied on a global import lock. " "This led to unexpected annoyances, such as deadlocks when importing a module " "would trigger code execution in a different thread as a side-effect. Clumsy " -"workarounds were sometimes employed, such as " -"the :c:func:`PyImport_ImportModuleNoBlock` C API function." +"workarounds were sometimes employed, such as the :c:func:" +"`PyImport_ImportModuleNoBlock` C API function." msgstr "" #: ../../whatsnew/3.3.rst:834 @@ -1374,8 +1387,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:852 msgid "" -":func:`hash`: hash randomization is enabled by default, " -"see :meth:`object.__hash__` and :envvar:`PYTHONHASHSEED`." +":func:`hash`: hash randomization is enabled by default, see :meth:`object." +"__hash__` and :envvar:`PYTHONHASHSEED`." msgstr "" #: ../../whatsnew/3.3.rst:854 @@ -1389,8 +1402,8 @@ msgstr "" msgid "" "The sequence documentation has been substantially rewritten to better " "explain the binary/text sequence distinction and to provide specific " -"documentation sections for the individual builtin sequence types " -"(:issue:`4966`)." +"documentation sections for the individual builtin sequence types (:issue:" +"`4966`)." msgstr "" #: ../../whatsnew/3.3.rst:864 @@ -1406,11 +1419,11 @@ msgid "" "This new debug module :mod:`faulthandler` contains functions to dump Python " "tracebacks explicitly, on a fault (a crash like a segmentation fault), after " "a timeout, or on a user signal. Call :func:`faulthandler.enable` to install " -"fault handlers for " -"the :const:`SIGSEGV`, :const:`SIGFPE`, :const:`SIGABRT`, :const:`SIGBUS`, " -"and :const:`SIGILL` signals. You can also enable them at startup by setting " -"the :envvar:`PYTHONFAULTHANDLER` environment variable or by using :option:`-" -"X` ``faulthandler`` command line option." +"fault handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :" +"const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and :const:`~signal." +"SIGILL` signals. You can also enable them at startup by setting the :envvar:" +"`PYTHONFAULTHANDLER` environment variable or by using :option:`-X` " +"``faulthandler`` command line option." msgstr "" #: ../../whatsnew/3.3.rst:877 @@ -1483,33 +1496,33 @@ msgstr "abc" msgid "" "Improved support for abstract base classes containing descriptors composed " "with abstract methods. The recommended approach to declaring abstract " -"descriptors is now to provide :attr:`__isabstractmethod__` as a dynamically " +"descriptors is now to provide :attr:`!__isabstractmethod__` as a dynamically " "updated property. The built-in descriptors have been updated accordingly." msgstr "" -#: ../../whatsnew/3.3.rst:922 ../../whatsnew/3.3.rst:2248 +#: ../../whatsnew/3.3.rst:922 ../../whatsnew/3.3.rst:2247 msgid "" ":class:`abc.abstractproperty` has been deprecated, use :class:`property` " "with :func:`abc.abstractmethod` instead." msgstr "" -":class:`abc.abstractproperty` 已被棄用,請改 :class:`property` " -"和 :func:`abc.abstractmethod`。" +":class:`abc.abstractproperty` 已被棄用,請改 :class:`property` 和 :func:`abc." +"abstractmethod`。" -#: ../../whatsnew/3.3.rst:924 ../../whatsnew/3.3.rst:2250 +#: ../../whatsnew/3.3.rst:924 ../../whatsnew/3.3.rst:2249 msgid "" -":class:`abc.abstractclassmethod` has been deprecated, " -"use :class:`classmethod` with :func:`abc.abstractmethod` instead." +":class:`abc.abstractclassmethod` has been deprecated, use :class:" +"`classmethod` with :func:`abc.abstractmethod` instead." msgstr "" -":class:`abc.abstractclassmethod` 已被棄用,請改用 :class:`classmethod` " -"和 :func:`abc.abstractmethod`。" +":class:`abc.abstractclassmethod` 已被棄用,請改用 :class:`classmethod` 和 :" +"func:`abc.abstractmethod`。" -#: ../../whatsnew/3.3.rst:926 ../../whatsnew/3.3.rst:2252 +#: ../../whatsnew/3.3.rst:926 ../../whatsnew/3.3.rst:2251 msgid "" -":class:`abc.abstractstaticmethod` has been deprecated, " -"use :class:`staticmethod` with :func:`abc.abstractmethod` instead." +":class:`abc.abstractstaticmethod` has been deprecated, use :class:" +"`staticmethod` with :func:`abc.abstractmethod` instead." msgstr "" -":class:`abc.abstractstaticmethod` 已被棄用,請改用 :class:`staticmethod` " -"和 :func:`abc.abstractmethod`。" +":class:`abc.abstractstaticmethod` 已被棄用,請改用 :class:`staticmethod` 和 :" +"func:`abc.abstractmethod`。" #: ../../whatsnew/3.3.rst:929 msgid "(Contributed by Darren Dale in :issue:`11610`.)" @@ -1542,9 +1555,9 @@ msgstr "base64" #: ../../whatsnew/3.3.rst:947 msgid "" "ASCII-only Unicode strings are now accepted by the decoding functions of " -"the :mod:`base64` modern interface. For example, " -"``base64.b64decode('YWJj')`` returns ``b'abc'``. (Contributed by Catalin " -"Iacob in :issue:`13641`.)" +"the :mod:`base64` modern interface. For example, ``base64." +"b64decode('YWJj')`` returns ``b'abc'``. (Contributed by Catalin Iacob in :" +"issue:`13641`.)" msgstr "" #: ../../whatsnew/3.3.rst:953 @@ -1587,9 +1600,9 @@ msgstr "(由 Nadeem Vawda 在 :issue:`5863` 中貢獻。)" #: ../../whatsnew/3.3.rst:974 msgid "" ":class:`bz2.BZ2File` and :func:`bz2.decompress` can now decompress multi-" -"stream inputs (such as those produced by the :program:`pbzip2` " -"tool). :class:`bz2.BZ2File` can now also be used to create this type of " -"file, using the ``'a'`` (append) mode." +"stream inputs (such as those produced by the :program:`pbzip2` tool). :class:" +"`bz2.BZ2File` can now also be used to create this type of file, using the " +"``'a'`` (append) mode." msgstr "" #: ../../whatsnew/3.3.rst:979 @@ -1599,7 +1612,7 @@ msgstr "(由 Nir Aides 在 :issue:`1625` 中貢獻。)" #: ../../whatsnew/3.3.rst:981 msgid "" ":class:`bz2.BZ2File` now implements all of the :class:`io.BufferedIOBase` " -"API, except for the :meth:`detach` and :meth:`truncate` methods." +"API, except for the :meth:`!detach` and :meth:`!truncate` methods." msgstr "" #: ../../whatsnew/3.3.rst:986 @@ -1609,9 +1622,9 @@ msgstr "codecs" #: ../../whatsnew/3.3.rst:988 msgid "" "The :mod:`~encodings.mbcs` codec has been rewritten to handle correctly " -"``replace`` and ``ignore`` error handlers on all Windows versions. " -"The :mod:`~encodings.mbcs` codec now supports all error handlers, instead of " -"only ``replace`` to encode and ``ignore`` to decode." +"``replace`` and ``ignore`` error handlers on all Windows versions. The :mod:" +"`~encodings.mbcs` codec now supports all error handlers, instead of only " +"``replace`` to encode and ``ignore`` to decode." msgstr "" #: ../../whatsnew/3.3.rst:993 @@ -1625,9 +1638,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:998 msgid "" "Multibyte CJK decoders now resynchronize faster. They only ignore the first " -"byte of an invalid byte sequence. For example, " -"``b'\\xff\\n'.decode('gb2312', 'replace')`` now returns a ``\\n`` after the " -"replacement character." +"byte of an invalid byte sequence. For example, ``b'\\xff\\n'." +"decode('gb2312', 'replace')`` now returns a ``\\n`` after the replacement " +"character." msgstr "" #: ../../whatsnew/3.3.rst:1002 @@ -1675,16 +1688,16 @@ msgstr "collections" #: ../../whatsnew/3.3.rst:1023 msgid "" "Addition of a new :class:`~collections.ChainMap` class to allow treating a " -"number of mappings as a single unit. (Written by Raymond Hettinger " -"for :issue:`11089`, made public in :issue:`11297`.)" +"number of mappings as a single unit. (Written by Raymond Hettinger for :" +"issue:`11089`, made public in :issue:`11297`.)" msgstr "" #: ../../whatsnew/3.3.rst:1027 msgid "" "The abstract base classes have been moved in a new :mod:`collections.abc` " "module, to better differentiate between the abstract and the concrete " -"collections classes. Aliases for ABCs are still present in " -"the :mod:`collections` module to preserve existing imports. (:issue:`11085`)" +"collections classes. Aliases for ABCs are still present in the :mod:" +"`collections` module to preserve existing imports. (:issue:`11085`)" msgstr "" #: ../../whatsnew/3.3.rst:1034 @@ -1735,9 +1748,8 @@ msgstr "curses" #: ../../whatsnew/3.3.rst:1065 msgid "" "If the :mod:`curses` module is linked to the ncursesw library, use Unicode " -"functions when Unicode strings or characters are passed " -"(e.g. :c:func:`waddwstr`), and bytes functions otherwise " -"(e.g. :c:func:`waddstr`)." +"functions when Unicode strings or characters are passed (e.g. :c:func:`!" +"waddwstr`), and bytes functions otherwise (e.g. :c:func:`!waddstr`)." msgstr "" #: ../../whatsnew/3.3.rst:1068 @@ -1776,8 +1788,8 @@ msgstr "datetime" #: ../../whatsnew/3.3.rst:1081 msgid "" "Equality comparisons between naive and aware :class:`~datetime.datetime` " -"instances now return :const:`False` instead of raising :exc:`TypeError` " -"(:issue:`15006`)." +"instances now return :const:`False` instead of raising :exc:`TypeError` (:" +"issue:`15006`)." msgstr "" #: ../../whatsnew/3.3.rst:1084 @@ -1902,8 +1914,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:1130 msgid "" "If Python is compiled without threads, the C version automatically disables " -"the expensive thread local context machinery. In this case, the " -"variable :const:`~decimal.HAVE_THREADS` is set to ``False``." +"the expensive thread local context machinery. In this case, the variable :" +"const:`~decimal.HAVE_THREADS` is set to ``False``." msgstr "" #: ../../whatsnew/3.3.rst:1137 @@ -1921,8 +1933,8 @@ msgid "64-bit" msgstr "64 位元" #: ../../whatsnew/3.3.rst:1143 -msgid ":const:`MAX_PREC`" -msgstr ":const:`MAX_PREC`" +msgid ":const:`~decimal.MAX_PREC`" +msgstr ":const:`~decimal.MAX_PREC`" #: ../../whatsnew/3.3.rst:1143 ../../whatsnew/3.3.rst:1145 msgid "``425000000``" @@ -1933,12 +1945,12 @@ msgid "``999999999999999999``" msgstr "``999999999999999999``" #: ../../whatsnew/3.3.rst:1145 -msgid ":const:`MAX_EMAX`" -msgstr ":const:`MAX_EMAX`" +msgid ":const:`~decimal.MAX_EMAX`" +msgstr ":const:`~decimal.MAX_EMAX`" #: ../../whatsnew/3.3.rst:1147 -msgid ":const:`MIN_EMIN`" -msgstr ":const:`MIN_EMIN`" +msgid ":const:`~decimal.MIN_EMIN`" +msgstr ":const:`~decimal.MIN_EMIN`" #: ../../whatsnew/3.3.rst:1147 msgid "``-425000000``" @@ -1950,11 +1962,10 @@ msgstr "``-999999999999999999``" #: ../../whatsnew/3.3.rst:1150 msgid "" -"In the context templates " -"(:const:`~decimal.DefaultContext`, :const:`~decimal.BasicContext` " -"and :const:`~decimal.ExtendedContext`) the magnitude " -"of :attr:`~decimal.Context.Emax` and :attr:`~decimal.Context.Emin` has " -"changed to ``999999``." +"In the context templates (:const:`~decimal.DefaultContext`, :const:`~decimal." +"BasicContext` and :const:`~decimal.ExtendedContext`) the magnitude of :attr:" +"`~decimal.Context.Emax` and :attr:`~decimal.Context.Emin` has changed to " +"``999999``." msgstr "" #: ../../whatsnew/3.3.rst:1155 @@ -1962,31 +1973,29 @@ msgid "" "The :class:`~decimal.Decimal` constructor in decimal.py does not observe the " "context limits and converts values with arbitrary exponents or precision " "exactly. Since the C version has internal limits, the following scheme is " -"used: If possible, values are converted exactly, " -"otherwise :exc:`~decimal.InvalidOperation` is raised and the result is NaN. " -"In the latter case it is always possible to " -"use :meth:`~decimal.Context.create_decimal` in order to obtain a rounded or " -"inexact value." +"used: If possible, values are converted exactly, otherwise :exc:`~decimal." +"InvalidOperation` is raised and the result is NaN. In the latter case it is " +"always possible to use :meth:`~decimal.Context.create_decimal` in order to " +"obtain a rounded or inexact value." msgstr "" #: ../../whatsnew/3.3.rst:1164 msgid "" "The power function in decimal.py is always correctly rounded. In the C " -"version, it is defined in terms of the correctly " -"rounded :meth:`~decimal.Decimal.exp` and :meth:`~decimal.Decimal.ln` " -"functions, but the final result is only \"almost always correctly rounded\"." +"version, it is defined in terms of the correctly rounded :meth:`~decimal." +"Decimal.exp` and :meth:`~decimal.Decimal.ln` functions, but the final result " +"is only \"almost always correctly rounded\"." msgstr "" #: ../../whatsnew/3.3.rst:1170 msgid "" -"In the C version, the context dictionary containing the signals is " -"a :class:`~collections.abc.MutableMapping`. For speed " -"reasons, :attr:`~decimal.Context.flags` and :attr:`~decimal.Context.traps` " -"always refer to the same :class:`~collections.abc.MutableMapping` that the " -"context was initialized with. If a new signal dictionary is " -"assigned, :attr:`~decimal.Context.flags` and :attr:`~decimal.Context.traps` " -"are updated with the new values, but they do not reference the RHS " -"dictionary." +"In the C version, the context dictionary containing the signals is a :class:" +"`~collections.abc.MutableMapping`. For speed reasons, :attr:`~decimal." +"Context.flags` and :attr:`~decimal.Context.traps` always refer to the same :" +"class:`~collections.abc.MutableMapping` that the context was initialized " +"with. If a new signal dictionary is assigned, :attr:`~decimal.Context.flags` " +"and :attr:`~decimal.Context.traps` are updated with the new values, but they " +"do not reference the RHS dictionary." msgstr "" #: ../../whatsnew/3.3.rst:1180 @@ -2017,18 +2026,18 @@ msgstr "" #: ../../whatsnew/3.3.rst:1200 msgid "" -"The email package now has a :mod:`~email.policy` framework. " -"A :class:`~email.policy.Policy` is an object with several methods and " -"properties that control how the email package behaves. The primary policy " -"for Python 3.3 is the :class:`~email.policy.Compat32` policy, which provides " -"backward compatibility with the email package in Python 3.2. A ``policy`` " -"can be specified when an email message is parsed by a :mod:`~email.parser`, " -"or when a :class:`~email.message.Message` object is created, or when an " -"email is serialized using a :mod:`~email.generator`. Unless overridden, a " -"policy passed to a ``parser`` is inherited by all the ``Message`` object and " -"sub-objects created by the ``parser``. By default a ``generator`` will use " -"the policy of the ``Message`` object it is serializing. The default policy " -"is :data:`~email.policy.compat32`." +"The email package now has a :mod:`~email.policy` framework. A :class:" +"`~email.policy.Policy` is an object with several methods and properties that " +"control how the email package behaves. The primary policy for Python 3.3 is " +"the :class:`~email.policy.Compat32` policy, which provides backward " +"compatibility with the email package in Python 3.2. A ``policy`` can be " +"specified when an email message is parsed by a :mod:`~email.parser`, or when " +"a :class:`~email.message.Message` object is created, or when an email is " +"serialized using a :mod:`~email.generator`. Unless overridden, a policy " +"passed to a ``parser`` is inherited by all the ``Message`` object and sub-" +"objects created by the ``parser``. By default a ``generator`` will use the " +"policy of the ``Message`` object it is serializing. The default policy is :" +"data:`~email.policy.compat32`." msgstr "" #: ../../whatsnew/3.3.rst:1213 @@ -2078,11 +2087,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:1235 msgid "" -"A new policy instance, with new settings, is created using " -"the :meth:`~email.policy.Policy.clone` method of policy objects. ``clone`` " -"takes any of the above controls as keyword arguments. Any control not " -"specified in the call retains its default value. Thus you can create a " -"policy that uses ``\\r\\n`` linesep characters like this::" +"A new policy instance, with new settings, is created using the :meth:`~email." +"policy.Policy.clone` method of policy objects. ``clone`` takes any of the " +"above controls as keyword arguments. Any control not specified in the call " +"retains its default value. Thus you can create a policy that uses " +"``\\r\\n`` linesep characters like this::" msgstr "" #: ../../whatsnew/3.3.rst:1241 @@ -2112,10 +2121,10 @@ msgid "" "for introducing it is to allow the creation of new policies that implement " "new features for the email package in a way that maintains backward " "compatibility for those who do not use the new policies. Because the new " -"policies introduce a new API, we are releasing them in Python 3.3 as " -"a :term:`provisional policy `. Backwards incompatible " -"changes (up to and including removal of the code) may occur if deemed " -"necessary by the core developers." +"policies introduce a new API, we are releasing them in Python 3.3 as a :term:" +"`provisional policy `. Backwards incompatible changes " +"(up to and including removal of the code) may occur if deemed necessary by " +"the core developers." msgstr "" #: ../../whatsnew/3.3.rst:1265 @@ -2173,8 +2182,8 @@ msgid "" "'Éric'\n" ">>> m['Date'] = email.utils.localtime()\n" ">>> m['Date'].datetime\n" -"datetime.datetime(2012, 5, 25, 21, 39, 24, 465484, " -"tzinfo=datetime.timezone(datetime.timedelta(-1, 72000), 'EDT'))\n" +"datetime.datetime(2012, 5, 25, 21, 39, 24, 465484, tzinfo=datetime." +"timezone(datetime.timedelta(-1, 72000), 'EDT'))\n" ">>> m['Date']\n" "'Fri, 25 May 2012 21:44:27 -0400'\n" ">>> print(m)\n" @@ -2193,8 +2202,8 @@ msgstr "" "'Éric'\n" ">>> m['Date'] = email.utils.localtime()\n" ">>> m['Date'].datetime\n" -"datetime.datetime(2012, 5, 25, 21, 39, 24, 465484, " -"tzinfo=datetime.timezone(datetime.timedelta(-1, 72000), 'EDT'))\n" +"datetime.datetime(2012, 5, 25, 21, 39, 24, 465484, tzinfo=datetime." +"timezone(datetime.timedelta(-1, 72000), 'EDT'))\n" ">>> m['Date']\n" "'Fri, 25 May 2012 21:44:27 -0400'\n" ">>> print(m)\n" @@ -2206,8 +2215,8 @@ msgid "" "You will note that the unicode display name is automatically encoded as " "``utf-8`` when the message is serialized, but that when the header is " "accessed directly, you get the unicode version. This eliminates any need to " -"deal with the :mod:`email.header` :meth:`~email.header.decode_header` " -"or :meth:`~email.header.make_header` functions." +"deal with the :mod:`email.header` :meth:`~email.header.decode_header` or :" +"meth:`~email.header.make_header` functions." msgstr "" #: ../../whatsnew/3.3.rst:1318 @@ -2254,8 +2263,8 @@ msgid "" "(Group(display_name='pals', addresses=(Address(display_name='Bob', " "username='bob', domain='example.com'), Address(display_name='Sally', " "username='sally', domain='example.com')), Group(display_name=None, " -"addresses=(Address(display_name='Bonzo', username='bonz', " -"domain='laugh.com'),))" +"addresses=(Address(display_name='Bonzo', username='bonz', domain='laugh." +"com'),))" msgstr "" ">>> m2['cc'].addresses\n" "(Address(display_name='Bob', username='bob', domain='example.com'), " @@ -2265,8 +2274,8 @@ msgstr "" "(Group(display_name='pals', addresses=(Address(display_name='Bob', " "username='bob', domain='example.com'), Address(display_name='Sally', " "username='sally', domain='example.com')), Group(display_name=None, " -"addresses=(Address(display_name='Bonzo', username='bonz', " -"domain='laugh.com'),))" +"addresses=(Address(display_name='Bonzo', username='bonz', domain='laugh." +"com'),))" #: ../../whatsnew/3.3.rst:1343 msgid "" @@ -2282,9 +2291,9 @@ msgstr "其他 API 變更" #: ../../whatsnew/3.3.rst:1351 msgid "" -"New :class:`~email.parser.BytesHeaderParser`, added to " -"the :mod:`~email.parser` module to " -"complement :class:`~email.parser.HeaderParser` and complete the Bytes API." +"New :class:`~email.parser.BytesHeaderParser`, added to the :mod:`~email." +"parser` module to complement :class:`~email.parser.HeaderParser` and " +"complete the Bytes API." msgstr "" #: ../../whatsnew/3.3.rst:1355 @@ -2307,11 +2316,10 @@ msgstr "" #: ../../whatsnew/3.3.rst:1364 msgid "" ":func:`~email.utils.localtime`: With no argument, returns the current local " -"time as an aware :class:`~datetime.datetime` using the " -"local :class:`~datetime.timezone`. Given an " -"aware :class:`~datetime.datetime`, converts it into an " -"aware :class:`~datetime.datetime` using the " -"local :class:`~datetime.timezone`." +"time as an aware :class:`~datetime.datetime` using the local :class:" +"`~datetime.timezone`. Given an aware :class:`~datetime.datetime`, converts " +"it into an aware :class:`~datetime.datetime` using the local :class:" +"`~datetime.timezone`." msgstr "" #: ../../whatsnew/3.3.rst:1372 @@ -2322,25 +2330,24 @@ msgstr "ftplib" msgid "" ":class:`ftplib.FTP` now accepts a ``source_address`` keyword argument to " "specify the ``(host, port)`` to use as the source address in the bind call " -"when creating the outgoing socket. (Contributed by Giampaolo Rodolà " -"in :issue:`8594`.)" +"when creating the outgoing socket. (Contributed by Giampaolo Rodolà in :" +"issue:`8594`.)" msgstr "" #: ../../whatsnew/3.3.rst:1379 msgid "" -"The :class:`~ftplib.FTP_TLS` class now provides a " -"new :func:`~ftplib.FTP_TLS.ccc` function to revert control channel back to " -"plaintext. This can be useful to take advantage of firewalls that know how " -"to handle NAT with non-secure FTP without opening fixed ports. (Contributed " -"by Giampaolo Rodolà in :issue:`12139`.)" +"The :class:`~ftplib.FTP_TLS` class now provides a new :func:`~ftplib.FTP_TLS." +"ccc` function to revert control channel back to plaintext. This can be " +"useful to take advantage of firewalls that know how to handle NAT with non-" +"secure FTP without opening fixed ports. (Contributed by Giampaolo Rodolà " +"in :issue:`12139`.)" msgstr "" #: ../../whatsnew/3.3.rst:1385 msgid "" "Added :meth:`ftplib.FTP.mlsd` method which provides a parsable directory " -"listing format and deprecates :meth:`ftplib.FTP.nlst` " -"and :meth:`ftplib.FTP.dir`. (Contributed by Giampaolo Rodolà " -"in :issue:`11072`.)" +"listing format and deprecates :meth:`ftplib.FTP.nlst` and :meth:`ftplib.FTP." +"dir`. (Contributed by Giampaolo Rodolà in :issue:`11072`.)" msgstr "" #: ../../whatsnew/3.3.rst:1391 @@ -2383,11 +2390,11 @@ msgstr "http" #: ../../whatsnew/3.3.rst:1417 msgid "" ":class:`http.server.BaseHTTPRequestHandler` now buffers the headers and " -"writes them all at once " -"when :meth:`~http.server.BaseHTTPRequestHandler.end_headers` is called. A " -"new method :meth:`~http.server.BaseHTTPRequestHandler.flush_headers` can be " -"used to directly manage when the accumulated headers are sent. (Contributed " -"by Andrew Schaaf in :issue:`3709`.)" +"writes them all at once when :meth:`~http.server.BaseHTTPRequestHandler." +"end_headers` is called. A new method :meth:`~http.server." +"BaseHTTPRequestHandler.flush_headers` can be used to directly manage when " +"the accumulated headers are sent. (Contributed by Andrew Schaaf in :issue:" +"`3709`.)" msgstr "" #: ../../whatsnew/3.3.rst:1423 @@ -2398,10 +2405,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1426 msgid "" -":class:`http.client.HTTPResponse` now has " -"a :meth:`~http.client.HTTPResponse.readinto` method, which means it can be " -"used as an :class:`io.RawIOBase` class. (Contributed by John Kuhn " -"in :issue:`13464`.)" +":class:`http.client.HTTPResponse` now has a :meth:`~http.client.HTTPResponse." +"readinto` method, which means it can be used as an :class:`io.RawIOBase` " +"class. (Contributed by John Kuhn in :issue:`13464`.)" msgstr "" #: ../../whatsnew/3.3.rst:1433 @@ -2411,12 +2417,14 @@ msgstr "html" #: ../../whatsnew/3.3.rst:1435 msgid "" ":class:`html.parser.HTMLParser` is now able to parse broken markup without " -"raising errors, therefore the *strict* argument of the constructor and " -"the :exc:`~html.parser.HTMLParseError` exception are now deprecated. The " -"ability to parse broken markup is the result of a number of bug fixes that " -"are also available on the latest bug fix releases of Python 2.7/3.2. " -"(Contributed by Ezio Melotti in :issue:`15114`, " -"and :issue:`14538`, :issue:`13993`, :issue:`13960`, :issue:`13358`, :issue:`1745761`, :issue:`755670`, :issue:`13357`, :issue:`12629`, :issue:`1200313`, :issue:`670664`, :issue:`13273`, :issue:`12888`, :issue:`7311`.)" +"raising errors, therefore the *strict* argument of the constructor and the :" +"exc:`!HTMLParseError` exception are now deprecated. The ability to parse " +"broken markup is the result of a number of bug fixes that are also available " +"on the latest bug fix releases of Python 2.7/3.2. (Contributed by Ezio " +"Melotti in :issue:`15114`, and :issue:`14538`, :issue:`13993`, :issue:" +"`13960`, :issue:`13358`, :issue:`1745761`, :issue:`755670`, :issue:`13357`, :" +"issue:`12629`, :issue:`1200313`, :issue:`670664`, :issue:`13273`, :issue:" +"`12888`, :issue:`7311`.)" msgstr "" #: ../../whatsnew/3.3.rst:1445 @@ -2488,10 +2496,10 @@ msgstr "(由 David Townshend 於 :issue:`12760` 中貢獻。)" #: ../../whatsnew/3.3.rst:1487 msgid "" "The constructor of the :class:`~io.TextIOWrapper` class has a new " -"*write_through* optional argument. If *write_through* is ``True``, calls " -"to :meth:`~io.TextIOWrapper.write` are guaranteed not to be buffered: any " -"data written on the :class:`~io.TextIOWrapper` object is immediately handled " -"to its underlying binary buffer." +"*write_through* optional argument. If *write_through* is ``True``, calls to :" +"meth:`!write` are guaranteed not to be buffered: any data written on the :" +"class:`~io.TextIOWrapper` object is immediately handled to its underlying " +"binary buffer." msgstr "" #: ../../whatsnew/3.3.rst:1495 @@ -2517,11 +2525,10 @@ msgstr "" #: ../../whatsnew/3.3.rst:1507 msgid "" -"A class level attribute :attr:`~logging.handlers.SysLogHandler.append_nul` " -"has been added to :class:`~logging.handlers.SysLogHandler` to allow control " -"of the appending of the ``NUL`` (``\\000``) byte to syslog records, since " -"for some daemons it is required while for others it is passed through to the " -"log." +"A class level attribute :attr:`!append_nul` has been added to :class:" +"`~logging.handlers.SysLogHandler` to allow control of the appending of the " +"``NUL`` (``\\000``) byte to syslog records, since for some daemons it is " +"required while for others it is passed through to the log." msgstr "" #: ../../whatsnew/3.3.rst:1515 @@ -2563,9 +2570,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1539 msgid "" -":class:`multiprocessing.Connection` objects can now be transferred over " -"multiprocessing connections. (Contributed by Richard Oudkerk " -"in :issue:`4892`.)" +":class:`multiprocessing.connection.Connection` objects can now be " +"transferred over multiprocessing connections. (Contributed by Richard " +"Oudkerk in :issue:`4892`.)" msgstr "" #: ../../whatsnew/3.3.rst:1543 @@ -2584,12 +2591,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:1552 msgid "" -"New methods :meth:`multiprocessing.pool.Pool.starmap` " -"and :meth:`~multiprocessing.pool.Pool.starmap_async` " -"provide :func:`itertools.starmap` equivalents to the " -"existing :meth:`multiprocessing.pool.Pool.map` " -"and :meth:`~multiprocessing.pool.Pool.map_async` functions. (Contributed by " -"Hynek Schlawack in :issue:`12708`.)" +"New methods :meth:`multiprocessing.pool.Pool.starmap` and :meth:" +"`~multiprocessing.pool.Pool.starmap_async` provide :func:`itertools.starmap` " +"equivalents to the existing :meth:`multiprocessing.pool.Pool.map` and :meth:" +"`~multiprocessing.pool.Pool.map_async` functions. (Contributed by Hynek " +"Schlawack in :issue:`12708`.)" msgstr "" #: ../../whatsnew/3.3.rst:1561 @@ -2609,16 +2615,16 @@ msgid "" ">>> with NNTP('news.gmane.org') as n:\n" "... n.group('gmane.comp.python.committers')\n" "...\n" -"('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, " -"'gmane.comp.python.committers')\n" +"('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, 'gmane.comp." +"python.committers')\n" ">>>" msgstr "" ">>> from nntplib import NNTP\n" ">>> with NNTP('news.gmane.org') as n:\n" "... n.group('gmane.comp.python.committers')\n" "...\n" -"('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, " -"'gmane.comp.python.committers')\n" +"('211 1755 1 1755 gmane.comp.python.committers', 1755, 1, 1755, 'gmane.comp." +"python.committers')\n" ">>>" #: ../../whatsnew/3.3.rst:1574 @@ -2632,9 +2638,9 @@ msgstr "os" #: ../../whatsnew/3.3.rst:1580 msgid "" "The :mod:`os` module has a new :func:`~os.pipe2` function that makes it " -"possible to create a pipe with :const:`~os.O_CLOEXEC` " -"or :const:`~os.O_NONBLOCK` flags set atomically. This is especially useful " -"to avoid race conditions in multi-threaded programs." +"possible to create a pipe with :const:`~os.O_CLOEXEC` or :const:`~os." +"O_NONBLOCK` flags set atomically. This is especially useful to avoid race " +"conditions in multi-threaded programs." msgstr "" #: ../../whatsnew/3.3.rst:1585 @@ -2658,46 +2664,52 @@ msgid "" "To avoid race conditions like symlink attacks and issues with temporary " "files and directories, it is more reliable (and also faster) to manipulate " "file descriptors instead of file names. Python 3.3 enhances existing " -"functions and introduces new functions to work on file descriptors " -"(:issue:`4761`, :issue:`10755` and :issue:`14626`)." +"functions and introduces new functions to work on file descriptors (:issue:" +"`4761`, :issue:`10755` and :issue:`14626`)." msgstr "" #: ../../whatsnew/3.3.rst:1601 msgid "" -"The :mod:`os` module has a new :func:`~os.fwalk` function similar " -"to :func:`~os.walk` except that it also yields file descriptors referring to " -"the directories visited. This is especially useful to avoid symlink races." +"The :mod:`os` module has a new :func:`~os.fwalk` function similar to :func:" +"`~os.walk` except that it also yields file descriptors referring to the " +"directories visited. This is especially useful to avoid symlink races." msgstr "" #: ../../whatsnew/3.3.rst:1605 msgid "" "The following functions get new optional *dir_fd* (:ref:`paths relative to " "directory descriptors `) and/or *follow_symlinks* (:ref:`not " -"following symlinks " -"`): :func:`~os.access`, :func:`~os.chflags`, :func:`~os.chmod`, :func:`~os.chown`, :func:`~os.link`, :func:`~os.lstat`, :func:`~os.mkdir`, :func:`~os.mkfifo`, :func:`~os.mknod`, :func:`~os.open`, :func:`~os.readlink`, :func:`~os.remove`, :func:`~os.rename`, :func:`~os.replace`, :func:`~os.rmdir`, :func:`~os.stat`, :func:`~os.symlink`, :func:`~os.unlink`, :func:`~os.utime`. " -"Platform support for using these parameters can be checked via the " -"sets :data:`os.supports_dir_fd` and :data:`os.supports_follows_symlinks`." +"following symlinks `): :func:`~os.access`, :func:`~os." +"chflags`, :func:`~os.chmod`, :func:`~os.chown`, :func:`~os.link`, :func:`~os." +"lstat`, :func:`~os.mkdir`, :func:`~os.mkfifo`, :func:`~os.mknod`, :func:`~os." +"open`, :func:`~os.readlink`, :func:`~os.remove`, :func:`~os.rename`, :func:" +"`~os.replace`, :func:`~os.rmdir`, :func:`~os.stat`, :func:`~os.symlink`, :" +"func:`~os.unlink`, :func:`~os.utime`. Platform support for using these " +"parameters can be checked via the sets :data:`os.supports_dir_fd` and :data:" +"`os.supports_follow_symlinks`." msgstr "" #: ../../whatsnew/3.3.rst:1616 msgid "" "The following functions now support a file descriptor for their path " -"argument: :func:`~os.chdir`, :func:`~os.chmod`, :func:`~os.chown`, :func:`~os.execve`, :func:`~os.listdir`, :func:`~os.pathconf`, :func:`~os.path.exists`, :func:`~os.stat`, :func:`~os.statvfs`, :func:`~os.utime`. " -"Platform support for this can be checked via the :data:`os.supports_fd` set." +"argument: :func:`~os.chdir`, :func:`~os.chmod`, :func:`~os.chown`, :func:" +"`~os.execve`, :func:`~os.listdir`, :func:`~os.pathconf`, :func:`~os.path." +"exists`, :func:`~os.stat`, :func:`~os.statvfs`, :func:`~os.utime`. Platform " +"support for this can be checked via the :data:`os.supports_fd` set." msgstr "" #: ../../whatsnew/3.3.rst:1622 msgid "" ":func:`~os.access` accepts an ``effective_ids`` keyword argument to turn on " "using the effective uid/gid rather than the real uid/gid in the access " -"check. Platform support for this can be checked via " -"the :data:`~os.supports_effective_ids` set." +"check. Platform support for this can be checked via the :data:`~os." +"supports_effective_ids` set." msgstr "" #: ../../whatsnew/3.3.rst:1627 msgid "" -"The :mod:`os` module has two new functions: :func:`~os.getpriority` " -"and :func:`~os.setpriority`. They can be used to get or set process niceness/" +"The :mod:`os` module has two new functions: :func:`~os.getpriority` and :" +"func:`~os.setpriority`. They can be used to get or set process niceness/" "priority in a fashion similar to :func:`os.nice` but extended to all " "processes instead of just the current one." msgstr "" @@ -2716,32 +2728,37 @@ msgstr "" #: ../../whatsnew/3.3.rst:1640 msgid "" -"The stat family of functions (:func:`~os.stat`, :func:`~os.fstat`, " -"and :func:`~os.lstat`) now support reading a file's timestamps with " -"nanosecond precision. Symmetrically, :func:`~os.utime` can now write file " -"timestamps with nanosecond precision. (Contributed by Larry Hastings " -"in :issue:`14127`.)" +"The stat family of functions (:func:`~os.stat`, :func:`~os.fstat`, and :func:" +"`~os.lstat`) now support reading a file's timestamps with nanosecond " +"precision. Symmetrically, :func:`~os.utime` can now write file timestamps " +"with nanosecond precision. (Contributed by Larry Hastings in :issue:" +"`14127`.)" msgstr "" #: ../../whatsnew/3.3.rst:1646 msgid "" "The new :func:`os.get_terminal_size` function queries the size of the " -"terminal attached to a file descriptor. See " -"also :func:`shutil.get_terminal_size`. (Contributed by Zbigniew Jędrzejewski-" -"Szmek in :issue:`13609`.)" +"terminal attached to a file descriptor. See also :func:`shutil." +"get_terminal_size`. (Contributed by Zbigniew Jędrzejewski-Szmek in :issue:" +"`13609`.)" msgstr "" #: ../../whatsnew/3.3.rst:1653 msgid "" -"New functions to support Linux extended attributes " -"(:issue:`12720`): :func:`~os.getxattr`, :func:`~os.listxattr`, :func:`~os.removexattr`, :func:`~os.setxattr`." +"New functions to support Linux extended attributes (:issue:`12720`): :func:" +"`~os.getxattr`, :func:`~os.listxattr`, :func:`~os.removexattr`, :func:`~os." +"setxattr`." msgstr "" #: ../../whatsnew/3.3.rst:1657 msgid "" "New interface to the scheduler. These functions control how a process is " -"allocated CPU time by the operating system. New " -"functions: :func:`~os.sched_get_priority_max`, :func:`~os.sched_get_priority_min`, :func:`~os.sched_getaffinity`, :func:`~os.sched_getparam`, :func:`~os.sched_getscheduler`, :func:`~os.sched_rr_get_interval`, :func:`~os.sched_setaffinity`, :func:`~os.sched_setparam`, :func:`~os.sched_setscheduler`, :func:`~os.sched_yield`," +"allocated CPU time by the operating system. New functions: :func:`~os." +"sched_get_priority_max`, :func:`~os.sched_get_priority_min`, :func:`~os." +"sched_getaffinity`, :func:`~os.sched_getparam`, :func:`~os." +"sched_getscheduler`, :func:`~os.sched_rr_get_interval`, :func:`~os." +"sched_setaffinity`, :func:`~os.sched_setparam`, :func:`~os." +"sched_setscheduler`, :func:`~os.sched_yield`," msgstr "" #: ../../whatsnew/3.3.rst:1666 @@ -2829,12 +2846,12 @@ msgstr "" #: ../../whatsnew/3.3.rst:1696 msgid "" -"New " -"constants :const:`~os.RTLD_LAZY`, :const:`~os.RTLD_NOW`, :const:`~os.RTLD_GLOBAL`, :const:`~os.RTLD_LOCAL`, :const:`~os.RTLD_NODELETE`, :const:`~os.RTLD_NOLOAD`, " -"and :const:`~os.RTLD_DEEPBIND` are available on platforms that support " -"them. These are for use with the :func:`sys.setdlopenflags` function, and " -"supersede the similar constants defined in :mod:`ctypes` and :mod:`DLFCN`. " -"(Contributed by Victor Stinner in :issue:`13226`.)" +"New constants :const:`~os.RTLD_LAZY`, :const:`~os.RTLD_NOW`, :const:`~os." +"RTLD_GLOBAL`, :const:`~os.RTLD_LOCAL`, :const:`~os.RTLD_NODELETE`, :const:" +"`~os.RTLD_NOLOAD`, and :const:`~os.RTLD_DEEPBIND` are available on platforms " +"that support them. These are for use with the :func:`sys.setdlopenflags` " +"function, and supersede the similar constants defined in :mod:`ctypes` and :" +"mod:`!DLFCN`. (Contributed by Victor Stinner in :issue:`13226`.)" msgstr "" #: ../../whatsnew/3.3.rst:1704 @@ -2864,9 +2881,8 @@ msgstr "pickle" #: ../../whatsnew/3.3.rst:1721 msgid "" -":class:`pickle.Pickler` objects now have an " -"optional :attr:`~pickle.Pickler.dispatch_table` attribute allowing per-" -"pickler reduction functions to be set." +":class:`pickle.Pickler` objects now have an optional :attr:`~pickle.Pickler." +"dispatch_table` attribute allowing per-pickler reduction functions to be set." msgstr "" #: ../../whatsnew/3.3.rst:1725 @@ -2879,9 +2895,9 @@ msgstr "pydoc" #: ../../whatsnew/3.3.rst:1731 msgid "" -"The Tk GUI and the :func:`~pydoc.serve` function have been removed from " -"the :mod:`pydoc` module: ``pydoc -g`` and :func:`~pydoc.serve` have been " -"deprecated in Python 3.2." +"The Tk GUI and the :func:`!serve` function have been removed from the :mod:" +"`pydoc` module: ``pydoc -g`` and :func:`!serve` have been deprecated in " +"Python 3.2." msgstr "" #: ../../whatsnew/3.3.rst:1737 @@ -2913,23 +2929,22 @@ msgstr "" #: ../../whatsnew/3.3.rst:1753 msgid "" ":class:`~sched.scheduler` class can now be safely used in multi-threaded " -"environments. (Contributed by Josiah Carlson and Giampaolo Rodolà " -"in :issue:`8684`.)" +"environments. (Contributed by Josiah Carlson and Giampaolo Rodolà in :issue:" +"`8684`.)" msgstr "" #: ../../whatsnew/3.3.rst:1757 msgid "" "*timefunc* and *delayfunct* parameters of :class:`~sched.scheduler` class " -"constructor are now optional and defaults to :func:`time.time` " -"and :func:`time.sleep` respectively. (Contributed by Chris Clark " -"in :issue:`13245`.)" +"constructor are now optional and defaults to :func:`time.time` and :func:" +"`time.sleep` respectively. (Contributed by Chris Clark in :issue:`13245`.)" msgstr "" #: ../../whatsnew/3.3.rst:1762 msgid "" ":meth:`~sched.scheduler.enter` and :meth:`~sched.scheduler.enterabs` " -"*argument* parameter is now optional. (Contributed by Chris Clark " -"in :issue:`13245`.)" +"*argument* parameter is now optional. (Contributed by Chris Clark in :issue:" +"`13245`.)" msgstr "" ":meth:`~sched.scheduler.enter` 和 :meth:`~sched.scheduler.enterabs` " "*argument* 參數現在是可選的。(由 Chris Clark 在 :issue:`13245` 中貢獻。)" @@ -2960,9 +2975,9 @@ msgstr "shlex" #: ../../whatsnew/3.3.rst:1782 msgid "" "The previously undocumented helper function ``quote`` from the :mod:`!pipes` " -"modules has been moved to the :mod:`shlex` module and " -"documented. :func:`~shlex.quote` properly escapes all characters in a " -"string that might be otherwise given special meaning by the shell." +"modules has been moved to the :mod:`shlex` module and documented. :func:" +"`~shlex.quote` properly escapes all characters in a string that might be " +"otherwise given special meaning by the shell." msgstr "" #: ../../whatsnew/3.3.rst:1789 @@ -3021,9 +3036,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1818 msgid "" ":func:`~shutil.rmtree` is now resistant to symlink attacks on platforms " -"which support the new ``dir_fd`` parameter in :func:`os.open` " -"and :func:`os.unlink`. (Contributed by Martin von Löwis and Hynek Schlawack " -"in :issue:`4489`.)" +"which support the new ``dir_fd`` parameter in :func:`os.open` and :func:`os." +"unlink`. (Contributed by Martin von Löwis and Hynek Schlawack in :issue:" +"`4489`.)" msgstr "" #: ../../whatsnew/3.3.rst:1825 @@ -3086,10 +3101,9 @@ msgstr "smtpd" #: ../../whatsnew/3.3.rst:1850 msgid "" -"The :mod:`!smtpd` module now supports :rfc:`5321` (extended SMTP) " -"and :rfc:`1870` (size extension). Per the standard, these extensions are " -"enabled if and only if the client initiates the session with an ``EHLO`` " -"command." +"The :mod:`!smtpd` module now supports :rfc:`5321` (extended SMTP) and :rfc:" +"`1870` (size extension). Per the standard, these extensions are enabled if " +"and only if the client initiates the session with an ``EHLO`` command." msgstr "" #: ../../whatsnew/3.3.rst:1854 @@ -3105,11 +3119,11 @@ msgstr "smtplib" #: ../../whatsnew/3.3.rst:1862 msgid "" -"The :class:`~smtplib.SMTP`, :class:`~smtplib.SMTP_SSL`, " -"and :class:`~smtplib.LMTP` classes now accept a ``source_address`` keyword " -"argument to specify the ``(host, port)`` to use as the source address in the " -"bind call when creating the outgoing socket. (Contributed by Paulo Scardine " -"in :issue:`11281`.)" +"The :class:`~smtplib.SMTP`, :class:`~smtplib.SMTP_SSL`, and :class:`~smtplib." +"LMTP` classes now accept a ``source_address`` keyword argument to specify " +"the ``(host, port)`` to use as the source address in the bind call when " +"creating the outgoing socket. (Contributed by Paulo Scardine in :issue:" +"`11281`.)" msgstr "" #: ../../whatsnew/3.3.rst:1868 @@ -3123,10 +3137,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1872 msgid "" -"The :class:`~smtplib.SMTP_SSL` constructor and " -"the :meth:`~smtplib.SMTP.starttls` method now accept an SSLContext parameter " -"to control parameters of the secure channel. (Contributed by Kasun Herath " -"in :issue:`8809`.)" +"The :class:`~smtplib.SMTP_SSL` constructor and the :meth:`~smtplib.SMTP." +"starttls` method now accept an SSLContext parameter to control parameters of " +"the secure channel. (Contributed by Kasun Herath in :issue:`8809`.)" msgstr "" ":class:`~smtplib.SMTP_SSL` 構造函式和 :meth:`~smtplib.SMTP.starttls` 方法現在" "接受 SSLContext 參數來控制安全通道的參數。(由 Kasun Herath 在 :issue:`8809` " @@ -3174,22 +3187,22 @@ msgstr "" #: ../../whatsnew/3.3.rst:1894 msgid "" -"(Contributed by Matthias Fuchs, updated by Tiago Gonçalves " -"in :issue:`10141`.)" +"(Contributed by Matthias Fuchs, updated by Tiago Gonçalves in :issue:" +"`10141`.)" msgstr "" "(在 :issue:`10141` 中由 Matthias Fuchs 貢獻、並由 Tiago Gonçalves 更新。)" #: ../../whatsnew/3.3.rst:1896 msgid "" "The :class:`~socket.socket` class now supports the PF_RDS protocol family " -"(https://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and `https://" -"oss.oracle.com/projects/rds `__)." +"(https://en.wikipedia.org/wiki/Reliable_Datagram_Sockets and `https://oss." +"oracle.com/projects/rds `__)." msgstr "" -":class:`~socket.socket` 類別現在支援 PF_RDS 協定系列(https://" -"en.wikipedia.org/wiki/Reliable_Datagram_Sockets 和 `https://oss.oracle.com/" -"projects/rds `__\\ )。" +":class:`~socket.socket` 類別現在支援 PF_RDS 協定系列(https://en.wikipedia." +"org/wiki/Reliable_Datagram_Sockets 和 `https://oss.oracle.com/projects/rds " +"`__\\ )。" #: ../../whatsnew/3.3.rst:1900 msgid "" @@ -3212,11 +3225,11 @@ msgstr "socketserver" #: ../../whatsnew/3.3.rst:1911 msgid "" -":class:`~socketserver.BaseServer` now has an overridable " -"method :meth:`~socketserver.BaseServer.service_actions` that is called by " -"the :meth:`~socketserver.BaseServer.serve_forever` method in the service " -"loop. :class:`~socketserver.ForkingMixIn` now uses this to clean up zombie " -"child processes. (Contributed by Justin Warkentin in :issue:`11109`.)" +":class:`~socketserver.BaseServer` now has an overridable method :meth:" +"`~socketserver.BaseServer.service_actions` that is called by the :meth:" +"`~socketserver.BaseServer.serve_forever` method in the service loop. :class:" +"`~socketserver.ForkingMixIn` now uses this to clean up zombie child " +"processes. (Contributed by Justin Warkentin in :issue:`11109`.)" msgstr "" #: ../../whatsnew/3.3.rst:1919 @@ -3225,10 +3238,9 @@ msgstr "sqlite3" #: ../../whatsnew/3.3.rst:1921 msgid "" -"New :class:`sqlite3.Connection` " -"method :meth:`~sqlite3.Connection.set_trace_callback` can be used to capture " -"a trace of all sql commands processed by sqlite. (Contributed by Torsten " -"Landschoff in :issue:`11688`.)" +"New :class:`sqlite3.Connection` method :meth:`~sqlite3.Connection." +"set_trace_callback` can be used to capture a trace of all sql commands " +"processed by sqlite. (Contributed by Torsten Landschoff in :issue:`11688`.)" msgstr "" #: ../../whatsnew/3.3.rst:1928 @@ -3246,8 +3258,8 @@ msgid "" msgstr ":func:`~ssl.RAND_bytes`:生成加密的強偽隨機位元組。" #: ../../whatsnew/3.3.rst:1934 -msgid ":func:`~ssl.RAND_pseudo_bytes`: generate pseudo-random bytes." -msgstr ":func:`~ssl.RAND_pseudo_bytes`:生成偽隨機位元組。" +msgid ":func:`!RAND_pseudo_bytes`: generate pseudo-random bytes." +msgstr ":func:`!RAND_pseudo_bytes`:生成偽隨機位元組。" #: ../../whatsnew/3.3.rst:1936 msgid "(Contributed by Victor Stinner in :issue:`12049`.)" @@ -3263,16 +3275,16 @@ msgstr "" #: ../../whatsnew/3.3.rst:1942 msgid "" ":meth:`~ssl.SSLContext.load_cert_chain` now accepts a *password* argument to " -"be used if the private key is encrypted. (Contributed by Adam Simpkins " -"in :issue:`12803`.)" +"be used if the private key is encrypted. (Contributed by Adam Simpkins in :" +"issue:`12803`.)" msgstr "" #: ../../whatsnew/3.3.rst:1946 msgid "" "Diffie-Hellman key exchange, both regular and Elliptic Curve-based, is now " -"supported through the :meth:`~ssl.SSLContext.load_dh_params` " -"and :meth:`~ssl.SSLContext.set_ecdh_curve` methods. (Contributed by Antoine " -"Pitrou in :issue:`13626` and :issue:`13627`.)" +"supported through the :meth:`~ssl.SSLContext.load_dh_params` and :meth:`~ssl." +"SSLContext.set_ecdh_curve` methods. (Contributed by Antoine Pitrou in :issue:" +"`13626` and :issue:`13627`.)" msgstr "" #: ../../whatsnew/3.3.rst:1951 @@ -3285,9 +3297,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1955 msgid "" "You can query the SSL compression algorithm used by an SSL socket, thanks to " -"its new :meth:`~ssl.SSLSocket.compression` method. The new " -"attribute :const:`~ssl.OP_NO_COMPRESSION` can be used to disable " -"compression. (Contributed by Antoine Pitrou in :issue:`13634`.)" +"its new :meth:`~ssl.SSLSocket.compression` method. The new attribute :const:" +"`~ssl.OP_NO_COMPRESSION` can be used to disable compression. (Contributed by " +"Antoine Pitrou in :issue:`13634`.)" msgstr "" #: ../../whatsnew/3.3.rst:1960 @@ -3299,9 +3311,9 @@ msgstr "" #: ../../whatsnew/3.3.rst:1964 msgid "" -"SSL errors can now be introspected more easily thanks " -"to :attr:`~ssl.SSLError.library` and :attr:`~ssl.SSLError.reason` " -"attributes. (Contributed by Antoine Pitrou in :issue:`14837`.)" +"SSL errors can now be introspected more easily thanks to :attr:`~ssl." +"SSLError.library` and :attr:`~ssl.SSLError.reason` attributes. (Contributed " +"by Antoine Pitrou in :issue:`14837`.)" msgstr "" #: ../../whatsnew/3.3.rst:1968 @@ -3323,9 +3335,9 @@ msgstr "stat" #: ../../whatsnew/3.3.rst:1979 msgid "" -"The undocumented tarfile.filemode function has been moved " -"to :func:`stat.filemode`. It can be used to convert a file's mode to a " -"string of the form '-rwxrwxrwx'." +"The undocumented tarfile.filemode function has been moved to :func:`stat." +"filemode`. It can be used to convert a file's mode to a string of the form '-" +"rwxrwxrwx'." msgstr "" #: ../../whatsnew/3.3.rst:1983 @@ -3356,8 +3368,8 @@ msgstr "" #: ../../whatsnew/3.3.rst:2000 msgid "" "A new constant :const:`~subprocess.DEVNULL` allows suppressing output in a " -"platform-independent fashion. (Contributed by Ross Lagerwall " -"in :issue:`5870`.)" +"platform-independent fashion. (Contributed by Ross Lagerwall in :issue:" +"`5870`.)" msgstr "" #: ../../whatsnew/3.3.rst:2006 @@ -3388,42 +3400,42 @@ msgstr "tempfile" #: ../../whatsnew/3.3.rst:2023 msgid "" -":class:`tempfile.SpooledTemporaryFile`\\'s :meth:`~tempfile.SpooledTemporaryFile.truncate` " -"method now accepts a ``size`` parameter. (Contributed by Ryan Kelly " -"in :issue:`9957`.)" +":class:`tempfile.SpooledTemporaryFile`\\'s :meth:`!truncate` method now " +"accepts a ``size`` parameter. (Contributed by Ryan Kelly in :issue:`9957`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2029 +#: ../../whatsnew/3.3.rst:2028 msgid "textwrap" msgstr "textwrap" -#: ../../whatsnew/3.3.rst:2031 +#: ../../whatsnew/3.3.rst:2030 msgid "" "The :mod:`textwrap` module has a new :func:`~textwrap.indent` that makes it " "straightforward to add a common prefix to selected lines in a block of text " "(:issue:`13857`)." msgstr "" -#: ../../whatsnew/3.3.rst:2037 +#: ../../whatsnew/3.3.rst:2036 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.3.rst:2039 +#: ../../whatsnew/3.3.rst:2038 msgid "" -":class:`threading.Condition`, :class:`threading.Semaphore`, :class:`threading.BoundedSemaphore`, :class:`threading.Event`, " -"and :class:`threading.Timer`, all of which used to be factory functions " -"returning a class instance, are now classes and may be subclassed. " -"(Contributed by Éric Araujo in :issue:`10968`.)" +":class:`threading.Condition`, :class:`threading.Semaphore`, :class:" +"`threading.BoundedSemaphore`, :class:`threading.Event`, and :class:" +"`threading.Timer`, all of which used to be factory functions returning a " +"class instance, are now classes and may be subclassed. (Contributed by Éric " +"Araujo in :issue:`10968`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2045 +#: ../../whatsnew/3.3.rst:2044 msgid "" "The :class:`threading.Thread` constructor now accepts a ``daemon`` keyword " "argument to override the default behavior of inheriting the ``daemon`` flag " "value from the parent thread (:issue:`6064`)." msgstr "" -#: ../../whatsnew/3.3.rst:2049 +#: ../../whatsnew/3.3.rst:2048 msgid "" "The formerly private function ``_thread.get_ident`` is now available as the " "public function :func:`threading.get_ident`. This eliminates several cases " @@ -3432,392 +3444,401 @@ msgid "" "public interface." msgstr "" -#: ../../whatsnew/3.3.rst:2057 +#: ../../whatsnew/3.3.rst:2056 msgid "time" msgstr "time" -#: ../../whatsnew/3.3.rst:2059 +#: ../../whatsnew/3.3.rst:2058 msgid "The :pep:`418` added new functions to the :mod:`time` module:" msgstr ":pep:`418` 向 :mod:`time` 模組新增了新功能:" -#: ../../whatsnew/3.3.rst:2061 +#: ../../whatsnew/3.3.rst:2060 msgid ":func:`~time.get_clock_info`: Get information on a clock." msgstr ":func:`~time.get_clock_info`:取得時鐘資訊。" -#: ../../whatsnew/3.3.rst:2062 +#: ../../whatsnew/3.3.rst:2061 msgid "" ":func:`~time.monotonic`: Monotonic clock (cannot go backward), not affected " "by system clock updates." msgstr "" ":func:`~time.monotonic`:單調時鐘(不能倒退),不受系統時鐘更新的影響。" -#: ../../whatsnew/3.3.rst:2064 +#: ../../whatsnew/3.3.rst:2063 msgid "" ":func:`~time.perf_counter`: Performance counter with the highest available " "resolution to measure a short duration." msgstr "" -#: ../../whatsnew/3.3.rst:2066 +#: ../../whatsnew/3.3.rst:2065 msgid "" ":func:`~time.process_time`: Sum of the system and user CPU time of the " "current process." msgstr ":func:`~time.process_time`:目前行程的系統和使用者 CPU 時間總和。" -#: ../../whatsnew/3.3.rst:2069 +#: ../../whatsnew/3.3.rst:2068 msgid "Other new functions:" msgstr "其他新功能:" -#: ../../whatsnew/3.3.rst:2071 +#: ../../whatsnew/3.3.rst:2070 msgid "" -":func:`~time.clock_getres`, :func:`~time.clock_gettime` " -"and :func:`~time.clock_settime` functions with :samp:`CLOCK_{xxx}` " -"constants. (Contributed by Victor Stinner in :issue:`10278`.)" +":func:`~time.clock_getres`, :func:`~time.clock_gettime` and :func:`~time." +"clock_settime` functions with :samp:`CLOCK_{xxx}` constants. (Contributed by " +"Victor Stinner in :issue:`10278`.)" msgstr "" -":func:`~time.clock_getres`、:func:`~time.clock_gettime` " -"和 :func:`~time.clock_settime` 函式帶有 :samp:`CLOCK_{xxx}` 常數。(由 " -"Victor Stinner 在 :issue:`10278` 中貢獻。)" +":func:`~time.clock_getres`、:func:`~time.clock_gettime` 和 :func:`~time." +"clock_settime` 函式帶有 :samp:`CLOCK_{xxx}` 常數。(由 Victor Stinner 在 :" +"issue:`10278` 中貢獻。)" -#: ../../whatsnew/3.3.rst:2075 +#: ../../whatsnew/3.3.rst:2074 msgid "" -"To improve cross platform consistency, :func:`~time.sleep` now raises " -"a :exc:`ValueError` when passed a negative sleep value. Previously this was " -"an error on posix, but produced an infinite sleep on Windows." +"To improve cross platform consistency, :func:`~time.sleep` now raises a :exc:" +"`ValueError` when passed a negative sleep value. Previously this was an " +"error on posix, but produced an infinite sleep on Windows." msgstr "" -#: ../../whatsnew/3.3.rst:2081 +#: ../../whatsnew/3.3.rst:2080 msgid "types" msgstr "types" -#: ../../whatsnew/3.3.rst:2083 +#: ../../whatsnew/3.3.rst:2082 msgid "" "Add a new :class:`types.MappingProxyType` class: Read-only proxy of a " "mapping. (:issue:`14386`)" msgstr "" -#: ../../whatsnew/3.3.rst:2087 +#: ../../whatsnew/3.3.rst:2086 msgid "" "The new functions :func:`types.new_class` and :func:`types.prepare_class` " -"provide support for :pep:`3115` compliant dynamic type creation. " -"(:issue:`14588`)" +"provide support for :pep:`3115` compliant dynamic type creation. (:issue:" +"`14588`)" msgstr "" -#: ../../whatsnew/3.3.rst:2092 +#: ../../whatsnew/3.3.rst:2091 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.3.rst:2094 +#: ../../whatsnew/3.3.rst:2093 msgid "" ":meth:`.assertRaises`, :meth:`.assertRaisesRegex`, :meth:`.assertWarns`, " "and :meth:`.assertWarnsRegex` now accept a keyword argument *msg* when used " -"as context managers. (Contributed by Ezio Melotti and Winston Ewert " -"in :issue:`10775`.)" +"as context managers. (Contributed by Ezio Melotti and Winston Ewert in :" +"issue:`10775`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2099 +#: ../../whatsnew/3.3.rst:2098 msgid "" ":meth:`unittest.TestCase.run` now returns the :class:`~unittest.TestResult` " "object." msgstr "" ":meth:`unittest.TestCase.run` 現在回傳 :class:`~unittest.TestResult` 物件。" -#: ../../whatsnew/3.3.rst:2104 +#: ../../whatsnew/3.3.rst:2103 msgid "urllib" msgstr "urllib" -#: ../../whatsnew/3.3.rst:2106 +#: ../../whatsnew/3.3.rst:2105 msgid "" "The :class:`~urllib.request.Request` class, now accepts a *method* argument " "used by :meth:`~urllib.request.Request.get_method` to determine what HTTP " "method should be used. For example, this will send a ``'HEAD'`` request::" msgstr "" -#: ../../whatsnew/3.3.rst:2110 +#: ../../whatsnew/3.3.rst:2109 msgid ">>> urlopen(Request('https://www.python.org', method='HEAD'))" msgstr ">>> urlopen(Request('https://www.python.org', method='HEAD'))" -#: ../../whatsnew/3.3.rst:2112 +#: ../../whatsnew/3.3.rst:2111 msgid "(:issue:`1673007`)" msgstr "(:issue:`1673007`)" -#: ../../whatsnew/3.3.rst:2116 +#: ../../whatsnew/3.3.rst:2115 msgid "webbrowser" msgstr "webbrowser" -#: ../../whatsnew/3.3.rst:2118 +#: ../../whatsnew/3.3.rst:2117 msgid "" "The :mod:`webbrowser` module supports more \"browsers\": Google Chrome " -"(named :program:`chrome`, :program:`chromium`, :program:`chrome-browser` " -"or :program:`chromium-browser` depending on the version and operating " -"system), and the generic launchers :program:`xdg-open`, from the " -"FreeDesktop.org project, and :program:`gvfs-open`, which is the default URI " -"handler for GNOME 3. (The former contributed by Arnaud Calmettes " -"in :issue:`13620`, the latter by Matthias Klose in :issue:`14493`.)" +"(named :program:`chrome`, :program:`chromium`, :program:`chrome-browser` or :" +"program:`chromium-browser` depending on the version and operating system), " +"and the generic launchers :program:`xdg-open`, from the FreeDesktop.org " +"project, and :program:`gvfs-open`, which is the default URI handler for " +"GNOME 3. (The former contributed by Arnaud Calmettes in :issue:`13620`, the " +"latter by Matthias Klose in :issue:`14493`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2128 +#: ../../whatsnew/3.3.rst:2127 msgid "xml.etree.ElementTree" msgstr "xml.etree.ElementTree" -#: ../../whatsnew/3.3.rst:2130 +#: ../../whatsnew/3.3.rst:2129 msgid "" "The :mod:`xml.etree.ElementTree` module now imports its C accelerator by " -"default; there is no longer a need to explicitly " -"import :mod:`xml.etree.cElementTree` (this module stays for backwards " -"compatibility, but is now deprecated). In addition, the ``iter`` family of " -"methods of :class:`~xml.etree.ElementTree.Element` has been optimized " -"(rewritten in C). The module's documentation has also been greatly improved " -"with added examples and a more detailed reference." +"default; there is no longer a need to explicitly import :mod:`!xml.etree." +"cElementTree` (this module stays for backwards compatibility, but is now " +"deprecated). In addition, the ``iter`` family of methods of :class:`~xml." +"etree.ElementTree.Element` has been optimized (rewritten in C). The module's " +"documentation has also been greatly improved with added examples and a more " +"detailed reference." msgstr "" -#: ../../whatsnew/3.3.rst:2140 +#: ../../whatsnew/3.3.rst:2139 msgid "zlib" msgstr "zlib" -#: ../../whatsnew/3.3.rst:2142 +#: ../../whatsnew/3.3.rst:2141 msgid "" "New attribute :attr:`zlib.Decompress.eof` makes it possible to distinguish " "between a properly formed compressed stream and an incomplete or truncated " "one. (Contributed by Nadeem Vawda in :issue:`12646`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2146 +#: ../../whatsnew/3.3.rst:2145 msgid "" "New attribute :const:`zlib.ZLIB_RUNTIME_VERSION` reports the version string " "of the underlying ``zlib`` library that is loaded at runtime. (Contributed " "by Torsten Landschoff in :issue:`12306`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2152 +#: ../../whatsnew/3.3.rst:2151 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.3.rst:2154 +#: ../../whatsnew/3.3.rst:2153 msgid "Major performance enhancements have been added:" msgstr "" -#: ../../whatsnew/3.3.rst:2156 +#: ../../whatsnew/3.3.rst:2155 msgid "" "Thanks to :pep:`393`, some operations on Unicode strings have been optimized:" msgstr "" -#: ../../whatsnew/3.3.rst:2158 +#: ../../whatsnew/3.3.rst:2157 msgid "the memory footprint is divided by 2 to 4 depending on the text" msgstr "" -#: ../../whatsnew/3.3.rst:2159 +#: ../../whatsnew/3.3.rst:2158 msgid "" "encode an ASCII string to UTF-8 doesn't need to encode characters anymore, " "the UTF-8 representation is shared with the ASCII representation" msgstr "" -#: ../../whatsnew/3.3.rst:2161 +#: ../../whatsnew/3.3.rst:2160 msgid "the UTF-8 encoder has been optimized" msgstr "" -#: ../../whatsnew/3.3.rst:2162 +#: ../../whatsnew/3.3.rst:2161 msgid "" "repeating a single ASCII letter and getting a substring of an ASCII string " "is 4 times faster" msgstr "" -#: ../../whatsnew/3.3.rst:2165 +#: ../../whatsnew/3.3.rst:2164 msgid "UTF-8 is now 2x to 4x faster. UTF-16 encoding is now up to 10x faster." msgstr "" -#: ../../whatsnew/3.3.rst:2167 +#: ../../whatsnew/3.3.rst:2166 msgid "" -"(Contributed by Serhiy Storchaka, :issue:`14624`, :issue:`14738` " -"and :issue:`15026`.)" +"(Contributed by Serhiy Storchaka, :issue:`14624`, :issue:`14738` and :issue:" +"`15026`.)" msgstr "" "(由 Serhiy Storchaka 於 :issue:`14624`、:issue:`14738` 和 :issue:`15026` 貢" "獻。)" -#: ../../whatsnew/3.3.rst:2172 +#: ../../whatsnew/3.3.rst:2171 msgid "Build and C API Changes" msgstr "建置和 C API 變更" -#: ../../whatsnew/3.3.rst:2174 +#: ../../whatsnew/3.3.rst:2173 msgid "Changes to Python's build process and to the C API include:" msgstr "Python 建置程序和 C API 的變更包括:" -#: ../../whatsnew/3.3.rst:2176 +#: ../../whatsnew/3.3.rst:2175 msgid "New :pep:`3118` related function:" msgstr "新的 :pep:`3118` 相關功能:" -#: ../../whatsnew/3.3.rst:2178 +#: ../../whatsnew/3.3.rst:2177 msgid ":c:func:`PyMemoryView_FromMemory`" msgstr ":c:func:`PyMemoryView_FromMemory`" -#: ../../whatsnew/3.3.rst:2180 +#: ../../whatsnew/3.3.rst:2179 msgid ":pep:`393` added new Unicode types, macros and functions:" msgstr "" -#: ../../whatsnew/3.3.rst:2182 +#: ../../whatsnew/3.3.rst:2181 msgid "High-level API:" msgstr "高階 API:" -#: ../../whatsnew/3.3.rst:2184 +#: ../../whatsnew/3.3.rst:2183 msgid ":c:func:`PyUnicode_CopyCharacters`" msgstr ":c:func:`PyUnicode_CopyCharacters`" -#: ../../whatsnew/3.3.rst:2185 +#: ../../whatsnew/3.3.rst:2184 msgid ":c:func:`PyUnicode_FindChar`" msgstr ":c:func:`PyUnicode_FindChar`" -#: ../../whatsnew/3.3.rst:2186 +#: ../../whatsnew/3.3.rst:2185 msgid ":c:func:`PyUnicode_GetLength`, :c:macro:`PyUnicode_GET_LENGTH`" msgstr ":c:func:`PyUnicode_GetLength`, :c:macro:`PyUnicode_GET_LENGTH`" -#: ../../whatsnew/3.3.rst:2187 +#: ../../whatsnew/3.3.rst:2186 msgid ":c:func:`PyUnicode_New`" msgstr ":c:func:`PyUnicode_New`" -#: ../../whatsnew/3.3.rst:2188 +#: ../../whatsnew/3.3.rst:2187 msgid ":c:func:`PyUnicode_Substring`" msgstr ":c:func:`PyUnicode_Substring`" -#: ../../whatsnew/3.3.rst:2189 +#: ../../whatsnew/3.3.rst:2188 msgid ":c:func:`PyUnicode_ReadChar`, :c:func:`PyUnicode_WriteChar`" msgstr ":c:func:`PyUnicode_ReadChar`, :c:func:`PyUnicode_WriteChar`" -#: ../../whatsnew/3.3.rst:2191 +#: ../../whatsnew/3.3.rst:2190 msgid "Low-level API:" msgstr "低階 API:" -#: ../../whatsnew/3.3.rst:2193 +#: ../../whatsnew/3.3.rst:2192 msgid ":c:type:`Py_UCS1`, :c:type:`Py_UCS2`, :c:type:`Py_UCS4` types" msgstr ":c:type:`Py_UCS1`、:c:type:`Py_UCS2`、:c:type:`Py_UCS4` 型別" -#: ../../whatsnew/3.3.rst:2194 +#: ../../whatsnew/3.3.rst:2193 msgid ":c:type:`PyASCIIObject` and :c:type:`PyCompactUnicodeObject` structures" msgstr ":c:type:`PyASCIIObject` 和 :c:type:`PyCompactUnicodeObject` 結構" -#: ../../whatsnew/3.3.rst:2195 +#: ../../whatsnew/3.3.rst:2194 msgid ":c:macro:`PyUnicode_READY`" msgstr ":c:macro:`PyUnicode_READY`" -#: ../../whatsnew/3.3.rst:2196 +#: ../../whatsnew/3.3.rst:2195 msgid ":c:func:`PyUnicode_FromKindAndData`" msgstr ":c:func:`PyUnicode_FromKindAndData`" -#: ../../whatsnew/3.3.rst:2197 +#: ../../whatsnew/3.3.rst:2196 msgid ":c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsUCS4Copy`" msgstr ":c:func:`PyUnicode_AsUCS4`, :c:func:`PyUnicode_AsUCS4Copy`" -#: ../../whatsnew/3.3.rst:2198 -msgid ":c:macro:`PyUnicode_DATA`, :c:macro:`PyUnicode_1BYTE_DATA`, :c:macro:`PyUnicode_2BYTE_DATA`, :c:macro:`PyUnicode_4BYTE_DATA`" -msgstr ":c:macro:`PyUnicode_DATA`, :c:macro:`PyUnicode_1BYTE_DATA`, :c:macro:`PyUnicode_2BYTE_DATA`, :c:macro:`PyUnicode_4BYTE_DATA`" +#: ../../whatsnew/3.3.rst:2197 +msgid "" +":c:macro:`PyUnicode_DATA`, :c:macro:`PyUnicode_1BYTE_DATA`, :c:macro:" +"`PyUnicode_2BYTE_DATA`, :c:macro:`PyUnicode_4BYTE_DATA`" +msgstr "" +":c:macro:`PyUnicode_DATA`, :c:macro:`PyUnicode_1BYTE_DATA`, :c:macro:" +"`PyUnicode_2BYTE_DATA`, :c:macro:`PyUnicode_4BYTE_DATA`" -#: ../../whatsnew/3.3.rst:2200 +#: ../../whatsnew/3.3.rst:2199 msgid "" -":c:macro:`PyUnicode_KIND` with :c:enum:`PyUnicode_Kind` enum: :c:data:`!" -"PyUnicode_WCHAR_KIND`, :c:data:`PyUnicode_1BYTE_KIND`, :c:data:`PyUnicode_2BYTE_KIND`, :c:data:`PyUnicode_4BYTE_KIND`" +":c:macro:`PyUnicode_KIND` with :c:enum:`!PyUnicode_Kind` enum: :c:data:`!" +"PyUnicode_WCHAR_KIND`, :c:data:`PyUnicode_1BYTE_KIND`, :c:data:" +"`PyUnicode_2BYTE_KIND`, :c:data:`PyUnicode_4BYTE_KIND`" msgstr "" -#: ../../whatsnew/3.3.rst:2203 -msgid ":c:macro:`PyUnicode_READ`, :c:macro:`PyUnicode_READ_CHAR`, :c:macro:`PyUnicode_WRITE`" -msgstr ":c:macro:`PyUnicode_READ`, :c:macro:`PyUnicode_READ_CHAR`, :c:macro:`PyUnicode_WRITE`" +#: ../../whatsnew/3.3.rst:2202 +msgid "" +":c:macro:`PyUnicode_READ`, :c:macro:`PyUnicode_READ_CHAR`, :c:macro:" +"`PyUnicode_WRITE`" +msgstr "" +":c:macro:`PyUnicode_READ`, :c:macro:`PyUnicode_READ_CHAR`, :c:macro:" +"`PyUnicode_WRITE`" -#: ../../whatsnew/3.3.rst:2204 +#: ../../whatsnew/3.3.rst:2203 msgid ":c:macro:`PyUnicode_MAX_CHAR_VALUE`" msgstr ":c:macro:`PyUnicode_MAX_CHAR_VALUE`" -#: ../../whatsnew/3.3.rst:2206 +#: ../../whatsnew/3.3.rst:2205 msgid "" ":c:macro:`PyArg_ParseTuple` now accepts a :class:`bytearray` for the ``c`` " "format (:issue:`12380`)." msgstr "" -":c:macro:`PyArg_ParseTuple` 現在接受 :class:`bytearray` 為 ``c`` 格式 " -"(:issue:`12380`)。" +":c:macro:`PyArg_ParseTuple` 現在接受 :class:`bytearray` 為 ``c`` 格式 (:" +"issue:`12380`)。" -#: ../../whatsnew/3.3.rst:2212 +#: ../../whatsnew/3.3.rst:2211 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.3.rst:2215 +#: ../../whatsnew/3.3.rst:2214 msgid "Unsupported Operating Systems" msgstr "不支援的作業系統" -#: ../../whatsnew/3.3.rst:2217 +#: ../../whatsnew/3.3.rst:2216 msgid "OS/2 and VMS are no longer supported due to the lack of a maintainer." msgstr "由於缺乏維護者,OS/2 和 VMS 不再受支援。" -#: ../../whatsnew/3.3.rst:2219 +#: ../../whatsnew/3.3.rst:2218 msgid "" "Windows 2000 and Windows platforms which set ``COMSPEC`` to ``command.com`` " "are no longer supported due to maintenance burden." msgstr "" -#: ../../whatsnew/3.3.rst:2222 +#: ../../whatsnew/3.3.rst:2221 msgid "OSF support, which was deprecated in 3.2, has been completely removed." msgstr "OSF 支援在 3.2 中已棄用,現已完全刪除。" -#: ../../whatsnew/3.3.rst:2226 +#: ../../whatsnew/3.3.rst:2225 msgid "Deprecated Python modules, functions and methods" msgstr "已棄用的 Python 模組、函式和方法" -#: ../../whatsnew/3.3.rst:2228 +#: ../../whatsnew/3.3.rst:2227 msgid "" "Passing a non-empty string to ``object.__format__()`` is deprecated, and " "will produce a :exc:`TypeError` in Python 3.4 (:issue:`9856`)." msgstr "" -#: ../../whatsnew/3.3.rst:2230 +#: ../../whatsnew/3.3.rst:2229 msgid "" -"The ``unicode_internal`` codec has been deprecated because of " -"the :pep:`393`, use UTF-8, UTF-16 (``utf-16-le`` or ``utf-16-be``), or " -"UTF-32 (``utf-32-le`` or ``utf-32-be``)" +"The ``unicode_internal`` codec has been deprecated because of the :pep:" +"`393`, use UTF-8, UTF-16 (``utf-16-le`` or ``utf-16-be``), or UTF-32 " +"(``utf-32-le`` or ``utf-32-be``)" msgstr "" -#: ../../whatsnew/3.3.rst:2233 +#: ../../whatsnew/3.3.rst:2232 msgid "" -":meth:`ftplib.FTP.nlst` and :meth:`ftplib.FTP.dir`: " -"use :meth:`ftplib.FTP.mlsd`" +":meth:`ftplib.FTP.nlst` and :meth:`ftplib.FTP.dir`: use :meth:`ftplib.FTP." +"mlsd`" msgstr "" -":meth:`ftplib.FTP.nlst` 和 :meth:`ftplib.FTP.dir`:使" -"用 :meth:`ftplib.FTP.mlsd`" +":meth:`ftplib.FTP.nlst` 和 :meth:`ftplib.FTP.dir`:使用 :meth:`ftplib.FTP." +"mlsd`" -#: ../../whatsnew/3.3.rst:2235 +#: ../../whatsnew/3.3.rst:2234 msgid "" -":func:`platform.popen`: use the :mod:`subprocess` module. Check especially " +":func:`!platform.popen`: use the :mod:`subprocess` module. Check especially " "the :ref:`subprocess-replacements` section (:issue:`11377`)." msgstr "" -":func:`platform.popen`:使用 :mod:`subprocess` 模組。請特別檢" -"查 :ref:`subprocess-replacements` 部分 (:issue:`11377`)。" +":func:`!platform.popen`:使用 :mod:`subprocess` 模組。請特別檢查 :ref:" +"`subprocess-replacements` 部分 (:issue:`11377`)。" -#: ../../whatsnew/3.3.rst:2237 +#: ../../whatsnew/3.3.rst:2236 msgid "" ":issue:`13374`: The Windows bytes API has been deprecated in the :mod:`os` " "module. Use Unicode filenames, instead of bytes filenames, to not depend on " "the ANSI code page anymore and to support any filename." msgstr "" -#: ../../whatsnew/3.3.rst:2240 +#: ../../whatsnew/3.3.rst:2239 msgid "" -":issue:`13988`: The :mod:`xml.etree.cElementTree` module is deprecated. The " -"accelerator is used automatically whenever available." +":issue:`13988`: The :mod:`!xml.etree.cElementTree` module is deprecated. " +"The accelerator is used automatically whenever available." msgstr "" -#: ../../whatsnew/3.3.rst:2242 +#: ../../whatsnew/3.3.rst:2241 msgid "" -"The behaviour of :func:`time.clock` depends on the platform: use the " -"new :func:`time.perf_counter` or :func:`time.process_time` function instead, " +"The behaviour of :func:`!time.clock` depends on the platform: use the new :" +"func:`time.perf_counter` or :func:`time.process_time` function instead, " "depending on your requirements, to have a well defined behaviour." msgstr "" -#: ../../whatsnew/3.3.rst:2245 -msgid "The :func:`os.stat_float_times` function is deprecated." -msgstr ":func:`os.stat_float_times` 函式已棄用。" +#: ../../whatsnew/3.3.rst:2244 +msgid "The :func:`!os.stat_float_times` function is deprecated." +msgstr ":func:`!os.stat_float_times` 函式已棄用。" -#: ../../whatsnew/3.3.rst:2246 +#: ../../whatsnew/3.3.rst:2245 msgid ":mod:`abc` module:" msgstr ":mod:`abc` 模組:" -#: ../../whatsnew/3.3.rst:2255 +#: ../../whatsnew/3.3.rst:2254 msgid ":mod:`importlib` package:" msgstr ":mod:`importlib` 套件:" -#: ../../whatsnew/3.3.rst:2257 +#: ../../whatsnew/3.3.rst:2256 msgid "" ":meth:`importlib.abc.SourceLoader.path_mtime` is now deprecated in favour " "of :meth:`importlib.abc.SourceLoader.path_stats` as bytecode files now store " @@ -3825,11 +3846,11 @@ msgid "" "compiled from." msgstr "" -#: ../../whatsnew/3.3.rst:2267 +#: ../../whatsnew/3.3.rst:2266 msgid "Deprecated functions and types of the C API" msgstr "C API 中已棄用的函式和型別" -#: ../../whatsnew/3.3.rst:2269 +#: ../../whatsnew/3.3.rst:2268 msgid "" "The :c:type:`Py_UNICODE` has been deprecated by :pep:`393` and will be " "removed in Python 4. All functions using this type are deprecated:" @@ -3837,21 +3858,21 @@ msgstr "" ":c:type:`Py_UNICODE` 已被 :pep:`393` 棄用,並將在 Python 4 中刪除。所有使用此" "型別的函式均已棄用:" -#: ../../whatsnew/3.3.rst:2272 +#: ../../whatsnew/3.3.rst:2271 msgid "" -"Unicode functions and methods using :c:type:`Py_UNICODE` " -"and :c:expr:`Py_UNICODE*` types:" +"Unicode functions and methods using :c:type:`Py_UNICODE` and :c:expr:" +"`Py_UNICODE*` types:" msgstr "" -#: ../../whatsnew/3.3.rst:2275 +#: ../../whatsnew/3.3.rst:2274 msgid "" -":c:macro:`!PyUnicode_FromUnicode`: use :c:func:`PyUnicode_FromWideChar` " -"or :c:func:`PyUnicode_FromKindAndData`" +":c:macro:`!PyUnicode_FromUnicode`: use :c:func:`PyUnicode_FromWideChar` or :" +"c:func:`PyUnicode_FromKindAndData`" msgstr "" -":c:macro:`!PyUnicode_FromUnicode`:使用 :c:func:`PyUnicode_FromWideChar` " -"或 :c:func:`PyUnicode_FromKindAndData`" +":c:macro:`!PyUnicode_FromUnicode`:使用 :c:func:`PyUnicode_FromWideChar` 或 :" +"c:func:`PyUnicode_FromKindAndData`" -#: ../../whatsnew/3.3.rst:2277 +#: ../../whatsnew/3.3.rst:2276 msgid "" ":c:macro:`!PyUnicode_AS_UNICODE`, :c:func:`!PyUnicode_AsUnicode`, :c:func:`!" "PyUnicode_AsUnicodeAndSize`: use :c:func:`PyUnicode_AsWideCharString`" @@ -3859,23 +3880,23 @@ msgstr "" ":c:macro:`!PyUnicode_AS_UNICODE`、:c:func:`!PyUnicode_AsUnicode`、:c:func:`!" "PyUnicode_AsUnicodeAndSize`:使用 :c:func:`PyUnicode_AsWideCharString`" -#: ../../whatsnew/3.3.rst:2279 +#: ../../whatsnew/3.3.rst:2278 msgid "" -":c:macro:`!PyUnicode_AS_DATA`: use :c:macro:`PyUnicode_DATA` " -"with :c:macro:`PyUnicode_READ` and :c:macro:`PyUnicode_WRITE`" +":c:macro:`!PyUnicode_AS_DATA`: use :c:macro:`PyUnicode_DATA` with :c:macro:" +"`PyUnicode_READ` and :c:macro:`PyUnicode_WRITE`" msgstr "" -":c:macro:`!PyUnicode_AS_DATA`:將 :c:macro:`PyUnicode_DATA` " -"與 :c:macro:`PyUnicode_READ` 和 :c:macro:`PyUnicode_WRITE` 一起使用" +":c:macro:`!PyUnicode_AS_DATA`:將 :c:macro:`PyUnicode_DATA` 與 :c:macro:" +"`PyUnicode_READ` 和 :c:macro:`PyUnicode_WRITE` 一起使用" -#: ../../whatsnew/3.3.rst:2281 +#: ../../whatsnew/3.3.rst:2280 msgid "" -":c:macro:`!PyUnicode_GET_SIZE`, :c:func:`!PyUnicode_GetSize`: " -"use :c:macro:`PyUnicode_GET_LENGTH` or :c:func:`PyUnicode_GetLength`" +":c:macro:`!PyUnicode_GET_SIZE`, :c:func:`!PyUnicode_GetSize`: use :c:macro:" +"`PyUnicode_GET_LENGTH` or :c:func:`PyUnicode_GetLength`" msgstr "" -":c:macro:`!PyUnicode_GET_SIZE`、:c:func:`!PyUnicode_GetSize`:使" -"用 :c:macro:`PyUnicode_GET_LENGTH` 或 :c:func:`PyUnicode_GetLength`" +":c:macro:`!PyUnicode_GET_SIZE`、:c:func:`!PyUnicode_GetSize`:使用 :c:macro:" +"`PyUnicode_GET_LENGTH` 或 :c:func:`PyUnicode_GetLength`" -#: ../../whatsnew/3.3.rst:2283 +#: ../../whatsnew/3.3.rst:2282 msgid "" ":c:macro:`!PyUnicode_GET_DATA_SIZE`: use ``PyUnicode_GET_LENGTH(str) * " "PyUnicode_KIND(str)`` (only work on ready strings)" @@ -3883,144 +3904,144 @@ msgstr "" ":c:macro:`!PyUnicode_GET_DATA_SIZE`:使用 ``PyUnicode_GET_LENGTH(str) * " "PyUnicode_KIND(str)``\\ (僅適用於準備好的字串)" -#: ../../whatsnew/3.3.rst:2286 +#: ../../whatsnew/3.3.rst:2285 msgid "" -":c:func:`!PyUnicode_AsUnicodeCopy`: use :c:func:`PyUnicode_AsUCS4Copy` " -"or :c:func:`PyUnicode_AsWideCharString`" +":c:func:`!PyUnicode_AsUnicodeCopy`: use :c:func:`PyUnicode_AsUCS4Copy` or :c:" +"func:`PyUnicode_AsWideCharString`" msgstr "" -":c:func:`!PyUnicode_AsUnicodeCopy`:使用 :c:func:`PyUnicode_AsUCS4Copy` " -"或 :c:func:`PyUnicode_AsWideCharString`" +":c:func:`!PyUnicode_AsUnicodeCopy`:使用 :c:func:`PyUnicode_AsUCS4Copy` 或 :" +"c:func:`PyUnicode_AsWideCharString`" -#: ../../whatsnew/3.3.rst:2288 +#: ../../whatsnew/3.3.rst:2287 msgid ":c:func:`!PyUnicode_GetMax`" msgstr ":c:func:`!PyUnicode_GetMax`" -#: ../../whatsnew/3.3.rst:2291 +#: ../../whatsnew/3.3.rst:2290 msgid "Functions and macros manipulating Py_UNICODE* strings:" msgstr "操作 Py_UNICODE* 字串的函式和巨集:" -#: ../../whatsnew/3.3.rst:2293 +#: ../../whatsnew/3.3.rst:2292 msgid "" -":c:macro:`!Py_UNICODE_strlen()`: use :c:func:`PyUnicode_GetLength` " -"or :c:macro:`PyUnicode_GET_LENGTH`" +":c:macro:`!Py_UNICODE_strlen()`: use :c:func:`PyUnicode_GetLength` or :c:" +"macro:`PyUnicode_GET_LENGTH`" msgstr "" -":c:macro:`!Py_UNICODE_strlen()`:使用 :c:func:`PyUnicode_GetLength` " -"或 :c:macro:`PyUnicode_GET_LENGTH`" +":c:macro:`!Py_UNICODE_strlen()`:使用 :c:func:`PyUnicode_GetLength` 或 :c:" +"macro:`PyUnicode_GET_LENGTH`" -#: ../../whatsnew/3.3.rst:2295 +#: ../../whatsnew/3.3.rst:2294 msgid "" -":c:macro:`!Py_UNICODE_strcat()`: use :c:func:`PyUnicode_CopyCharacters` " -"or :c:func:`PyUnicode_FromFormat`" +":c:macro:`!Py_UNICODE_strcat()`: use :c:func:`PyUnicode_CopyCharacters` or :" +"c:func:`PyUnicode_FromFormat`" msgstr "" -":c:macro:`!Py_UNICODE_strcat()`:使用 :c:func:`PyUnicode_CopyCharacters` " -"或 :c:func:`PyUnicode_FromFormat`" +":c:macro:`!Py_UNICODE_strcat()`:使用 :c:func:`PyUnicode_CopyCharacters` 或 :" +"c:func:`PyUnicode_FromFormat`" -#: ../../whatsnew/3.3.rst:2297 +#: ../../whatsnew/3.3.rst:2296 msgid "" -":c:macro:`!Py_UNICODE_strcpy()`, :c:macro:`!" -"Py_UNICODE_strncpy()`, :c:macro:`!Py_UNICODE_COPY()`: " -"use :c:func:`PyUnicode_CopyCharacters` or :c:func:`PyUnicode_Substring`" +":c:macro:`!Py_UNICODE_strcpy()`, :c:macro:`!Py_UNICODE_strncpy()`, :c:macro:" +"`!Py_UNICODE_COPY()`: use :c:func:`PyUnicode_CopyCharacters` or :c:func:" +"`PyUnicode_Substring`" msgstr "" -":c:macro:`!Py_UNICODE_strcpy()`、:c:macro:`!" -"Py_UNICODE_strncpy()`、:c:macro:`!Py_UNICODE_COPY()`:使" -"用 :c:func:`PyUnicode_CopyCharacters` 或 :c:func:`PyUnicode_Substring`" +":c:macro:`!Py_UNICODE_strcpy()`、:c:macro:`!Py_UNICODE_strncpy()`、:c:macro:" +"`!Py_UNICODE_COPY()`:使用 :c:func:`PyUnicode_CopyCharacters` 或 :c:func:" +"`PyUnicode_Substring`" -#: ../../whatsnew/3.3.rst:2300 +#: ../../whatsnew/3.3.rst:2299 msgid ":c:macro:`!Py_UNICODE_strcmp()`: use :c:func:`PyUnicode_Compare`" msgstr ":c:macro:`!Py_UNICODE_strcmp()`:使用 :c:func:`PyUnicode_Compare`" -#: ../../whatsnew/3.3.rst:2301 +#: ../../whatsnew/3.3.rst:2300 msgid ":c:macro:`!Py_UNICODE_strncmp()`: use :c:func:`PyUnicode_Tailmatch`" msgstr ":c:macro:`!Py_UNICODE_strncmp()`: 使用 :c:func:`PyUnicode_Tailmatch`" -#: ../../whatsnew/3.3.rst:2302 +#: ../../whatsnew/3.3.rst:2301 msgid "" -":c:macro:`!Py_UNICODE_strchr()`, :c:macro:`!Py_UNICODE_strrchr()`: " -"use :c:func:`PyUnicode_FindChar`" +":c:macro:`!Py_UNICODE_strchr()`, :c:macro:`!Py_UNICODE_strrchr()`: use :c:" +"func:`PyUnicode_FindChar`" msgstr "" -":c:macro:`!Py_UNICODE_strchr()`, :c:macro:`!Py_UNICODE_strrchr()`: 使" -"用 :c:func:`PyUnicode_FindChar`" +":c:macro:`!Py_UNICODE_strchr()`, :c:macro:`!Py_UNICODE_strrchr()`: 使用 :c:" +"func:`PyUnicode_FindChar`" -#: ../../whatsnew/3.3.rst:2304 +#: ../../whatsnew/3.3.rst:2303 msgid ":c:macro:`!Py_UNICODE_FILL()`: use :c:func:`PyUnicode_Fill`" msgstr ":c:macro:`!Py_UNICODE_FILL()`: 使用 :c:func:`PyUnicode_Fill`" -#: ../../whatsnew/3.3.rst:2305 +#: ../../whatsnew/3.3.rst:2304 msgid ":c:macro:`!Py_UNICODE_MATCH`" msgstr ":c:macro:`!Py_UNICODE_MATCH`" -#: ../../whatsnew/3.3.rst:2307 +#: ../../whatsnew/3.3.rst:2306 msgid "Encoders:" msgstr "編碼器:" -#: ../../whatsnew/3.3.rst:2309 +#: ../../whatsnew/3.3.rst:2308 msgid ":c:func:`!PyUnicode_Encode`: use :c:func:`!PyUnicode_AsEncodedObject`" msgstr ":c:func:`!PyUnicode_Encode`:使用 :c:func:`!PyUnicode_AsEncodedObject`" -#: ../../whatsnew/3.3.rst:2310 +#: ../../whatsnew/3.3.rst:2309 msgid ":c:func:`!PyUnicode_EncodeUTF7`" msgstr ":c:func:`!PyUnicode_EncodeUTF7`" -#: ../../whatsnew/3.3.rst:2311 +#: ../../whatsnew/3.3.rst:2310 msgid "" -":c:func:`!PyUnicode_EncodeUTF8`: use :c:func:`PyUnicode_AsUTF8` " -"or :c:func:`PyUnicode_AsUTF8String`" +":c:func:`!PyUnicode_EncodeUTF8`: use :c:func:`PyUnicode_AsUTF8` or :c:func:" +"`PyUnicode_AsUTF8String`" msgstr "" -":c:func:`!PyUnicode_EncodeUTF8`:使用 :c:func:`PyUnicode_AsUTF8` " -"或 :c:func:`PyUnicode_AsUTF8String`" +":c:func:`!PyUnicode_EncodeUTF8`:使用 :c:func:`PyUnicode_AsUTF8` 或 :c:func:" +"`PyUnicode_AsUTF8String`" -#: ../../whatsnew/3.3.rst:2313 +#: ../../whatsnew/3.3.rst:2312 msgid ":c:func:`!PyUnicode_EncodeUTF32`" msgstr ":c:func:`!PyUnicode_EncodeUTF32`" -#: ../../whatsnew/3.3.rst:2314 +#: ../../whatsnew/3.3.rst:2313 msgid ":c:func:`!PyUnicode_EncodeUTF16`" msgstr ":c:func:`!PyUnicode_EncodeUTF16`" -#: ../../whatsnew/3.3.rst:2315 +#: ../../whatsnew/3.3.rst:2314 msgid "" -":c:func:`!PyUnicode_EncodeUnicodeEscape` " -"use :c:func:`PyUnicode_AsUnicodeEscapeString`" +":c:func:`!PyUnicode_EncodeUnicodeEscape` use :c:func:" +"`PyUnicode_AsUnicodeEscapeString`" msgstr "" -":c:func:`!PyUnicode_EncodeUnicodeEscape` 使" -"用 :c:func:`PyUnicode_AsUnicodeEscapeString`" +":c:func:`!PyUnicode_EncodeUnicodeEscape` 使用 :c:func:" +"`PyUnicode_AsUnicodeEscapeString`" -#: ../../whatsnew/3.3.rst:2317 +#: ../../whatsnew/3.3.rst:2316 msgid "" -":c:func:`!PyUnicode_EncodeRawUnicodeEscape` " -"use :c:func:`PyUnicode_AsRawUnicodeEscapeString`" +":c:func:`!PyUnicode_EncodeRawUnicodeEscape` use :c:func:" +"`PyUnicode_AsRawUnicodeEscapeString`" msgstr "" -":c:func:`!PyUnicode_EncodeRawUnicodeEscape` 使" -"用 :c:func:`PyUnicode_AsRawUnicodeEscapeString`" +":c:func:`!PyUnicode_EncodeRawUnicodeEscape` 使用 :c:func:" +"`PyUnicode_AsRawUnicodeEscapeString`" -#: ../../whatsnew/3.3.rst:2319 +#: ../../whatsnew/3.3.rst:2318 msgid "" ":c:func:`!PyUnicode_EncodeLatin1`: use :c:func:`PyUnicode_AsLatin1String`" msgstr "" ":c:func:`!PyUnicode_EncodeLatin1`: 使用 :c:func:`PyUnicode_AsLatin1String`" -#: ../../whatsnew/3.3.rst:2320 +#: ../../whatsnew/3.3.rst:2319 msgid ":c:func:`!PyUnicode_EncodeASCII`: use :c:func:`PyUnicode_AsASCIIString`" msgstr "" ":c:func:`!PyUnicode_EncodeASCII`:使用 :c:func:`PyUnicode_AsASCIIString`" -#: ../../whatsnew/3.3.rst:2321 +#: ../../whatsnew/3.3.rst:2320 msgid ":c:func:`!PyUnicode_EncodeCharmap`" msgstr ":c:func:`!PyUnicode_EncodeCharmap`" -#: ../../whatsnew/3.3.rst:2322 +#: ../../whatsnew/3.3.rst:2321 msgid ":c:func:`!PyUnicode_TranslateCharmap`" msgstr ":c:func:`!PyUnicode_TranslateCharmap`" -#: ../../whatsnew/3.3.rst:2323 +#: ../../whatsnew/3.3.rst:2322 msgid "" -":c:func:`!PyUnicode_EncodeMBCS`: use :c:func:`PyUnicode_AsMBCSString` " -"or :c:func:`PyUnicode_EncodeCodePage` (with ``CP_ACP`` code_page)" +":c:func:`!PyUnicode_EncodeMBCS`: use :c:func:`PyUnicode_AsMBCSString` or :c:" +"func:`PyUnicode_EncodeCodePage` (with ``CP_ACP`` code_page)" msgstr "" -":c:func:`!PyUnicode_EncodeMBCS`:使用 :c:func:`PyUnicode_AsMBCSString` " -"或 :c:func:`PyUnicode_EncodeCodePage` (帶有 ``CP_ACP`` code_page)" +":c:func:`!PyUnicode_EncodeMBCS`:使用 :c:func:`PyUnicode_AsMBCSString` 或 :c:" +"func:`PyUnicode_EncodeCodePage` (帶有 ``CP_ACP`` code_page)" -#: ../../whatsnew/3.3.rst:2325 +#: ../../whatsnew/3.3.rst:2324 msgid "" ":c:func:`!PyUnicode_EncodeDecimal`, :c:func:`!" "PyUnicode_TransformDecimalToASCII`" @@ -4028,38 +4049,38 @@ msgstr "" ":c:func:`!PyUnicode_EncodeDecimal`、:c:func:`!" "PyUnicode_TransformDecimalToASCII`" -#: ../../whatsnew/3.3.rst:2330 +#: ../../whatsnew/3.3.rst:2329 msgid "Deprecated features" msgstr "已棄用的功能" -#: ../../whatsnew/3.3.rst:2332 +#: ../../whatsnew/3.3.rst:2331 msgid "" "The :mod:`array` module's ``'u'`` format code is now deprecated and will be " "removed in Python 4 together with the rest of the (:c:type:`Py_UNICODE`) API." msgstr "" -#: ../../whatsnew/3.3.rst:2337 +#: ../../whatsnew/3.3.rst:2336 msgid "Porting to Python 3.3" msgstr "移植到 Python 3.3" -#: ../../whatsnew/3.3.rst:2339 +#: ../../whatsnew/3.3.rst:2338 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "本節列出了前面描述的更改以及可能需要你更改程式碼的其他錯誤修復。" -#: ../../whatsnew/3.3.rst:2345 +#: ../../whatsnew/3.3.rst:2344 msgid "Porting Python code" msgstr "移植 Python 程式碼" -#: ../../whatsnew/3.3.rst:2347 +#: ../../whatsnew/3.3.rst:2346 msgid "" "Hash randomization is enabled by default. Set the :envvar:`PYTHONHASHSEED` " -"environment variable to ``0`` to disable hash randomization. See also " -"the :meth:`object.__hash__` method." +"environment variable to ``0`` to disable hash randomization. See also the :" +"meth:`object.__hash__` method." msgstr "" -#: ../../whatsnew/3.3.rst:2351 +#: ../../whatsnew/3.3.rst:2350 msgid "" ":issue:`12326`: On Linux, sys.platform doesn't contain the major version " "anymore. It is now always 'linux', instead of 'linux2' or 'linux3' depending " @@ -4068,24 +4089,24 @@ msgid "" "if you don't need to support older Python versions." msgstr "" -#: ../../whatsnew/3.3.rst:2357 +#: ../../whatsnew/3.3.rst:2356 msgid "" -":issue:`13847`, :issue:`14180`: :mod:`time` " -"and :mod:`datetime`: :exc:`OverflowError` is now raised instead " -"of :exc:`ValueError` if a timestamp is out of range. :exc:`OSError` is now " -"raised if C functions :c:func:`gmtime` or :c:func:`localtime` failed." +":issue:`13847`, :issue:`14180`: :mod:`time` and :mod:`datetime`: :exc:" +"`OverflowError` is now raised instead of :exc:`ValueError` if a timestamp is " +"out of range. :exc:`OSError` is now raised if C functions :c:func:`gmtime` " +"or :c:func:`localtime` failed." msgstr "" -#: ../../whatsnew/3.3.rst:2362 +#: ../../whatsnew/3.3.rst:2361 msgid "" "The default finders used by import now utilize a cache of what is contained " "within a specific directory. If you create a Python source file or " -"sourceless bytecode file, make sure to " -"call :func:`importlib.invalidate_caches` to clear out the cache for the " -"finders to notice the new file." +"sourceless bytecode file, make sure to call :func:`importlib." +"invalidate_caches` to clear out the cache for the finders to notice the new " +"file." msgstr "" -#: ../../whatsnew/3.3.rst:2367 +#: ../../whatsnew/3.3.rst:2366 msgid "" ":exc:`ImportError` now uses the full name of the module that was attempted " "to be imported. Doctests that check ImportErrors' message will need to be " @@ -4093,43 +4114,42 @@ msgid "" "name." msgstr "" -#: ../../whatsnew/3.3.rst:2372 +#: ../../whatsnew/3.3.rst:2371 msgid "" "The *index* argument to :func:`__import__` now defaults to 0 instead of -1 " "and no longer support negative values. It was an oversight when :pep:`328` " "was implemented that the default value remained -1. If you need to continue " "to perform a relative import followed by an absolute import, then perform " "the relative import using an index of 1, followed by another import using an " -"index of 0. It is preferred, though, that you " -"use :func:`importlib.import_module` rather than call :func:`__import__` " -"directly." +"index of 0. It is preferred, though, that you use :func:`importlib." +"import_module` rather than call :func:`__import__` directly." msgstr "" -#: ../../whatsnew/3.3.rst:2380 +#: ../../whatsnew/3.3.rst:2379 msgid "" ":func:`__import__` no longer allows one to use an index value other than 0 " "for top-level modules. E.g. ``__import__('sys', level=1)`` is now an error." msgstr "" -#: ../../whatsnew/3.3.rst:2383 +#: ../../whatsnew/3.3.rst:2382 msgid "" "Because :data:`sys.meta_path` and :data:`sys.path_hooks` now have finders on " -"them by default, you will most likely want to use :meth:`list.insert` " -"instead of :meth:`list.append` to add to those lists." +"them by default, you will most likely want to use :meth:`!list.insert` " +"instead of :meth:`!list.append` to add to those lists." msgstr "" -#: ../../whatsnew/3.3.rst:2387 +#: ../../whatsnew/3.3.rst:2386 msgid "" "Because ``None`` is now inserted into :data:`sys.path_importer_cache`, if " "you are clearing out entries in the dictionary of paths that do not have a " -"finder, you will need to remove keys paired with values of ``None`` " -"**and** :class:`!imp.NullImporter` to be backwards-compatible. This will " -"lead to extra overhead on older versions of Python that re-insert ``None`` " -"into :data:`sys.path_importer_cache` where it represents the use of implicit " +"finder, you will need to remove keys paired with values of ``None`` **and** :" +"class:`!imp.NullImporter` to be backwards-compatible. This will lead to " +"extra overhead on older versions of Python that re-insert ``None`` into :" +"data:`sys.path_importer_cache` where it represents the use of implicit " "finders, but semantically it should not change anything." msgstr "" -#: ../../whatsnew/3.3.rst:2395 +#: ../../whatsnew/3.3.rst:2394 msgid "" ":class:`!importlib.abc.Finder` no longer specifies a ``find_module()`` " "abstract method that must be implemented. If you were relying on subclasses " @@ -4138,21 +4158,21 @@ msgid "" "in the case of working with :term:`path entry finders `." msgstr "" -#: ../../whatsnew/3.3.rst:2401 +#: ../../whatsnew/3.3.rst:2400 msgid "" ":mod:`pkgutil` has been converted to use :mod:`importlib` internally. This " "eliminates many edge cases where the old behaviour of the :pep:`302` import " "emulation failed to match the behaviour of the real import system. The " -"import emulation itself is still present, but is now deprecated. " -"The :func:`pkgutil.iter_importers` and :func:`pkgutil.walk_packages` " -"functions special case the standard import hooks so they are still supported " -"even though they do not provide the non-standard ``iter_modules()`` method." +"import emulation itself is still present, but is now deprecated. The :func:" +"`pkgutil.iter_importers` and :func:`pkgutil.walk_packages` functions special " +"case the standard import hooks so they are still supported even though they " +"do not provide the non-standard ``iter_modules()`` method." msgstr "" -#: ../../whatsnew/3.3.rst:2409 +#: ../../whatsnew/3.3.rst:2408 msgid "" -"A longstanding RFC-compliance bug (:issue:`1079`) in the parsing done " -"by :func:`email.header.decode_header` has been fixed. Code that uses the " +"A longstanding RFC-compliance bug (:issue:`1079`) in the parsing done by :" +"func:`email.header.decode_header` has been fixed. Code that uses the " "standard idiom to convert encoded headers into unicode " "(``str(make_header(decode_header(h))``) will see no change, but code that " "looks at the individual tuples returned by decode_header will see that " @@ -4163,7 +4183,7 @@ msgid "" "already present in the input strings." msgstr "" -#: ../../whatsnew/3.3.rst:2420 +#: ../../whatsnew/3.3.rst:2419 msgid "" ":func:`email.utils.formataddr` now does the correct content transfer " "encoding when passed non-``ASCII`` display names. Any code that depended on " @@ -4171,15 +4191,15 @@ msgid "" "formatted output string will need to be changed (:issue:`1690608`)." msgstr "" -#: ../../whatsnew/3.3.rst:2425 +#: ../../whatsnew/3.3.rst:2424 msgid "" ":meth:`poplib.POP3.quit` may now raise protocol errors like all other " -"``poplib`` methods. Code that assumes ``quit`` does not " -"raise :exc:`poplib.error_proto` errors may need to be changed if errors on " -"``quit`` are encountered by a particular application (:issue:`11291`)." +"``poplib`` methods. Code that assumes ``quit`` does not raise :exc:`poplib." +"error_proto` errors may need to be changed if errors on ``quit`` are " +"encountered by a particular application (:issue:`11291`)." msgstr "" -#: ../../whatsnew/3.3.rst:2430 +#: ../../whatsnew/3.3.rst:2429 msgid "" "The ``strict`` argument to :class:`email.parser.Parser`, deprecated since " "Python 2.4, has finally been removed." @@ -4187,51 +4207,51 @@ msgstr "" "自 Python 2.4 以來已棄用的 :class:`email.parser.Parser` 的 ``strict`` 引數終" "於被刪除了。" -#: ../../whatsnew/3.3.rst:2433 +#: ../../whatsnew/3.3.rst:2432 msgid "" "The deprecated method ``unittest.TestCase.assertSameElements`` has been " "removed." msgstr "已棄用的方法 ``unittest.TestCase.assertSameElements`` 已被刪除。" -#: ../../whatsnew/3.3.rst:2436 +#: ../../whatsnew/3.3.rst:2435 msgid "The deprecated variable ``time.accept2dyear`` has been removed." msgstr "已棄用的變數 ``time.accept2dyear`` 已被刪除。" -#: ../../whatsnew/3.3.rst:2438 +#: ../../whatsnew/3.3.rst:2437 msgid "" -"The deprecated ``Context._clamp`` attribute has been removed from " -"the :mod:`decimal` module. It was previously replaced by the public " -"attribute :attr:`~decimal.Context.clamp`. (See :issue:`8540`.)" +"The deprecated ``Context._clamp`` attribute has been removed from the :mod:" +"`decimal` module. It was previously replaced by the public attribute :attr:" +"`~decimal.Context.clamp`. (See :issue:`8540`.)" msgstr "" -#: ../../whatsnew/3.3.rst:2442 +#: ../../whatsnew/3.3.rst:2441 msgid "" "The undocumented internal helper class ``SSLFakeFile`` has been removed " "from :mod:`smtplib`, since its functionality has long been provided directly " "by :meth:`socket.socket.makefile`." msgstr "" -#: ../../whatsnew/3.3.rst:2446 +#: ../../whatsnew/3.3.rst:2445 msgid "" "Passing a negative value to :func:`time.sleep` on Windows now raises an " "error instead of sleeping forever. It has always raised an error on posix." msgstr "" -#: ../../whatsnew/3.3.rst:2449 +#: ../../whatsnew/3.3.rst:2448 msgid "" "The ``ast.__version__`` constant has been removed. If you need to make " "decisions affected by the AST version, use :data:`sys.version_info` to make " "the decision." msgstr "" -#: ../../whatsnew/3.3.rst:2453 +#: ../../whatsnew/3.3.rst:2452 msgid "" "Code that used to work around the fact that the :mod:`threading` module used " "factory functions by subclassing the private classes will need to change to " "subclass the now-public classes." msgstr "" -#: ../../whatsnew/3.3.rst:2457 +#: ../../whatsnew/3.3.rst:2456 msgid "" "The undocumented debugging machinery in the threading module has been " "removed, simplifying the code. This should have no effect on production " @@ -4239,58 +4259,58 @@ msgid "" "interacting with it (:issue:`13550`)." msgstr "" -#: ../../whatsnew/3.3.rst:2464 +#: ../../whatsnew/3.3.rst:2463 msgid "Porting C code" msgstr "" -#: ../../whatsnew/3.3.rst:2466 +#: ../../whatsnew/3.3.rst:2465 msgid "" "In the course of changes to the buffer API the undocumented :c:member:`!" "smalltable` member of the :c:type:`Py_buffer` structure has been removed and " -"the layout of the :c:type:`PyMemoryViewObject` has changed." +"the layout of the :c:type:`!PyMemoryViewObject` has changed." msgstr "" -#: ../../whatsnew/3.3.rst:2471 +#: ../../whatsnew/3.3.rst:2470 msgid "" "All extensions relying on the relevant parts in ``memoryobject.h`` or " "``object.h`` must be rebuilt." msgstr "" -#: ../../whatsnew/3.3.rst:2474 +#: ../../whatsnew/3.3.rst:2473 msgid "" "Due to :ref:`PEP 393 `, the :c:type:`Py_UNICODE` type and all " "functions using this type are deprecated (but will stay available for at " "least five years). If you were using low-level Unicode APIs to construct " "and access unicode objects and you want to benefit of the memory footprint " -"reduction provided by :pep:`393`, you have to convert your code to the " -"new :doc:`Unicode API <../c-api/unicode>`." +"reduction provided by :pep:`393`, you have to convert your code to the new :" +"doc:`Unicode API <../c-api/unicode>`." msgstr "" -#: ../../whatsnew/3.3.rst:2481 +#: ../../whatsnew/3.3.rst:2480 msgid "" -"However, if you only have been using high-level functions such " -"as :c:func:`PyUnicode_Concat()`, :c:func:`PyUnicode_Join` " -"or :c:func:`PyUnicode_FromFormat()`, your code will automatically take " -"advantage of the new unicode representations." +"However, if you only have been using high-level functions such as :c:func:" +"`PyUnicode_Concat()`, :c:func:`PyUnicode_Join` or :c:func:" +"`PyUnicode_FromFormat()`, your code will automatically take advantage of the " +"new unicode representations." msgstr "" -#: ../../whatsnew/3.3.rst:2486 +#: ../../whatsnew/3.3.rst:2485 msgid ":c:func:`PyImport_GetMagicNumber` now returns ``-1`` upon failure." msgstr ":c:func:`PyImport_GetMagicNumber` 現在在失敗時回傳 ``-1``。" -#: ../../whatsnew/3.3.rst:2488 +#: ../../whatsnew/3.3.rst:2487 msgid "" "As a negative value for the *level* argument to :func:`__import__` is no " "longer valid, the same now holds for :c:func:`PyImport_ImportModuleLevel`. " -"This also means that the value of *level* used " -"by :c:func:`PyImport_ImportModuleEx` is now ``0`` instead of ``-1``." +"This also means that the value of *level* used by :c:func:" +"`PyImport_ImportModuleEx` is now ``0`` instead of ``-1``." msgstr "" -#: ../../whatsnew/3.3.rst:2495 +#: ../../whatsnew/3.3.rst:2494 msgid "Building C extensions" msgstr "" -#: ../../whatsnew/3.3.rst:2497 +#: ../../whatsnew/3.3.rst:2496 msgid "" "The range of possible file names for C extensions has been narrowed. Very " "rarely used spellings have been suppressed: under POSIX, files named " @@ -4300,32 +4320,32 @@ msgid "" "remove the ``module`` string from the file names)." msgstr "" -#: ../../whatsnew/3.3.rst:2505 +#: ../../whatsnew/3.3.rst:2504 msgid "(implemented in :issue:`14040`.)" msgstr "(於 :issue:`14040` 中實作。)" -#: ../../whatsnew/3.3.rst:2509 +#: ../../whatsnew/3.3.rst:2508 msgid "Command Line Switch Changes" msgstr "命令列開關更改" -#: ../../whatsnew/3.3.rst:2511 +#: ../../whatsnew/3.3.rst:2510 msgid "" "The -Q command-line flag and related artifacts have been removed. Code " "checking sys.flags.division_warning will need updating." msgstr "" -#: ../../whatsnew/3.3.rst:2514 +#: ../../whatsnew/3.3.rst:2513 msgid "(:issue:`10998`, contributed by Éric Araujo.)" msgstr "(由 Éric Araujo 於 :issue:`10998` 中實作。)" -#: ../../whatsnew/3.3.rst:2516 +#: ../../whatsnew/3.3.rst:2515 msgid "" "When :program:`python` is started with :option:`-S`, ``import site`` will no " "longer add site-specific paths to the module search paths. In previous " "versions, it did." msgstr "" -#: ../../whatsnew/3.3.rst:2520 +#: ../../whatsnew/3.3.rst:2519 msgid "" "(:issue:`11591`, contributed by Carl Meyer with editions by Éric Araujo.)" msgstr "(:issue:`11591`,由 Carl Meyer 貢獻並由 Éric Araujo 修訂。)" diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 7c5cc676f0..71ff532e88 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-02-19 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -71,8 +71,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:89 msgid "" -"command line option for :ref:`isolated mode ` " -"(:issue:`16499`)." +"command line option for :ref:`isolated mode ` (:" +"issue:`16499`)." msgstr "" #: ../../whatsnew/3.4.rst:91 @@ -83,8 +83,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:93 msgid "" -":ref:`A ModuleSpec Type ` for the Import System " -"(:pep:`451`). (Affects importer authors.)" +":ref:`A ModuleSpec Type ` for the Import System (:pep:" +"`451`). (Affects importer authors.)" msgstr "" #: ../../whatsnew/3.4.rst:95 @@ -102,35 +102,35 @@ msgid "" ":mod:`asyncio`: :ref:`New provisional API for asynchronous IO ` (:pep:`3156`)." msgstr "" -":mod:`asyncio`: :ref:`新的用於非同步 IO 的臨時 API ` " -"(:pep:`3156`)。" +":mod:`asyncio`: :ref:`新的用於非同步 IO 的臨時 API ` (:" +"pep:`3156`)。" #: ../../whatsnew/3.4.rst:102 msgid "" ":mod:`ensurepip`: :ref:`Bootstrapping the pip installer ` (:pep:`453`)." msgstr "" -":mod:`ensurepip`: :ref:`初始建置 pip 安裝程式 ` " -"(:pep:`453`)。" +":mod:`ensurepip`: :ref:`初始建置 pip 安裝程式 ` (:pep:" +"`453`)。" #: ../../whatsnew/3.4.rst:104 msgid "" -":mod:`enum`: :ref:`Support for enumeration types ` " -"(:pep:`435`)." +":mod:`enum`: :ref:`Support for enumeration types ` (:pep:" +"`435`)." msgstr ":mod:`enum`: :ref:`支援列舉型別 ` (:pep:`435`)。" #: ../../whatsnew/3.4.rst:106 msgid "" -":mod:`pathlib`: :ref:`Object-oriented filesystem paths ` " -"(:pep:`428`)." +":mod:`pathlib`: :ref:`Object-oriented filesystem paths ` (:" +"pep:`428`)." msgstr "" ":mod:`pathlib`: :ref:`物件導向檔案系統路徑 ` (:pep:`428`)。" #: ../../whatsnew/3.4.rst:108 msgid "" ":mod:`selectors`: :ref:`High-level and efficient I/O multiplexing `, built upon the :mod:`select` module primitives (part " -"of :pep:`3156`)." +"selectors>`, built upon the :mod:`select` module primitives (part of :pep:" +"`3156`)." msgstr "" #: ../../whatsnew/3.4.rst:111 @@ -144,8 +144,8 @@ msgid "" ":mod:`tracemalloc`: :ref:`Trace Python memory allocations ` (:pep:`454`)." msgstr "" -":mod:`tracemalloc`: :ref:`追蹤 Python 記憶體配置 ` " -"(:pep:`454`)。" +":mod:`tracemalloc`: :ref:`追蹤 Python 記憶體配置 ` (:" +"pep:`454`)。" #: ../../whatsnew/3.4.rst:116 msgid "Significantly improved library modules:" @@ -153,8 +153,8 @@ msgstr "顯著改進的函式庫模組:" #: ../../whatsnew/3.4.rst:118 msgid "" -":ref:`Single-dispatch generic functions ` " -"in :mod:`functools` (:pep:`443`)." +":ref:`Single-dispatch generic functions ` in :mod:" +"`functools` (:pep:`443`)." msgstr "" #: ../../whatsnew/3.4.rst:120 @@ -172,10 +172,10 @@ msgstr "" #: ../../whatsnew/3.4.rst:123 msgid "" -":mod:`email` has a new submodule, :mod:`~email.contentmanager`, and a " -"new :mod:`~email.message.Message` subclass " -"(:class:`~email.contentmanager.EmailMessage`) that :ref:`simplify MIME " -"handling ` (:issue:`18891`)." +":mod:`email` has a new submodule, :mod:`~email.contentmanager`, and a new :" +"mod:`~email.message.Message` subclass (:class:`~email.message.EmailMessage`) " +"that :ref:`simplify MIME handling ` (:issue:" +"`18891`)." msgstr "" #: ../../whatsnew/3.4.rst:127 @@ -195,8 +195,8 @@ msgstr "安全性改進:" #: ../../whatsnew/3.4.rst:134 msgid "" -":ref:`Secure and interchangeable hash algorithm ` " -"(:pep:`456`)." +":ref:`Secure and interchangeable hash algorithm ` (:pep:" +"`456`)." msgstr "" #: ../../whatsnew/3.4.rst:136 @@ -207,11 +207,11 @@ msgstr "" #: ../../whatsnew/3.4.rst:138 msgid "" -"New command line option for :ref:`isolated mode `, " -"(:issue:`16499`)." +"New command line option for :ref:`isolated mode `, (:" +"issue:`16499`)." msgstr "" -"用於\\ :ref:`隔離模式 `\\ 的新命令列選項 " -"(:issue:`16499`)。" +"用於\\ :ref:`隔離模式 `\\ 的新命令列選項 (:issue:" +"`16499`)。" #: ../../whatsnew/3.4.rst:140 msgid "" @@ -259,9 +259,9 @@ msgstr "" #: ../../whatsnew/3.4.rst:155 msgid "" "All modules in the standard library that support SSL now support server " -"certificate verification, including hostname matching " -"(:func:`ssl.match_hostname`) and CRLs (Certificate Revocation lists, " -"see :func:`ssl.SSLContext.load_verify_locations`)." +"certificate verification, including hostname matching (:func:`!ssl." +"match_hostname`) and CRLs (Certificate Revocation lists, see :func:`ssl." +"SSLContext.load_verify_locations`)." msgstr "" #: ../../whatsnew/3.4.rst:160 @@ -391,8 +391,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:247 msgid "" "However, as this migration is currently still incomplete, the legacy " -"versions of those guides remaining available as :ref:`install-index` " -"and :ref:`setuptools-index`." +"versions of those guides remaining available as :ref:`install-index` and :" +"ref:`setuptools-index`." msgstr "" #: ../../whatsnew/3.4.rst:253 @@ -433,14 +433,16 @@ msgid ":func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`" msgstr ":func:`os.get_handle_inheritable`、:func:`os.set_handle_inheritable`" #: ../../whatsnew/3.4.rst:274 -msgid ":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`" -msgstr ":meth:`socket.socket.get_inheritable`、:meth:`socket.socket.set_inheritable`" +msgid "" +":meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable`" +msgstr "" +":meth:`socket.socket.get_inheritable`、:meth:`socket.socket.set_inheritable`" #: ../../whatsnew/3.4.rst:278 msgid ":pep:`446` -- Make newly created file descriptors non-inheritable" msgstr ":pep:`446` - 使新建立的檔案描述器不可繼承" -#: ../../whatsnew/3.4.rst:279 ../../whatsnew/3.4.rst:1811 +#: ../../whatsnew/3.4.rst:279 ../../whatsnew/3.4.rst:1812 msgid "PEP written and implemented by Victor Stinner." msgstr "由 Victor Stinner 撰寫 PEP 與實作。" @@ -459,20 +461,19 @@ msgstr "" #: ../../whatsnew/3.4.rst:294 msgid "" -"As a key step in clarifying the situation, the :meth:`codecs.encode` " -"and :meth:`codecs.decode` convenience functions are now properly documented " -"in Python 2.7, 3.3 and 3.4. These functions have existed in " -"the :mod:`codecs` module (and have been covered by the regression test " -"suite) since Python 2.4, but were previously only discoverable through " -"runtime introspection." +"As a key step in clarifying the situation, the :meth:`codecs.encode` and :" +"meth:`codecs.decode` convenience functions are now properly documented in " +"Python 2.7, 3.3 and 3.4. These functions have existed in the :mod:`codecs` " +"module (and have been covered by the regression test suite) since Python " +"2.4, but were previously only discoverable through runtime introspection." msgstr "" #: ../../whatsnew/3.4.rst:300 msgid "" -"Unlike the convenience methods on :class:`str`, :class:`bytes` " -"and :class:`bytearray`, the :mod:`codecs` convenience functions support " -"arbitrary codecs in both Python 2 and Python 3, rather than being limited to " -"Unicode text encodings (in Python 3) or ``basestring`` <-> ``basestring`` " +"Unlike the convenience methods on :class:`str`, :class:`bytes` and :class:" +"`bytearray`, the :mod:`codecs` convenience functions support arbitrary " +"codecs in both Python 2 and Python 3, rather than being limited to Unicode " +"text encodings (in Python 3) or ``basestring`` <-> ``basestring`` " "conversions (in Python 2)." msgstr "" @@ -594,11 +595,11 @@ msgstr "" #: ../../whatsnew/3.4.rst:373 msgid "" -"(Contributed by Nick Coghlan " -"in :issue:`7475`, :issue:`17827`, :issue:`17828` and :issue:`19619`.)" +"(Contributed by Nick Coghlan in :issue:`7475`, :issue:`17827`, :issue:" +"`17828` and :issue:`19619`.)" msgstr "" -"(由 Nick Coghlan 在 :issue:`7475`、:issue:`17827`、:issue:`17828` " -"和 :issue:`19619` 中貢獻。)" +"(由 Nick Coghlan 在 :issue:`7475`、:issue:`17827`、:issue:`17828` 和 :issue:" +"`19619` 中貢獻。)" #: ../../whatsnew/3.4.rst:380 msgid "PEP 451: A ModuleSpec Type for the Import System" @@ -619,9 +620,9 @@ msgid "" "Furthermore, they should be transparent to everyone but importer authors. " "Key finder and loader methods have been deprecated, but they will continue " "working. New importers should use the new methods described in the PEP. " -"Existing importers should be updated to implement the new methods. See " -"the :ref:`deprecated-3.4` section for a list of methods that should be " -"replaced and their replacements." +"Existing importers should be updated to implement the new methods. See the :" +"ref:`deprecated-3.4` section for a list of methods that should be replaced " +"and their replacements." msgstr "" #: ../../whatsnew/3.4.rst:400 @@ -640,8 +641,8 @@ msgstr "" msgid "" ":func:`min` and :func:`max` now accept a *default* keyword-only argument " "that can be used to specify the value they return if the iterable they are " -"evaluating has no elements. (Contributed by Julian Berman " -"in :issue:`18111`.)" +"evaluating has no elements. (Contributed by Julian Berman in :issue:" +"`18111`.)" msgstr "" #: ../../whatsnew/3.4.rst:411 @@ -651,9 +652,9 @@ msgstr "" #: ../../whatsnew/3.4.rst:413 msgid "" "Module ``__file__`` attributes (and related values) should now always " -"contain absolute paths by default, with the sole exception of " -"``__main__.__file__`` when a script has been executed directly using a " -"relative path. (Contributed by Brett Cannon in :issue:`18416`.)" +"contain absolute paths by default, with the sole exception of ``__main__." +"__file__`` when a script has been executed directly using a relative path. " +"(Contributed by Brett Cannon in :issue:`18416`.)" msgstr "" #: ../../whatsnew/3.4.rst:418 @@ -681,8 +682,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:431 msgid "" ":class:`bytes`.join() and :class:`bytearray`.join() now accept arbitrary " -"buffer objects as arguments. (Contributed by Antoine Pitrou " -"in :issue:`15958`.)" +"buffer objects as arguments. (Contributed by Antoine Pitrou in :issue:" +"`15958`.)" msgstr "" #: ../../whatsnew/3.4.rst:435 @@ -701,9 +702,9 @@ msgstr "" #: ../../whatsnew/3.4.rst:443 msgid "" -":class:`memoryview` is now registered as a :class:`Sequence " -"`, and supports the :func:`reversed` builtin. (Contributed " -"by Nick Coghlan and Claudiu Popa in :issue:`18690` and :issue:`19078`.)" +":class:`memoryview` is now registered as a :class:`Sequence `, and supports the :func:`reversed` builtin. (Contributed by Nick " +"Coghlan and Claudiu Popa in :issue:`18690` and :issue:`19078`.)" msgstr "" #: ../../whatsnew/3.4.rst:447 @@ -716,8 +717,8 @@ msgstr "" #: ../../whatsnew/3.4.rst:451 msgid "" ":meth:`~object.__length_hint__` is now part of the formal language " -"specification (see :pep:`424`). (Contributed by Armin Ronacher " -"in :issue:`16148`.)" +"specification (see :pep:`424`). (Contributed by Armin Ronacher in :issue:" +"`16148`.)" msgstr "" #: ../../whatsnew/3.4.rst:457 @@ -754,11 +755,11 @@ msgstr "ensurepip" #: ../../whatsnew/3.4.rst:483 msgid "" -"The new :mod:`ensurepip` module is the primary infrastructure for " -"the :pep:`453` implementation. In the normal course of events end users " -"will not need to interact with this module, but it can be used to manually " -"bootstrap ``pip`` if the automated bootstrapping into an installation or " -"virtual environment was declined." +"The new :mod:`ensurepip` module is the primary infrastructure for the :pep:" +"`453` implementation. In the normal course of events end users will not " +"need to interact with this module, but it can be used to manually bootstrap " +"``pip`` if the automated bootstrapping into an installation or virtual " +"environment was declined." msgstr "" #: ../../whatsnew/3.4.rst:489 @@ -788,10 +789,10 @@ msgstr "enum" #: ../../whatsnew/3.4.rst:509 msgid "" "The new :mod:`enum` module (defined in :pep:`435`) provides a standard " -"implementation of enumeration types, allowing other modules (such " -"as :mod:`socket`) to provide more informative error messages and better " -"debugging support by replacing opaque integer constants with backwards " -"compatible enumeration values." +"implementation of enumeration types, allowing other modules (such as :mod:" +"`socket`) to provide more informative error messages and better debugging " +"support by replacing opaque integer constants with backwards compatible " +"enumeration values." msgstr "" #: ../../whatsnew/3.4.rst:517 @@ -821,7 +822,7 @@ msgstr "" msgid ":pep:`428` -- The pathlib module -- object-oriented filesystem paths" msgstr "" -#: ../../whatsnew/3.4.rst:538 ../../whatsnew/3.4.rst:1834 +#: ../../whatsnew/3.4.rst:538 ../../whatsnew/3.4.rst:1835 msgid "PEP written and implemented by Antoine Pitrou." msgstr "由 Antoine Pitrou 撰寫 PEP 與實作。" @@ -831,9 +832,9 @@ msgstr "selectors" #: ../../whatsnew/3.4.rst:546 msgid "" -"The new :mod:`selectors` module (created as part of " -"implementing :pep:`3156`) allows high-level and efficient I/O multiplexing, " -"built upon the :mod:`select` module primitives." +"The new :mod:`selectors` module (created as part of implementing :pep:" +"`3156`) allows high-level and efficient I/O multiplexing, built upon the :" +"mod:`select` module primitives." msgstr "" #: ../../whatsnew/3.4.rst:554 @@ -931,11 +932,11 @@ msgid "" "Serhiy Storchacha in :issue:`16486`.)" msgstr "" -#: ../../whatsnew/3.4.rst:615 ../../whatsnew/3.4.rst:1542 +#: ../../whatsnew/3.4.rst:615 ../../whatsnew/3.4.rst:1543 msgid "" -"The :meth:`!writeframesraw` and :meth:`!writeframes` methods now accept " -"any :term:`bytes-like object`. (Contributed by Serhiy Storchaka " -"in :issue:`8311`.)" +"The :meth:`!writeframesraw` and :meth:`!writeframes` methods now accept any :" +"term:`bytes-like object`. (Contributed by Serhiy Storchaka in :issue:" +"`8311`.)" msgstr "" #: ../../whatsnew/3.4.rst:621 @@ -978,22 +979,21 @@ msgstr "base64" #: ../../whatsnew/3.4.rst:646 msgid "" -"The encoding and decoding functions in :mod:`base64` now accept " -"any :term:`bytes-like object` in cases where it previously required " -"a :class:`bytes` or :class:`bytearray` instance. (Contributed by Nick " -"Coghlan in :issue:`17839`.)" +"The encoding and decoding functions in :mod:`base64` now accept any :term:" +"`bytes-like object` in cases where it previously required a :class:`bytes` " +"or :class:`bytearray` instance. (Contributed by Nick Coghlan in :issue:" +"`17839`.)" msgstr "" #: ../../whatsnew/3.4.rst:651 msgid "" -"New " -"functions :func:`~base64.a85encode`, :func:`~base64.a85decode`, :func:`~base64.b85encode`, " -"and :func:`~base64.b85decode` provide the ability to encode and decode " -"binary data from and to ``Ascii85`` and the git/mercurial ``Base85`` " -"formats, respectively. The ``a85`` functions have options that can be used " -"to make them compatible with the variants of the ``Ascii85`` encoding, " -"including the Adobe variant. (Contributed by Martin Morrison, the Mercurial " -"project, Serhiy Storchaka, and Antoine Pitrou in :issue:`17618`.)" +"New functions :func:`~base64.a85encode`, :func:`~base64.a85decode`, :func:" +"`~base64.b85encode`, and :func:`~base64.b85decode` provide the ability to " +"encode and decode binary data from and to ``Ascii85`` and the git/mercurial " +"``Base85`` formats, respectively. The ``a85`` functions have options that " +"can be used to make them compatible with the variants of the ``Ascii85`` " +"encoding, including the Adobe variant. (Contributed by Martin Morrison, the " +"Mercurial project, Serhiy Storchaka, and Antoine Pitrou in :issue:`17618`.)" msgstr "" #: ../../whatsnew/3.4.rst:661 @@ -1035,21 +1035,21 @@ msgstr "" #: ../../whatsnew/3.4.rst:686 msgid "" "The new :func:`contextlib.redirect_stdout` context manager makes it easier " -"for utility scripts to handle inflexible APIs that write their output " -"to :data:`sys.stdout` and don't provide any options to redirect it. Using " -"the context manager, the :data:`sys.stdout` output can be redirected to any " +"for utility scripts to handle inflexible APIs that write their output to :" +"data:`sys.stdout` and don't provide any options to redirect it. Using the " +"context manager, the :data:`sys.stdout` output can be redirected to any " "other stream or, in conjunction with :class:`io.StringIO`, to a string. The " "latter can be especially useful, for example, to capture output from a " "function that was written to implement a command line interface. It is " -"recommended only for utility scripts because it affects the global state " -"of :data:`sys.stdout`. (Contributed by Raymond Hettinger in :issue:`15805`.)" +"recommended only for utility scripts because it affects the global state of :" +"data:`sys.stdout`. (Contributed by Raymond Hettinger in :issue:`15805`.)" msgstr "" #: ../../whatsnew/3.4.rst:697 msgid "" -"The :mod:`contextlib` documentation has also been updated to include " -"a :ref:`discussion ` of the " -"differences between single use, reusable and reentrant context managers." +"The :mod:`contextlib` documentation has also been updated to include a :ref:" +"`discussion ` of the differences " +"between single use, reusable and reentrant context managers." msgstr "" #: ../../whatsnew/3.4.rst:703 @@ -1070,8 +1070,8 @@ msgstr "dis" #: ../../whatsnew/3.4.rst:714 msgid "" -"Functions :func:`~dis.show_code`, :func:`~dis.dis`, :func:`~dis.distb`, " -"and :func:`~dis.disassemble` now accept a keyword-only *file* argument that " +"Functions :func:`~dis.show_code`, :func:`~dis.dis`, :func:`~dis.distb`, and :" +"func:`~dis.disassemble` now accept a keyword-only *file* argument that " "controls where they write their output." msgstr "" @@ -1119,13 +1119,13 @@ msgstr "" msgid "" "In addition, a new application-friendly class :class:`~dis.Bytecode` " "provides an object-oriented API for inspecting bytecode in both in human-" -"readable form and for iterating over instructions. " -"The :class:`~dis.Bytecode` constructor takes the same arguments " -"that :func:`~dis.get_instruction` does (plus an optional *current_offset*), " -"and the resulting object can be iterated to " -"produce :class:`~dis.Instruction` objects. But it also has " -"a :mod:`~dis.Bytecode.dis` method, equivalent to calling :mod:`~dis.dis` on " -"the constructor argument, but returned as a multi-line string::" +"readable form and for iterating over instructions. The :class:`~dis." +"Bytecode` constructor takes the same arguments that :func:`~dis." +"get_instructions` does (plus an optional *current_offset*), and the " +"resulting object can be iterated to produce :class:`~dis.Instruction` " +"objects. But it also has a :mod:`~dis.Bytecode.dis` method, equivalent to " +"calling :mod:`~dis.dis` on the constructor argument, but returned as a multi-" +"line string::" msgstr "" #: ../../whatsnew/3.4.rst:748 @@ -1158,16 +1158,16 @@ msgstr "" #: ../../whatsnew/3.4.rst:761 msgid "" -":class:`~dis.Bytecode` also has a class " -"method, :meth:`~dis.Bytecode.from_traceback`, that provides the ability to " -"manipulate a traceback (that is, " -"``print(Bytecode.from_traceback(tb).dis())`` is equivalent to ``distb(tb)``)." +":class:`~dis.Bytecode` also has a class method, :meth:`~dis.Bytecode." +"from_traceback`, that provides the ability to manipulate a traceback (that " +"is, ``print(Bytecode.from_traceback(tb).dis())`` is equivalent to " +"``distb(tb)``)." msgstr "" #: ../../whatsnew/3.4.rst:766 msgid "" -"(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver " -"in :issue:`11816` and Claudiu Popa in :issue:`17916`.)" +"(Contributed by Nick Coghlan, Ryan Kelly and Thomas Kluyver in :issue:" +"`11816` and Claudiu Popa in :issue:`17916`.)" msgstr "" "(由 Nick Coghlan、Ryan Kelly 和 Thomas Kluyver 在 :issue:`11816` 中以及 " "Claudiu Popa 在 :issue:`17916` 中貢獻。)" @@ -1196,8 +1196,8 @@ msgid "" "two new options, ``-o`` and ``-f``. ``-o`` allows :ref:`doctest options " "` to be specified on the command line, and ``-f`` is a " "shorthand for ``-o FAIL_FAST`` (to parallel the similar option supported by " -"the :mod:`unittest` CLI). (Contributed by R. David Murray " -"in :issue:`11390`.)" +"the :mod:`unittest` CLI). (Contributed by R. David Murray in :issue:" +"`11390`.)" msgstr "" #: ../../whatsnew/3.4.rst:787 @@ -1225,10 +1225,10 @@ msgid "" "New method :meth:`~email.message.Message.as_bytes` added to produce a bytes " "representation of the message in a fashion similar to how ``as_string`` " "produces a string representation. It does not accept the *maxheaderlen* " -"argument, but does accept the *unixfrom* and *policy* arguments. " -"The :class:`~email.message.Message` :meth:`~email.message.Message.__bytes__` " -"method calls it, meaning that ``bytes(mymsg)`` will now produce the " -"intuitive result: a bytes object containing the fully formatted message. " +"argument, but does accept the *unixfrom* and *policy* arguments. The :class:" +"`~email.message.Message` :meth:`~email.message.Message.__bytes__` method " +"calls it, meaning that ``bytes(mymsg)`` will now produce the intuitive " +"result: a bytes object containing the fully formatted message. " "(Contributed by R. David Murray in :issue:`18600`.)" msgstr "" @@ -1237,8 +1237,8 @@ msgid "" "The :meth:`.Message.set_param` message now accepts a *replace* keyword " "argument. When specified, the associated header will be updated without " "changing its location in the list of headers. For backward compatibility, " -"the default is ``False``. (Contributed by R. David Murray " -"in :issue:`18891`.)" +"the default is ``False``. (Contributed by R. David Murray in :issue:" +"`18891`.)" msgstr "" #: ../../whatsnew/3.4.rst:818 @@ -1250,13 +1250,12 @@ msgid "" "documentation is currently in the new module, which is being added as part " "of email's new :term:`provisional API`. These classes provide a number of " "new methods that make extracting content from and inserting content into " -"email messages much easier. For details, see " -"the :mod:`~email.contentmanager` documentation and the :ref:`email-" -"examples`. These API additions complete the bulk of the work that was " -"planned as part of the email6 project. The currently provisional API is " -"scheduled to become final in Python 3.5 (possibly with a few minor additions " -"in the area of error handling). (Contributed by R. David Murray " -"in :issue:`18891`.)" +"email messages much easier. For details, see the :mod:`~email." +"contentmanager` documentation and the :ref:`email-examples`. These API " +"additions complete the bulk of the work that was planned as part of the " +"email6 project. The currently provisional API is scheduled to become final " +"in Python 3.5 (possibly with a few minor additions in the area of error " +"handling). (Contributed by R. David Murray in :issue:`18891`.)" msgstr "" #: ../../whatsnew/3.4.rst:834 @@ -1277,8 +1276,8 @@ msgstr "" msgid "" "New module attribute :const:`~filecmp.DEFAULT_IGNORES` provides the list of " "directories that are used as the default value for the *ignore* parameter of " -"the :func:`~filecmp.dircmp` function. (Contributed by Eli Bendersky " -"in :issue:`15442`.)" +"the :func:`~filecmp.dircmp` function. (Contributed by Eli Bendersky in :" +"issue:`15442`.)" msgstr "" #: ../../whatsnew/3.4.rst:850 @@ -1315,9 +1314,9 @@ msgstr "由 Łukasz Langa 撰寫 PEP 與實作。" #: ../../whatsnew/3.4.rst:873 msgid "" -":func:`~functools.total_ordering` now supports a return value " -"of :data:`NotImplemented` from the underlying comparison function. " -"(Contributed by Katie Miller in :issue:`10042`.)" +":func:`~functools.total_ordering` now supports a return value of :data:" +"`NotImplemented` from the underlying comparison function. (Contributed by " +"Katie Miller in :issue:`10042`.)" msgstr "" #: ../../whatsnew/3.4.rst:877 @@ -1362,17 +1361,17 @@ msgid "" "(Contributed by Christian Heimes in :issue:`18582`.)" msgstr "" "新的 :func:`hashlib.pbkdf2_hmac` 函式提供了\\ `基於密碼的 PKCS#5 密鑰生成函" -"式 2 `_。(由 Christian Heimes " -"在 :issue:`18582` 中貢獻。)" +"式 2 `_。(由 Christian Heimes 在 :" +"issue:`18582` 中貢獻。)" #: ../../whatsnew/3.4.rst:907 msgid "" "The :attr:`~hashlib.hash.name` attribute of :mod:`hashlib` hash objects is " -"now a formally supported interface. It has always existed in " -"CPython's :mod:`hashlib` (although it did not return lower case names for " -"all supported hashes), but it was not a public interface and so some other " -"Python implementations have not previously supported it. (Contributed by " -"Jason R. Coombs in :issue:`18532`.)" +"now a formally supported interface. It has always existed in CPython's :mod:" +"`hashlib` (although it did not return lower case names for all supported " +"hashes), but it was not a public interface and so some other Python " +"implementations have not previously supported it. (Contributed by Jason R. " +"Coombs in :issue:`18532`.)" msgstr "" #: ../../whatsnew/3.4.rst:916 @@ -1399,11 +1398,10 @@ msgstr "" #: ../../whatsnew/3.4.rst:930 msgid "" -"With the addition of :attr:`~hmac.HMAC.block_size` " -"and :attr:`~hmac.HMAC.name` attributes (and the formal documentation of " -"the :attr:`~hmac.HMAC.digest_size` attribute), the :mod:`hmac` module now " -"conforms fully to the :pep:`247` API. (Contributed by Christian Heimes " -"in :issue:`18775`.)" +"With the addition of :attr:`~hmac.HMAC.block_size` and :attr:`~hmac.HMAC." +"name` attributes (and the formal documentation of the :attr:`~hmac.HMAC." +"digest_size` attribute), the :mod:`hmac` module now conforms fully to the :" +"pep:`247` API. (Contributed by Christian Heimes in :issue:`18775`.)" msgstr "" #: ../../whatsnew/3.4.rst:937 @@ -1442,46 +1440,46 @@ msgid "" ":meth:`~http.server.BaseHTTPRequestHandler.send_error` now accepts an " "optional additional *explain* parameter which can be used to provide an " "extended error description, overriding the hardcoded default if there is " -"one. This extended error description will be formatted using " -"the :attr:`~http.server.HTTP.error_message_format` attribute and sent as the " -"body of the error response. (Contributed by Karl Cow in :issue:`12921`.)" +"one. This extended error description will be formatted using the :attr:" +"`~http.server.BaseHTTPRequestHandler.error_message_format` attribute and " +"sent as the body of the error response. (Contributed by Karl Cow in :issue:" +"`12921`.)" msgstr "" -#: ../../whatsnew/3.4.rst:964 +#: ../../whatsnew/3.4.rst:965 msgid "" "The :mod:`http.server` :ref:`command line interface ` now " "has a ``-b/--bind`` option that causes the server to listen on a specific " "address. (Contributed by Malte Swart in :issue:`17764`.)" msgstr "" -#: ../../whatsnew/3.4.rst:970 +#: ../../whatsnew/3.4.rst:971 msgid "idlelib and IDLE" msgstr "idlelib 與 IDLE" -#: ../../whatsnew/3.4.rst:972 +#: ../../whatsnew/3.4.rst:973 msgid "" "Since idlelib implements the IDLE shell and editor and is not intended for " -"import by other programs, it gets improvements with every release. " -"See :file:`Lib/idlelib/NEWS.txt` for a cumulative list of changes since " -"3.3.0, as well as changes made in future 3.4.x releases. This file is also " -"available from the IDLE :menuselection:`Help --> About IDLE` dialog." +"import by other programs, it gets improvements with every release. See :file:" +"`Lib/idlelib/NEWS.txt` for a cumulative list of changes since 3.3.0, as well " +"as changes made in future 3.4.x releases. This file is also available from " +"the IDLE :menuselection:`Help --> About IDLE` dialog." msgstr "" -#: ../../whatsnew/3.4.rst:980 +#: ../../whatsnew/3.4.rst:981 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.4.rst:982 +#: ../../whatsnew/3.4.rst:983 msgid "" -"The :class:`~importlib.abc.InspectLoader` ABC defines a new " -"method, :meth:`~importlib.abc.InspectLoader.source_to_code` that accepts " -"source data and a path and returns a code object. The default " -"implementation is equivalent to ``compile(data, path, 'exec', " -"dont_inherit=True)``. (Contributed by Eric Snow and Brett Cannon " -"in :issue:`15627`.)" +"The :class:`~importlib.abc.InspectLoader` ABC defines a new method, :meth:" +"`~importlib.abc.InspectLoader.source_to_code` that accepts source data and a " +"path and returns a code object. The default implementation is equivalent to " +"``compile(data, path, 'exec', dont_inherit=True)``. (Contributed by Eric " +"Snow and Brett Cannon in :issue:`15627`.)" msgstr "" -#: ../../whatsnew/3.4.rst:988 +#: ../../whatsnew/3.4.rst:989 msgid "" ":class:`~importlib.abc.InspectLoader` also now has a default implementation " "for the :meth:`~importlib.abc.InspectLoader.get_code` method. However, it " @@ -1489,14 +1487,14 @@ msgid "" "performance reasons. (Contributed by Brett Cannon in :issue:`18072`.)" msgstr "" -#: ../../whatsnew/3.4.rst:993 +#: ../../whatsnew/3.4.rst:994 msgid "" -"The :func:`~importlib.reload` function has been moved from :mod:`!imp` " -"to :mod:`importlib` as part of the :mod:`!imp` module deprecation. " -"(Contributed by Berker Peksag in :issue:`18193`.)" +"The :func:`~importlib.reload` function has been moved from :mod:`!imp` to :" +"mod:`importlib` as part of the :mod:`!imp` module deprecation. (Contributed " +"by Berker Peksag in :issue:`18193`.)" msgstr "" -#: ../../whatsnew/3.4.rst:997 +#: ../../whatsnew/3.4.rst:998 msgid "" ":mod:`importlib.util` now has a :const:`~importlib.util.MAGIC_NUMBER` " "attribute providing access to the bytecode version number. This replaces " @@ -1504,44 +1502,43 @@ msgid "" "(Contributed by Brett Cannon in :issue:`18192`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1002 +#: ../../whatsnew/3.4.rst:1003 msgid "" -"New :mod:`importlib.util` " -"functions :func:`~importlib.util.cache_from_source` " -"and :func:`~importlib.util.source_from_cache` replace the same-named " -"functions in the deprecated :mod:`!imp` module. (Contributed by Brett " -"Cannon in :issue:`18194`.)" +"New :mod:`importlib.util` functions :func:`~importlib.util." +"cache_from_source` and :func:`~importlib.util.source_from_cache` replace the " +"same-named functions in the deprecated :mod:`!imp` module. (Contributed by " +"Brett Cannon in :issue:`18194`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1007 +#: ../../whatsnew/3.4.rst:1008 msgid "" "The :mod:`importlib` bootstrap :class:`.NamespaceLoader` now conforms to " -"the :class:`.InspectLoader` ABC, which means that ``runpy`` and ``python " -"-m`` can now be used with namespace packages. (Contributed by Brett Cannon " +"the :class:`.InspectLoader` ABC, which means that ``runpy`` and ``python -" +"m`` can now be used with namespace packages. (Contributed by Brett Cannon " "in :issue:`18058`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1012 +#: ../../whatsnew/3.4.rst:1013 msgid "" -":mod:`importlib.util` has a new " -"function :func:`~importlib.util.decode_source` that decodes source from " -"bytes using universal newline processing. This is useful for " -"implementing :meth:`.InspectLoader.get_source` methods." +":mod:`importlib.util` has a new function :func:`~importlib.util." +"decode_source` that decodes source from bytes using universal newline " +"processing. This is useful for implementing :meth:`.InspectLoader." +"get_source` methods." msgstr "" -#: ../../whatsnew/3.4.rst:1016 +#: ../../whatsnew/3.4.rst:1017 msgid "" -":class:`importlib.machinery.ExtensionFileLoader` now has " -"a :meth:`~importlib.machinery.ExtensionFileLoader.get_filename` method. " -"This was inadvertently omitted in the original implementation. (Contributed " -"by Eric Snow in :issue:`19152`.)" +":class:`importlib.machinery.ExtensionFileLoader` now has a :meth:`~importlib." +"machinery.ExtensionFileLoader.get_filename` method. This was inadvertently " +"omitted in the original implementation. (Contributed by Eric Snow in :issue:" +"`19152`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1023 +#: ../../whatsnew/3.4.rst:1024 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.4.rst:1025 +#: ../../whatsnew/3.4.rst:1026 msgid "" "The :mod:`inspect` module now offers a basic :ref:`command line interface " "` to quickly display source code and other information " @@ -1549,7 +1546,7 @@ msgid "" "Coghlan in :issue:`18626`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1030 +#: ../../whatsnew/3.4.rst:1031 msgid "" ":func:`~inspect.unwrap` makes it easy to unravel wrapper function chains " "created by :func:`functools.wraps` (and any other API that sets the " @@ -1557,161 +1554,154 @@ msgid "" "Urban, Aaron Iles and Nick Coghlan in :issue:`13266`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1035 +#: ../../whatsnew/3.4.rst:1036 msgid "" -"As part of the implementation of the new :mod:`enum` module, " -"the :mod:`inspect` module now has substantially better support for custom " -"``__dir__`` methods and dynamic class attributes provided through " -"metaclasses. (Contributed by Ethan Furman in :issue:`18929` " -"and :issue:`19030`.)" +"As part of the implementation of the new :mod:`enum` module, the :mod:" +"`inspect` module now has substantially better support for custom ``__dir__`` " +"methods and dynamic class attributes provided through metaclasses. " +"(Contributed by Ethan Furman in :issue:`18929` and :issue:`19030`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1041 +#: ../../whatsnew/3.4.rst:1042 msgid "" -":func:`~inspect.getfullargspec` and :func:`~inspect.getargspec` now use " -"the :func:`~inspect.signature` API. This allows them to support a much " -"broader range of callables, including those with ``__signature__`` " -"attributes, those with metadata provided by argument " -"clinic, :func:`functools.partial` objects and more. Note that, " -"unlike :func:`~inspect.signature`, these functions still ignore " -"``__wrapped__`` attributes, and report the already bound first argument for " -"bound methods, so it is still necessary to update your code to " +":func:`~inspect.getfullargspec` and :func:`~inspect.getargspec` now use the :" +"func:`~inspect.signature` API. This allows them to support a much broader " +"range of callables, including those with ``__signature__`` attributes, those " +"with metadata provided by argument clinic, :func:`functools.partial` objects " +"and more. Note that, unlike :func:`~inspect.signature`, these functions " +"still ignore ``__wrapped__`` attributes, and report the already bound first " +"argument for bound methods, so it is still necessary to update your code to " "use :func:`~inspect.signature` directly if those features are desired. " "(Contributed by Yury Selivanov in :issue:`17481`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1052 +#: ../../whatsnew/3.4.rst:1053 msgid "" ":func:`~inspect.signature` now supports duck types of CPython functions, " "which adds support for functions compiled with Cython. (Contributed by " "Stefan Behnel and Yury Selivanov in :issue:`17159`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1058 +#: ../../whatsnew/3.4.rst:1059 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.4.rst:1060 +#: ../../whatsnew/3.4.rst:1061 msgid "" -":mod:`ipaddress` was added to the standard library in Python 3.3 as " -"a :term:`provisional API`. With the release of Python 3.4, this " -"qualification has been removed: :mod:`ipaddress` is now considered a stable " -"API, covered by the normal standard library requirements to maintain " -"backwards compatibility." +":mod:`ipaddress` was added to the standard library in Python 3.3 as a :term:" +"`provisional API`. With the release of Python 3.4, this qualification has " +"been removed: :mod:`ipaddress` is now considered a stable API, covered by " +"the normal standard library requirements to maintain backwards compatibility." msgstr "" -#: ../../whatsnew/3.4.rst:1066 +#: ../../whatsnew/3.4.rst:1067 msgid "" "A new :attr:`~ipaddress.IPv4Address.is_global` property is ``True`` if an " -"address is globally routeable. (Contributed by Peter Moody " -"in :issue:`17400`.)" +"address is globally routeable. (Contributed by Peter Moody in :issue:" +"`17400`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1072 +#: ../../whatsnew/3.4.rst:1073 msgid "logging" msgstr "logging" -#: ../../whatsnew/3.4.rst:1074 +#: ../../whatsnew/3.4.rst:1075 msgid "" "The :class:`~logging.handlers.TimedRotatingFileHandler` has a new *atTime* " "parameter that can be used to specify the time of day when rollover should " "happen. (Contributed by Ronald Oussoren in :issue:`9556`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1078 +#: ../../whatsnew/3.4.rst:1079 msgid "" -":class:`~logging.handlers.SocketHandler` " -"and :class:`~logging.handlers.DatagramHandler` now support Unix domain " -"sockets (by setting *port* to ``None``). (Contributed by Vinay Sajip in " -"commit ce46195b56a9.)" +":class:`~logging.handlers.SocketHandler` and :class:`~logging.handlers." +"DatagramHandler` now support Unix domain sockets (by setting *port* to " +"``None``). (Contributed by Vinay Sajip in commit ce46195b56a9.)" msgstr "" -#: ../../whatsnew/3.4.rst:1083 +#: ../../whatsnew/3.4.rst:1084 msgid "" -":func:`~logging.config.fileConfig` now accepts " -"a :class:`configparser.RawConfigParser` subclass instance for the *fname* " -"parameter. This facilitates using a configuration file when logging " -"configuration is just a part of the overall application configuration, or " -"where the application modifies the configuration before passing it " -"to :func:`~logging.config.fileConfig`. (Contributed by Vinay Sajip " -"in :issue:`16110`.)" +":func:`~logging.config.fileConfig` now accepts a :class:`configparser." +"RawConfigParser` subclass instance for the *fname* parameter. This " +"facilitates using a configuration file when logging configuration is just a " +"part of the overall application configuration, or where the application " +"modifies the configuration before passing it to :func:`~logging.config." +"fileConfig`. (Contributed by Vinay Sajip in :issue:`16110`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1091 +#: ../../whatsnew/3.4.rst:1092 msgid "" -"Logging configuration data received from a socket via " -"the :func:`logging.config.listen` function can now be validated before being " -"processed by supplying a verification function as the argument to the new " -"*verify* keyword argument. (Contributed by Vinay Sajip in :issue:`15452`.)" +"Logging configuration data received from a socket via the :func:`logging." +"config.listen` function can now be validated before being processed by " +"supplying a verification function as the argument to the new *verify* " +"keyword argument. (Contributed by Vinay Sajip in :issue:`15452`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1100 +#: ../../whatsnew/3.4.rst:1101 msgid "marshal" msgstr "marshal" -#: ../../whatsnew/3.4.rst:1102 +#: ../../whatsnew/3.4.rst:1103 msgid "" "The default :mod:`marshal` version has been bumped to 3. The code " "implementing the new version restores the Python2 behavior of recording only " "one copy of interned strings and preserving the interning on " "deserialization, and extends this \"one copy\" ability to any object type " -"(including handling recursive references). This reduces both the size of " -"``.pyc`` files and the amount of memory a module occupies in memory when it " -"is loaded from a ``.pyc`` (or ``.pyo``) file. (Contributed by Kristján " -"Valur Jónsson in :issue:`16475`, with additional speedups by Antoine Pitrou " -"in :issue:`19219`.)" +"(including handling recursive references). This reduces both the size of ``." +"pyc`` files and the amount of memory a module occupies in memory when it is " +"loaded from a ``.pyc`` (or ``.pyo``) file. (Contributed by Kristján Valur " +"Jónsson in :issue:`16475`, with additional speedups by Antoine Pitrou in :" +"issue:`19219`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1113 +#: ../../whatsnew/3.4.rst:1114 msgid "mmap" msgstr "mmap" -#: ../../whatsnew/3.4.rst:1115 +#: ../../whatsnew/3.4.rst:1116 msgid "" "mmap objects are now :ref:`weakly referenceable `. (Contributed " "by Valerie Lambert in :issue:`4885`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1120 +#: ../../whatsnew/3.4.rst:1121 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.4.rst:1124 +#: ../../whatsnew/3.4.rst:1125 msgid "" "On Unix two new :ref:`start methods `, " -"``spawn`` and ``forkserver``, have been added for starting processes " -"using :mod:`multiprocessing`. These make the mixing of processes with " -"threads more robust, and the ``spawn`` method matches the semantics that " -"multiprocessing has always used on Windows. New " -"function :func:`~multiprocessing.get_all_start_methods` reports all start " -"methods available on the platform, :func:`~multiprocessing.get_start_method` " -"reports the current start method, " +"``spawn`` and ``forkserver``, have been added for starting processes using :" +"mod:`multiprocessing`. These make the mixing of processes with threads more " +"robust, and the ``spawn`` method matches the semantics that multiprocessing " +"has always used on Windows. New function :func:`~multiprocessing." +"get_all_start_methods` reports all start methods available on the platform, :" +"func:`~multiprocessing.get_start_method` reports the current start method, " "and :func:`~multiprocessing.set_start_method` sets the start method. " "(Contributed by Richard Oudkerk in :issue:`8713`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1134 +#: ../../whatsnew/3.4.rst:1135 msgid "" ":mod:`multiprocessing` also now has the concept of a ``context``, which " -"determines how child processes are created. New " -"function :func:`~multiprocessing.get_context` returns a context that uses a " -"specified start method. It has the same API as the :mod:`multiprocessing` " -"module itself, so you can use it to " -"create :class:`~multiprocessing.pool.Pool`\\ s and other objects that will " -"operate within that context. This allows a framework and an application or " -"different parts of the same application to use multiprocessing without " -"interfering with each other. (Contributed by Richard Oudkerk " -"in :issue:`18999`.)" +"determines how child processes are created. New function :func:" +"`~multiprocessing.get_context` returns a context that uses a specified start " +"method. It has the same API as the :mod:`multiprocessing` module itself, so " +"you can use it to create :class:`~multiprocessing.pool.Pool`\\ s and other " +"objects that will operate within that context. This allows a framework and " +"an application or different parts of the same application to use " +"multiprocessing without interfering with each other. (Contributed by " +"Richard Oudkerk in :issue:`18999`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1144 +#: ../../whatsnew/3.4.rst:1145 msgid "" "Except when using the old *fork* start method, child processes no longer " -"inherit unneeded handles/file descriptors from their parents (part " -"of :issue:`8713`)." +"inherit unneeded handles/file descriptors from their parents (part of :issue:" +"`8713`)." msgstr "" -#: ../../whatsnew/3.4.rst:1148 +#: ../../whatsnew/3.4.rst:1149 msgid "" ":mod:`multiprocessing` now relies on :mod:`runpy` (which implements the ``-" "m`` switch) to initialise ``__main__`` appropriately in child processes when " @@ -1721,11 +1711,11 @@ msgid "" "(Contributed by Nick Coghlan in :issue:`19946`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1157 +#: ../../whatsnew/3.4.rst:1158 msgid "operator" msgstr "operator" -#: ../../whatsnew/3.4.rst:1159 +#: ../../whatsnew/3.4.rst:1160 msgid "" "New function :func:`~operator.length_hint` provides an implementation of the " "specification for how the :meth:`~object.__length_hint__` special method " @@ -1733,63 +1723,63 @@ msgid "" "language feature. (Contributed by Armin Ronacher in :issue:`16148`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1164 +#: ../../whatsnew/3.4.rst:1165 msgid "" "There is now a pure-python version of the :mod:`operator` module available " "for reference and for use by alternate implementations of Python. " "(Contributed by Zachary Ware in :issue:`16694`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1170 +#: ../../whatsnew/3.4.rst:1171 msgid "os" msgstr "os" -#: ../../whatsnew/3.4.rst:1172 +#: ../../whatsnew/3.4.rst:1173 msgid "" "There are new functions to get and set the :ref:`inheritable flag " -"` of a file descriptor " -"(:func:`os.get_inheritable`, :func:`os.set_inheritable`) or a Windows handle " -"(:func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable`)." +"` of a file descriptor (:func:`os.get_inheritable`, :func:" +"`os.set_inheritable`) or a Windows handle (:func:`os." +"get_handle_inheritable`, :func:`os.set_handle_inheritable`)." msgstr "" -#: ../../whatsnew/3.4.rst:1177 +#: ../../whatsnew/3.4.rst:1178 msgid "" "New function :func:`~os.cpu_count` reports the number of CPUs available on " "the platform on which Python is running (or ``None`` if the count can't be " "determined). The :func:`multiprocessing.cpu_count` function is now " "implemented in terms of this function). (Contributed by Trent Nelson, " -"Yogesh Chaudhari, Victor Stinner, and Charles-François Natali " -"in :issue:`17914`.)" +"Yogesh Chaudhari, Victor Stinner, and Charles-François Natali in :issue:" +"`17914`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1183 +#: ../../whatsnew/3.4.rst:1184 msgid "" -":func:`os.path.samestat` is now available on the Windows platform (and " -"the :func:`os.path.samefile` implementation is now shared between Unix and " +":func:`os.path.samestat` is now available on the Windows platform (and the :" +"func:`os.path.samefile` implementation is now shared between Unix and " "Windows). (Contributed by Brian Curtin in :issue:`11939`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1187 +#: ../../whatsnew/3.4.rst:1188 msgid "" ":func:`os.path.ismount` now recognizes volumes mounted below a drive root on " "Windows. (Contributed by Tim Golden in :issue:`9035`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1190 +#: ../../whatsnew/3.4.rst:1191 msgid "" -":func:`os.open` supports two new flags on platforms that provide " -"them, :const:`~os.O_PATH` (un-opened file descriptor), " -"and :const:`~os.O_TMPFILE` (unnamed temporary file; as of 3.4.0 release " -"available only on Linux systems with a kernel version of 3.11 or newer that " -"have uapi headers). (Contributed by Christian Heimes in :issue:`18673` and " -"Benjamin Peterson, respectively.)" +":func:`os.open` supports two new flags on platforms that provide them, :" +"const:`~os.O_PATH` (un-opened file descriptor), and :const:`~os.O_TMPFILE` " +"(unnamed temporary file; as of 3.4.0 release available only on Linux systems " +"with a kernel version of 3.11 or newer that have uapi headers). " +"(Contributed by Christian Heimes in :issue:`18673` and Benjamin Peterson, " +"respectively.)" msgstr "" -#: ../../whatsnew/3.4.rst:1198 +#: ../../whatsnew/3.4.rst:1199 msgid "pdb" msgstr "pdb" -#: ../../whatsnew/3.4.rst:1200 +#: ../../whatsnew/3.4.rst:1201 msgid "" ":mod:`pdb` has been enhanced to handle generators, :keyword:`yield`, and " "``yield from`` in a more useful fashion. This is especially helpful when " @@ -1797,7 +1787,7 @@ msgid "" "Xavier de Gaye in :issue:`16596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1205 +#: ../../whatsnew/3.4.rst:1206 msgid "" "The ``print`` command has been removed from :mod:`pdb`, restoring access to " "the Python :func:`print` function from the pdb command line. Python2's " @@ -1810,130 +1800,128 @@ msgid "" "(Contributed by Connor Osborn in :issue:`18764`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1219 +#: ../../whatsnew/3.4.rst:1220 msgid "pickle" msgstr "pickle" -#: ../../whatsnew/3.4.rst:1221 +#: ../../whatsnew/3.4.rst:1222 msgid "" ":mod:`pickle` now supports (but does not use by default) a new pickle " "protocol, protocol 4. This new protocol addresses a number of issues that " "were present in previous protocols, such as the serialization of nested " -"classes, very large strings and containers, and classes " -"whose :meth:`__new__` method takes keyword-only arguments. It also provides " -"some efficiency improvements." +"classes, very large strings and containers, and classes whose :meth:`~object." +"__new__` method takes keyword-only arguments. It also provides some " +"efficiency improvements." msgstr "" -#: ../../whatsnew/3.4.rst:1229 +#: ../../whatsnew/3.4.rst:1230 msgid ":pep:`3154` -- Pickle protocol 4" msgstr ":pep:`3154` -- Pickle 協定 4" -#: ../../whatsnew/3.4.rst:1230 +#: ../../whatsnew/3.4.rst:1231 msgid "PEP written by Antoine Pitrou and implemented by Alexandre Vassalotti." msgstr "由 Antoine Pitrou 撰寫 PEP、Alexandre Vassalotti 實作。" -#: ../../whatsnew/3.4.rst:1234 +#: ../../whatsnew/3.4.rst:1235 msgid "plistlib" msgstr "plistlib" -#: ../../whatsnew/3.4.rst:1236 +#: ../../whatsnew/3.4.rst:1237 msgid "" ":mod:`plistlib` now has an API that is similar to the standard pattern for " -"stdlib serialization protocols, with " -"new :func:`~plistlib.load`, :func:`~plistlib.dump`, :func:`~plistlib.loads`, " -"and :func:`~plistlib.dumps` functions. (The older API is now deprecated.) " -"In addition to the already supported XML plist format " -"(:const:`~plistlib.FMT_XML`), it also now supports the binary plist format " -"(:const:`~plistlib.FMT_BINARY`). (Contributed by Ronald Oussoren and others " -"in :issue:`14455`.)" +"stdlib serialization protocols, with new :func:`~plistlib.load`, :func:" +"`~plistlib.dump`, :func:`~plistlib.loads`, and :func:`~plistlib.dumps` " +"functions. (The older API is now deprecated.) In addition to the already " +"supported XML plist format (:const:`~plistlib.FMT_XML`), it also now " +"supports the binary plist format (:const:`~plistlib.FMT_BINARY`). " +"(Contributed by Ronald Oussoren and others in :issue:`14455`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1246 +#: ../../whatsnew/3.4.rst:1247 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.4.rst:1248 +#: ../../whatsnew/3.4.rst:1249 msgid "" "Two new methods have been added to :mod:`poplib`: :meth:`~poplib.POP3.capa`, " -"which returns the list of capabilities advertised by the POP server, " -"and :meth:`~poplib.POP3.stls`, which switches a clear-text POP3 session into " -"an encrypted POP3 session if the POP server supports it. (Contributed by " +"which returns the list of capabilities advertised by the POP server, and :" +"meth:`~poplib.POP3.stls`, which switches a clear-text POP3 session into an " +"encrypted POP3 session if the POP server supports it. (Contributed by " "Lorenzo Catucci in :issue:`4473`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1256 +#: ../../whatsnew/3.4.rst:1257 msgid "pprint" msgstr "pprint" -#: ../../whatsnew/3.4.rst:1258 +#: ../../whatsnew/3.4.rst:1259 msgid "" -"The :mod:`pprint` module's :class:`~pprint.PrettyPrinter` class and " -"its :func:`~pprint.pformat`, and :func:`~pprint.pprint` functions have a new " +"The :mod:`pprint` module's :class:`~pprint.PrettyPrinter` class and its :" +"func:`~pprint.pformat`, and :func:`~pprint.pprint` functions have a new " "option, *compact*, that controls how the output is formatted. Currently " "setting *compact* to ``True`` means that sequences will be printed with as " "many sequence elements as will fit within *width* on each (indented) line. " "(Contributed by Serhiy Storchaka in :issue:`19132`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1265 +#: ../../whatsnew/3.4.rst:1266 msgid "" "Long strings are now wrapped using Python's normal line continuation " "syntax. (Contributed by Antoine Pitrou in :issue:`17150`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1270 +#: ../../whatsnew/3.4.rst:1271 msgid "pty" msgstr "pty" -#: ../../whatsnew/3.4.rst:1272 +#: ../../whatsnew/3.4.rst:1273 msgid "" ":func:`pty.spawn` now returns the status value from :func:`os.waitpid` on " "the child process, instead of ``None``. (Contributed by Gregory P. Smith.)" msgstr "" -#: ../../whatsnew/3.4.rst:1277 +#: ../../whatsnew/3.4.rst:1278 msgid "pydoc" msgstr "pydoc" -#: ../../whatsnew/3.4.rst:1279 +#: ../../whatsnew/3.4.rst:1280 msgid "" -"The :mod:`pydoc` module is now based directly on " -"the :func:`inspect.signature` introspection API, allowing it to provide " -"signature information for a wider variety of callable objects. This change " -"also means that ``__wrapped__`` attributes are now taken into account when " -"displaying help information. (Contributed by Larry Hastings " -"in :issue:`19674`.)" +"The :mod:`pydoc` module is now based directly on the :func:`inspect." +"signature` introspection API, allowing it to provide signature information " +"for a wider variety of callable objects. This change also means that " +"``__wrapped__`` attributes are now taken into account when displaying help " +"information. (Contributed by Larry Hastings in :issue:`19674`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1285 +#: ../../whatsnew/3.4.rst:1286 msgid "" "The :mod:`pydoc` module no longer displays the ``self`` parameter for " "already bound methods. Instead, it aims to always display the exact current " -"signature of the supplied callable. (Contributed by Larry Hastings " -"in :issue:`20710`.)" +"signature of the supplied callable. (Contributed by Larry Hastings in :" +"issue:`20710`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1290 +#: ../../whatsnew/3.4.rst:1291 msgid "" "In addition to the changes that have been made to :mod:`pydoc` directly, its " "handling of custom ``__dir__`` methods and various descriptor behaviours has " -"also been improved substantially by the underlying changes in " -"the :mod:`inspect` module." +"also been improved substantially by the underlying changes in the :mod:" +"`inspect` module." msgstr "" -#: ../../whatsnew/3.4.rst:1295 +#: ../../whatsnew/3.4.rst:1296 msgid "" "As the :func:`help` builtin is based on :mod:`pydoc`, the above changes also " "affect the behaviour of :func:`help`." msgstr "" -#: ../../whatsnew/3.4.rst:1300 +#: ../../whatsnew/3.4.rst:1301 msgid "re" msgstr "re" -#: ../../whatsnew/3.4.rst:1302 +#: ../../whatsnew/3.4.rst:1303 msgid "" -"New :func:`~re.fullmatch` function and :meth:`.regex.fullmatch` method " +"New :func:`~re.fullmatch` function and :meth:`.Pattern.fullmatch` method " "anchor the pattern at both ends of the string to match. This provides a way " "to be explicit about the goal of the match, which avoids a class of subtle " "bugs where ``$`` characters get lost during code changes or the addition of " @@ -1941,7 +1929,7 @@ msgid "" "Barnett in :issue:`16203`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1309 +#: ../../whatsnew/3.4.rst:1310 msgid "" "The repr of :ref:`regex objects ` now includes the pattern and " "the flags; the repr of :ref:`match objects ` now includes the " @@ -1949,11 +1937,11 @@ msgid "" "Lopes Tavares and Serhiy Storchaka in :issue:`13592` and :issue:`17087`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1317 +#: ../../whatsnew/3.4.rst:1318 msgid "resource" msgstr "resource" -#: ../../whatsnew/3.4.rst:1319 +#: ../../whatsnew/3.4.rst:1320 msgid "" "New :func:`~resource.prlimit` function, available on Linux platforms with a " "kernel version of 2.6.36 or later and glibc of 2.13 or later, provides the " @@ -1961,28 +1949,27 @@ msgid "" "making the call. (Contributed by Christian Heimes in :issue:`16595`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1324 +#: ../../whatsnew/3.4.rst:1325 msgid "" "On Linux kernel version 2.6.36 or later, there are also some new Linux " -"specific " -"constants: :const:`~resource.RLIMIT_MSGQUEUE`, :const:`~resource.RLIMIT_NICE`, :const:`~resource.RLIMIT_RTPRIO`, :const:`~resource.RLIMIT_RTTIME`, " -"and :const:`~resource.RLIMIT_SIGPENDING`. (Contributed by Christian Heimes " -"in :issue:`19324`.)" +"specific constants: :const:`~resource.RLIMIT_MSGQUEUE`, :const:`~resource." +"RLIMIT_NICE`, :const:`~resource.RLIMIT_RTPRIO`, :const:`~resource." +"RLIMIT_RTTIME`, and :const:`~resource.RLIMIT_SIGPENDING`. (Contributed by " +"Christian Heimes in :issue:`19324`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1330 +#: ../../whatsnew/3.4.rst:1331 msgid "" -"On FreeBSD version 9 and later, there some new FreeBSD specific " -"constants: :const:`~resource.RLIMIT_SBSIZE`, :const:`~resource.RLIMIT_SWAP`, " -"and :const:`~resource.RLIMIT_NPTS`. (Contributed by Claudiu Popa " -"in :issue:`19343`.)" +"On FreeBSD version 9 and later, there some new FreeBSD specific constants: :" +"const:`~resource.RLIMIT_SBSIZE`, :const:`~resource.RLIMIT_SWAP`, and :const:" +"`~resource.RLIMIT_NPTS`. (Contributed by Claudiu Popa in :issue:`19343`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1337 +#: ../../whatsnew/3.4.rst:1338 msgid "select" msgstr "select" -#: ../../whatsnew/3.4.rst:1339 +#: ../../whatsnew/3.4.rst:1340 msgid "" ":class:`~select.epoll` objects now support the context management protocol. " "When used in a :keyword:`with` statement, the :meth:`~select.epoll.close` " @@ -1990,56 +1977,55 @@ msgid "" "by Serhiy Storchaka in :issue:`16488`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1344 +#: ../../whatsnew/3.4.rst:1345 msgid "" ":class:`~select.devpoll` objects now have :meth:`~select.devpoll.fileno` " -"and :meth:`~select.devpoll.close` methods, as well as a new " -"attribute :attr:`~select.devpoll.closed`. (Contributed by Victor Stinner " -"in :issue:`18794`.)" +"and :meth:`~select.devpoll.close` methods, as well as a new attribute :attr:" +"`~select.devpoll.closed`. (Contributed by Victor Stinner in :issue:`18794`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1351 +#: ../../whatsnew/3.4.rst:1352 msgid "shelve" msgstr "shelve" -#: ../../whatsnew/3.4.rst:1353 +#: ../../whatsnew/3.4.rst:1354 msgid "" ":class:`~shelve.Shelf` instances may now be used in :keyword:`with` " "statements, and will be automatically closed at the end of the :keyword:`!" "with` block. (Contributed by Filip Gruszczyński in :issue:`13896`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1359 +#: ../../whatsnew/3.4.rst:1360 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.4.rst:1361 +#: ../../whatsnew/3.4.rst:1362 msgid "" ":func:`~shutil.copyfile` now raises a specific :exc:`~shutil.Error` " "subclass, :exc:`~shutil.SameFileError`, when the source and destination are " "the same file, which allows an application to take appropriate action on " -"this specific error. (Contributed by Atsuo Ishimoto and Hynek Schlawack " -"in :issue:`1492704`.)" +"this specific error. (Contributed by Atsuo Ishimoto and Hynek Schlawack in :" +"issue:`1492704`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1369 +#: ../../whatsnew/3.4.rst:1370 msgid "smtpd" msgstr "smtpd" -#: ../../whatsnew/3.4.rst:1371 +#: ../../whatsnew/3.4.rst:1372 msgid "" "The :class:`!SMTPServer` and :class:`!SMTPChannel` classes now accept a " "*map* keyword argument which, if specified, is passed in to :class:`!" "asynchat.async_chat` as its *map* argument. This allows an application to " -"avoid affecting the global socket map. (Contributed by Vinay Sajip " -"in :issue:`11959`.)" +"avoid affecting the global socket map. (Contributed by Vinay Sajip in :" +"issue:`11959`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1379 +#: ../../whatsnew/3.4.rst:1380 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.4.rst:1381 +#: ../../whatsnew/3.4.rst:1382 msgid "" ":exc:`~smtplib.SMTPException` is now a subclass of :exc:`OSError`, which " "allows both socket level errors and SMTP protocol level errors to be caught " @@ -2047,45 +2033,45 @@ msgid "" "occurred. (Contributed by Ned Jackson Lovely in :issue:`2118`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1388 +#: ../../whatsnew/3.4.rst:1389 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.4.rst:1390 +#: ../../whatsnew/3.4.rst:1391 msgid "" "The socket module now supports the :const:`~socket.CAN_BCM` protocol on " "platforms that support it. (Contributed by Brian Thorne in :issue:`15359`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1393 +#: ../../whatsnew/3.4.rst:1394 msgid "" "Socket objects have new methods to get or set their :ref:`inheritable flag " -"`, :meth:`~socket.socket.get_inheritable` " -"and :meth:`~socket.socket.set_inheritable`." +"`, :meth:`~socket.socket.get_inheritable` and :meth:`~socket." +"socket.set_inheritable`." msgstr "" -#: ../../whatsnew/3.4.rst:1397 +#: ../../whatsnew/3.4.rst:1398 msgid "" "The ``socket.AF_*`` and ``socket.SOCK_*`` constants are now enumeration " "values using the new :mod:`enum` module. This allows meaningful names to be " "printed during debugging, instead of integer \"magic numbers\"." msgstr "" -#: ../../whatsnew/3.4.rst:1401 +#: ../../whatsnew/3.4.rst:1402 msgid "The :const:`~socket.AF_LINK` constant is now available on BSD and OSX." msgstr "" -#: ../../whatsnew/3.4.rst:1403 +#: ../../whatsnew/3.4.rst:1404 msgid "" ":func:`~socket.inet_pton` and :func:`~socket.inet_ntop` are now supported on " "Windows. (Contributed by Atsuo Ishimoto in :issue:`7171`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1408 +#: ../../whatsnew/3.4.rst:1409 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.4.rst:1410 +#: ../../whatsnew/3.4.rst:1411 msgid "" "A new boolean parameter to the :func:`~sqlite3.connect` function, *uri*, can " "be used to indicate that the *database* parameter is a ``uri`` (see the " @@ -2093,11 +2079,11 @@ msgid "" "(Contributed by poq in :issue:`13773`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1417 +#: ../../whatsnew/3.4.rst:1418 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.4.rst:1421 +#: ../../whatsnew/3.4.rst:1422 msgid "" ":data:`~ssl.PROTOCOL_TLSv1_1` and :data:`~ssl.PROTOCOL_TLSv1_2` (TLSv1.1 and " "TLSv1.2 support) have been added; support for these protocols is only " @@ -2105,7 +2091,7 @@ msgid "" "Michele Orrù and Antoine Pitrou in :issue:`16692`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1428 +#: ../../whatsnew/3.4.rst:1429 msgid "" "New function :func:`~ssl.create_default_context` provides a standard way to " "obtain an :class:`~ssl.SSLContext` whose settings are intended to be a " @@ -2113,149 +2099,144 @@ msgid "" "more stringent than the defaults provided by the :class:`~ssl.SSLContext` " "constructor, and may be adjusted in the future, without prior deprecation, " "if best-practice security requirements change. The new recommended best " -"practice for using stdlib libraries that support SSL is to " -"use :func:`~ssl.create_default_context` to obtain " -"an :class:`~ssl.SSLContext` object, modify it if needed, and then pass it as " -"the *context* argument of the appropriate stdlib API. (Contributed by " -"Christian Heimes in :issue:`19689`.)" +"practice for using stdlib libraries that support SSL is to use :func:`~ssl." +"create_default_context` to obtain an :class:`~ssl.SSLContext` object, modify " +"it if needed, and then pass it as the *context* argument of the appropriate " +"stdlib API. (Contributed by Christian Heimes in :issue:`19689`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1440 +#: ../../whatsnew/3.4.rst:1441 msgid "" -":class:`~ssl.SSLContext` " -"method :meth:`~ssl.SSLContext.load_verify_locations` accepts a new optional " -"argument *cadata*, which can be used to provide PEM or DER encoded " -"certificates directly via strings or bytes, respectively. (Contributed by " -"Christian Heimes in :issue:`18138`.)" +":class:`~ssl.SSLContext` method :meth:`~ssl.SSLContext." +"load_verify_locations` accepts a new optional argument *cadata*, which can " +"be used to provide PEM or DER encoded certificates directly via strings or " +"bytes, respectively. (Contributed by Christian Heimes in :issue:`18138`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1445 +#: ../../whatsnew/3.4.rst:1446 msgid "" "New function :func:`~ssl.get_default_verify_paths` returns a named tuple of " -"the paths and environment variables that " -"the :meth:`~ssl.SSLContext.set_default_verify_paths` method uses to set " -"OpenSSL's default ``cafile`` and ``capath``. This can be an aid in " -"debugging default verification issues. (Contributed by Christian Heimes " -"in :issue:`18143`.)" +"the paths and environment variables that the :meth:`~ssl.SSLContext." +"set_default_verify_paths` method uses to set OpenSSL's default ``cafile`` " +"and ``capath``. This can be an aid in debugging default verification " +"issues. (Contributed by Christian Heimes in :issue:`18143`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1452 +#: ../../whatsnew/3.4.rst:1453 msgid "" -":class:`~ssl.SSLContext` has a new " -"method, :meth:`~ssl.SSLContext.cert_store_stats`, that reports the number of " -"loaded ``X.509`` certs, ``X.509 CA`` certs, and certificate revocation lists " -"(``crl``\\ s), as well as a :meth:`~ssl.SSLContext.get_ca_certs` method that " -"returns a list of the loaded ``CA`` certificates. (Contributed by Christian " -"Heimes in :issue:`18147`.)" +":class:`~ssl.SSLContext` has a new method, :meth:`~ssl.SSLContext." +"cert_store_stats`, that reports the number of loaded ``X.509`` certs, " +"``X.509 CA`` certs, and certificate revocation lists (``crl``\\ s), as well " +"as a :meth:`~ssl.SSLContext.get_ca_certs` method that returns a list of the " +"loaded ``CA`` certificates. (Contributed by Christian Heimes in :issue:" +"`18147`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1459 +#: ../../whatsnew/3.4.rst:1460 msgid "" "If OpenSSL 0.9.8 or later is available, :class:`~ssl.SSLContext` has a new " "attribute :attr:`~ssl.SSLContext.verify_flags` that can be used to control " "the certificate verification process by setting it to some combination of " -"the new " -"constants :const:`~ssl.VERIFY_DEFAULT`, :const:`~ssl.VERIFY_CRL_CHECK_LEAF`, :const:`~ssl.VERIFY_CRL_CHECK_CHAIN`, " -"or :const:`~ssl.VERIFY_X509_STRICT`. OpenSSL does not do any CRL " -"verification by default. (Contributed by Christien Heimes in :issue:`8813`.)" +"the new constants :const:`~ssl.VERIFY_DEFAULT`, :const:`~ssl." +"VERIFY_CRL_CHECK_LEAF`, :const:`~ssl.VERIFY_CRL_CHECK_CHAIN`, or :const:" +"`~ssl.VERIFY_X509_STRICT`. OpenSSL does not do any CRL verification by " +"default. (Contributed by Christien Heimes in :issue:`8813`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1467 +#: ../../whatsnew/3.4.rst:1468 msgid "" -"New :class:`~ssl.SSLContext` " -"method :meth:`~ssl.SSLContext.load_default_certs` loads a set of default " -"\"certificate authority\" (CA) certificates from default locations, which " -"vary according to the platform. It can be used to load both TLS web server " -"authentication certificates (``purpose=``:data:`~ssl.Purpose.SERVER_AUTH`) " -"for a client to use to verify a server, and certificates for a server to use " -"in verifying client certificates " -"(``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`). (Contributed by Christian " -"Heimes in :issue:`19292`.)" +"New :class:`~ssl.SSLContext` method :meth:`~ssl.SSLContext." +"load_default_certs` loads a set of default \"certificate authority\" (CA) " +"certificates from default locations, which vary according to the platform. " +"It can be used to load both TLS web server authentication certificates " +"(``purpose=``:data:`~ssl.Purpose.SERVER_AUTH`) for a client to use to verify " +"a server, and certificates for a server to use in verifying client " +"certificates (``purpose=``:data:`~ssl.Purpose.CLIENT_AUTH`). (Contributed " +"by Christian Heimes in :issue:`19292`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1478 +#: ../../whatsnew/3.4.rst:1479 msgid "" -"Two new windows-only functions, :func:`~ssl.enum_certificates` " -"and :func:`~ssl.enum_crls` provide the ability to retrieve certificates, " -"certificate information, and CRLs from the Windows cert store. (Contributed " -"by Christian Heimes in :issue:`17134`.)" +"Two new windows-only functions, :func:`~ssl.enum_certificates` and :func:" +"`~ssl.enum_crls` provide the ability to retrieve certificates, certificate " +"information, and CRLs from the Windows cert store. (Contributed by " +"Christian Heimes in :issue:`17134`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1485 +#: ../../whatsnew/3.4.rst:1486 msgid "" -"Support for server-side SNI (Server Name Indication) using the " -"new :meth:`ssl.SSLContext.set_servername_callback` method. (Contributed by " -"Daniel Black in :issue:`8109`.)" +"Support for server-side SNI (Server Name Indication) using the new :meth:" +"`ssl.SSLContext.set_servername_callback` method. (Contributed by Daniel " +"Black in :issue:`8109`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1489 +#: ../../whatsnew/3.4.rst:1490 msgid "" "The dictionary returned by :meth:`.SSLSocket.getpeercert` contains " "additional ``X509v3`` extension items: ``crlDistributionPoints``, " -"``calIssuers``, and ``OCSP`` URIs. (Contributed by Christian Heimes " -"in :issue:`18379`.)" +"``calIssuers``, and ``OCSP`` URIs. (Contributed by Christian Heimes in :" +"issue:`18379`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1495 +#: ../../whatsnew/3.4.rst:1496 msgid "stat" msgstr "stat" -#: ../../whatsnew/3.4.rst:1497 +#: ../../whatsnew/3.4.rst:1498 msgid "" "The :mod:`stat` module is now backed by a C implementation in :mod:`!_stat`. " "A C implementation is required as most of the values aren't standardized and " "are platform-dependent. (Contributed by Christian Heimes in :issue:`11016`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1501 +#: ../../whatsnew/3.4.rst:1502 msgid "" -"The module supports new :mod:`~stat.ST_MODE` " -"flags, :mod:`~stat.S_IFDOOR`, :const:`~stat.S_IFPORT`, " -"and :const:`~stat.S_IFWHT`. (Contributed by Christian Hiemes " -"in :issue:`11016`.)" +"The module supports new :mod:`~stat.ST_MODE` flags, :mod:`~stat.S_IFDOOR`, :" +"const:`~stat.S_IFPORT`, and :const:`~stat.S_IFWHT`. (Contributed by " +"Christian Hiemes in :issue:`11016`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1507 +#: ../../whatsnew/3.4.rst:1508 msgid "struct" msgstr "struct" -#: ../../whatsnew/3.4.rst:1509 +#: ../../whatsnew/3.4.rst:1510 msgid "" -"New function :mod:`~struct.iter_unpack` and a " -"new :meth:`struct.Struct.iter_unpack` method on compiled formats provide " -"streamed unpacking of a buffer containing repeated instances of a given " -"format of data. (Contributed by Antoine Pitrou in :issue:`17804`.)" +"New function :mod:`~struct.iter_unpack` and a new :meth:`struct.Struct." +"iter_unpack` method on compiled formats provide streamed unpacking of a " +"buffer containing repeated instances of a given format of data. (Contributed " +"by Antoine Pitrou in :issue:`17804`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1516 +#: ../../whatsnew/3.4.rst:1517 msgid "subprocess" msgstr "subprocess" -#: ../../whatsnew/3.4.rst:1518 +#: ../../whatsnew/3.4.rst:1519 msgid "" ":func:`~subprocess.check_output` now accepts an *input* argument that can be " "used to provide the contents of ``stdin`` for the command that is run. " "(Contributed by Zack Weinberg in :issue:`16624`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1522 +#: ../../whatsnew/3.4.rst:1523 msgid "" -":func:`~subprocess.getstatus` and :func:`~subprocess.getstatusoutput` now " +":func:`~subprocess.getoutput` and :func:`~subprocess.getstatusoutput` now " "work on Windows. This change was actually inadvertently made in 3.3.4. " "(Contributed by Tim Golden in :issue:`10197`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1528 +#: ../../whatsnew/3.4.rst:1529 msgid "sunau" msgstr "sunau" -#: ../../whatsnew/3.4.rst:1530 +#: ../../whatsnew/3.4.rst:1531 msgid "" "The :meth:`!getparams` method now returns a namedtuple rather than a plain " "tuple. (Contributed by Claudiu Popa in :issue:`18901`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1533 +#: ../../whatsnew/3.4.rst:1534 msgid "" ":meth:`!sunau.open` now supports the context management protocol: when used " "in a :keyword:`with` block, the ``close`` method of the returned object will " @@ -2263,28 +2244,28 @@ msgid "" "Storchaka in :issue:`18878`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1538 +#: ../../whatsnew/3.4.rst:1539 msgid "" -":meth:`.AU_write.setsampwidth` now supports 24 bit samples, thus adding " +":meth:`!AU_write.setsampwidth` now supports 24 bit samples, thus adding " "support for writing 24 sample using the module. (Contributed by Serhiy " "Storchaka in :issue:`19261`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1548 +#: ../../whatsnew/3.4.rst:1549 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.4.rst:1550 +#: ../../whatsnew/3.4.rst:1551 msgid "" "New function :func:`sys.getallocatedblocks` returns the current number of " "blocks allocated by the interpreter. (In CPython with the default ``--with-" -"pymalloc`` setting, this is allocations made through " -"the :c:func:`PyObject_Malloc` API.) This can be useful for tracking memory " -"leaks, especially if automated via a test suite. (Contributed by Antoine " -"Pitrou in :issue:`13390`.)" +"pymalloc`` setting, this is allocations made through the :c:func:" +"`PyObject_Malloc` API.) This can be useful for tracking memory leaks, " +"especially if automated via a test suite. (Contributed by Antoine Pitrou " +"in :issue:`13390`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1557 +#: ../../whatsnew/3.4.rst:1558 msgid "" "When the Python interpreter starts in :ref:`interactive mode `, it checks for an :data:`~sys.__interactivehook__` attribute " @@ -2294,29 +2275,29 @@ msgid "" "The :mod:`site` module :ref:`sets it ` to a function " "that enables tab completion and history saving (in :file:`~/.python-" "history`) if the platform supports :mod:`readline`. If you do not want this " -"(new) behavior, you can override it " -"in :envvar:`PYTHONSTARTUP`, :mod:`sitecustomize`, or :mod:`usercustomize` by " -"deleting this attribute from :mod:`sys` (or setting it to some other " -"callable). (Contributed by Éric Araujo and Antoine Pitrou in :issue:`5845`.)" +"(new) behavior, you can override it in :envvar:`PYTHONSTARTUP`, :mod:" +"`sitecustomize`, or :mod:`usercustomize` by deleting this attribute from :" +"mod:`sys` (or setting it to some other callable). (Contributed by Éric " +"Araujo and Antoine Pitrou in :issue:`5845`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1572 +#: ../../whatsnew/3.4.rst:1573 msgid "tarfile" msgstr "tarfile" -#: ../../whatsnew/3.4.rst:1574 +#: ../../whatsnew/3.4.rst:1575 msgid "" "The :mod:`tarfile` module now supports a simple :ref:`tarfile-commandline` " "when called as a script directly or via ``-m``. This can be used to create " -"and extract tarfile archives. (Contributed by Berker Peksag " -"in :issue:`13477`.)" +"and extract tarfile archives. (Contributed by Berker Peksag in :issue:" +"`13477`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1580 +#: ../../whatsnew/3.4.rst:1581 msgid "textwrap" msgstr "textwrap" -#: ../../whatsnew/3.4.rst:1582 +#: ../../whatsnew/3.4.rst:1583 msgid "" "The :class:`~textwrap.TextWrapper` class has two new attributes/constructor " "arguments: :attr:`~textwrap.TextWrapper.max_lines`, which limits the number " @@ -2326,15 +2307,15 @@ msgid "" "convenience function :func:`~textwrap.shorten` collapses all of the " "whitespace in the input to single spaces and produces a single line of a " "given *width* that ends with the *placeholder* (by default, ``[...]``). " -"(Contributed by Antoine Pitrou and Serhiy Storchaka in :issue:`18585` " -"and :issue:`18725`.)" +"(Contributed by Antoine Pitrou and Serhiy Storchaka in :issue:`18585` and :" +"issue:`18725`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1594 +#: ../../whatsnew/3.4.rst:1595 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.4.rst:1596 +#: ../../whatsnew/3.4.rst:1597 msgid "" "The :class:`~threading.Thread` object representing the main thread can be " "obtained from the new :func:`~threading.main_thread` function. In normal " @@ -2342,91 +2323,90 @@ msgid "" "started. (Contributed by Andrew Svetlov in :issue:`18882`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1603 +#: ../../whatsnew/3.4.rst:1604 msgid "traceback" msgstr "traceback" -#: ../../whatsnew/3.4.rst:1605 +#: ../../whatsnew/3.4.rst:1606 msgid "" "A new :func:`traceback.clear_frames` function takes a traceback object and " "clears the local variables in all of the frames it references, reducing the " -"amount of memory consumed. (Contributed by Andrew Kuchling " -"in :issue:`1565525`.)" +"amount of memory consumed. (Contributed by Andrew Kuchling in :issue:" +"`1565525`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1612 +#: ../../whatsnew/3.4.rst:1613 msgid "types" msgstr "types" -#: ../../whatsnew/3.4.rst:1614 +#: ../../whatsnew/3.4.rst:1615 msgid "" "A new :func:`~types.DynamicClassAttribute` descriptor provides a way to " "define an attribute that acts normally when looked up through an instance " "object, but which is routed to the *class* ``__getattr__`` when looked up " "through the class. This allows one to have properties active on a class, " -"and have virtual attributes on the class with the same name (see :mod:`Enum` " +"and have virtual attributes on the class with the same name (see :mod:`enum` " "for an example). (Contributed by Ethan Furman in :issue:`19030`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1623 +#: ../../whatsnew/3.4.rst:1624 msgid "urllib" msgstr "urllib" -#: ../../whatsnew/3.4.rst:1625 +#: ../../whatsnew/3.4.rst:1626 msgid "" -":mod:`urllib.request` now supports ``data:`` URLs via " -"the :class:`~urllib.request.DataHandler` class. (Contributed by Mathias " -"Panzenböck in :issue:`16423`.)" +":mod:`urllib.request` now supports ``data:`` URLs via the :class:`~urllib." +"request.DataHandler` class. (Contributed by Mathias Panzenböck in :issue:" +"`16423`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1629 +#: ../../whatsnew/3.4.rst:1630 msgid "" "The http method that will be used by a :class:`~urllib.request.Request` " -"class can now be specified by setting " -"a :class:`~urllib.request.Request.method` class attribute on the subclass. " -"(Contributed by Jason R Coombs in :issue:`18978`.)" +"class can now be specified by setting a :class:`~urllib.request.Request." +"method` class attribute on the subclass. (Contributed by Jason R Coombs in :" +"issue:`18978`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1634 +#: ../../whatsnew/3.4.rst:1635 msgid "" -":class:`~urllib.request.Request` objects are now reusable: if " -"the :attr:`~urllib.request.Request.full_url` " -"or :attr:`~urllib.request.Request.data` attributes are modified, all " -"relevant internal properties are updated. This means, for example, that it " -"is now possible to use the same :class:`~urllib.request.Request` object in " -"more than one :meth:`.OpenerDirector.open` call with different *data* " -"arguments, or to modify a :class:`~urllib.request.Request`\\ 's ``url`` " -"rather than recomputing it from scratch. There is also a " -"new :meth:`~urllib.request.Request.remove_header` method that can be used to " -"remove headers from a :class:`~urllib.request.Request`. (Contributed by " -"Alexey Kachayev in :issue:`16464`, Daniel Wozniak in :issue:`17485`, and " -"Damien Brecht and Senthil Kumaran in :issue:`17272`.)" +":class:`~urllib.request.Request` objects are now reusable: if the :attr:" +"`~urllib.request.Request.full_url` or :attr:`~urllib.request.Request.data` " +"attributes are modified, all relevant internal properties are updated. This " +"means, for example, that it is now possible to use the same :class:`~urllib." +"request.Request` object in more than one :meth:`.OpenerDirector.open` call " +"with different *data* arguments, or to modify a :class:`~urllib.request." +"Request`\\ 's ``url`` rather than recomputing it from scratch. There is " +"also a new :meth:`~urllib.request.Request.remove_header` method that can be " +"used to remove headers from a :class:`~urllib.request.Request`. " +"(Contributed by Alexey Kachayev in :issue:`16464`, Daniel Wozniak in :issue:" +"`17485`, and Damien Brecht and Senthil Kumaran in :issue:`17272`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1647 +#: ../../whatsnew/3.4.rst:1648 msgid "" -":class:`~urllib.error.HTTPError` objects now have " -"a :attr:`~urllib.error.HTTPError.headers` attribute that provides access to " -"the HTTP response headers associated with the error. (Contributed by Berker " -"Peksag in :issue:`15701`.)" +":class:`~urllib.error.HTTPError` objects now have a :attr:`~urllib.error." +"HTTPError.headers` attribute that provides access to the HTTP response " +"headers associated with the error. (Contributed by Berker Peksag in :issue:" +"`15701`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1654 +#: ../../whatsnew/3.4.rst:1655 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.4.rst:1656 +#: ../../whatsnew/3.4.rst:1657 msgid "" -"The :class:`~unittest.TestCase` class has a new " -"method, :meth:`~unittest.TestCase.subTest`, that produces a context manager " -"whose :keyword:`with` block becomes a \"sub-test\". This context manager " -"allows a test method to dynamically generate subtests by, say, calling the " -"``subTest`` context manager inside a loop. A single test method can thereby " -"produce an indefinite number of separately identified and separately counted " -"tests, all of which will run even if one or more of them fail. For example::" +"The :class:`~unittest.TestCase` class has a new method, :meth:`~unittest." +"TestCase.subTest`, that produces a context manager whose :keyword:`with` " +"block becomes a \"sub-test\". This context manager allows a test method to " +"dynamically generate subtests by, say, calling the ``subTest`` context " +"manager inside a loop. A single test method can thereby produce an " +"indefinite number of separately identified and separately counted tests, all " +"of which will run even if one or more of them fail. For example::" msgstr "" -#: ../../whatsnew/3.4.rst:1664 +#: ../../whatsnew/3.4.rst:1665 msgid "" "class NumbersTest(unittest.TestCase):\n" " def test_even(self):\n" @@ -2440,7 +2420,7 @@ msgstr "" " with self.subTest(i=i):\n" " self.assertEqual(i % 2, 0)" -#: ../../whatsnew/3.4.rst:1670 +#: ../../whatsnew/3.4.rst:1671 msgid "" "will result in six subtests, each identified in the unittest verbose output " "with a label consisting of the variable name ``i`` and a particular value " @@ -2448,28 +2428,28 @@ msgid "" "version of this example. (Contributed by Antoine Pitrou in :issue:`16997`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1675 +#: ../../whatsnew/3.4.rst:1676 msgid "" ":func:`unittest.main` now accepts an iterable of test names for " "*defaultTest*, where previously it only accepted a single test name as a " "string. (Contributed by Jyrki Pulliainen in :issue:`15132`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1679 +#: ../../whatsnew/3.4.rst:1680 msgid "" "If :class:`~unittest.SkipTest` is raised during test discovery (that is, at " "the module level in the test file), it is now reported as a skip instead of " "an error. (Contributed by Zach Ware in :issue:`16935`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1683 +#: ../../whatsnew/3.4.rst:1684 msgid "" ":meth:`~unittest.TestLoader.discover` now sorts the discovered files to " "provide consistent test ordering. (Contributed by Martin Melin and Jeff " "Ramnani in :issue:`16709`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1687 +#: ../../whatsnew/3.4.rst:1688 msgid "" ":class:`~unittest.TestSuite` now drops references to tests as soon as the " "test has been run, if the test is successful. On Python interpreters that " @@ -2480,25 +2460,25 @@ msgid "" "Wardill, Matt McClure, and Andrew Svetlov in :issue:`11798`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1695 +#: ../../whatsnew/3.4.rst:1696 msgid "" "A new test assertion context-manager, :meth:`~unittest.TestCase.assertLogs`, " -"will ensure that a given block of code emits a log message using " -"the :mod:`logging` module. By default the message can come from any logger " -"and have a priority of ``INFO`` or higher, but both the logger name and an " +"will ensure that a given block of code emits a log message using the :mod:" +"`logging` module. By default the message can come from any logger and have " +"a priority of ``INFO`` or higher, but both the logger name and an " "alternative minimum logging level may be specified. The object returned by " "the context manager can be queried for the :class:`~logging.LogRecord`\\ s " "and/or formatted messages that were logged. (Contributed by Antoine Pitrou " "in :issue:`18937`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1704 +#: ../../whatsnew/3.4.rst:1705 msgid "" "Test discovery now works with namespace packages (Contributed by Claudiu " "Popa in :issue:`17457`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1707 +#: ../../whatsnew/3.4.rst:1708 msgid "" ":mod:`unittest.mock` objects now inspect their specification signatures when " "matching calls, which means an argument can now be matched by either " @@ -2506,72 +2486,72 @@ msgid "" "Pitrou in :issue:`17015`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1712 +#: ../../whatsnew/3.4.rst:1713 msgid "" -":func:`~mock.mock_open` objects now have ``readline`` and ``readlines`` " -"methods. (Contributed by Toshio Kuratomi in :issue:`17467`.)" +":func:`~unittest.mock.mock_open` objects now have ``readline`` and " +"``readlines`` methods. (Contributed by Toshio Kuratomi in :issue:`17467`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1717 +#: ../../whatsnew/3.4.rst:1718 msgid "venv" msgstr "venv" -#: ../../whatsnew/3.4.rst:1719 +#: ../../whatsnew/3.4.rst:1720 msgid "" ":mod:`venv` now includes activation scripts for the ``csh`` and ``fish`` " "shells. (Contributed by Andrew Svetlov in :issue:`15417`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1722 +#: ../../whatsnew/3.4.rst:1723 msgid "" ":class:`~venv.EnvBuilder` and the :func:`~venv.create` convenience function " "take a new keyword argument *with_pip*, which defaults to ``False``, that " "controls whether or not :class:`~venv.EnvBuilder` ensures that ``pip`` is " -"installed in the virtual environment. (Contributed by Nick Coghlan " -"in :issue:`19552` as part of the :pep:`453` implementation.)" +"installed in the virtual environment. (Contributed by Nick Coghlan in :" +"issue:`19552` as part of the :pep:`453` implementation.)" msgstr "" -#: ../../whatsnew/3.4.rst:1730 +#: ../../whatsnew/3.4.rst:1731 msgid "wave" msgstr "wave" -#: ../../whatsnew/3.4.rst:1732 +#: ../../whatsnew/3.4.rst:1733 msgid "" -"The :meth:`~wave.getparams` method now returns a namedtuple rather than a " -"plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.)" +"The :meth:`~wave.Wave_read.getparams` method now returns a namedtuple rather " +"than a plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1735 +#: ../../whatsnew/3.4.rst:1736 msgid "" ":meth:`wave.open` now supports the context management protocol. " "(Contributed by Claudiu Popa in :issue:`17616`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1738 +#: ../../whatsnew/3.4.rst:1739 msgid "" ":mod:`wave` can now :ref:`write output to unseekable files `. (Contributed by David Jones, Guilherme Polo, and Serhiy " "Storchaka in :issue:`5202`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1742 +#: ../../whatsnew/3.4.rst:1743 msgid "" -"The :meth:`~wave.Wave_write.writeframesraw` " -"and :meth:`~wave.Wave_write.writeframes` methods now accept any :term:`bytes-" -"like object`. (Contributed by Serhiy Storchaka in :issue:`8311`.)" +"The :meth:`~wave.Wave_write.writeframesraw` and :meth:`~wave.Wave_write." +"writeframes` methods now accept any :term:`bytes-like object`. (Contributed " +"by Serhiy Storchaka in :issue:`8311`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1748 +#: ../../whatsnew/3.4.rst:1749 msgid "weakref" msgstr "weakref" -#: ../../whatsnew/3.4.rst:1750 +#: ../../whatsnew/3.4.rst:1751 msgid "" "New :class:`~weakref.WeakMethod` class simulates weak references to bound " "methods. (Contributed by Antoine Pitrou in :issue:`14631`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1753 +#: ../../whatsnew/3.4.rst:1754 msgid "" "New :class:`~weakref.finalize` class makes it possible to register a " "callback to be invoked when an object is garbage collected, without needing " @@ -2579,106 +2559,105 @@ msgid "" "(Contributed by Richard Oudkerk in :issue:`15528`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1758 +#: ../../whatsnew/3.4.rst:1759 msgid "" "The callback, if any, associated with a :class:`~weakref.ref` is now exposed " "via the :attr:`~weakref.ref.__callback__` attribute. (Contributed by Mark " "Dickinson in :issue:`17643`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1764 +#: ../../whatsnew/3.4.rst:1765 msgid "xml.etree" msgstr "xml.etree" -#: ../../whatsnew/3.4.rst:1766 +#: ../../whatsnew/3.4.rst:1767 msgid "" "A new parser, :class:`~xml.etree.ElementTree.XMLPullParser`, allows a non-" -"blocking applications to parse XML documents. An example can be seen " -"at :ref:`elementtree-pull-parsing`. (Contributed by Antoine Pitrou " -"in :issue:`17741`.)" +"blocking applications to parse XML documents. An example can be seen at :" +"ref:`elementtree-pull-parsing`. (Contributed by Antoine Pitrou in :issue:" +"`17741`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1771 +#: ../../whatsnew/3.4.rst:1772 msgid "" "The :mod:`xml.etree.ElementTree` :func:`~xml.etree.ElementTree.tostring` " -"and :func:`~xml.etree.ElementTree.tostringlist` functions, and " -"the :class:`~xml.etree.ElementTree.ElementTree` :meth:`~xml.etree.ElementTree.ElementTree.write` " -"method, now have a *short_empty_elements* :ref:`keyword-only parameter " -"` providing control over whether elements with no " -"content are written in abbreviated (````) or expanded (````) form. (Contributed by Ariel Poliak and Serhiy Storchaka " -"in :issue:`14377`.)" +"and :func:`~xml.etree.ElementTree.tostringlist` functions, and the :class:" +"`~xml.etree.ElementTree.ElementTree` :meth:`~xml.etree.ElementTree." +"ElementTree.write` method, now have a *short_empty_elements* :ref:`keyword-" +"only parameter ` providing control over whether " +"elements with no content are written in abbreviated (````) or " +"expanded (````) form. (Contributed by Ariel Poliak and Serhiy " +"Storchaka in :issue:`14377`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1782 +#: ../../whatsnew/3.4.rst:1783 msgid "zipfile" msgstr "zipfile" -#: ../../whatsnew/3.4.rst:1784 +#: ../../whatsnew/3.4.rst:1785 msgid "" -"The :meth:`~zipfile.PyZipFile.writepy` method of " -"the :class:`~zipfile.PyZipFile` class has a new *filterfunc* option that can " -"be used to control which directories and files are added to the archive. " -"For example, this could be used to exclude test files from the archive. " -"(Contributed by Christian Tismer in :issue:`19274`.)" +"The :meth:`~zipfile.PyZipFile.writepy` method of the :class:`~zipfile." +"PyZipFile` class has a new *filterfunc* option that can be used to control " +"which directories and files are added to the archive. For example, this " +"could be used to exclude test files from the archive. (Contributed by " +"Christian Tismer in :issue:`19274`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1790 +#: ../../whatsnew/3.4.rst:1791 msgid "" -"The *allowZip64* parameter to :class:`~zipfile.ZipFile` " -"and :class:`~zipfile.PyZipfile` is now ``True`` by default. (Contributed by " -"William Mallard in :issue:`17201`.)" +"The *allowZip64* parameter to :class:`~zipfile.ZipFile` and :class:`~zipfile." +"PyZipFile` is now ``True`` by default. (Contributed by William Mallard in :" +"issue:`17201`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1797 +#: ../../whatsnew/3.4.rst:1798 msgid "CPython Implementation Changes" msgstr "CPython 實作變更" -#: ../../whatsnew/3.4.rst:1803 +#: ../../whatsnew/3.4.rst:1804 msgid "PEP 445: Customization of CPython Memory Allocators" msgstr "" -#: ../../whatsnew/3.4.rst:1805 +#: ../../whatsnew/3.4.rst:1806 msgid "" ":pep:`445` adds new C level interfaces to customize memory allocation in the " "CPython interpreter." msgstr "" -#: ../../whatsnew/3.4.rst:1810 +#: ../../whatsnew/3.4.rst:1811 msgid ":pep:`445` -- Add new APIs to customize Python memory allocators" msgstr "" -#: ../../whatsnew/3.4.rst:1817 +#: ../../whatsnew/3.4.rst:1818 msgid "PEP 442: Safe Object Finalization" msgstr "" -#: ../../whatsnew/3.4.rst:1819 +#: ../../whatsnew/3.4.rst:1820 msgid "" ":pep:`442` removes the current limitations and quirks of object finalization " -"in CPython. With it, objects with :meth:`__del__` methods, as well as " -"generators with :keyword:`finally` clauses, can be finalized when they are " -"part of a reference cycle." +"in CPython. With it, objects with :meth:`~object.__del__` methods, as well " +"as generators with :keyword:`finally` clauses, can be finalized when they " +"are part of a reference cycle." msgstr "" -#: ../../whatsnew/3.4.rst:1824 +#: ../../whatsnew/3.4.rst:1825 msgid "" -"As part of this change, module globals are no longer forcibly set " -"to :const:`None` during interpreter shutdown in most cases, instead relying " -"on the normal operation of the cyclic garbage collector. This avoids a " -"whole class of interpreter-shutdown-time errors, usually involving " -"``__del__`` methods, that have plagued Python since the cyclic GC was first " -"introduced." +"As part of this change, module globals are no longer forcibly set to :const:" +"`None` during interpreter shutdown in most cases, instead relying on the " +"normal operation of the cyclic garbage collector. This avoids a whole class " +"of interpreter-shutdown-time errors, usually involving ``__del__`` methods, " +"that have plagued Python since the cyclic GC was first introduced." msgstr "" -#: ../../whatsnew/3.4.rst:1833 +#: ../../whatsnew/3.4.rst:1834 msgid ":pep:`442` -- Safe object finalization" msgstr ":pep:`442` -- 安全的物件最終化" -#: ../../whatsnew/3.4.rst:1840 +#: ../../whatsnew/3.4.rst:1841 msgid "PEP 456: Secure and Interchangeable Hash Algorithm" msgstr "" -#: ../../whatsnew/3.4.rst:1842 +#: ../../whatsnew/3.4.rst:1843 msgid "" ":pep:`456` follows up on earlier security fix work done on Python's hash " "algorithm to address certain DOS attacks to which public facing APIs backed " @@ -2690,18 +2669,18 @@ msgid "" "comparison with the older FNV algorithm are trivial." msgstr "" -#: ../../whatsnew/3.4.rst:1851 +#: ../../whatsnew/3.4.rst:1852 msgid "" "The PEP adds additional fields to the :data:`sys.hash_info` named tuple to " "describe the hash algorithm in use by the currently executing binary. " "Otherwise, the PEP does not alter any existing CPython APIs." msgstr "" -#: ../../whatsnew/3.4.rst:1859 +#: ../../whatsnew/3.4.rst:1860 msgid "PEP 436: Argument Clinic" msgstr "" -#: ../../whatsnew/3.4.rst:1861 +#: ../../whatsnew/3.4.rst:1862 msgid "" "\"Argument Clinic\" (:pep:`436`) is now part of the CPython build process " "and can be used to simplify the process of defining and maintaining accurate " @@ -2709,21 +2688,21 @@ msgid "" "in C." msgstr "" -#: ../../whatsnew/3.4.rst:1866 +#: ../../whatsnew/3.4.rst:1867 msgid "" "Some standard library extension modules have been converted to use Argument " "Clinic in Python 3.4, and :mod:`pydoc` and :mod:`inspect` have been updated " "accordingly." msgstr "" -#: ../../whatsnew/3.4.rst:1870 +#: ../../whatsnew/3.4.rst:1871 msgid "" "It is expected that signature metadata for programmatic introspection will " "be added to additional callables implemented in C as part of Python 3.4 " "maintenance releases." msgstr "" -#: ../../whatsnew/3.4.rst:1875 +#: ../../whatsnew/3.4.rst:1876 msgid "" "The Argument Clinic PEP is not fully up to date with the state of the " "implementation. This has been deemed acceptable by the release manager and " @@ -2731,26 +2710,26 @@ msgid "" "available as a public API for third party use in Python 3.4." msgstr "" -#: ../../whatsnew/3.4.rst:1882 +#: ../../whatsnew/3.4.rst:1883 msgid ":pep:`436` -- The Argument Clinic DSL" msgstr "" -#: ../../whatsnew/3.4.rst:1883 +#: ../../whatsnew/3.4.rst:1884 msgid "PEP written and implemented by Larry Hastings." msgstr "由 Larry Hastings 撰寫 PEP 與實作。" -#: ../../whatsnew/3.4.rst:1887 +#: ../../whatsnew/3.4.rst:1888 msgid "Other Build and C API Changes" msgstr "其他建置和 C API 變更" -#: ../../whatsnew/3.4.rst:1889 +#: ../../whatsnew/3.4.rst:1890 msgid "" "The new :c:func:`PyType_GetSlot` function has been added to the stable ABI, " "allowing retrieval of function pointers from named type slots when using the " "limited API. (Contributed by Martin von Löwis in :issue:`17162`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1893 +#: ../../whatsnew/3.4.rst:1894 msgid "" "The new :c:func:`!Py_SetStandardStreamEncoding` pre-initialization API " "allows applications embedding the CPython interpreter to reliably force a " @@ -2758,62 +2737,60 @@ msgid "" "by Bastien Montagne and Nick Coghlan in :issue:`16129`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1898 +#: ../../whatsnew/3.4.rst:1899 msgid "" "Most Python C APIs that don't mutate string arguments are now correctly " "marked as accepting ``const char *`` rather than ``char *``. (Contributed " "by Serhiy Storchaka in :issue:`1772673`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1902 +#: ../../whatsnew/3.4.rst:1903 msgid "" "A new shell version of ``python-config`` can be used even when a python " "interpreter is not available (for example, in cross compilation scenarios)." msgstr "" -#: ../../whatsnew/3.4.rst:1905 +#: ../../whatsnew/3.4.rst:1906 msgid "" ":c:func:`PyUnicode_FromFormat` now supports width and precision " "specifications for ``%s``, ``%A``, ``%U``, ``%V``, ``%S``, and ``%R``. " "(Contributed by Ysj Ray and Victor Stinner in :issue:`7330`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1909 +#: ../../whatsnew/3.4.rst:1910 msgid "" -"New function :c:func:`PyStructSequence_InitType2` supplements the " -"existing :c:func:`PyStructSequence_InitType` function. The difference is " -"that it returns ``0`` on success and ``-1`` on failure." +"New function :c:func:`PyStructSequence_InitType2` supplements the existing :" +"c:func:`PyStructSequence_InitType` function. The difference is that it " +"returns ``0`` on success and ``-1`` on failure." msgstr "" -#: ../../whatsnew/3.4.rst:1913 +#: ../../whatsnew/3.4.rst:1914 msgid "" "The CPython source can now be compiled using the address sanity checking " "features of recent versions of GCC and clang: the false alarms in the small " -"object allocator have been silenced. (Contributed by Dhiru Kholia " -"in :issue:`18596`.)" +"object allocator have been silenced. (Contributed by Dhiru Kholia in :issue:" +"`18596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1918 +#: ../../whatsnew/3.4.rst:1919 msgid "" -"The Windows build now uses `Address Space Layout Randomization `_ and `Data " -"Execution Prevention `_. (Contributed by Christian Heimes " -"in :issue:`16632`.)" +"The Windows build now uses `Address Space Layout Randomization `_ and `Data Execution " +"Prevention `_. " +"(Contributed by Christian Heimes in :issue:`16632`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1923 +#: ../../whatsnew/3.4.rst:1924 msgid "" -"New function :c:func:`PyObject_LengthHint` is the C API equivalent " -"of :func:`operator.length_hint`. (Contributed by Armin Ronacher " -"in :issue:`16148`.)" +"New function :c:func:`PyObject_LengthHint` is the C API equivalent of :func:" +"`operator.length_hint`. (Contributed by Armin Ronacher in :issue:`16148`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1931 +#: ../../whatsnew/3.4.rst:1932 msgid "Other Improvements" msgstr "其他改進" -#: ../../whatsnew/3.4.rst:1935 +#: ../../whatsnew/3.4.rst:1936 msgid "" "The :ref:`python ` command has a new :ref:`option `, ``-I``, which causes it to run in \"isolated mode\", " @@ -2827,7 +2804,7 @@ msgid "" "scripts. (Contributed by Christian Heimes in :issue:`16499`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1946 +#: ../../whatsnew/3.4.rst:1947 msgid "" "Tab-completion is now enabled by default in the interactive interpreter on " "systems that support :mod:`readline`. History is also enabled by default, " @@ -2835,7 +2812,7 @@ msgid "" "(Contributed by Antoine Pitrou and Éric Araujo in :issue:`5845`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1951 +#: ../../whatsnew/3.4.rst:1952 msgid "" "Invoking the Python interpreter with ``--version`` now outputs the version " "to standard output instead of standard error (:issue:`18338`). Similar " @@ -2843,15 +2820,15 @@ msgid "" "have script-like invocation capabilities (:issue:`18922`)." msgstr "" -#: ../../whatsnew/3.4.rst:1956 +#: ../../whatsnew/3.4.rst:1957 msgid "" "The CPython Windows installer now adds ``.py`` to the :envvar:`PATHEXT` " "variable when extensions are registered, allowing users to run a python " -"script at the windows command prompt by just typing its name without the " -"``.py`` extension. (Contributed by Paul Moore in :issue:`18569`.)" +"script at the windows command prompt by just typing its name without the ``." +"py`` extension. (Contributed by Paul Moore in :issue:`18569`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1961 +#: ../../whatsnew/3.4.rst:1962 msgid "" "A new ``make`` target `coverage-report `_ will build python, run " @@ -2859,58 +2836,57 @@ msgid "" "using ``gcov`` and `lcov `_." msgstr "" -#: ../../whatsnew/3.4.rst:1967 +#: ../../whatsnew/3.4.rst:1968 msgid "" "The ``-R`` option to the :ref:`python regression test suite ` now " -"also checks for memory allocation leaks, " -"using :func:`sys.getallocatedblocks`. (Contributed by Antoine Pitrou " -"in :issue:`13390`.)" +"also checks for memory allocation leaks, using :func:`sys." +"getallocatedblocks`. (Contributed by Antoine Pitrou in :issue:`13390`.)" msgstr "" -":ref:`python 迴歸測試套裝 ` 的 ``-R`` 選項現在也可以透過使" -"用 :func:`sys.getallocatedblocks` 來檢查記憶體配置洩漏。(由 Antoine Pitrou " -"在 :issue:`13390` 貢獻。)" +":ref:`python 迴歸測試套裝 ` 的 ``-R`` 選項現在也可以透過使用 :func:" +"`sys.getallocatedblocks` 來檢查記憶體配置洩漏。(由 Antoine Pitrou 在 :issue:" +"`13390` 貢獻。)" -#: ../../whatsnew/3.4.rst:1972 +#: ../../whatsnew/3.4.rst:1973 msgid "``python -m`` now works with namespace packages." msgstr "``python -m`` 現在可以使用於命名空間套件。" -#: ../../whatsnew/3.4.rst:1974 +#: ../../whatsnew/3.4.rst:1975 msgid "" "The :mod:`stat` module is now implemented in C, which means it gets the " "values for its constants from the C header files, instead of having the " "values hard-coded in the python module as was previously the case." msgstr "" -#: ../../whatsnew/3.4.rst:1978 +#: ../../whatsnew/3.4.rst:1979 msgid "" "Loading multiple python modules from a single OS module (``.so``, ``.dll``) " "now works correctly (previously it silently returned the first python module " "in the file). (Contributed by Václav Šmilauer in :issue:`16421`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1982 +#: ../../whatsnew/3.4.rst:1983 msgid "" "A new opcode, :opcode:`!LOAD_CLASSDEREF`, has been added to fix a bug in the " "loading of free variables in class bodies that could be triggered by certain " -"uses of :ref:`__prepare__ `. (Contributed by Benjamin Peterson " -"in :issue:`17853`.)" +"uses of :ref:`__prepare__ `. (Contributed by Benjamin Peterson in :" +"issue:`17853`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1987 +#: ../../whatsnew/3.4.rst:1988 msgid "" "A number of MemoryError-related crashes were identified and fixed by Victor " -"Stinner using his :pep:`445`-based ``pyfailmalloc`` tool " -"(:issue:`18408`, :issue:`18520`)." +"Stinner using his :pep:`445`-based ``pyfailmalloc`` tool (:issue:`18408`, :" +"issue:`18520`)." msgstr "" -#: ../../whatsnew/3.4.rst:1991 +#: ../../whatsnew/3.4.rst:1992 msgid "" "The ``pyvenv`` command now accepts a ``--copies`` option to use copies " "rather than symlinks even on systems where symlinks are the default. " "(Contributed by Vinay Sajip in :issue:`18807`.)" msgstr "" -#: ../../whatsnew/3.4.rst:1995 +#: ../../whatsnew/3.4.rst:1996 msgid "" "The ``pyvenv`` command also accepts a ``--without-pip`` option to suppress " "the otherwise-automatic bootstrapping of pip into the virtual environment. " @@ -2918,32 +2894,32 @@ msgid "" "implementation.)" msgstr "" -#: ../../whatsnew/3.4.rst:2000 +#: ../../whatsnew/3.4.rst:2001 msgid "" -"The encoding name is now optional in the value set for " -"the :envvar:`PYTHONIOENCODING` environment variable. This makes it possible " -"to set just the error handler, without changing the default encoding. " -"(Contributed by Serhiy Storchaka in :issue:`18818`.)" +"The encoding name is now optional in the value set for the :envvar:" +"`PYTHONIOENCODING` environment variable. This makes it possible to set just " +"the error handler, without changing the default encoding. (Contributed by " +"Serhiy Storchaka in :issue:`18818`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2005 +#: ../../whatsnew/3.4.rst:2006 msgid "" "The :mod:`bz2`, :mod:`lzma`, and :mod:`gzip` module ``open`` functions now " "support ``x`` (exclusive creation) mode. (Contributed by Tim Heaney and " "Vajrasky Kok in :issue:`19201`, :issue:`19222`, and :issue:`19223`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2011 +#: ../../whatsnew/3.4.rst:2012 msgid "Significant Optimizations" msgstr "顯著最佳化" -#: ../../whatsnew/3.4.rst:2013 +#: ../../whatsnew/3.4.rst:2014 msgid "" "The UTF-32 decoder is now 3x to 4x faster. (Contributed by Serhiy Storchaka " "in :issue:`14625`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2016 +#: ../../whatsnew/3.4.rst:2017 msgid "" "The cost of hash collisions for sets is now reduced. Each hash table probe " "now checks a series of consecutive, adjacent key/hash pairs before " @@ -2956,163 +2932,160 @@ msgid "" "Raymond Hettinger in :issue:`18771`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2027 +#: ../../whatsnew/3.4.rst:2028 msgid "" "The interpreter starts about 30% faster. A couple of measures lead to the " -"speedup. The interpreter loads fewer modules on startup, e.g. " -"the :mod:`re`, :mod:`collections` and :mod:`locale` modules and their " -"dependencies are no longer imported by default. The marshal module has been " -"improved to load compiled Python code faster. (Contributed by Antoine " -"Pitrou, Christian Heimes and Victor Stinner " -"in :issue:`19219`, :issue:`19218`, :issue:`19209`, :issue:`19205` " -"and :issue:`9548`.)" +"speedup. The interpreter loads fewer modules on startup, e.g. the :mod:" +"`re`, :mod:`collections` and :mod:`locale` modules and their dependencies " +"are no longer imported by default. The marshal module has been improved to " +"load compiled Python code faster. (Contributed by Antoine Pitrou, Christian " +"Heimes and Victor Stinner in :issue:`19219`, :issue:`19218`, :issue:" +"`19209`, :issue:`19205` and :issue:`9548`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2035 +#: ../../whatsnew/3.4.rst:2036 msgid "" ":class:`bz2.BZ2File` is now as fast or faster than the Python2 version for " "most cases. :class:`lzma.LZMAFile` has also been optimized. (Contributed " "by Serhiy Storchaka and Nadeem Vawda in :issue:`16034`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2039 +#: ../../whatsnew/3.4.rst:2040 msgid "" ":func:`random.getrandbits` is 20%-40% faster for small integers (the most " "common use case). (Contributed by Serhiy Storchaka in :issue:`16674`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2042 +#: ../../whatsnew/3.4.rst:2043 msgid "" "By taking advantage of the new storage format for strings, pickling of " "strings is now significantly faster. (Contributed by Victor Stinner and " "Antoine Pitrou in :issue:`15596`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2046 +#: ../../whatsnew/3.4.rst:2047 msgid "" -"A performance issue in :meth:`io.FileIO.readall` has been solved. This " +"A performance issue in :meth:`!io.FileIO.readall` has been solved. This " "particularly affects Windows, and significantly speeds up the case of piping " "significant amounts of data through :mod:`subprocess`. (Contributed by " "Richard Oudkerk in :issue:`15758`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2051 +#: ../../whatsnew/3.4.rst:2052 msgid "" -":func:`html.escape` is now 10x faster. (Contributed by Matt Bryant " -"in :issue:`18020`.)" +":func:`html.escape` is now 10x faster. (Contributed by Matt Bryant in :" +"issue:`18020`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2054 +#: ../../whatsnew/3.4.rst:2055 msgid "" "On Windows, the native ``VirtualAlloc`` is now used instead of the CRT " "``malloc`` in ``obmalloc``. Artificial benchmarks show about a 3% memory " "savings." msgstr "" -#: ../../whatsnew/3.4.rst:2058 +#: ../../whatsnew/3.4.rst:2059 msgid "" ":func:`os.urandom` now uses a lazily opened persistent file descriptor so as " "to avoid using many file descriptors when run in parallel from multiple " "threads. (Contributed by Antoine Pitrou in :issue:`18756`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2066 +#: ../../whatsnew/3.4.rst:2067 msgid "Deprecated" msgstr "已棄用" -#: ../../whatsnew/3.4.rst:2068 +#: ../../whatsnew/3.4.rst:2069 msgid "" "This section covers various APIs and other features that have been " "deprecated in Python 3.4, and will be removed in Python 3.5 or later. In " -"most (but not all) cases, using the deprecated APIs will produce " -"a :exc:`DeprecationWarning` when the interpreter is run with deprecation " -"warnings enabled (for example, by using ``-Wd``)." +"most (but not all) cases, using the deprecated APIs will produce a :exc:" +"`DeprecationWarning` when the interpreter is run with deprecation warnings " +"enabled (for example, by using ``-Wd``)." msgstr "" -#: ../../whatsnew/3.4.rst:2076 +#: ../../whatsnew/3.4.rst:2077 msgid "Deprecations in the Python API" msgstr "已棄用的 Python API" -#: ../../whatsnew/3.4.rst:2078 +#: ../../whatsnew/3.4.rst:2079 msgid "" "As mentioned in :ref:`whatsnew-pep-451`, a number of :mod:`importlib` " "methods and functions are deprecated: :meth:`!importlib.find_loader` is " -"replaced by :func:`importlib.util.find_spec`; :meth:`!" -"importlib.machinery.PathFinder.find_module` is replaced " -"by :meth:`importlib.machinery.PathFinder.find_spec`; :meth:`!" -"importlib.abc.MetaPathFinder.find_module` is replaced " -"by :meth:`importlib.abc.MetaPathFinder.find_spec`; :meth:`!" -"importlib.abc.PathEntryFinder.find_loader` and :meth:`!find_module` are " -"replaced by :meth:`importlib.abc.PathEntryFinder.find_spec`; all of " -"the :samp:`{xxx}Loader` ABC ``load_module`` methods (:meth:`!" -"importlib.abc.Loader.load_module`, :meth:`!" -"importlib.abc.InspectLoader.load_module`, :meth:`!" -"importlib.abc.FileLoader.load_module`, :meth:`!" -"importlib.abc.SourceLoader.load_module`) should no longer be implemented, " -"instead loaders should implement an ``exec_module`` method " -"(:meth:`importlib.abc.Loader.exec_module`, :meth:`importlib.abc.InspectLoader.exec_module` :meth:`importlib.abc.SourceLoader.exec_module`) " -"and let the import system take care of the rest; and :meth:`!" -"importlib.abc.Loader.module_repr`, :meth:`!" -"importlib.util.module_for_loader`, :meth:`!importlib.util.set_loader`, " -"and :meth:`!importlib.util.set_package` are no longer needed because their " -"functions are now handled automatically by the import system." -msgstr "" - -#: ../../whatsnew/3.4.rst:2103 +"replaced by :func:`importlib.util.find_spec`; :meth:`!importlib.machinery." +"PathFinder.find_module` is replaced by :meth:`importlib.machinery.PathFinder." +"find_spec`; :meth:`!importlib.abc.MetaPathFinder.find_module` is replaced " +"by :meth:`importlib.abc.MetaPathFinder.find_spec`; :meth:`!importlib.abc." +"PathEntryFinder.find_loader` and :meth:`!find_module` are replaced by :meth:" +"`importlib.abc.PathEntryFinder.find_spec`; all of the :samp:`{xxx}Loader` " +"ABC ``load_module`` methods (:meth:`!importlib.abc.Loader.load_module`, :" +"meth:`!importlib.abc.InspectLoader.load_module`, :meth:`!importlib.abc." +"FileLoader.load_module`, :meth:`!importlib.abc.SourceLoader.load_module`) " +"should no longer be implemented, instead loaders should implement an " +"``exec_module`` method (:meth:`importlib.abc.Loader.exec_module`, :meth:" +"`importlib.abc.InspectLoader.exec_module` :meth:`importlib.abc.SourceLoader." +"exec_module`) and let the import system take care of the rest; and :meth:`!" +"importlib.abc.Loader.module_repr`, :meth:`!importlib.util." +"module_for_loader`, :meth:`!importlib.util.set_loader`, and :meth:`!" +"importlib.util.set_package` are no longer needed because their functions are " +"now handled automatically by the import system." +msgstr "" + +#: ../../whatsnew/3.4.rst:2104 msgid "" "The :mod:`!imp` module is pending deprecation. To keep compatibility with " "Python 2/3 code bases, the module's removal is currently not scheduled." msgstr "" -#: ../../whatsnew/3.4.rst:2106 +#: ../../whatsnew/3.4.rst:2107 msgid "" -"The :mod:`formatter` module is pending deprecation and is slated for removal " -"in Python 3.6." +"The :mod:`!formatter` module is pending deprecation and is slated for " +"removal in Python 3.6." msgstr "" -#: ../../whatsnew/3.4.rst:2109 +#: ../../whatsnew/3.4.rst:2110 msgid "" "``MD5`` as the default *digestmod* for the :func:`hmac.new` function is " "deprecated. Python 3.6 will require an explicit digest name or constructor " "as *digestmod* argument." msgstr "" -#: ../../whatsnew/3.4.rst:2113 +#: ../../whatsnew/3.4.rst:2114 msgid "" "The internal ``Netrc`` class in the :mod:`ftplib` module has been documented " -"as deprecated in its docstring for quite some time. It now emits " -"a :exc:`DeprecationWarning` and will be removed completely in Python 3.5." +"as deprecated in its docstring for quite some time. It now emits a :exc:" +"`DeprecationWarning` and will be removed completely in Python 3.5." msgstr "" -#: ../../whatsnew/3.4.rst:2117 +#: ../../whatsnew/3.4.rst:2118 msgid "" "The undocumented *endtime* argument to :meth:`subprocess.Popen.wait` should " "not have been exposed and is hopefully not in use; it is deprecated and will " "mostly likely be removed in Python 3.5." msgstr "" -#: ../../whatsnew/3.4.rst:2121 +#: ../../whatsnew/3.4.rst:2122 msgid "" "The *strict* argument of :class:`~html.parser.HTMLParser` is deprecated." msgstr "" -#: ../../whatsnew/3.4.rst:2123 +#: ../../whatsnew/3.4.rst:2124 msgid "" -"The :mod:`plistlib` :func:`~plistlib.readPlist`, :func:`~plistlib.writePlist`, :func:`~plistlib.readPlistFromBytes`, " -"and :func:`~plistlib.writePlistToBytes` functions are deprecated in favor of " -"the corresponding new " -"functions :func:`~plistlib.load`, :func:`~plistlib.dump`, :func:`~plistlib.loads`, " -"and :func:`~plistlib.dumps`. :func:`~plistlib.Data` is deprecated in favor " -"of just using the :class:`bytes` constructor." +"The :mod:`plistlib` :func:`!readPlist`, :func:`!writePlist`, :func:`!" +"readPlistFromBytes`, and :func:`!writePlistToBytes` functions are deprecated " +"in favor of the corresponding new functions :func:`~plistlib.load`, :func:" +"`~plistlib.dump`, :func:`~plistlib.loads`, and :func:`~plistlib.dumps`. :" +"func:`!Data` is deprecated in favor of just using the :class:`bytes` " +"constructor." msgstr "" -#: ../../whatsnew/3.4.rst:2130 +#: ../../whatsnew/3.4.rst:2131 msgid "" "The :mod:`sysconfig` key ``SO`` is deprecated, it has been replaced by " "``EXT_SUFFIX``." msgstr "" -#: ../../whatsnew/3.4.rst:2133 +#: ../../whatsnew/3.4.rst:2134 msgid "" "The ``U`` mode accepted by various ``open`` functions is deprecated. In " "Python3 it does not do anything useful, and should be replaced by " @@ -3120,105 +3093,105 @@ msgid "" "argument." msgstr "" -#: ../../whatsnew/3.4.rst:2138 +#: ../../whatsnew/3.4.rst:2139 msgid "" "The *parser* argument of :func:`xml.etree.ElementTree.iterparse` has been " -"deprecated, as has the *html* argument " -"of :func:`~xml.etree.ElementTree.XMLParser`. To prepare for the removal of " -"the latter, all arguments to ``XMLParser`` should be passed by keyword." +"deprecated, as has the *html* argument of :func:`~xml.etree.ElementTree." +"XMLParser`. To prepare for the removal of the latter, all arguments to " +"``XMLParser`` should be passed by keyword." msgstr "" -#: ../../whatsnew/3.4.rst:2145 +#: ../../whatsnew/3.4.rst:2146 msgid "Deprecated Features" msgstr "已棄用功能" -#: ../../whatsnew/3.4.rst:2147 +#: ../../whatsnew/3.4.rst:2148 msgid "" "Running :ref:`idle` with the ``-n`` flag (no subprocess) is deprecated. " "However, the feature will not be removed until :issue:`18823` is resolved." msgstr "" -#: ../../whatsnew/3.4.rst:2150 +#: ../../whatsnew/3.4.rst:2151 msgid "" "The site module adding a \"site-python\" directory to sys.path, if it " "exists, is deprecated (:issue:`19375`)." msgstr "" -#: ../../whatsnew/3.4.rst:2156 +#: ../../whatsnew/3.4.rst:2157 msgid "Removed" msgstr "已移除" -#: ../../whatsnew/3.4.rst:2160 +#: ../../whatsnew/3.4.rst:2161 msgid "Operating Systems No Longer Supported" msgstr "不再支援的作業系統" -#: ../../whatsnew/3.4.rst:2162 +#: ../../whatsnew/3.4.rst:2163 msgid "" "Support for the following operating systems has been removed from the source " "and build tools:" msgstr "" -#: ../../whatsnew/3.4.rst:2165 +#: ../../whatsnew/3.4.rst:2166 msgid "OS/2 (:issue:`16135`)." msgstr "OS/2 (:issue:`16135`)。" -#: ../../whatsnew/3.4.rst:2166 +#: ../../whatsnew/3.4.rst:2167 msgid "Windows 2000 (changeset e52df05b496a)." msgstr "" -#: ../../whatsnew/3.4.rst:2167 +#: ../../whatsnew/3.4.rst:2168 msgid "" "Windows systems where ``COMSPEC`` points to ``command.com`` (:issue:`14470`)." msgstr "" -#: ../../whatsnew/3.4.rst:2168 +#: ../../whatsnew/3.4.rst:2169 msgid "VMS (:issue:`16136`)." msgstr "VMS (:issue:`16136`)。" -#: ../../whatsnew/3.4.rst:2172 +#: ../../whatsnew/3.4.rst:2173 msgid "API and Feature Removals" msgstr "API 與功能的移除" -#: ../../whatsnew/3.4.rst:2174 +#: ../../whatsnew/3.4.rst:2175 msgid "" "The following obsolete and previously deprecated APIs and features have been " "removed:" msgstr "" -#: ../../whatsnew/3.4.rst:2177 +#: ../../whatsnew/3.4.rst:2178 msgid "" "The unmaintained ``Misc/TextMate`` and ``Misc/vim`` directories have been " "removed (see the `devguide `_ for suggestions " "on what to use instead)." msgstr "" -#: ../../whatsnew/3.4.rst:2181 +#: ../../whatsnew/3.4.rst:2182 msgid "" "The ``SO`` makefile macro is removed (it was replaced by the " "``SHLIB_SUFFIX`` and ``EXT_SUFFIX`` macros) (:issue:`16754`)." msgstr "" -#: ../../whatsnew/3.4.rst:2184 +#: ../../whatsnew/3.4.rst:2185 msgid "" "The ``PyThreadState.tick_counter`` field has been removed; its value has " -"been meaningless since Python 3.2, when the \"new GIL\" was introduced " -"(:issue:`19199`)." +"been meaningless since Python 3.2, when the \"new GIL\" was introduced (:" +"issue:`19199`)." msgstr "" -#: ../../whatsnew/3.4.rst:2188 +#: ../../whatsnew/3.4.rst:2189 msgid "" "``PyLoader`` and ``PyPycLoader`` have been removed from :mod:`importlib`. " "(Contributed by Taras Lyapun in :issue:`15641`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2191 +#: ../../whatsnew/3.4.rst:2192 msgid "" -"The *strict* argument to :class:`~http.client.HTTPConnection` " -"and :class:`~http.client.HTTPSConnection` has been removed. HTTP 0.9-style " -"\"Simple Responses\" are no longer supported." +"The *strict* argument to :class:`~http.client.HTTPConnection` and :class:" +"`~http.client.HTTPSConnection` has been removed. HTTP 0.9-style \"Simple " +"Responses\" are no longer supported." msgstr "" -#: ../../whatsnew/3.4.rst:2195 +#: ../../whatsnew/3.4.rst:2196 msgid "" "The deprecated :mod:`urllib.request.Request` getter and setter methods " "``add_data``, ``has_data``, ``get_data``, ``get_type``, ``get_host``, " @@ -3226,19 +3199,19 @@ msgid "" "``is_unverifiable`` have been removed (use direct attribute access instead)." msgstr "" -#: ../../whatsnew/3.4.rst:2200 +#: ../../whatsnew/3.4.rst:2201 msgid "" -"Support for loading the deprecated ``TYPE_INT64`` has been removed " -"from :mod:`marshal`. (Contributed by Dan Riti in :issue:`15480`.)" +"Support for loading the deprecated ``TYPE_INT64`` has been removed from :mod:" +"`marshal`. (Contributed by Dan Riti in :issue:`15480`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2203 +#: ../../whatsnew/3.4.rst:2204 msgid "" ":class:`inspect.Signature`: positional-only parameters are now required to " "have a valid name." msgstr "" -#: ../../whatsnew/3.4.rst:2206 +#: ../../whatsnew/3.4.rst:2207 msgid "" ":meth:`object.__format__` no longer accepts non-empty format strings, it now " "raises a :exc:`TypeError` instead. Using a non-empty string has been " @@ -3246,29 +3219,29 @@ msgid "" "situation where previously working (but incorrect) code would start failing " "if an object gained a __format__ method, which means that your code may now " "raise a :exc:`TypeError` if you are using an ``'s'`` format code with " -"objects that do not have a __format__ method that handles it. " -"See :issue:`7994` for background." +"objects that do not have a __format__ method that handles it. See :issue:" +"`7994` for background." msgstr "" -#: ../../whatsnew/3.4.rst:2215 +#: ../../whatsnew/3.4.rst:2216 msgid "" -":meth:`difflib.SequenceMatcher.isbjunk` " -"and :meth:`difflib.SequenceMatcher.isbpopular` were deprecated in 3.2, and " -"have now been removed: use ``x in sm.bjunk`` and ``x in sm.bpopular``, where " -"*sm* is a :class:`~difflib.SequenceMatcher` object (:issue:`13248`)." +":meth:`!difflib.SequenceMatcher.isbjunk` and :meth:`!difflib.SequenceMatcher." +"isbpopular` were deprecated in 3.2, and have now been removed: use ``x in sm." +"bjunk`` and ``x in sm.bpopular``, where *sm* is a :class:`~difflib." +"SequenceMatcher` object (:issue:`13248`)." msgstr "" -#: ../../whatsnew/3.4.rst:2223 +#: ../../whatsnew/3.4.rst:2224 msgid "Code Cleanups" msgstr "程式碼的清除" -#: ../../whatsnew/3.4.rst:2225 +#: ../../whatsnew/3.4.rst:2226 msgid "" "The unused and undocumented internal ``Scanner`` class has been removed from " "the :mod:`pydoc` module." msgstr "" -#: ../../whatsnew/3.4.rst:2228 +#: ../../whatsnew/3.4.rst:2229 msgid "" "The private and effectively unused ``_gestalt`` module has been removed, " "along with the private :mod:`platform` functions ``_mac_ver_lookup``, " @@ -3276,83 +3249,81 @@ msgid "" "called on badly broken OSX systems (see :issue:`18393`)." msgstr "" -#: ../../whatsnew/3.4.rst:2233 +#: ../../whatsnew/3.4.rst:2234 msgid "" "The hardcoded copies of certain :mod:`stat` constants that were included in " "the :mod:`tarfile` module namespace have been removed." msgstr "" -#: ../../whatsnew/3.4.rst:2239 +#: ../../whatsnew/3.4.rst:2240 msgid "Porting to Python 3.4" msgstr "移植至 Python 3.4" -#: ../../whatsnew/3.4.rst:2241 +#: ../../whatsnew/3.4.rst:2242 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.4.rst:2246 +#: ../../whatsnew/3.4.rst:2247 msgid "Changes in 'python' Command Behavior" msgstr "" -#: ../../whatsnew/3.4.rst:2248 +#: ../../whatsnew/3.4.rst:2249 msgid "" "In a posix shell, setting the :envvar:`PATH` environment variable to an " -"empty value is equivalent to not setting it at all. However, " -"setting :envvar:`PYTHONPATH` to an empty value was *not* equivalent to not " -"setting it at all: setting :envvar:`PYTHONPATH` to an empty value was " -"equivalent to setting it to ``.``, which leads to confusion when reasoning " -"by analogy to how :envvar:`PATH` works. The behavior now conforms to the " -"posix convention for :envvar:`PATH`." +"empty value is equivalent to not setting it at all. However, setting :" +"envvar:`PYTHONPATH` to an empty value was *not* equivalent to not setting it " +"at all: setting :envvar:`PYTHONPATH` to an empty value was equivalent to " +"setting it to ``.``, which leads to confusion when reasoning by analogy to " +"how :envvar:`PATH` works. The behavior now conforms to the posix convention " +"for :envvar:`PATH`." msgstr "" -#: ../../whatsnew/3.4.rst:2256 +#: ../../whatsnew/3.4.rst:2257 msgid "" "The [X refs, Y blocks] output of a debug (``--with-pydebug``) build of the " "CPython interpreter is now off by default. It can be re-enabled using the " "``-X showrefcount`` option. (Contributed by Ezio Melotti in :issue:`17323`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2260 +#: ../../whatsnew/3.4.rst:2261 msgid "" "The python command and most stdlib scripts (as well as :mod:`argparse`) now " "output ``--version`` information to ``stdout`` instead of ``stderr`` (for " "issue list see :ref:`other-improvements-3.4` above)." msgstr "" -#: ../../whatsnew/3.4.rst:2266 +#: ../../whatsnew/3.4.rst:2267 msgid "Changes in the Python API" msgstr "Python API 的變更" -#: ../../whatsnew/3.4.rst:2268 +#: ../../whatsnew/3.4.rst:2269 msgid "" "The ABCs defined in :mod:`importlib.abc` now either raise the appropriate " -"exception or return a default value instead of " -"raising :exc:`NotImplementedError` blindly. This will only affect code " -"calling :func:`super` and falling through all the way to the ABCs. For " -"compatibility, catch both :exc:`NotImplementedError` or the appropriate " -"exception as needed." +"exception or return a default value instead of raising :exc:" +"`NotImplementedError` blindly. This will only affect code calling :func:" +"`super` and falling through all the way to the ABCs. For compatibility, " +"catch both :exc:`NotImplementedError` or the appropriate exception as needed." msgstr "" -#: ../../whatsnew/3.4.rst:2274 +#: ../../whatsnew/3.4.rst:2275 msgid "" -"The module type now initializes the :attr:`~module.__package__` " -"and :attr:`~module.__loader__` attributes to ``None`` by default. To " -"determine if these attributes were set in a backwards-compatible fashion, " -"use e.g. ``getattr(module, '__loader__', None) is not None``. " -"(:issue:`17115`.)" +"The module type now initializes the :attr:`~module.__package__` and :attr:" +"`~module.__loader__` attributes to ``None`` by default. To determine if " +"these attributes were set in a backwards-compatible fashion, use e.g. " +"``getattr(module, '__loader__', None) is not None``. (:issue:`17115`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2280 +#: ../../whatsnew/3.4.rst:2281 msgid "" ":meth:`!importlib.util.module_for_loader` now sets ``__loader__`` and " "``__package__`` unconditionally to properly support reloading. If this is " "not desired then you will need to set these attributes manually. You can " -"use :func:`importlib.util.module_to_load` for module management." +"use :func:`!importlib.util.module_to_load` for module management." msgstr "" -#: ../../whatsnew/3.4.rst:2285 +#: ../../whatsnew/3.4.rst:2286 msgid "" "Import now resets relevant attributes (e.g. ``__name__``, ``__loader__``, " "``__package__``, ``__file__``, ``__cached__``) unconditionally when " @@ -3360,7 +3331,7 @@ msgid "" "module is re-found when re-loaded (:issue:`19413`)." msgstr "" -#: ../../whatsnew/3.4.rst:2290 +#: ../../whatsnew/3.4.rst:2291 msgid "" "Frozen packages no longer set ``__path__`` to a list containing the package " "name, they now set it to an empty list. The previous behavior could cause " @@ -3370,18 +3341,18 @@ msgid "" "'__path__')`` (:issue:`18065`)." msgstr "" -#: ../../whatsnew/3.4.rst:2297 +#: ../../whatsnew/3.4.rst:2298 msgid "" "Frozen modules no longer define a ``__file__`` attribute. It's semantically " "incorrect for frozen modules to set the attribute as they are not loaded " "from any explicit location. If you must know that a module comes from frozen " "code then you can see if the module's ``__spec__.location`` is set to " -"``'frozen'``, check if the loader is a subclass " -"of :class:`importlib.machinery.FrozenImporter`, or if Python 2 compatibility " -"is necessary you can use :func:`!imp.is_frozen`." +"``'frozen'``, check if the loader is a subclass of :class:`importlib." +"machinery.FrozenImporter`, or if Python 2 compatibility is necessary you can " +"use :func:`!imp.is_frozen`." msgstr "" -#: ../../whatsnew/3.4.rst:2305 +#: ../../whatsnew/3.4.rst:2306 msgid "" ":func:`py_compile.compile` now raises :exc:`FileExistsError` if the file " "path it would write to is a symlink or a non-regular file. This is to act as " @@ -3389,19 +3360,19 @@ msgid "" "regardless of what type of file path they were originally." msgstr "" -#: ../../whatsnew/3.4.rst:2310 +#: ../../whatsnew/3.4.rst:2311 msgid "" -":meth:`importlib.abc.SourceLoader.get_source` no longer " -"raises :exc:`ImportError` when the source code being loaded triggers " -"a :exc:`SyntaxError` or :exc:`UnicodeDecodeError`. As :exc:`ImportError` is " -"meant to be raised only when source code cannot be found but it should, it " -"was felt to be over-reaching/overloading of that meaning when the source " -"code is found but improperly structured. If you were catching ImportError " -"before and wish to continue to ignore syntax or decoding issues, catch all " -"three exceptions now." +":meth:`importlib.abc.SourceLoader.get_source` no longer raises :exc:" +"`ImportError` when the source code being loaded triggers a :exc:" +"`SyntaxError` or :exc:`UnicodeDecodeError`. As :exc:`ImportError` is meant " +"to be raised only when source code cannot be found but it should, it was " +"felt to be over-reaching/overloading of that meaning when the source code is " +"found but improperly structured. If you were catching ImportError before and " +"wish to continue to ignore syntax or decoding issues, catch all three " +"exceptions now." msgstr "" -#: ../../whatsnew/3.4.rst:2319 +#: ../../whatsnew/3.4.rst:2320 msgid "" ":func:`functools.update_wrapper` and :func:`functools.wraps` now correctly " "set the ``__wrapped__`` attribute to the function being wrapped, even if " @@ -3413,18 +3384,17 @@ msgid "" "function in the chain that has no ``__wrapped__`` attribute." msgstr "" -#: ../../whatsnew/3.4.rst:2329 +#: ../../whatsnew/3.4.rst:2330 msgid "" -":func:`inspect.getfullargspec` has been reimplemented on top " -"of :func:`inspect.signature` and hence handles a much wider variety of " -"callable objects than it did in the past. It is expected that additional " -"builtin and extension module callables will gain signature metadata over the " -"course of the Python 3.4 series. Code that assumes " -"that :func:`inspect.getfullargspec` will fail on non-Python callables may " -"need to be adjusted accordingly." +":func:`inspect.getfullargspec` has been reimplemented on top of :func:" +"`inspect.signature` and hence handles a much wider variety of callable " +"objects than it did in the past. It is expected that additional builtin and " +"extension module callables will gain signature metadata over the course of " +"the Python 3.4 series. Code that assumes that :func:`inspect.getfullargspec` " +"will fail on non-Python callables may need to be adjusted accordingly." msgstr "" -#: ../../whatsnew/3.4.rst:2337 +#: ../../whatsnew/3.4.rst:2338 msgid "" ":class:`importlib.machinery.PathFinder` now passes on the current working " "directory to objects in :data:`sys.path_hooks` for the empty string. This " @@ -3434,11 +3404,11 @@ msgid "" "working directory will also now have an absolute path, including when using " "``-m`` with the interpreter (except for ``__main__.__file__`` when a script " "has been executed directly using a relative path) (Contributed by Brett " -"Cannon in :issue:`18416`). is specified on the command-line) " -"(:issue:`18416`)." +"Cannon in :issue:`18416`). is specified on the command-line) (:issue:" +"`18416`)." msgstr "" -#: ../../whatsnew/3.4.rst:2348 +#: ../../whatsnew/3.4.rst:2349 msgid "" "The removal of the *strict* argument to :class:`~http.client.HTTPConnection` " "and :class:`~http.client.HTTPSConnection` changes the meaning of the " @@ -3447,84 +3417,81 @@ msgid "" "should already be specifying any additional arguments via keywords." msgstr "" -#: ../../whatsnew/3.4.rst:2354 +#: ../../whatsnew/3.4.rst:2355 msgid "" "Strings between ``from __future__ import ...`` statements now *always* raise " "a :exc:`SyntaxError`. Previously if there was no leading docstring, an " "interstitial string would sometimes be ignored. This brings CPython into " -"compliance with the language spec; Jython and PyPy already were. " -"(:issue:`17434`)." +"compliance with the language spec; Jython and PyPy already were. (:issue:" +"`17434`)." msgstr "" -#: ../../whatsnew/3.4.rst:2360 +#: ../../whatsnew/3.4.rst:2361 msgid "" ":meth:`ssl.SSLSocket.getpeercert` and :meth:`ssl.SSLSocket.do_handshake` now " "raise an :exc:`OSError` with ``ENOTCONN`` when the ``SSLSocket`` is not " -"connected, instead of the previous behavior of raising " -"an :exc:`AttributeError`. In addition, :meth:`~ssl.SSLSocket.getpeercert` " -"will raise a :exc:`ValueError` if the handshake has not yet been done." +"connected, instead of the previous behavior of raising an :exc:" +"`AttributeError`. In addition, :meth:`~ssl.SSLSocket.getpeercert` will " +"raise a :exc:`ValueError` if the handshake has not yet been done." msgstr "" -#: ../../whatsnew/3.4.rst:2366 +#: ../../whatsnew/3.4.rst:2367 msgid "" ":func:`base64.b32decode` now raises a :exc:`binascii.Error` when the input " "string contains non-b32-alphabet characters, instead of a :exc:`TypeError`. " -"This particular :exc:`TypeError` was missed when the " -"other :exc:`TypeError`\\ s were converted. (Contributed by Serhiy Storchaka " -"in :issue:`18011`.) Note: this change was also inadvertently applied in " -"Python 3.3.3." +"This particular :exc:`TypeError` was missed when the other :exc:" +"`TypeError`\\ s were converted. (Contributed by Serhiy Storchaka in :issue:" +"`18011`.) Note: this change was also inadvertently applied in Python 3.3.3." msgstr "" -#: ../../whatsnew/3.4.rst:2373 +#: ../../whatsnew/3.4.rst:2374 msgid "" -"The :attr:`!file` attribute is now automatically closed when the " -"creating :class:`!cgi.FieldStorage` instance is garbage collected. If you " -"were pulling the file object out separately from the :class:`!" -"cgi.FieldStorage` instance and not keeping the instance alive, then you " -"should either store the entire :class:`!cgi.FieldStorage` instance or read " -"the contents of the file before the :class:`!cgi.FieldStorage` instance is " -"garbage collected." +"The :attr:`!file` attribute is now automatically closed when the creating :" +"class:`!cgi.FieldStorage` instance is garbage collected. If you were pulling " +"the file object out separately from the :class:`!cgi.FieldStorage` instance " +"and not keeping the instance alive, then you should either store the entire :" +"class:`!cgi.FieldStorage` instance or read the contents of the file before " +"the :class:`!cgi.FieldStorage` instance is garbage collected." msgstr "" -#: ../../whatsnew/3.4.rst:2380 +#: ../../whatsnew/3.4.rst:2381 msgid "" "Calling ``read`` or ``write`` on a closed SSL socket now raises an " -"informative :exc:`ValueError` rather than the previous more " -"mysterious :exc:`AttributeError` (:issue:`9177`)." +"informative :exc:`ValueError` rather than the previous more mysterious :exc:" +"`AttributeError` (:issue:`9177`)." msgstr "" -#: ../../whatsnew/3.4.rst:2384 +#: ../../whatsnew/3.4.rst:2385 msgid "" ":meth:`slice.indices` no longer produces an :exc:`OverflowError` for huge " -"values. As a consequence of this fix, :meth:`slice.indices` now raises " -"a :exc:`ValueError` if given a negative length; previously it returned " -"nonsense values (:issue:`14794`)." +"values. As a consequence of this fix, :meth:`slice.indices` now raises a :" +"exc:`ValueError` if given a negative length; previously it returned nonsense " +"values (:issue:`14794`)." msgstr "" -#: ../../whatsnew/3.4.rst:2389 +#: ../../whatsnew/3.4.rst:2390 msgid "" "The :class:`complex` constructor, unlike the :mod:`cmath` functions, was " "incorrectly accepting :class:`float` values if an object's ``__complex__`` " -"special method returned one. This now raises a :exc:`TypeError`. " -"(:issue:`16290`.)" +"special method returned one. This now raises a :exc:`TypeError`. (:issue:" +"`16290`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2394 +#: ../../whatsnew/3.4.rst:2395 msgid "" -"The :class:`int` constructor in 3.2 and 3.3 erroneously " -"accepts :class:`float` values for the *base* parameter. It is unlikely " -"anyone was doing this, but if so, it will now raise a :exc:`TypeError` " -"(:issue:`16772`)." +"The :class:`int` constructor in 3.2 and 3.3 erroneously accepts :class:" +"`float` values for the *base* parameter. It is unlikely anyone was doing " +"this, but if so, it will now raise a :exc:`TypeError` (:issue:`16772`)." msgstr "" -#: ../../whatsnew/3.4.rst:2398 +#: ../../whatsnew/3.4.rst:2399 msgid "" "Defaults for keyword-only arguments are now evaluated *after* defaults for " "regular keyword arguments, instead of before. Hopefully no one wrote any " "code that depends on the previous buggy behavior (:issue:`16967`)." msgstr "" -#: ../../whatsnew/3.4.rst:2402 +#: ../../whatsnew/3.4.rst:2403 msgid "" "Stale thread states are now cleared after :func:`~os.fork`. This may cause " "some system resources to be released that previously were incorrectly kept " @@ -3532,21 +3499,21 @@ msgid "" "storage). (:issue:`17094`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2407 +#: ../../whatsnew/3.4.rst:2408 msgid "" "Parameter names in ``__annotations__`` dicts are now mangled properly, " "similarly to :attr:`~function.__kwdefaults__`. (Contributed by Yury " "Selivanov in :issue:`20625`.)" msgstr "" -#: ../../whatsnew/3.4.rst:2411 +#: ../../whatsnew/3.4.rst:2412 msgid "" ":attr:`hashlib.hash.name` now always returns the identifier in lower case. " "Previously some builtin hashes had uppercase names, but now that it is a " "formal public interface the naming has been made consistent (:issue:`18532`)." msgstr "" -#: ../../whatsnew/3.4.rst:2415 +#: ../../whatsnew/3.4.rst:2416 msgid "" "Because :mod:`unittest.TestSuite` now drops references to tests after they " "are run, test harnesses that reuse a :class:`~unittest.TestSuite` to re-run " @@ -3555,11 +3522,11 @@ msgid "" "isolation that :mod:`unittest` is designed to provide. However, if the lack " "of isolation is considered acceptable, the old behavior can be restored by " "creating a :mod:`~unittest.TestSuite` subclass that defines a " -"``_removeTestAtIndex`` method that does nothing " -"(see :meth:`.TestSuite.__iter__`) (:issue:`11798`)." +"``_removeTestAtIndex`` method that does nothing (see :meth:`.TestSuite." +"__iter__`) (:issue:`11798`)." msgstr "" -#: ../../whatsnew/3.4.rst:2425 +#: ../../whatsnew/3.4.rst:2426 msgid "" ":mod:`unittest` now uses :mod:`argparse` for command line parsing. There " "are certain invalid command forms that used to work that are no longer " @@ -3568,39 +3535,39 @@ msgid "" "use." msgstr "" -#: ../../whatsnew/3.4.rst:2430 +#: ../../whatsnew/3.4.rst:2431 msgid "" "The :func:`re.split`, :func:`re.findall`, and :func:`re.sub` functions, and " -"the :meth:`~re.match.group` and :meth:`~re.match.groups` methods of " +"the :meth:`~re.Match.group` and :meth:`~re.Match.groups` methods of " "``match`` objects now always return a *bytes* object when the string to be " "matched is a :term:`bytes-like object`. Previously the return type matched " "the input type, so if your code was depending on the return value being, " "say, a ``bytearray``, you will need to change your code." msgstr "" -#: ../../whatsnew/3.4.rst:2437 +#: ../../whatsnew/3.4.rst:2438 msgid "" ":mod:`!audioop` functions now raise an error immediately if passed string " "input, instead of failing randomly later on (:issue:`16685`)." msgstr "" -#: ../../whatsnew/3.4.rst:2440 +#: ../../whatsnew/3.4.rst:2441 msgid "" "The new *convert_charrefs* argument to :class:`~html.parser.HTMLParser` " "currently defaults to ``False`` for backward compatibility, but will " "eventually be changed to default to ``True``. It is recommended that you " -"add this keyword, with the appropriate value, to " -"any :class:`~html.parser.HTMLParser` calls in your code (:issue:`13633`)." +"add this keyword, with the appropriate value, to any :class:`~html.parser." +"HTMLParser` calls in your code (:issue:`13633`)." msgstr "" -#: ../../whatsnew/3.4.rst:2446 +#: ../../whatsnew/3.4.rst:2447 msgid "" "Since the *digestmod* argument to the :func:`hmac.new` function will in the " "future have no default, all calls to :func:`hmac.new` should be changed to " "explicitly specify a *digestmod* (:issue:`17276`)." msgstr "" -#: ../../whatsnew/3.4.rst:2450 +#: ../../whatsnew/3.4.rst:2451 msgid "" "Calling :func:`sysconfig.get_config_var` with the ``SO`` key, or looking " "``SO`` up in the results of a call to :func:`sysconfig.get_config_vars` is " @@ -3608,23 +3575,23 @@ msgid "" "``SHLIB_SUFFIX``, depending on the context (:issue:`19555`)." msgstr "" -#: ../../whatsnew/3.4.rst:2455 +#: ../../whatsnew/3.4.rst:2456 msgid "" "Any calls to ``open`` functions that specify ``U`` should be modified. ``U`` " "is ineffective in Python3 and will eventually raise an error if used. " "Depending on the function, the equivalent of its old Python2 behavior can be " "achieved using either a *newline* argument, or if necessary by wrapping the " -"stream in :mod:`~io.TextIOWrapper` to use its *newline* argument " -"(:issue:`15204`)." +"stream in :mod:`~io.TextIOWrapper` to use its *newline* argument (:issue:" +"`15204`)." msgstr "" -#: ../../whatsnew/3.4.rst:2462 +#: ../../whatsnew/3.4.rst:2463 msgid "" "If you use ``pyvenv`` in a script and desire that pip *not* be installed, " "you must add ``--without-pip`` to your command invocation." msgstr "" -#: ../../whatsnew/3.4.rst:2466 +#: ../../whatsnew/3.4.rst:2467 msgid "" "The default behavior of :func:`json.dump` and :func:`json.dumps` when an " "indent is specified has changed: it no longer produces trailing spaces after " @@ -3633,7 +3600,7 @@ msgid "" "output (:issue:`16333`)." msgstr "" -#: ../../whatsnew/3.4.rst:2472 +#: ../../whatsnew/3.4.rst:2473 msgid "" ":mod:`doctest` now looks for doctests in extension module ``__doc__`` " "strings, so if your doctest test discovery includes extension modules that " @@ -3641,74 +3608,74 @@ msgid "" "never seen before when running your tests (:issue:`3158`)." msgstr "" -#: ../../whatsnew/3.4.rst:2477 +#: ../../whatsnew/3.4.rst:2478 msgid "" "The :mod:`collections.abc` module has been slightly refactored as part of " "the Python startup improvements. As a consequence of this, it is no longer " -"the case that importing :mod:`collections` automatically " -"imports :mod:`collections.abc`. If your program depended on the " -"(undocumented) implicit import, you will need to add an explicit ``import " -"collections.abc`` (:issue:`20784`)." +"the case that importing :mod:`collections` automatically imports :mod:" +"`collections.abc`. If your program depended on the (undocumented) implicit " +"import, you will need to add an explicit ``import collections.abc`` (:issue:" +"`20784`)." msgstr "" -#: ../../whatsnew/3.4.rst:2486 +#: ../../whatsnew/3.4.rst:2487 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.4.rst:2488 +#: ../../whatsnew/3.4.rst:2489 msgid "" -":c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr`, " -"and :c:func:`PyObject_Str`, along with some other internal C APIs, now " -"include a debugging assertion that ensures they are not used in situations " -"where they may silently discard a currently active exception. In cases where " -"discarding the active exception is expected and desired (for example, " -"because it has already been saved locally with :c:func:`PyErr_Fetch` or is " -"being deliberately replaced with a different exception), an " -"explicit :c:func:`PyErr_Clear` call will be needed to avoid triggering the " -"assertion when invoking these operations (directly or indirectly) and " -"running against a version of Python that is compiled with assertions enabled." +":c:func:`PyEval_EvalFrameEx`, :c:func:`PyObject_Repr`, and :c:func:" +"`PyObject_Str`, along with some other internal C APIs, now include a " +"debugging assertion that ensures they are not used in situations where they " +"may silently discard a currently active exception. In cases where discarding " +"the active exception is expected and desired (for example, because it has " +"already been saved locally with :c:func:`PyErr_Fetch` or is being " +"deliberately replaced with a different exception), an explicit :c:func:" +"`PyErr_Clear` call will be needed to avoid triggering the assertion when " +"invoking these operations (directly or indirectly) and running against a " +"version of Python that is compiled with assertions enabled." msgstr "" -#: ../../whatsnew/3.4.rst:2500 +#: ../../whatsnew/3.4.rst:2501 msgid "" ":c:func:`PyErr_SetImportError` now sets :exc:`TypeError` when its **msg** " "argument is not set. Previously only ``NULL`` was returned with no exception " "set." msgstr "" -#: ../../whatsnew/3.4.rst:2504 +#: ../../whatsnew/3.4.rst:2505 msgid "" "The result of the :c:data:`PyOS_ReadlineFunctionPointer` callback must now " -"be a string allocated by :c:func:`PyMem_RawMalloc` " -"or :c:func:`PyMem_RawRealloc`, or ``NULL`` if an error occurred, instead of " -"a string allocated by :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc` " -"(:issue:`16742`)" +"be a string allocated by :c:func:`PyMem_RawMalloc` or :c:func:" +"`PyMem_RawRealloc`, or ``NULL`` if an error occurred, instead of a string " +"allocated by :c:func:`PyMem_Malloc` or :c:func:`PyMem_Realloc` (:issue:" +"`16742`)" msgstr "" -#: ../../whatsnew/3.4.rst:2510 +#: ../../whatsnew/3.4.rst:2511 msgid "" ":c:func:`PyThread_set_key_value` now always set the value. In Python 3.3, " "the function did nothing if the key already exists (if the current value is " "a non-``NULL`` pointer)." msgstr "" -#: ../../whatsnew/3.4.rst:2514 +#: ../../whatsnew/3.4.rst:2515 msgid "" "The ``f_tstate`` (thread state) field of the :c:type:`PyFrameObject` " "structure has been removed to fix a bug: see :issue:`14432` for the " "rationale." msgstr "" -#: ../../whatsnew/3.4.rst:2519 +#: ../../whatsnew/3.4.rst:2520 msgid "Changed in 3.4.3" msgstr "3.4.3 中的變更" -#: ../../whatsnew/3.4.rst:2524 +#: ../../whatsnew/3.4.rst:2525 msgid "" "PEP 476: Enabling certificate verification by default for stdlib http clients" msgstr "" -#: ../../whatsnew/3.4.rst:2526 +#: ../../whatsnew/3.4.rst:2527 msgid "" ":mod:`http.client` and modules which use it, such as :mod:`urllib.request` " "and :mod:`xmlrpc.client`, will now verify that the server presents a " @@ -3717,13 +3684,13 @@ msgid "" "improving security for many applications." msgstr "" -#: ../../whatsnew/3.4.rst:2532 +#: ../../whatsnew/3.4.rst:2533 msgid "" "For applications which require the old previous behavior, they can pass an " "alternate context::" msgstr "" -#: ../../whatsnew/3.4.rst:2535 +#: ../../whatsnew/3.4.rst:2536 msgid "" "import urllib.request\n" "import ssl\n" diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index aaa0953c25..3565d7f36c 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-10 00:13+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -21,7 +21,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:3 msgid "What's New In Python 3.5" -msgstr "Python 3.4 有什麼新功能" +msgstr "Python 3.5 有什麼新功能" #: ../../whatsnew/3.5.rst:0 msgid "Editors" @@ -57,6 +57,7 @@ msgstr "新增語法特性:" msgid "" ":ref:`PEP 492 `, coroutines with async and await syntax." msgstr "" +":ref:`PEP 492 `,使用 async 和 await 語法的協程" #: ../../whatsnew/3.5.rst:63 msgid "" @@ -82,6 +83,7 @@ msgid "" ":mod:`zipapp`: :ref:`PEP 441 Improving Python ZIP Application Support " "`." msgstr "" +":mod:`zipapp`::ref:`PEP 441 改進 Python ZIP 應用程式支援 `。" #: ../../whatsnew/3.5.rst:74 msgid "New built-in features:" @@ -124,10 +126,10 @@ msgstr "CPython 實作改進:" #: ../../whatsnew/3.5.rst:96 msgid "" -"When the ``LC_TYPE`` locale is the POSIX locale (``C`` " -"locale), :py:data:`sys.stdin` and :py:data:`sys.stdout` now use the " -"``surrogateescape`` error handler, instead of the ``strict`` error handler. " -"(Contributed by Victor Stinner in :issue:`19977`.)" +"When the ``LC_TYPE`` locale is the POSIX locale (``C`` locale), :py:data:" +"`sys.stdin` and :py:data:`sys.stdout` now use the ``surrogateescape`` error " +"handler, instead of the ``strict`` error handler. (Contributed by Victor " +"Stinner in :issue:`19977`.)" msgstr "" #: ../../whatsnew/3.5.rst:101 @@ -191,9 +193,8 @@ msgstr "安全性改進:" #: ../../whatsnew/3.5.rst:138 msgid "" "SSLv3 is now disabled throughout the standard library. It can still be " -"enabled by instantiating a :class:`ssl.SSLContext` manually. " -"(See :issue:`22638` for more details; this change was backported to CPython " -"3.4 and 2.7.)" +"enabled by instantiating a :class:`ssl.SSLContext` manually. (See :issue:" +"`22638` for more details; this change was backported to CPython 3.4 and 2.7.)" msgstr "" #: ../../whatsnew/3.5.rst:143 @@ -204,13 +205,13 @@ msgstr "" #: ../../whatsnew/3.5.rst:148 msgid "Windows improvements:" -msgstr "" +msgstr "Windows 改進:" #: ../../whatsnew/3.5.rst:150 msgid "" "A new installer for Windows has replaced the old MSI. See :ref:`using-on-" "windows` for more information." -msgstr "" +msgstr "Windows 的新安裝程式取代了舊的 MSI。詳情請參見 :ref:`using-on-windows`。" #: ../../whatsnew/3.5.rst:153 msgid "" @@ -231,7 +232,7 @@ msgstr "新增功能" #: ../../whatsnew/3.5.rst:168 msgid "PEP 492 - Coroutines with async and await syntax" -msgstr "" +msgstr "PEP 492 - 使用 async 和 await 語法的協程" #: ../../whatsnew/3.5.rst:170 msgid "" @@ -260,7 +261,7 @@ msgid "" "Inside a coroutine function, the new :keyword:`await` expression can be used " "to suspend coroutine execution until the result is available. Any object " "can be *awaited*, as long as it implements the :term:`awaitable` protocol by " -"defining the :meth:`__await__` method." +"defining the :meth:`~object.__await__` method." msgstr "" #: ../../whatsnew/3.5.rst:186 @@ -346,10 +347,26 @@ msgid "" "finally:\n" " loop.close()" msgstr "" +"import asyncio\n" +"\n" +"async def coro(name, lock):\n" +" print('coro {}: waiting for lock'.format(name))\n" +" async with lock:\n" +" print('coro {}: holding the lock'.format(name))\n" +" await asyncio.sleep(1)\n" +" print('coro {}: releasing the lock'.format(name))\n" +"\n" +"loop = asyncio.get_event_loop()\n" +"lock = asyncio.Lock()\n" +"coros = asyncio.gather(coro(1, lock), coro(2, lock))\n" +"try:\n" +" loop.run_until_complete(coros)\n" +"finally:\n" +" loop.close()" #: ../../whatsnew/3.5.rst:235 msgid "will output::" -msgstr "" +msgstr "將輸出: ::" #: ../../whatsnew/3.5.rst:237 msgid "" @@ -360,6 +377,12 @@ msgid "" "coro 1: holding the lock\n" "coro 1: releasing the lock" msgstr "" +"coro 2: waiting for lock\n" +"coro 2: holding the lock\n" +"coro 1: waiting for lock\n" +"coro 2: releasing the lock\n" +"coro 1: holding the lock\n" +"coro 1: releasing the lock" #: ../../whatsnew/3.5.rst:244 msgid "" @@ -375,19 +398,18 @@ msgstr "" #: ../../whatsnew/3.5.rst:253 msgid "" -"Starting with CPython 3.5.2, ``__aiter__`` can directly " -"return :term:`asynchronous iterators `. Returning " -"an :term:`awaitable` object will result in " -"a :exc:`PendingDeprecationWarning`." +"Starting with CPython 3.5.2, ``__aiter__`` can directly return :term:" +"`asynchronous iterators `. Returning an :term:" +"`awaitable` object will result in a :exc:`PendingDeprecationWarning`." msgstr "" #: ../../whatsnew/3.5.rst:259 msgid "See more details in the :ref:`async-iterators` documentation section." -msgstr "" +msgstr "更多細節請見 :ref:`async-iterators` 文件部分。" #: ../../whatsnew/3.5.rst:265 msgid ":pep:`492` -- Coroutines with async and await syntax" -msgstr "" +msgstr ":pep:`492` -- 使用 async 和 await 語法的協程" #: ../../whatsnew/3.5.rst:266 msgid "PEP written and implemented by Yury Selivanov." @@ -401,28 +423,28 @@ msgstr "" msgid "" ":pep:`465` adds the ``@`` infix operator for matrix multiplication. " "Currently, no builtin Python types implement the new operator, however, it " -"can be implemented by defining :meth:`__matmul__`, :meth:`__rmatmul__`, " -"and :meth:`__imatmul__` for regular, reflected, and in-place matrix " -"multiplication. The semantics of these methods is similar to that of " -"methods defining other infix arithmetic operators." +"can be implemented by defining :meth:`~object.__matmul__`, :meth:`~object." +"__rmatmul__`, and :meth:`~object.__imatmul__` for regular, reflected, and in-" +"place matrix multiplication. The semantics of these methods is similar to " +"that of methods defining other infix arithmetic operators." msgstr "" -#: ../../whatsnew/3.5.rst:281 +#: ../../whatsnew/3.5.rst:282 msgid "" "Matrix multiplication is a notably common operation in many fields of " "mathematics, science, engineering, and the addition of ``@`` allows writing " "cleaner code::" msgstr "" -#: ../../whatsnew/3.5.rst:285 +#: ../../whatsnew/3.5.rst:286 msgid "S = (H @ beta - r).T @ inv(H @ V @ H.T) @ (H @ beta - r)" msgstr "S = (H @ beta - r).T @ inv(H @ V @ H.T) @ (H @ beta - r)" -#: ../../whatsnew/3.5.rst:287 +#: ../../whatsnew/3.5.rst:288 msgid "instead of::" msgstr "" -#: ../../whatsnew/3.5.rst:289 +#: ../../whatsnew/3.5.rst:290 msgid "" "S = dot((dot(H, beta) - r).T,\n" " dot(inv(dot(dot(H, V), H.T)), dot(H, beta) - r))" @@ -430,11 +452,11 @@ msgstr "" "S = dot((dot(H, beta) - r).T,\n" " dot(inv(dot(dot(H, V), H.T)), dot(H, beta) - r))" -#: ../../whatsnew/3.5.rst:292 +#: ../../whatsnew/3.5.rst:293 msgid "NumPy 1.10 has support for the new operator::" msgstr "" -#: ../../whatsnew/3.5.rst:294 +#: ../../whatsnew/3.5.rst:295 msgid "" ">>> import numpy\n" "\n" @@ -466,26 +488,26 @@ msgstr "" ">>> x @ m\n" "array([ 1., 1., 1.])" -#: ../../whatsnew/3.5.rst:312 +#: ../../whatsnew/3.5.rst:313 msgid ":pep:`465` -- A dedicated infix operator for matrix multiplication" msgstr "" -#: ../../whatsnew/3.5.rst:313 +#: ../../whatsnew/3.5.rst:314 msgid "PEP written by Nathaniel J. Smith; implemented by Benjamin Peterson." msgstr "由 Nathaniel J. Smith 撰寫 PEP;由 Benjamin Peterson 實作。" -#: ../../whatsnew/3.5.rst:319 +#: ../../whatsnew/3.5.rst:320 msgid "PEP 448 - Additional Unpacking Generalizations" msgstr "" -#: ../../whatsnew/3.5.rst:321 +#: ../../whatsnew/3.5.rst:322 msgid "" ":pep:`448` extends the allowed uses of the ``*`` iterable unpacking operator " "and ``**`` dictionary unpacking operator. It is now possible to use an " "arbitrary number of unpackings in :ref:`function calls `::" msgstr "" -#: ../../whatsnew/3.5.rst:325 +#: ../../whatsnew/3.5.rst:326 msgid "" ">>> print(*[1], *[2], 3, *[4, 5])\n" "1 2 3 4 5\n" @@ -507,13 +529,13 @@ msgstr "" ">>> fn(**{'a': 1, 'c': 3}, **{'b': 2, 'd': 4})\n" "1 2 3 4" -#: ../../whatsnew/3.5.rst:335 +#: ../../whatsnew/3.5.rst:336 msgid "" "Similarly, tuple, list, set, and dictionary displays allow multiple " "unpackings (see :ref:`exprlists` and :ref:`dict`)::" msgstr "" -#: ../../whatsnew/3.5.rst:338 +#: ../../whatsnew/3.5.rst:339 msgid "" ">>> *range(4), 4\n" "(0, 1, 2, 3, 4)\n" @@ -539,27 +561,27 @@ msgstr "" ">>> {'x': 1, **{'y': 2}}\n" "{'x': 1, 'y': 2}" -#: ../../whatsnew/3.5.rst:352 +#: ../../whatsnew/3.5.rst:353 msgid ":pep:`448` -- Additional Unpacking Generalizations" msgstr "" -#: ../../whatsnew/3.5.rst:353 +#: ../../whatsnew/3.5.rst:354 msgid "" "PEP written by Joshua Landau; implemented by Neil Girdhar, Thomas Wouters, " "and Joshua Landau." msgstr "" -#: ../../whatsnew/3.5.rst:360 +#: ../../whatsnew/3.5.rst:361 msgid "PEP 461 - percent formatting support for bytes and bytearray" msgstr "" -#: ../../whatsnew/3.5.rst:362 +#: ../../whatsnew/3.5.rst:363 msgid "" ":pep:`461` adds support for the ``%`` :ref:`interpolation operator ` to :class:`bytes` and :class:`bytearray`." msgstr "" -#: ../../whatsnew/3.5.rst:366 +#: ../../whatsnew/3.5.rst:367 msgid "" "While interpolation is usually thought of as a string operation, there are " "cases where interpolation on ``bytes`` or ``bytearrays`` makes sense, and " @@ -569,11 +591,11 @@ msgid "" "ASCII compatible text." msgstr "" -#: ../../whatsnew/3.5.rst:373 ../../whatsnew/3.5.rst:1848 +#: ../../whatsnew/3.5.rst:374 ../../whatsnew/3.5.rst:1847 msgid "Examples::" msgstr "範例: ::" -#: ../../whatsnew/3.5.rst:375 +#: ../../whatsnew/3.5.rst:376 msgid "" ">>> b'Hello %b!' % b'World'\n" "b'Hello World!'\n" @@ -587,13 +609,13 @@ msgstr "" ">>> b'x=%i y=%f' % (1, 2.5)\n" "b'x=1 y=2.500000'" -#: ../../whatsnew/3.5.rst:381 +#: ../../whatsnew/3.5.rst:382 msgid "" "Unicode is not allowed for ``%b``, but it is accepted by ``%a`` (equivalent " "of ``repr(obj).encode('ascii', 'backslashreplace')``)::" msgstr "" -#: ../../whatsnew/3.5.rst:384 +#: ../../whatsnew/3.5.rst:385 msgid "" ">>> b'Hello %b!' % 'World'\n" "Traceback (most recent call last):\n" @@ -613,33 +635,33 @@ msgstr "" ">>> b'price: %a' % '10€'\n" "b\"price: '10\\\\u20ac'\"" -#: ../../whatsnew/3.5.rst:392 +#: ../../whatsnew/3.5.rst:393 msgid "" "Note that ``%s`` and ``%r`` conversion types, although supported, should " "only be used in codebases that need compatibility with Python 2." msgstr "" -#: ../../whatsnew/3.5.rst:397 +#: ../../whatsnew/3.5.rst:398 msgid ":pep:`461` -- Adding % formatting to bytes and bytearray" msgstr "" -#: ../../whatsnew/3.5.rst:398 +#: ../../whatsnew/3.5.rst:399 msgid "" "PEP written by Ethan Furman; implemented by Neil Schemenauer and Ethan " "Furman." msgstr "" -#: ../../whatsnew/3.5.rst:405 +#: ../../whatsnew/3.5.rst:406 msgid "PEP 484 - Type Hints" msgstr "PEP 484 - 型別提示" -#: ../../whatsnew/3.5.rst:407 +#: ../../whatsnew/3.5.rst:408 msgid "" -"Function annotation syntax has been a Python feature since version 3.0 " -"(:pep:`3107`), however the semantics of annotations has been left undefined." +"Function annotation syntax has been a Python feature since version 3.0 (:pep:" +"`3107`), however the semantics of annotations has been left undefined." msgstr "" -#: ../../whatsnew/3.5.rst:410 +#: ../../whatsnew/3.5.rst:411 msgid "" "Experience has shown that the majority of function annotation uses were to " "provide type hints to function parameters and return values. It became " @@ -647,20 +669,20 @@ msgid "" "library included the base definitions and tools for type annotations." msgstr "" -#: ../../whatsnew/3.5.rst:415 +#: ../../whatsnew/3.5.rst:416 msgid "" ":pep:`484` introduces a :term:`provisional module ` to " "provide these standard definitions and tools, along with some conventions " "for situations where annotations are not available." msgstr "" -#: ../../whatsnew/3.5.rst:419 +#: ../../whatsnew/3.5.rst:420 msgid "" "For example, here is a simple function whose argument and return type are " "declared in the annotations::" msgstr "" -#: ../../whatsnew/3.5.rst:422 +#: ../../whatsnew/3.5.rst:423 msgid "" "def greeting(name: str) -> str:\n" " return 'Hello ' + name" @@ -668,50 +690,50 @@ msgstr "" "def greeting(name: str) -> str:\n" " return 'Hello ' + name" -#: ../../whatsnew/3.5.rst:425 +#: ../../whatsnew/3.5.rst:426 msgid "" -"While these annotations are available at runtime through the " -"usual :attr:`~object.__annotations__` attribute, *no automatic type checking " -"happens at runtime*. Instead, it is assumed that a separate off-line type " -"checker (e.g. `mypy `_) will be used for on-demand " -"source code analysis." +"While these annotations are available at runtime through the usual :attr:`!" +"__annotations__` attribute, *no automatic type checking happens at " +"runtime*. Instead, it is assumed that a separate off-line type checker (e." +"g. `mypy `_) will be used for on-demand source code " +"analysis." msgstr "" -#: ../../whatsnew/3.5.rst:431 +#: ../../whatsnew/3.5.rst:432 msgid "" -"The type system supports unions, generic types, and a special type " -"named :class:`~typing.Any` which is consistent with (i.e. assignable to and " -"from) all types." +"The type system supports unions, generic types, and a special type named :" +"class:`~typing.Any` which is consistent with (i.e. assignable to and from) " +"all types." msgstr "" -#: ../../whatsnew/3.5.rst:437 +#: ../../whatsnew/3.5.rst:438 msgid ":mod:`typing` module documentation" msgstr ":mod:`typing` 模組文件" -#: ../../whatsnew/3.5.rst:438 +#: ../../whatsnew/3.5.rst:439 msgid ":pep:`484` -- Type Hints" msgstr ":pep:`484` -- 型別提示" -#: ../../whatsnew/3.5.rst:439 +#: ../../whatsnew/3.5.rst:440 msgid "" "PEP written by Guido van Rossum, Jukka Lehtosalo, and Łukasz Langa; " "implemented by Guido van Rossum." msgstr "" -#: ../../whatsnew/3.5.rst:441 +#: ../../whatsnew/3.5.rst:442 msgid ":pep:`483` -- The Theory of Type Hints" msgstr ":pep:`483` -- 型別提示理論" -#: ../../whatsnew/3.5.rst:442 +#: ../../whatsnew/3.5.rst:443 msgid "PEP written by Guido van Rossum" msgstr "由 Guido van Rossum 撰寫 PEP" -#: ../../whatsnew/3.5.rst:448 +#: ../../whatsnew/3.5.rst:449 msgid "" "PEP 471 - os.scandir() function -- a better and faster directory iterator" msgstr "" -#: ../../whatsnew/3.5.rst:450 +#: ../../whatsnew/3.5.rst:451 msgid "" ":pep:`471` adds a new directory iteration function, :func:`os.scandir`, to " "the standard library. Additionally, :func:`os.walk` is now implemented " @@ -721,14 +743,14 @@ msgid "" "tree." msgstr "" -#: ../../whatsnew/3.5.rst:457 +#: ../../whatsnew/3.5.rst:458 msgid "" "Additionally, ``scandir`` returns an iterator, as opposed to returning a " "list of file names, which improves memory efficiency when iterating over " "very large directories." msgstr "" -#: ../../whatsnew/3.5.rst:461 +#: ../../whatsnew/3.5.rst:462 msgid "" "The following example shows a simple use of :func:`os.scandir` to display " "all the files (excluding directories) in the given *path* that don't start " @@ -736,7 +758,7 @@ msgid "" "generally not make an additional system call::" msgstr "" -#: ../../whatsnew/3.5.rst:466 +#: ../../whatsnew/3.5.rst:467 msgid "" "for entry in os.scandir(path):\n" " if not entry.name.startswith('.') and entry.is_file():\n" @@ -746,21 +768,21 @@ msgstr "" " if not entry.name.startswith('.') and entry.is_file():\n" " print(entry.name)" -#: ../../whatsnew/3.5.rst:472 +#: ../../whatsnew/3.5.rst:473 msgid "" ":pep:`471` -- os.scandir() function -- a better and faster directory iterator" msgstr "" -#: ../../whatsnew/3.5.rst:473 +#: ../../whatsnew/3.5.rst:474 msgid "" "PEP written and implemented by Ben Hoyt with the help of Victor Stinner." msgstr "在 Victor Stinner 協助下由 Ben Hoyt 撰寫 PEP 與實作。" -#: ../../whatsnew/3.5.rst:479 +#: ../../whatsnew/3.5.rst:480 msgid "PEP 475: Retry system calls failing with EINTR" msgstr "" -#: ../../whatsnew/3.5.rst:481 +#: ../../whatsnew/3.5.rst:482 msgid "" "An :py:const:`errno.EINTR` error code is returned whenever a system call, " "that is waiting for I/O, is interrupted by a signal. Previously, Python " @@ -768,32 +790,32 @@ msgid "" "writing a Python application, the developer had two choices:" msgstr "" -#: ../../whatsnew/3.5.rst:486 +#: ../../whatsnew/3.5.rst:487 msgid "Ignore the ``InterruptedError``." msgstr "" -#: ../../whatsnew/3.5.rst:487 +#: ../../whatsnew/3.5.rst:488 msgid "" "Handle the ``InterruptedError`` and attempt to restart the interrupted " "system call at every call site." msgstr "" -#: ../../whatsnew/3.5.rst:490 +#: ../../whatsnew/3.5.rst:491 msgid "" "The first option makes an application fail intermittently. The second option " "adds a large amount of boilerplate that makes the code nearly unreadable. " "Compare::" msgstr "" -#: ../../whatsnew/3.5.rst:494 +#: ../../whatsnew/3.5.rst:495 msgid "print(\"Hello World\")" msgstr "print(\"Hello World\")" -#: ../../whatsnew/3.5.rst:496 +#: ../../whatsnew/3.5.rst:497 msgid "and::" msgstr "和: ::" -#: ../../whatsnew/3.5.rst:498 +#: ../../whatsnew/3.5.rst:499 msgid "" "while True:\n" " try:\n" @@ -809,7 +831,7 @@ msgstr "" " except InterruptedError:\n" " continue" -#: ../../whatsnew/3.5.rst:505 +#: ../../whatsnew/3.5.rst:506 msgid "" ":pep:`475` implements automatic retry of system calls on ``EINTR``. This " "removes the burden of dealing with ``EINTR`` or :exc:`InterruptedError` in " @@ -818,73 +840,78 @@ msgid "" "the signal handler does not raise an exception." msgstr "" -#: ../../whatsnew/3.5.rst:512 +#: ../../whatsnew/3.5.rst:513 msgid "" "Below is a list of functions which are now retried when interrupted by a " "signal:" msgstr "" -#: ../../whatsnew/3.5.rst:515 +#: ../../whatsnew/3.5.rst:516 msgid ":func:`open` and :func:`io.open`;" msgstr ":func:`open` 和 :func:`io.open`\\ ;" -#: ../../whatsnew/3.5.rst:517 +#: ../../whatsnew/3.5.rst:518 msgid "functions of the :mod:`faulthandler` module;" msgstr ":mod:`faulthandler` 模組的函式;" -#: ../../whatsnew/3.5.rst:519 +#: ../../whatsnew/3.5.rst:520 msgid "" -":mod:`os` " -"functions: :func:`~os.fchdir`, :func:`~os.fchmod`, :func:`~os.fchown`, :func:`~os.fdatasync`, :func:`~os.fstat`, :func:`~os.fstatvfs`, :func:`~os.fsync`, :func:`~os.ftruncate`, :func:`~os.mkfifo`, :func:`~os.mknod`, :func:`~os.open`, :func:`~os.posix_fadvise`, :func:`~os.posix_fallocate`, :func:`~os.pread`, :func:`~os.pwrite`, :func:`~os.read`, :func:`~os.readv`, :func:`~os.sendfile`, :func:`~os.wait3`, :func:`~os.wait4`, :func:`~os.wait`, :func:`~os.waitid`, :func:`~os.waitpid`, :func:`~os.write`, :func:`~os.writev`;" +":mod:`os` functions: :func:`~os.fchdir`, :func:`~os.fchmod`, :func:`~os." +"fchown`, :func:`~os.fdatasync`, :func:`~os.fstat`, :func:`~os.fstatvfs`, :" +"func:`~os.fsync`, :func:`~os.ftruncate`, :func:`~os.mkfifo`, :func:`~os." +"mknod`, :func:`~os.open`, :func:`~os.posix_fadvise`, :func:`~os." +"posix_fallocate`, :func:`~os.pread`, :func:`~os.pwrite`, :func:`~os.read`, :" +"func:`~os.readv`, :func:`~os.sendfile`, :func:`~os.wait3`, :func:`~os." +"wait4`, :func:`~os.wait`, :func:`~os.waitid`, :func:`~os.waitpid`, :func:" +"`~os.write`, :func:`~os.writev`;" msgstr "" -#: ../../whatsnew/3.5.rst:529 +#: ../../whatsnew/3.5.rst:530 msgid "" -"special cases: :func:`os.close` and :func:`os.dup2` now " -"ignore :py:const:`~errno.EINTR` errors; the syscall is not retried (see the " -"PEP for the rationale);" +"special cases: :func:`os.close` and :func:`os.dup2` now ignore :py:const:" +"`~errno.EINTR` errors; the syscall is not retried (see the PEP for the " +"rationale);" msgstr "" -#: ../../whatsnew/3.5.rst:533 +#: ../../whatsnew/3.5.rst:534 msgid "" -":mod:`select` functions: :func:`devpoll.poll() " -"`, :func:`epoll.poll() " -"`, :func:`kqueue.control() " -"`, :func:`poll.poll() " -"`, :func:`~select.select`;" +":mod:`select` functions: :func:`devpoll.poll() `, :func:" +"`epoll.poll() `, :func:`kqueue.control() `, :func:`poll.poll() `, :func:`~select.select`;" msgstr "" -#: ../../whatsnew/3.5.rst:538 +#: ../../whatsnew/3.5.rst:539 msgid "" -"methods of the :class:`~socket.socket` " -"class: :meth:`~socket.socket.accept`, :meth:`~socket.socket.connect` (except " -"for non-blocking " -"sockets), :meth:`~socket.socket.recv`, :meth:`~socket.socket.recvfrom`, :meth:`~socket.socket.recvmsg`, :meth:`~socket.socket.send`, :meth:`~socket.socket.sendall`, :meth:`~socket.socket.sendmsg`, :meth:`~socket.socket.sendto`;" +"methods of the :class:`~socket.socket` class: :meth:`~socket.socket." +"accept`, :meth:`~socket.socket.connect` (except for non-blocking sockets), :" +"meth:`~socket.socket.recv`, :meth:`~socket.socket.recvfrom`, :meth:`~socket." +"socket.recvmsg`, :meth:`~socket.socket.send`, :meth:`~socket.socket." +"sendall`, :meth:`~socket.socket.sendmsg`, :meth:`~socket.socket.sendto`;" msgstr "" -#: ../../whatsnew/3.5.rst:545 +#: ../../whatsnew/3.5.rst:546 msgid ":func:`signal.sigtimedwait` and :func:`signal.sigwaitinfo`;" msgstr ":func:`signal.sigtimedwait` 和 :func:`signal.sigwaitinfo`\\ ;" -#: ../../whatsnew/3.5.rst:547 +#: ../../whatsnew/3.5.rst:548 msgid ":func:`time.sleep`." msgstr ":func:`time.sleep`。" -#: ../../whatsnew/3.5.rst:551 +#: ../../whatsnew/3.5.rst:552 msgid ":pep:`475` -- Retry system calls failing with EINTR" msgstr "" -#: ../../whatsnew/3.5.rst:552 +#: ../../whatsnew/3.5.rst:553 msgid "" "PEP and implementation written by Charles-François Natali and Victor " "Stinner, with the help of Antoine Pitrou (the French connection)." msgstr "" -#: ../../whatsnew/3.5.rst:559 +#: ../../whatsnew/3.5.rst:560 msgid "PEP 479: Change StopIteration handling inside generators" msgstr "" -#: ../../whatsnew/3.5.rst:561 +#: ../../whatsnew/3.5.rst:562 msgid "" "The interaction of generators and :exc:`StopIteration` in Python 3.4 and " "earlier was sometimes surprising, and could conceal obscure bugs. " @@ -893,24 +920,24 @@ msgid "" "driving the generator." msgstr "" -#: ../../whatsnew/3.5.rst:567 +#: ../../whatsnew/3.5.rst:568 msgid "" ":pep:`479` changes the behavior of generators: when a ``StopIteration`` " -"exception is raised inside a generator, it is replaced with " -"a :exc:`RuntimeError` before it exits the generator frame. The main goal of " -"this change is to ease debugging in the situation where an " -"unguarded :func:`next` call raises ``StopIteration`` and causes the " -"iteration controlled by the generator to terminate silently. This is " -"particularly pernicious in combination with the ``yield from`` construct." +"exception is raised inside a generator, it is replaced with a :exc:" +"`RuntimeError` before it exits the generator frame. The main goal of this " +"change is to ease debugging in the situation where an unguarded :func:`next` " +"call raises ``StopIteration`` and causes the iteration controlled by the " +"generator to terminate silently. This is particularly pernicious in " +"combination with the ``yield from`` construct." msgstr "" -#: ../../whatsnew/3.5.rst:575 +#: ../../whatsnew/3.5.rst:576 msgid "" -"This is a backwards incompatible change, so to enable the new behavior, " -"a :term:`__future__` import is necessary::" +"This is a backwards incompatible change, so to enable the new behavior, a :" +"term:`__future__` import is necessary::" msgstr "" -#: ../../whatsnew/3.5.rst:578 +#: ../../whatsnew/3.5.rst:579 msgid "" ">>> from __future__ import generator_stop\n" "\n" @@ -946,28 +973,28 @@ msgstr "" " File \"\", line 1, in \n" "RuntimeError: generator raised StopIteration" -#: ../../whatsnew/3.5.rst:595 +#: ../../whatsnew/3.5.rst:596 msgid "" "Without a ``__future__`` import, a :exc:`PendingDeprecationWarning` will be " "raised whenever a :exc:`StopIteration` exception is raised inside a " "generator." msgstr "" -#: ../../whatsnew/3.5.rst:600 +#: ../../whatsnew/3.5.rst:601 msgid ":pep:`479` -- Change StopIteration handling inside generators" msgstr "" -#: ../../whatsnew/3.5.rst:601 +#: ../../whatsnew/3.5.rst:602 msgid "" "PEP written by Chris Angelico and Guido van Rossum. Implemented by Chris " "Angelico, Yury Selivanov and Nick Coghlan." msgstr "" -#: ../../whatsnew/3.5.rst:608 +#: ../../whatsnew/3.5.rst:609 msgid "PEP 485: A function for testing approximate equality" msgstr "" -#: ../../whatsnew/3.5.rst:610 +#: ../../whatsnew/3.5.rst:611 msgid "" ":pep:`485` adds the :func:`math.isclose` and :func:`cmath.isclose` functions " "which tell whether two values are approximately equal or \"close\" to each " @@ -977,7 +1004,7 @@ msgid "" "the larger absolute value::" msgstr "" -#: ../../whatsnew/3.5.rst:617 +#: ../../whatsnew/3.5.rst:618 msgid "" ">>> import math\n" ">>> a = 5.0\n" @@ -995,13 +1022,13 @@ msgstr "" ">>> math.isclose(a, b, rel_tol=1e-6)\n" "False" -#: ../../whatsnew/3.5.rst:625 +#: ../../whatsnew/3.5.rst:626 msgid "" "It is also possible to compare two values using absolute tolerance, which " "must be a non-negative value::" msgstr "" -#: ../../whatsnew/3.5.rst:628 +#: ../../whatsnew/3.5.rst:629 msgid "" ">>> import math\n" ">>> a = 5.0\n" @@ -1019,20 +1046,20 @@ msgstr "" ">>> math.isclose(a, b, abs_tol=0.00001)\n" "False" -#: ../../whatsnew/3.5.rst:638 +#: ../../whatsnew/3.5.rst:639 msgid ":pep:`485` -- A function for testing approximate equality" msgstr "" -#: ../../whatsnew/3.5.rst:639 +#: ../../whatsnew/3.5.rst:640 msgid "" "PEP written by Christopher Barker; implemented by Chris Barker and Tal Einat." msgstr "" -#: ../../whatsnew/3.5.rst:646 +#: ../../whatsnew/3.5.rst:647 msgid "PEP 486: Make the Python Launcher aware of virtual environments" msgstr "" -#: ../../whatsnew/3.5.rst:648 +#: ../../whatsnew/3.5.rst:649 msgid "" ":pep:`486` makes the Windows launcher (see :pep:`397`) aware of an active " "virtual environment. When the default interpreter would be used and the " @@ -1040,50 +1067,50 @@ msgid "" "environment will be used." msgstr "" -#: ../../whatsnew/3.5.rst:655 +#: ../../whatsnew/3.5.rst:656 msgid ":pep:`486` -- Make the Python Launcher aware of virtual environments" msgstr "" -#: ../../whatsnew/3.5.rst:656 +#: ../../whatsnew/3.5.rst:657 msgid "PEP written and implemented by Paul Moore." msgstr "由 Paul Moore 撰寫 PEP 與實作。" -#: ../../whatsnew/3.5.rst:662 +#: ../../whatsnew/3.5.rst:663 msgid "PEP 488: Elimination of PYO files" msgstr "" -#: ../../whatsnew/3.5.rst:664 +#: ../../whatsnew/3.5.rst:665 msgid "" -":pep:`488` does away with the concept of ``.pyo`` files. This means that " -"``.pyc`` files represent both unoptimized and optimized bytecode. To prevent " +":pep:`488` does away with the concept of ``.pyo`` files. This means that ``." +"pyc`` files represent both unoptimized and optimized bytecode. To prevent " "the need to constantly regenerate bytecode files, ``.pyc`` files now have an " "optional ``opt-`` tag in their name when the bytecode is optimized. This has " "the side-effect of no more bytecode file name clashes when running under " "either :option:`-O` or :option:`-OO`. Consequently, bytecode files generated " -"from :option:`-O`, and :option:`-OO` may now exist " -"simultaneously. :func:`importlib.util.cache_from_source` has an updated API " -"to help with this change." +"from :option:`-O`, and :option:`-OO` may now exist simultaneously. :func:" +"`importlib.util.cache_from_source` has an updated API to help with this " +"change." msgstr "" -#: ../../whatsnew/3.5.rst:676 +#: ../../whatsnew/3.5.rst:677 msgid ":pep:`488` -- Elimination of PYO files" msgstr "" -#: ../../whatsnew/3.5.rst:677 +#: ../../whatsnew/3.5.rst:678 msgid "PEP written and implemented by Brett Cannon." msgstr "由 Brett Cannon 撰寫 PEP 與實作。" -#: ../../whatsnew/3.5.rst:683 +#: ../../whatsnew/3.5.rst:684 msgid "PEP 489: Multi-phase extension module initialization" msgstr "" -#: ../../whatsnew/3.5.rst:685 +#: ../../whatsnew/3.5.rst:686 msgid "" ":pep:`489` updates extension module initialization to take advantage of the " "two step module loading mechanism introduced by :pep:`451` in Python 3.4." msgstr "" -#: ../../whatsnew/3.5.rst:688 +#: ../../whatsnew/3.5.rst:689 msgid "" "This change brings the import semantics of extension modules that opt-in to " "using the new mechanism much closer to those of Python source and bytecode " @@ -1091,77 +1118,77 @@ msgid "" "rather than being restricted to ASCII." msgstr "" -#: ../../whatsnew/3.5.rst:695 +#: ../../whatsnew/3.5.rst:696 msgid ":pep:`489` -- Multi-phase extension module initialization" msgstr ":pep:`489` -- 多階段擴充模組初始化" -#: ../../whatsnew/3.5.rst:696 +#: ../../whatsnew/3.5.rst:697 msgid "" "PEP written by Petr Viktorin, Stefan Behnel, and Nick Coghlan; implemented " "by Petr Viktorin." msgstr "" -#: ../../whatsnew/3.5.rst:701 +#: ../../whatsnew/3.5.rst:702 msgid "Other Language Changes" msgstr "其他語言更動" -#: ../../whatsnew/3.5.rst:703 +#: ../../whatsnew/3.5.rst:704 msgid "Some smaller changes made to the core Python language are:" msgstr "" -#: ../../whatsnew/3.5.rst:705 +#: ../../whatsnew/3.5.rst:706 msgid "" "Added the ``\"namereplace\"`` error handlers. The ``\"backslashreplace\"`` " "error handlers now work with decoding and translating. (Contributed by " "Serhiy Storchaka in :issue:`19676` and :issue:`22286`.)" msgstr "" -#: ../../whatsnew/3.5.rst:709 +#: ../../whatsnew/3.5.rst:710 msgid "" -"The :option:`-b` option now affects comparisons of :class:`bytes` " -"with :class:`int`. (Contributed by Serhiy Storchaka in :issue:`23681`.)" +"The :option:`-b` option now affects comparisons of :class:`bytes` with :" +"class:`int`. (Contributed by Serhiy Storchaka in :issue:`23681`.)" msgstr "" -#: ../../whatsnew/3.5.rst:712 +#: ../../whatsnew/3.5.rst:713 msgid "" "New Kazakh ``kz1048`` and Tajik ``koi8_t`` :ref:`codecs `. (Contributed by Serhiy Storchaka in :issue:`22682` " -"and :issue:`22681`.)" +"encodings>`. (Contributed by Serhiy Storchaka in :issue:`22682` and :issue:" +"`22681`.)" msgstr "" -#: ../../whatsnew/3.5.rst:715 +#: ../../whatsnew/3.5.rst:716 msgid "" -"Property docstrings are now writable. This is especially useful " -"for :func:`collections.namedtuple` docstrings. (Contributed by Berker Peksag " -"in :issue:`24064`.)" +"Property docstrings are now writable. This is especially useful for :func:" +"`collections.namedtuple` docstrings. (Contributed by Berker Peksag in :issue:" +"`24064`.)" msgstr "" -#: ../../whatsnew/3.5.rst:719 +#: ../../whatsnew/3.5.rst:720 msgid "" "Circular imports involving relative imports are now supported. (Contributed " "by Brett Cannon and Antoine Pitrou in :issue:`17636`.)" msgstr "" -#: ../../whatsnew/3.5.rst:724 +#: ../../whatsnew/3.5.rst:725 msgid "New Modules" msgstr "新增模組" -#: ../../whatsnew/3.5.rst:727 +#: ../../whatsnew/3.5.rst:728 msgid "typing" msgstr "typing" -#: ../../whatsnew/3.5.rst:729 +#: ../../whatsnew/3.5.rst:730 msgid "" "The new :mod:`typing` :term:`provisional ` module provides " "standard definitions and tools for function type annotations. See :ref:`Type " "Hints ` for more information." msgstr "" -#: ../../whatsnew/3.5.rst:736 +#: ../../whatsnew/3.5.rst:737 msgid "zipapp" msgstr "zipapp" -#: ../../whatsnew/3.5.rst:738 +#: ../../whatsnew/3.5.rst:739 msgid "" "The new :mod:`zipapp` module (specified in :pep:`441`) provides an API and " "command line tool for creating executable Python Zip Applications, which " @@ -1169,14 +1196,14 @@ msgid "" "publicized, either at the time or since." msgstr "" -#: ../../whatsnew/3.5.rst:743 +#: ../../whatsnew/3.5.rst:744 msgid "" "With the new module, bundling your application is as simple as putting all " "the files, including a ``__main__.py`` file, into a directory ``myapp`` and " "running:" msgstr "" -#: ../../whatsnew/3.5.rst:747 +#: ../../whatsnew/3.5.rst:748 msgid "" "$ python -m zipapp myapp\n" "$ python myapp.pyz" @@ -1184,67 +1211,67 @@ msgstr "" "$ python -m zipapp myapp\n" "$ python myapp.pyz" -#: ../../whatsnew/3.5.rst:752 +#: ../../whatsnew/3.5.rst:753 msgid "" -"The module implementation has been contributed by Paul Moore " -"in :issue:`23491`." -msgstr "" +"The module implementation has been contributed by Paul Moore in :issue:" +"`23491`." +msgstr "模組實作由 Paul Moore 在 :issue:`23491` 貢獻。" -#: ../../whatsnew/3.5.rst:757 +#: ../../whatsnew/3.5.rst:758 msgid ":pep:`441` -- Improving Python ZIP Application Support" -msgstr "" +msgstr ":pep:`441` -- 改進 Python ZIP 應用程式支援" -#: ../../whatsnew/3.5.rst:761 +#: ../../whatsnew/3.5.rst:762 msgid "Improved Modules" msgstr "改進的模組" -#: ../../whatsnew/3.5.rst:764 +#: ../../whatsnew/3.5.rst:765 msgid "argparse" msgstr "argparse" -#: ../../whatsnew/3.5.rst:766 +#: ../../whatsnew/3.5.rst:767 msgid "" -"The :class:`~argparse.ArgumentParser` class now allows " -"disabling :ref:`abbreviated usage ` of long options by " -"setting :ref:`allow_abbrev` to ``False``. (Contributed by Jonathan Paugh, " -"Steven Bethard, paul j3 and Daniel Eriksson in :issue:`14910`.)" +"The :class:`~argparse.ArgumentParser` class now allows disabling :ref:" +"`abbreviated usage ` of long options by setting :ref:" +"`allow_abbrev` to ``False``. (Contributed by Jonathan Paugh, Steven " +"Bethard, paul j3 and Daniel Eriksson in :issue:`14910`.)" msgstr "" -#: ../../whatsnew/3.5.rst:773 +#: ../../whatsnew/3.5.rst:774 msgid "asyncio" msgstr "asyncio" -#: ../../whatsnew/3.5.rst:775 +#: ../../whatsnew/3.5.rst:776 msgid "" "Since the :mod:`asyncio` module is :term:`provisional `, " -"all changes introduced in Python 3.5 have also been backported to Python " -"3.4.x." +"all changes introduced in Python 3.5 have also been backported to Python 3.4." +"x." msgstr "" -#: ../../whatsnew/3.5.rst:778 +#: ../../whatsnew/3.5.rst:779 msgid "Notable changes in the :mod:`asyncio` module since Python 3.4.0:" -msgstr "" +msgstr "Python 3.4.0 以來 :mod:`asyncio` 模組的顯著變更:" -#: ../../whatsnew/3.5.rst:780 +#: ../../whatsnew/3.5.rst:781 msgid "" -"New debugging APIs: :meth:`loop.set_debug() ` " -"and :meth:`loop.get_debug() ` methods. (Contributed " -"by Victor Stinner.)" +"New debugging APIs: :meth:`loop.set_debug() ` and :" +"meth:`loop.get_debug() ` methods. (Contributed by " +"Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.5.rst:784 +#: ../../whatsnew/3.5.rst:785 msgid "" "The proactor event loop now supports SSL. (Contributed by Antoine Pitrou and " "Victor Stinner in :issue:`22560`.)" msgstr "" -#: ../../whatsnew/3.5.rst:787 +#: ../../whatsnew/3.5.rst:788 msgid "" "A new :meth:`loop.is_closed() ` method to check if " "the event loop is closed. (Contributed by Victor Stinner in :issue:`21326`.)" msgstr "" -#: ../../whatsnew/3.5.rst:791 +#: ../../whatsnew/3.5.rst:792 msgid "" "A new :meth:`loop.create_task() ` to conveniently " "create and schedule a new :class:`~asyncio.Task` for a coroutine. The " @@ -1253,45 +1280,44 @@ msgid "" "etc. (Contributed by Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.5.rst:798 +#: ../../whatsnew/3.5.rst:799 msgid "" -"A new :meth:`transport.get_write_buffer_limits() " -"` method to inquire for " -"*high-* and *low-* water limits of the flow control. (Contributed by Victor " -"Stinner.)" +"A new :meth:`transport.get_write_buffer_limits() ` method to inquire for *high-* and *low-* water " +"limits of the flow control. (Contributed by Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.5.rst:803 +#: ../../whatsnew/3.5.rst:804 msgid "" -"The :func:`~asyncio.async` function is deprecated in favor " -"of :func:`~asyncio.ensure_future`. (Contributed by Yury Selivanov.)" +"The :func:`!async` function is deprecated in favor of :func:`~asyncio." +"ensure_future`. (Contributed by Yury Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:807 +#: ../../whatsnew/3.5.rst:808 msgid "" -"New :meth:`loop.set_task_factory() ` " -"and :meth:`loop.get_task_factory() ` methods " -"to customize the task factory that :meth:`loop.create_task() " -"` method uses. (Contributed by Yury Selivanov.)" +"New :meth:`loop.set_task_factory() ` and :" +"meth:`loop.get_task_factory() ` methods to " +"customize the task factory that :meth:`loop.create_task() ` method uses. (Contributed by Yury Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:814 +#: ../../whatsnew/3.5.rst:815 msgid "" "New :meth:`Queue.join() ` and :meth:`Queue.task_done() " "` queue methods. (Contributed by Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.5.rst:818 +#: ../../whatsnew/3.5.rst:819 msgid "" -"The ``JoinableQueue`` class was removed, in favor of " -"the :class:`asyncio.Queue` class. (Contributed by Victor Stinner.)" +"The ``JoinableQueue`` class was removed, in favor of the :class:`asyncio." +"Queue` class. (Contributed by Victor Stinner.)" msgstr "" -#: ../../whatsnew/3.5.rst:822 +#: ../../whatsnew/3.5.rst:823 msgid "Updates in 3.5.1:" -msgstr "" +msgstr "3.5.1 的更新:" -#: ../../whatsnew/3.5.rst:824 +#: ../../whatsnew/3.5.rst:825 msgid "" "The :func:`~asyncio.ensure_future` function and all functions that use it, " "such as :meth:`loop.run_until_complete() `, " @@ -1299,30 +1325,30 @@ msgid "" "by Yury Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:829 +#: ../../whatsnew/3.5.rst:830 msgid "" "New :func:`~asyncio.run_coroutine_threadsafe` function to submit coroutines " "to event loops from other threads. (Contributed by Vincent Michel.)" msgstr "" -#: ../../whatsnew/3.5.rst:833 +#: ../../whatsnew/3.5.rst:834 msgid "" "New :meth:`Transport.is_closing() ` method " "to check if the transport is closing or closed. (Contributed by Yury " "Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:837 +#: ../../whatsnew/3.5.rst:838 msgid "" "The :meth:`loop.create_server() ` method can now " "accept a list of hosts. (Contributed by Yann Sionneau.)" msgstr "" -#: ../../whatsnew/3.5.rst:841 +#: ../../whatsnew/3.5.rst:842 msgid "Updates in 3.5.2:" -msgstr "" +msgstr "3.5.2 的更新:" -#: ../../whatsnew/3.5.rst:843 +#: ../../whatsnew/3.5.rst:844 msgid "" "New :meth:`loop.create_future() ` method to " "create Future objects. This allows alternative event loop implementations, " @@ -1331,115 +1357,112 @@ msgid "" "Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:850 +#: ../../whatsnew/3.5.rst:851 msgid "" -"New :meth:`loop.get_exception_handler() " -"` method to get the current exception " -"handler. (Contributed by Yury Selivanov.)" +"New :meth:`loop.get_exception_handler() ` method to get the current exception handler. " +"(Contributed by Yury Selivanov.)" msgstr "" -#: ../../whatsnew/3.5.rst:854 +#: ../../whatsnew/3.5.rst:855 msgid "" "New :meth:`StreamReader.readuntil() ` method " "to read data from the stream until a separator bytes sequence appears. " "(Contributed by Mark Korenberg.)" msgstr "" -#: ../../whatsnew/3.5.rst:859 +#: ../../whatsnew/3.5.rst:860 msgid "" -"The :meth:`loop.create_connection() ` " -"and :meth:`loop.create_server() ` methods are " +"The :meth:`loop.create_connection() ` and :" +"meth:`loop.create_server() ` methods are " "optimized to avoid calling the system ``getaddrinfo`` function if the " "address is already resolved. (Contributed by A. Jesse Jiryu Davis.)" msgstr "" -#: ../../whatsnew/3.5.rst:865 +#: ../../whatsnew/3.5.rst:866 msgid "" "The :meth:`loop.sock_connect(sock, address) ` no " "longer requires the *address* to be resolved prior to the call. (Contributed " "by A. Jesse Jiryu Davis.)" msgstr "" -#: ../../whatsnew/3.5.rst:871 +#: ../../whatsnew/3.5.rst:872 msgid "bz2" msgstr "bz2" -#: ../../whatsnew/3.5.rst:873 +#: ../../whatsnew/3.5.rst:874 msgid "" "The :meth:`BZ2Decompressor.decompress ` " "method now accepts an optional *max_length* argument to limit the maximum " "size of decompressed data. (Contributed by Nikolaus Rath in :issue:`15955`.)" msgstr "" -#: ../../whatsnew/3.5.rst:879 +#: ../../whatsnew/3.5.rst:880 msgid "cgi" msgstr "cgi" -#: ../../whatsnew/3.5.rst:881 +#: ../../whatsnew/3.5.rst:882 msgid "" "The :class:`!FieldStorage` class now supports the :term:`context manager` " "protocol. (Contributed by Berker Peksag in :issue:`20289`.)" msgstr "" -#: ../../whatsnew/3.5.rst:886 +#: ../../whatsnew/3.5.rst:887 msgid "cmath" msgstr "cmath" -#: ../../whatsnew/3.5.rst:888 +#: ../../whatsnew/3.5.rst:889 msgid "" "A new function :func:`~cmath.isclose` provides a way to test for approximate " "equality. (Contributed by Chris Barker and Tal Einat in :issue:`24270`.)" msgstr "" -#: ../../whatsnew/3.5.rst:893 +#: ../../whatsnew/3.5.rst:894 msgid "code" msgstr "code" -#: ../../whatsnew/3.5.rst:895 +#: ../../whatsnew/3.5.rst:896 msgid "" -"The :func:`InteractiveInterpreter.showtraceback() " -"` method now prints the full " -"chained traceback, just like the interactive interpreter. (Contributed by " -"Claudiu Popa in :issue:`17442`.)" +"The :func:`InteractiveInterpreter.showtraceback() ` method now prints the full chained " +"traceback, just like the interactive interpreter. (Contributed by Claudiu " +"Popa in :issue:`17442`.)" msgstr "" -#: ../../whatsnew/3.5.rst:901 +#: ../../whatsnew/3.5.rst:902 msgid "collections" msgstr "collections" -#: ../../whatsnew/3.5.rst:905 +#: ../../whatsnew/3.5.rst:906 msgid "" "The :class:`~collections.OrderedDict` class is now implemented in C, which " -"makes it 4 to 100 times faster. (Contributed by Eric Snow " -"in :issue:`16991`.)" +"makes it 4 to 100 times faster. (Contributed by Eric Snow in :issue:" +"`16991`.)" msgstr "" -#: ../../whatsnew/3.5.rst:908 +#: ../../whatsnew/3.5.rst:909 msgid "" -":meth:`OrderedDict.items() " -"`, :meth:`OrderedDict.keys() " -"`, :meth:`OrderedDict.values() " -"` views now support :func:`reversed` " -"iteration. (Contributed by Serhiy Storchaka in :issue:`19505`.)" +":meth:`!OrderedDict.items`, :meth:`!OrderedDict.keys`, and :meth:`!" +"OrderedDict.values` views now support :func:`reversed` iteration. " +"(Contributed by Serhiy Storchaka in :issue:`19505`.)" msgstr "" -#: ../../whatsnew/3.5.rst:914 +#: ../../whatsnew/3.5.rst:913 msgid "" -"The :class:`~collections.deque` class now " -"defines :meth:`~collections.deque.index`, :meth:`~collections.deque.insert`, " -"and :meth:`~collections.deque.copy`, and supports the ``+`` and ``*`` " -"operators. This allows deques to be recognized as " -"a :class:`~collections.abc.MutableSequence` and improves their " -"substitutability for lists. (Contributed by Raymond Hettinger " -"in :issue:`23704`.)" +"The :class:`~collections.deque` class now defines :meth:`~collections.deque." +"index`, :meth:`~collections.deque.insert`, and :meth:`~collections.deque." +"copy`, and supports the ``+`` and ``*`` operators. This allows deques to be " +"recognized as a :class:`~collections.abc.MutableSequence` and improves their " +"substitutability for lists. (Contributed by Raymond Hettinger in :issue:" +"`23704`.)" msgstr "" -#: ../../whatsnew/3.5.rst:921 +#: ../../whatsnew/3.5.rst:920 msgid "" "Docstrings produced by :func:`~collections.namedtuple` can now be updated::" msgstr "" -#: ../../whatsnew/3.5.rst:923 +#: ../../whatsnew/3.5.rst:922 msgid "" "Point = namedtuple('Point', ['x', 'y'])\n" "Point.__doc__ += ': Cartesian coordinate'\n" @@ -1451,83 +1474,83 @@ msgstr "" "Point.x.__doc__ = 'abscissa'\n" "Point.y.__doc__ = 'ordinate'" -#: ../../whatsnew/3.5.rst:928 +#: ../../whatsnew/3.5.rst:927 msgid "(Contributed by Berker Peksag in :issue:`24064`.)" msgstr "(由 Berker Peksag 在 :issue:`24064` 中貢獻。)" -#: ../../whatsnew/3.5.rst:930 +#: ../../whatsnew/3.5.rst:929 msgid "" -"The :class:`~collections.UserString` class now implements " -"the :meth:`__getnewargs__`, :meth:`__rmod__`, :meth:`~str.casefold`, :meth:`~str.format_map`, :meth:`~str.isprintable`, " -"and :meth:`~str.maketrans` methods to match the corresponding methods " -"of :class:`str`. (Contributed by Joe Jevnik in :issue:`22189`.)" +"The :class:`~collections.UserString` class now implements the :meth:`~object." +"__getnewargs__`, :meth:`~object.__rmod__`, :meth:`~str.casefold`, :meth:" +"`~str.format_map`, :meth:`~str.isprintable`, and :meth:`~str.maketrans` " +"methods to match the corresponding methods of :class:`str`. (Contributed by " +"Joe Jevnik in :issue:`22189`.)" msgstr "" -#: ../../whatsnew/3.5.rst:938 +#: ../../whatsnew/3.5.rst:937 msgid "collections.abc" msgstr "collections.abc" -#: ../../whatsnew/3.5.rst:940 +#: ../../whatsnew/3.5.rst:939 msgid "" -"The :meth:`Sequence.index() ` method now " -"accepts *start* and *stop* arguments to match the corresponding methods " -"of :class:`tuple`, :class:`list`, etc. (Contributed by Devin Jeanpierre " -"in :issue:`23086`.)" +"The :meth:`!Sequence.index` method now accepts *start* and *stop* arguments " +"to match the corresponding methods of :class:`tuple`, :class:`list`, etc. " +"(Contributed by Devin Jeanpierre in :issue:`23086`.)" msgstr "" -#: ../../whatsnew/3.5.rst:945 +#: ../../whatsnew/3.5.rst:944 msgid "" "A new :class:`~collections.abc.Generator` abstract base class. (Contributed " "by Stefan Behnel in :issue:`24018`.)" msgstr "" -#: ../../whatsnew/3.5.rst:948 +#: ../../whatsnew/3.5.rst:947 msgid "" -"New :class:`~collections.abc.Awaitable`, :class:`~collections.abc.Coroutine`, :class:`~collections.abc.AsyncIterator`, " -"and :class:`~collections.abc.AsyncIterable` abstract base classes. " -"(Contributed by Yury Selivanov in :issue:`24184`.)" +"New :class:`~collections.abc.Awaitable`, :class:`~collections.abc." +"Coroutine`, :class:`~collections.abc.AsyncIterator`, and :class:" +"`~collections.abc.AsyncIterable` abstract base classes. (Contributed by Yury " +"Selivanov in :issue:`24184`.)" msgstr "" -#: ../../whatsnew/3.5.rst:953 +#: ../../whatsnew/3.5.rst:952 msgid "" "For earlier Python versions, a backport of the new ABCs is available in an " "external :pypi:`PyPI package `." msgstr "" -#: ../../whatsnew/3.5.rst:958 +#: ../../whatsnew/3.5.rst:957 msgid "compileall" msgstr "compileall" -#: ../../whatsnew/3.5.rst:960 +#: ../../whatsnew/3.5.rst:959 msgid "" "A new :mod:`compileall` option, :samp:`-j {N}`, allows running *N* workers " -"simultaneously to perform parallel bytecode compilation. " -"The :func:`~compileall.compile_dir` function has a corresponding ``workers`` " +"simultaneously to perform parallel bytecode compilation. The :func:" +"`~compileall.compile_dir` function has a corresponding ``workers`` " "parameter. (Contributed by Claudiu Popa in :issue:`16104`.)" msgstr "" -#: ../../whatsnew/3.5.rst:965 +#: ../../whatsnew/3.5.rst:964 msgid "" "Another new option, ``-r``, allows controlling the maximum recursion level " "for subdirectories. (Contributed by Claudiu Popa in :issue:`19628`.)" msgstr "" -#: ../../whatsnew/3.5.rst:968 +#: ../../whatsnew/3.5.rst:967 msgid "" "The ``-q`` command line option can now be specified more than once, in which " "case all output, including errors, will be suppressed. The corresponding " -"``quiet`` parameter " -"in :func:`~compileall.compile_dir`, :func:`~compileall.compile_file`, " -"and :func:`~compileall.compile_path` can now accept an integer value " -"indicating the level of output suppression. (Contributed by Thomas Kluyver " -"in :issue:`21338`.)" +"``quiet`` parameter in :func:`~compileall.compile_dir`, :func:`~compileall." +"compile_file`, and :func:`~compileall.compile_path` can now accept an " +"integer value indicating the level of output suppression. (Contributed by " +"Thomas Kluyver in :issue:`21338`.)" msgstr "" -#: ../../whatsnew/3.5.rst:977 +#: ../../whatsnew/3.5.rst:976 msgid "concurrent.futures" msgstr "concurrent.futures" -#: ../../whatsnew/3.5.rst:979 +#: ../../whatsnew/3.5.rst:978 msgid "" "The :meth:`Executor.map() ` method now " "accepts a *chunksize* argument to allow batching of tasks to improve " @@ -1535,31 +1558,31 @@ msgid "" "(Contributed by Dan O'Reilly in :issue:`11271`.)" msgstr "" -#: ../../whatsnew/3.5.rst:984 +#: ../../whatsnew/3.5.rst:983 msgid "" "The number of workers in the :class:`~concurrent.futures.ThreadPoolExecutor` " "constructor is optional now. The default value is 5 times the number of " "CPUs. (Contributed by Claudiu Popa in :issue:`21527`.)" msgstr "" -#: ../../whatsnew/3.5.rst:990 +#: ../../whatsnew/3.5.rst:989 msgid "configparser" msgstr "configparser" -#: ../../whatsnew/3.5.rst:992 +#: ../../whatsnew/3.5.rst:991 msgid "" ":mod:`configparser` now provides a way to customize the conversion of values " -"by specifying a dictionary of converters in " -"the :class:`~configparser.ConfigParser` constructor, or by defining them as " -"methods in ``ConfigParser`` subclasses. Converters defined in a parser " -"instance are inherited by its section proxies." +"by specifying a dictionary of converters in the :class:`~configparser." +"ConfigParser` constructor, or by defining them as methods in " +"``ConfigParser`` subclasses. Converters defined in a parser instance are " +"inherited by its section proxies." msgstr "" -#: ../../whatsnew/3.5.rst:998 +#: ../../whatsnew/3.5.rst:997 msgid "Example::" msgstr "範例: ::" -#: ../../whatsnew/3.5.rst:1000 +#: ../../whatsnew/3.5.rst:999 msgid "" ">>> import configparser\n" ">>> conv = {}\n" @@ -1593,15 +1616,15 @@ msgstr "" ">>> section.getlist('list')\n" "['a', 'b', 'c', 'd', 'e', 'f', 'g']" -#: ../../whatsnew/3.5.rst:1016 +#: ../../whatsnew/3.5.rst:1015 msgid "(Contributed by Łukasz Langa in :issue:`18159`.)" msgstr "(由 Łukasz Langa 在 :issue:`18159` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1020 +#: ../../whatsnew/3.5.rst:1019 msgid "contextlib" msgstr "contextlib" -#: ../../whatsnew/3.5.rst:1022 +#: ../../whatsnew/3.5.rst:1021 msgid "" "The new :func:`~contextlib.redirect_stderr` :term:`context manager` (similar " "to :func:`~contextlib.redirect_stdout`) makes it easier for utility scripts " @@ -1609,7 +1632,7 @@ msgid "" "don't provide any options to redirect it::" msgstr "" -#: ../../whatsnew/3.5.rst:1027 +#: ../../whatsnew/3.5.rst:1026 msgid "" ">>> import contextlib, io, logging\n" ">>> f = io.StringIO()\n" @@ -1627,142 +1650,143 @@ msgstr "" ">>> f.getvalue()\n" "'WARNING:root:warning\\n'" -#: ../../whatsnew/3.5.rst:1035 +#: ../../whatsnew/3.5.rst:1034 msgid "(Contributed by Berker Peksag in :issue:`22389`.)" msgstr "(由 Berker Peksag 在 :issue:`22389` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1039 +#: ../../whatsnew/3.5.rst:1038 msgid "csv" msgstr "csv" -#: ../../whatsnew/3.5.rst:1041 +#: ../../whatsnew/3.5.rst:1040 msgid "" "The :meth:`~csv.csvwriter.writerow` method now supports arbitrary iterables, " "not just sequences. (Contributed by Serhiy Storchaka in :issue:`23171`.)" msgstr "" +":meth:`~csv.csvwriter.writerow` 方法現在支援任意可疊代物件,而不僅限於序列。" +"(由 Serhiy Storchaka 在 :issue:`23171` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1046 +#: ../../whatsnew/3.5.rst:1045 msgid "curses" msgstr "curses" -#: ../../whatsnew/3.5.rst:1048 +#: ../../whatsnew/3.5.rst:1047 msgid "" -"The new :func:`~curses.update_lines_cols` function updates the :data:`LINES` " -"and :data:`COLS` module variables. This is useful for detecting manual " -"screen resizing. (Contributed by Arnon Yaari in :issue:`4254`.)" +"The new :func:`~curses.update_lines_cols` function updates the :data:" +"`~curses.LINES` and :data:`~curses.COLS` module variables. This is useful " +"for detecting manual screen resizing. (Contributed by Arnon Yaari in :issue:" +"`4254`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1054 +#: ../../whatsnew/3.5.rst:1053 msgid "dbm" msgstr "dbm" -#: ../../whatsnew/3.5.rst:1056 +#: ../../whatsnew/3.5.rst:1055 msgid "" ":func:`dumb.open ` always creates a new database when the " -"flag has the value ``\"n\"``. (Contributed by Claudiu Popa " -"in :issue:`18039`.)" +"flag has the value ``\"n\"``. (Contributed by Claudiu Popa in :issue:" +"`18039`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1061 +#: ../../whatsnew/3.5.rst:1060 msgid "difflib" msgstr "difflib" -#: ../../whatsnew/3.5.rst:1063 +#: ../../whatsnew/3.5.rst:1062 msgid "" "The charset of HTML documents generated by :meth:`HtmlDiff.make_file() " "` can now be customized by using a new *charset* " "keyword-only argument. The default charset of HTML document changed from " -"``\"ISO-8859-1\"`` to ``\"utf-8\"``. (Contributed by Berker Peksag " -"in :issue:`2052`.)" +"``\"ISO-8859-1\"`` to ``\"utf-8\"``. (Contributed by Berker Peksag in :issue:" +"`2052`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1070 +#: ../../whatsnew/3.5.rst:1069 msgid "" "The :func:`~difflib.diff_bytes` function can now compare lists of byte " "strings. This fixes a regression from Python 2. (Contributed by Terry J. " "Reedy and Greg Ward in :issue:`17445`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1076 +#: ../../whatsnew/3.5.rst:1075 msgid "distutils" msgstr "distutils" -#: ../../whatsnew/3.5.rst:1078 +#: ../../whatsnew/3.5.rst:1077 msgid "" "Both the ``build`` and ``build_ext`` commands now accept a ``-j`` option to " "enable parallel building of extension modules. (Contributed by Antoine " "Pitrou in :issue:`5309`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1082 +#: ../../whatsnew/3.5.rst:1081 msgid "" "The ``distutils`` module now supports ``xz`` compression, and can be enabled " "by passing ``xztar`` as an argument to ``bdist --format``. (Contributed by " "Serhiy Storchaka in :issue:`16314`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1088 +#: ../../whatsnew/3.5.rst:1087 msgid "doctest" msgstr "doctest" -#: ../../whatsnew/3.5.rst:1090 +#: ../../whatsnew/3.5.rst:1089 msgid "" -"The :func:`~doctest.DocTestSuite` function returns an " -"empty :class:`unittest.TestSuite` if *module* contains no docstrings, " -"instead of raising :exc:`ValueError`. (Contributed by Glenn Jones " -"in :issue:`15916`.)" +"The :func:`~doctest.DocTestSuite` function returns an empty :class:`unittest." +"TestSuite` if *module* contains no docstrings, instead of raising :exc:" +"`ValueError`. (Contributed by Glenn Jones in :issue:`15916`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1096 +#: ../../whatsnew/3.5.rst:1095 msgid "email" msgstr "email" -#: ../../whatsnew/3.5.rst:1098 +#: ../../whatsnew/3.5.rst:1097 msgid "" -"A new policy option :attr:`Policy.mangle_from_ " -"` controls whether or not lines that start " -"with ``\"From \"`` in email bodies are prefixed with a ``\">\"`` character " -"by generators. The default is ``True`` for :attr:`~email.policy.compat32` " -"and ``False`` for all other policies. (Contributed by Milan Oberkirch " -"in :issue:`20098`.)" +"A new policy option :attr:`Policy.mangle_from_ ` controls whether or not lines that start with ``\"From \"`` " +"in email bodies are prefixed with a ``\">\"`` character by generators. The " +"default is ``True`` for :attr:`~email.policy.compat32` and ``False`` for all " +"other policies. (Contributed by Milan Oberkirch in :issue:`20098`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1104 +#: ../../whatsnew/3.5.rst:1103 msgid "" -"A new :meth:`Message.get_content_disposition() " -"` method provides easy access " -"to a canonical value for the :mailheader:`Content-Disposition` header. " -"(Contributed by Abhilash Raj in :issue:`21083`.)" +"A new :meth:`Message.get_content_disposition() ` method provides easy access to a canonical value " +"for the :mailheader:`Content-Disposition` header. (Contributed by Abhilash " +"Raj in :issue:`21083`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1110 +#: ../../whatsnew/3.5.rst:1109 msgid "" "A new policy option :attr:`EmailPolicy.utf8 ` " "can be set to ``True`` to encode email headers using the UTF-8 charset " "instead of using encoded words. This allows ``Messages`` to be formatted " -"according to :rfc:`6532` and used with an SMTP server that supports " -"the :rfc:`6531` ``SMTPUTF8`` extension. (Contributed by R. David Murray " -"in :issue:`24211`.)" +"according to :rfc:`6532` and used with an SMTP server that supports the :rfc:" +"`6531` ``SMTPUTF8`` extension. (Contributed by R. David Murray in :issue:" +"`24211`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1117 +#: ../../whatsnew/3.5.rst:1116 msgid "" "The :class:`mime.text.MIMEText ` constructor now " "accepts a :class:`charset.Charset ` instance. " "(Contributed by Claude Paroz and Berker Peksag in :issue:`16324`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1123 +#: ../../whatsnew/3.5.rst:1122 msgid "enum" msgstr "enum" -#: ../../whatsnew/3.5.rst:1125 +#: ../../whatsnew/3.5.rst:1124 msgid "" "The :class:`~enum.Enum` callable has a new parameter *start* to specify the " "initial number of enum values if only *names* are provided::" msgstr "" -#: ../../whatsnew/3.5.rst:1128 +#: ../../whatsnew/3.5.rst:1127 msgid "" ">>> Animal = enum.Enum('Animal', 'cat dog', start=10)\n" ">>> Animal.cat\n" @@ -1776,60 +1800,60 @@ msgstr "" ">>> Animal.dog\n" "" -#: ../../whatsnew/3.5.rst:1134 +#: ../../whatsnew/3.5.rst:1133 msgid "(Contributed by Ethan Furman in :issue:`21706`.)" msgstr "(由 Ethan Furman 在 :issue:`21706` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1138 +#: ../../whatsnew/3.5.rst:1137 msgid "faulthandler" msgstr "faulthandler" -#: ../../whatsnew/3.5.rst:1140 +#: ../../whatsnew/3.5.rst:1139 msgid "" -"The :func:`~faulthandler.enable`, :func:`~faulthandler.register`, :func:`~faulthandler.dump_traceback` " -"and :func:`~faulthandler.dump_traceback_later` functions now accept file " -"descriptors in addition to file-like objects. (Contributed by Wei Wu " -"in :issue:`23566`.)" +"The :func:`~faulthandler.enable`, :func:`~faulthandler.register`, :func:" +"`~faulthandler.dump_traceback` and :func:`~faulthandler." +"dump_traceback_later` functions now accept file descriptors in addition to " +"file-like objects. (Contributed by Wei Wu in :issue:`23566`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1148 +#: ../../whatsnew/3.5.rst:1147 msgid "functools" msgstr "functools" -#: ../../whatsnew/3.5.rst:1152 +#: ../../whatsnew/3.5.rst:1151 msgid "" "Most of the :func:`~functools.lru_cache` machinery is now implemented in C, " "making it significantly faster. (Contributed by Matt Joiner, Alexey " "Kachayev, and Serhiy Storchaka in :issue:`14373`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1158 +#: ../../whatsnew/3.5.rst:1157 msgid "glob" msgstr "glob" -#: ../../whatsnew/3.5.rst:1160 +#: ../../whatsnew/3.5.rst:1159 msgid "" "The :func:`~glob.iglob` and :func:`~glob.glob` functions now support " "recursive search in subdirectories, using the ``\"**\"`` pattern. " "(Contributed by Serhiy Storchaka in :issue:`13968`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1166 +#: ../../whatsnew/3.5.rst:1165 msgid "gzip" msgstr "gzip" -#: ../../whatsnew/3.5.rst:1168 +#: ../../whatsnew/3.5.rst:1167 msgid "" "The *mode* argument of the :class:`~gzip.GzipFile` constructor now accepts " -"``\"x\"`` to request exclusive creation. (Contributed by Tim Heaney " -"in :issue:`19222`.)" +"``\"x\"`` to request exclusive creation. (Contributed by Tim Heaney in :" +"issue:`19222`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1174 +#: ../../whatsnew/3.5.rst:1173 msgid "heapq" msgstr "heapq" -#: ../../whatsnew/3.5.rst:1176 +#: ../../whatsnew/3.5.rst:1175 msgid "" "Element comparison in :func:`~heapq.merge` can now be customized by passing " "a :term:`key function` in a new optional *key* keyword argument, and a new " @@ -1837,7 +1861,7 @@ msgid "" "comparison::" msgstr "" -#: ../../whatsnew/3.5.rst:1181 +#: ../../whatsnew/3.5.rst:1180 msgid "" ">>> import heapq\n" ">>> a = ['9', '777', '55555']\n" @@ -1855,37 +1879,36 @@ msgstr "" ">>> list(heapq.merge(reversed(a), reversed(b), key=len, reverse=True))\n" "['55555', '6666', '777', '88', '9']" -#: ../../whatsnew/3.5.rst:1189 +#: ../../whatsnew/3.5.rst:1188 msgid "(Contributed by Raymond Hettinger in :issue:`13742`.)" msgstr "(由 Raymond Hettinger 在 :issue:`13742` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1193 +#: ../../whatsnew/3.5.rst:1192 msgid "http" msgstr "http" -#: ../../whatsnew/3.5.rst:1195 +#: ../../whatsnew/3.5.rst:1194 msgid "" "A new :class:`HTTPStatus ` enum that defines a set of HTTP " "status codes, reason phrases and long descriptions written in English. " "(Contributed by Demian Brecht in :issue:`21793`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1201 +#: ../../whatsnew/3.5.rst:1200 msgid "http.client" msgstr "http.client" -#: ../../whatsnew/3.5.rst:1203 +#: ../../whatsnew/3.5.rst:1202 msgid "" -":meth:`HTTPConnection.getresponse() " -"` now raises " -"a :exc:`~http.client.RemoteDisconnected` exception when a remote server " -"connection is closed unexpectedly. Additionally, if " -"a :exc:`ConnectionError` (of which ``RemoteDisconnected`` is a subclass) is " +":meth:`HTTPConnection.getresponse() ` now raises a :exc:`~http.client.RemoteDisconnected` exception " +"when a remote server connection is closed unexpectedly. Additionally, if a :" +"exc:`ConnectionError` (of which ``RemoteDisconnected`` is a subclass) is " "raised, the client socket is now closed automatically, and will reconnect on " "the next request::" msgstr "" -#: ../../whatsnew/3.5.rst:1210 +#: ../../whatsnew/3.5.rst:1209 msgid "" "import http.client\n" "conn = http.client.HTTPConnection('www.python.org')\n" @@ -1905,28 +1928,28 @@ msgstr "" " except http.client.RemoteDisconnected:\n" " pass" -#: ../../whatsnew/3.5.rst:1219 +#: ../../whatsnew/3.5.rst:1218 msgid "(Contributed by Martin Panter in :issue:`3566`.)" msgstr "(由 Martin Panter 在 :issue:`3566` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1223 +#: ../../whatsnew/3.5.rst:1222 msgid "idlelib and IDLE" -msgstr "" +msgstr "idlelib 與 IDLE" -#: ../../whatsnew/3.5.rst:1225 +#: ../../whatsnew/3.5.rst:1224 msgid "" "Since idlelib implements the IDLE shell and editor and is not intended for " -"import by other programs, it gets improvements with every release. " -"See :file:`Lib/idlelib/NEWS.txt` for a cumulative list of changes since " -"3.4.0, as well as changes made in future 3.5.x releases. This file is also " -"available from the IDLE :menuselection:`Help --> About IDLE` dialog." +"import by other programs, it gets improvements with every release. See :" +"file:`Lib/idlelib/NEWS.txt` for a cumulative list of changes since 3.4.0, as " +"well as changes made in future 3.5.x releases. This file is also available " +"from the IDLE :menuselection:`Help --> About IDLE` dialog." msgstr "" -#: ../../whatsnew/3.5.rst:1233 +#: ../../whatsnew/3.5.rst:1232 msgid "imaplib" msgstr "imaplib" -#: ../../whatsnew/3.5.rst:1235 +#: ../../whatsnew/3.5.rst:1234 msgid "" "The :class:`~imaplib.IMAP4` class now supports the :term:`context manager` " "protocol. When used in a :keyword:`with` statement, the IMAP4 ``LOGOUT`` " @@ -1934,56 +1957,56 @@ msgid "" "by Tarek Ziadé and Serhiy Storchaka in :issue:`4972`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1240 +#: ../../whatsnew/3.5.rst:1239 msgid "" -"The :mod:`imaplib` module now supports :rfc:`5161` (ENABLE Extension) " -"and :rfc:`6855` (UTF-8 Support) via the :meth:`IMAP4.enable() " -"` method. A new :attr:`IMAP4.utf8_enabled " -"` attribute tracks whether or not :rfc:`6855` " -"support is enabled. (Contributed by Milan Oberkirch, R. David Murray, and " -"Maciej Szulik in :issue:`21800`.)" +"The :mod:`imaplib` module now supports :rfc:`5161` (ENABLE Extension) and :" +"rfc:`6855` (UTF-8 Support) via the :meth:`IMAP4.enable() ` method. A new :attr:`IMAP4.utf8_enabled ` attribute tracks whether or not :rfc:`6855` support is " +"enabled. (Contributed by Milan Oberkirch, R. David Murray, and Maciej Szulik " +"in :issue:`21800`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1247 +#: ../../whatsnew/3.5.rst:1246 msgid "" "The :mod:`imaplib` module now automatically encodes non-ASCII string " "usernames and passwords using UTF-8, as recommended by the RFCs. " "(Contributed by Milan Oberkirch in :issue:`21800`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1253 +#: ../../whatsnew/3.5.rst:1252 msgid "imghdr" msgstr "imghdr" -#: ../../whatsnew/3.5.rst:1255 +#: ../../whatsnew/3.5.rst:1254 msgid "" -"The :func:`!what` function now recognizes the `OpenEXR `_ format (contributed by Martin Vignali and Claudiu Popa " -"in :issue:`20295`), and the `WebP `_ " -"format (contributed by Fabrice Aneche and Claudiu Popa in :issue:`20197`.)" +"The :func:`!what` function now recognizes the `OpenEXR `_ format (contributed by Martin Vignali and Claudiu Popa in :issue:" +"`20295`), and the `WebP `_ format " +"(contributed by Fabrice Aneche and Claudiu Popa in :issue:`20197`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1263 +#: ../../whatsnew/3.5.rst:1262 msgid "importlib" msgstr "importlib" -#: ../../whatsnew/3.5.rst:1265 +#: ../../whatsnew/3.5.rst:1264 msgid "" "The :class:`util.LazyLoader ` class allows for " "lazy loading of modules in applications where startup time is important. " "(Contributed by Brett Cannon in :issue:`17621`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1269 +#: ../../whatsnew/3.5.rst:1268 msgid "" -"The :func:`abc.InspectLoader.source_to_code() " -"` method is now a static " -"method. This makes it easier to initialize a module object with code " -"compiled from a string by running ``exec(code, module.__dict__)``. " -"(Contributed by Brett Cannon in :issue:`21156`.)" +"The :func:`abc.InspectLoader.source_to_code() ` method is now a static method. This makes it easier to " +"initialize a module object with code compiled from a string by running " +"``exec(code, module.__dict__)``. (Contributed by Brett Cannon in :issue:" +"`21156`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1275 +#: ../../whatsnew/3.5.rst:1274 msgid "" "The new :func:`util.module_from_spec() ` " "function is now the preferred way to create a new module. As opposed to " @@ -1992,25 +2015,25 @@ msgid "" "spec object. (Contributed by Brett Cannon in :issue:`20383`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1283 +#: ../../whatsnew/3.5.rst:1282 msgid "inspect" msgstr "inspect" -#: ../../whatsnew/3.5.rst:1285 +#: ../../whatsnew/3.5.rst:1284 msgid "" "Both the :class:`~inspect.Signature` and :class:`~inspect.Parameter` classes " -"are now picklable and hashable. (Contributed by Yury Selivanov " -"in :issue:`20726` and :issue:`20334`.)" +"are now picklable and hashable. (Contributed by Yury Selivanov in :issue:" +"`20726` and :issue:`20334`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1289 +#: ../../whatsnew/3.5.rst:1288 msgid "" -"A new :meth:`BoundArguments.apply_defaults() " -"` method provides a way to set " -"default values for missing arguments::" +"A new :meth:`BoundArguments.apply_defaults() ` method provides a way to set default values for missing " +"arguments::" msgstr "" -#: ../../whatsnew/3.5.rst:1293 +#: ../../whatsnew/3.5.rst:1292 msgid "" ">>> def foo(a, b='ham', *args): pass\n" ">>> ba = inspect.signature(foo).bind('spam')\n" @@ -2024,67 +2047,67 @@ msgstr "" ">>> ba.arguments\n" "OrderedDict([('a', 'spam'), ('b', 'ham'), ('args', ())])" -#: ../../whatsnew/3.5.rst:1299 +#: ../../whatsnew/3.5.rst:1298 msgid "(Contributed by Yury Selivanov in :issue:`24190`.)" msgstr "(由 Yury Selivanov 在 :issue:`24190` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1301 +#: ../../whatsnew/3.5.rst:1300 msgid "" -"A new class method :meth:`Signature.from_callable() " -"` makes subclassing " -"of :class:`~inspect.Signature` easier. (Contributed by Yury Selivanov and " -"Eric Snow in :issue:`17373`.)" +"A new class method :meth:`Signature.from_callable() ` makes subclassing of :class:`~inspect.Signature` easier. " +"(Contributed by Yury Selivanov and Eric Snow in :issue:`17373`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1306 +#: ../../whatsnew/3.5.rst:1305 msgid "" "The :func:`~inspect.signature` function now accepts a *follow_wrapped* " "optional keyword argument, which, when set to ``False``, disables automatic " -"following of ``__wrapped__`` links. (Contributed by Yury Selivanov " -"in :issue:`20691`.)" +"following of ``__wrapped__`` links. (Contributed by Yury Selivanov in :issue:" +"`20691`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1311 +#: ../../whatsnew/3.5.rst:1310 msgid "" "A set of new functions to inspect :term:`coroutine functions ` and :term:`coroutine objects ` has been " -"added: :func:`~inspect.iscoroutine`, :func:`~inspect.iscoroutinefunction`, :func:`~inspect.isawaitable`, :func:`~inspect.getcoroutinelocals`, " -"and :func:`~inspect.getcoroutinestate`. (Contributed by Yury Selivanov " -"in :issue:`24017` and :issue:`24400`.)" +"function>` and :term:`coroutine objects ` has been added: :func:" +"`~inspect.iscoroutine`, :func:`~inspect.iscoroutinefunction`, :func:" +"`~inspect.isawaitable`, :func:`~inspect.getcoroutinelocals`, and :func:" +"`~inspect.getcoroutinestate`. (Contributed by Yury Selivanov in :issue:" +"`24017` and :issue:`24400`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1319 +#: ../../whatsnew/3.5.rst:1318 msgid "" -"The :func:`~inspect.stack`, :func:`~inspect.trace`, :func:`~inspect.getouterframes`, " -"and :func:`~inspect.getinnerframes` functions now return a list of named " -"tuples. (Contributed by Daniel Shahaf in :issue:`16808`.)" +"The :func:`~inspect.stack`, :func:`~inspect.trace`, :func:`~inspect." +"getouterframes`, and :func:`~inspect.getinnerframes` functions now return a " +"list of named tuples. (Contributed by Daniel Shahaf in :issue:`16808`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1326 +#: ../../whatsnew/3.5.rst:1325 msgid "io" msgstr "io" -#: ../../whatsnew/3.5.rst:1328 +#: ../../whatsnew/3.5.rst:1327 msgid "" "A new :meth:`BufferedIOBase.readinto1() ` " -"method, that uses at most one call to the underlying raw " -"stream's :meth:`RawIOBase.read() ` " -"or :meth:`RawIOBase.readinto() ` methods. " -"(Contributed by Nikolaus Rath in :issue:`20578`.)" +"method, that uses at most one call to the underlying raw stream's :meth:" +"`RawIOBase.read() ` or :meth:`RawIOBase.readinto() ` methods. (Contributed by Nikolaus Rath in :issue:" +"`20578`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1336 +#: ../../whatsnew/3.5.rst:1335 msgid "ipaddress" msgstr "ipaddress" -#: ../../whatsnew/3.5.rst:1338 +#: ../../whatsnew/3.5.rst:1337 msgid "" "Both the :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` " "classes now accept an ``(address, netmask)`` tuple argument, so as to easily " "construct network objects from existing addresses::" msgstr "" -#: ../../whatsnew/3.5.rst:1342 +#: ../../whatsnew/3.5.rst:1341 msgid "" ">>> import ipaddress\n" ">>> ipaddress.IPv4Network(('127.0.0.0', 8))\n" @@ -2098,18 +2121,18 @@ msgstr "" ">>> ipaddress.IPv4Network(('127.0.0.0', '255.0.0.0'))\n" "IPv4Network('127.0.0.0/8')" -#: ../../whatsnew/3.5.rst:1348 +#: ../../whatsnew/3.5.rst:1347 msgid "(Contributed by Peter Moody and Antoine Pitrou in :issue:`16531`.)" msgstr "(由 Peter Moody 和 Antoine Pitrou 在 :issue:`16531` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1350 +#: ../../whatsnew/3.5.rst:1349 msgid "" -"A new :attr:`~ipaddress.IPv4Network.reverse_pointer` attribute for " -"the :class:`~ipaddress.IPv4Network` and :class:`~ipaddress.IPv6Network` " -"classes returns the name of the reverse DNS PTR record::" +"A new :attr:`~ipaddress.IPv4Address.reverse_pointer` attribute for the :" +"class:`~ipaddress.IPv4Address` and :class:`~ipaddress.IPv6Address` classes " +"returns the name of the reverse DNS PTR record::" msgstr "" -#: ../../whatsnew/3.5.rst:1354 +#: ../../whatsnew/3.5.rst:1353 msgid "" ">>> import ipaddress\n" ">>> addr = ipaddress.IPv4Address('127.0.0.1')\n" @@ -2127,34 +2150,34 @@ msgstr "" ">>> addr6.reverse_pointer\n" "'1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa'" -#: ../../whatsnew/3.5.rst:1362 +#: ../../whatsnew/3.5.rst:1361 msgid "(Contributed by Leon Weber in :issue:`20480`.)" msgstr "(由 Leon Weber 在 :issue:`20480` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1366 +#: ../../whatsnew/3.5.rst:1365 msgid "json" msgstr "json" -#: ../../whatsnew/3.5.rst:1368 +#: ../../whatsnew/3.5.rst:1367 msgid "" "The :mod:`json.tool` command line interface now preserves the order of keys " "in JSON objects passed in input. The new ``--sort-keys`` option can be used " -"to sort the keys alphabetically. (Contributed by Berker Peksag " -"in :issue:`21650`.)" +"to sort the keys alphabetically. (Contributed by Berker Peksag in :issue:" +"`21650`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1373 +#: ../../whatsnew/3.5.rst:1372 msgid "" -"JSON decoder now raises :exc:`~json.JSONDecodeError` instead " -"of :exc:`ValueError` to provide better context information about the error. " +"JSON decoder now raises :exc:`~json.JSONDecodeError` instead of :exc:" +"`ValueError` to provide better context information about the error. " "(Contributed by Serhiy Storchaka in :issue:`19361`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1379 +#: ../../whatsnew/3.5.rst:1378 msgid "linecache" msgstr "linecache" -#: ../../whatsnew/3.5.rst:1381 +#: ../../whatsnew/3.5.rst:1380 msgid "" "A new :func:`~linecache.lazycache` function can be used to capture " "information about a non-file-based module to permit getting its lines later " @@ -2163,18 +2186,18 @@ msgid "" "indefinitely. (Contributed by Robert Collins in :issue:`17911`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1389 +#: ../../whatsnew/3.5.rst:1388 msgid "locale" msgstr "locale" -#: ../../whatsnew/3.5.rst:1391 +#: ../../whatsnew/3.5.rst:1390 msgid "" "A new :func:`~locale.delocalize` function can be used to convert a string " "into a normalized number string, taking the ``LC_NUMERIC`` settings into " "account::" msgstr "" -#: ../../whatsnew/3.5.rst:1394 +#: ../../whatsnew/3.5.rst:1393 msgid "" ">>> import locale\n" ">>> locale.setlocale(locale.LC_NUMERIC, 'de_DE.UTF-8')\n" @@ -2196,23 +2219,23 @@ msgstr "" ">>> locale.delocalize('1,234.56')\n" "'1234.56'" -#: ../../whatsnew/3.5.rst:1404 +#: ../../whatsnew/3.5.rst:1403 msgid "(Contributed by Cédric Krier in :issue:`13918`.)" msgstr "(由 Cédric Krier 在 :issue:`13918` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1408 +#: ../../whatsnew/3.5.rst:1407 msgid "logging" msgstr "logging" -#: ../../whatsnew/3.5.rst:1410 +#: ../../whatsnew/3.5.rst:1409 msgid "" -"All logging methods " -"(:class:`~logging.Logger` :meth:`~logging.Logger.log`, :meth:`~logging.Logger.exception`, :meth:`~logging.Logger.critical`, :meth:`~logging.Logger.debug`, " -"etc.), now accept exception instances as an *exc_info* argument, in addition " -"to boolean values and exception tuples::" +"All logging methods (:class:`~logging.Logger` :meth:`~logging.Logger.log`, :" +"meth:`~logging.Logger.exception`, :meth:`~logging.Logger.critical`, :meth:" +"`~logging.Logger.debug`, etc.), now accept exception instances as an " +"*exc_info* argument, in addition to boolean values and exception tuples::" msgstr "" -#: ../../whatsnew/3.5.rst:1416 +#: ../../whatsnew/3.5.rst:1415 msgid "" ">>> import logging\n" ">>> try:\n" @@ -2228,19 +2251,19 @@ msgstr "" "... logging.error('exception', exc_info=ex)\n" "ERROR:root:exception" -#: ../../whatsnew/3.5.rst:1423 +#: ../../whatsnew/3.5.rst:1422 msgid "(Contributed by Yury Selivanov in :issue:`20537`.)" msgstr "(由 Yury Selivanov 在 :issue:`20537` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1425 +#: ../../whatsnew/3.5.rst:1424 msgid "" "The :class:`handlers.HTTPHandler ` class now " "accepts an optional :class:`ssl.SSLContext` instance to configure SSL " -"settings used in an HTTP connection. (Contributed by Alex Gaynor " -"in :issue:`22788`.)" +"settings used in an HTTP connection. (Contributed by Alex Gaynor in :issue:" +"`22788`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1430 +#: ../../whatsnew/3.5.rst:1429 msgid "" "The :class:`handlers.QueueListener ` class " "now takes a *respect_handler_level* keyword argument which, if set to " @@ -2248,96 +2271,96 @@ msgid "" "(Contributed by Vinay Sajip.)" msgstr "" -#: ../../whatsnew/3.5.rst:1437 +#: ../../whatsnew/3.5.rst:1436 msgid "lzma" msgstr "lzma" -#: ../../whatsnew/3.5.rst:1439 +#: ../../whatsnew/3.5.rst:1438 msgid "" "The :meth:`LZMADecompressor.decompress() ` " "method now accepts an optional *max_length* argument to limit the maximum " "size of decompressed data. (Contributed by Martin Panter in :issue:`15955`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1446 +#: ../../whatsnew/3.5.rst:1445 msgid "math" msgstr "math" -#: ../../whatsnew/3.5.rst:1448 +#: ../../whatsnew/3.5.rst:1447 msgid "" -"Two new constants have been added to the :mod:`math` " -"module: :data:`~math.inf` and :data:`~math.nan`. (Contributed by Mark " -"Dickinson in :issue:`23185`.)" +"Two new constants have been added to the :mod:`math` module: :data:`~math." +"inf` and :data:`~math.nan`. (Contributed by Mark Dickinson in :issue:" +"`23185`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1451 +#: ../../whatsnew/3.5.rst:1450 msgid "" "A new function :func:`~math.isclose` provides a way to test for approximate " "equality. (Contributed by Chris Barker and Tal Einat in :issue:`24270`.)" msgstr "" +"一個新函式 :func:`~math.isclose` 提供了測試近似相等性的方式。(由 Chris " +"Barker 和 Tal Einat 在 :issue:`24270` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1454 +#: ../../whatsnew/3.5.rst:1453 msgid "" -"A new :func:`~math.gcd` function has been added. The :func:`fractions.gcd` " +"A new :func:`~math.gcd` function has been added. The :func:`!fractions.gcd` " "function is now deprecated. (Contributed by Mark Dickinson and Serhiy " "Storchaka in :issue:`22486`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1460 +#: ../../whatsnew/3.5.rst:1459 msgid "multiprocessing" msgstr "multiprocessing" -#: ../../whatsnew/3.5.rst:1462 +#: ../../whatsnew/3.5.rst:1461 msgid "" -":func:`sharedctypes.synchronized() " -"` objects now support " -"the :term:`context manager` protocol. (Contributed by Charles-François " -"Natali in :issue:`21565`.)" +":func:`sharedctypes.synchronized() ` objects now support the :term:`context manager` protocol. " +"(Contributed by Charles-François Natali in :issue:`21565`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1468 +#: ../../whatsnew/3.5.rst:1467 msgid "operator" msgstr "operator" -#: ../../whatsnew/3.5.rst:1470 +#: ../../whatsnew/3.5.rst:1469 msgid "" -":func:`~operator.attrgetter`, :func:`~operator.itemgetter`, " -"and :func:`~operator.methodcaller` objects now support pickling. " -"(Contributed by Josh Rosenberg and Serhiy Storchaka in :issue:`22955`.)" +":func:`~operator.attrgetter`, :func:`~operator.itemgetter`, and :func:" +"`~operator.methodcaller` objects now support pickling. (Contributed by Josh " +"Rosenberg and Serhiy Storchaka in :issue:`22955`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1474 +#: ../../whatsnew/3.5.rst:1473 msgid "" "New :func:`~operator.matmul` and :func:`~operator.imatmul` functions to " -"perform matrix multiplication. (Contributed by Benjamin Peterson " -"in :issue:`21176`.)" +"perform matrix multiplication. (Contributed by Benjamin Peterson in :issue:" +"`21176`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1480 +#: ../../whatsnew/3.5.rst:1479 msgid "os" msgstr "os" -#: ../../whatsnew/3.5.rst:1482 +#: ../../whatsnew/3.5.rst:1481 msgid "" -"The new :func:`~os.scandir` function returning an iterator " -"of :class:`~os.DirEntry` objects has been added. If " -"possible, :func:`~os.scandir` extracts file attributes while scanning a " -"directory, removing the need to perform subsequent system calls to determine " -"file type or attributes, which may significantly improve performance. " -"(Contributed by Ben Hoyt with the help of Victor Stinner in :issue:`22524`.)" +"The new :func:`~os.scandir` function returning an iterator of :class:`~os." +"DirEntry` objects has been added. If possible, :func:`~os.scandir` extracts " +"file attributes while scanning a directory, removing the need to perform " +"subsequent system calls to determine file type or attributes, which may " +"significantly improve performance. (Contributed by Ben Hoyt with the help " +"of Victor Stinner in :issue:`22524`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1489 +#: ../../whatsnew/3.5.rst:1488 msgid "" -"On Windows, a new :attr:`stat_result.st_file_attributes " -"` attribute is now available. It " -"corresponds to the ``dwFileAttributes`` member of the " -"``BY_HANDLE_FILE_INFORMATION`` structure returned by " -"``GetFileInformationByHandle()``. (Contributed by Ben Hoyt " -"in :issue:`21719`.)" +"On Windows, a new :attr:`stat_result.st_file_attributes ` attribute is now available. It corresponds to the " +"``dwFileAttributes`` member of the ``BY_HANDLE_FILE_INFORMATION`` structure " +"returned by ``GetFileInformationByHandle()``. (Contributed by Ben Hoyt in :" +"issue:`21719`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1495 +#: ../../whatsnew/3.5.rst:1494 msgid "" "The :func:`~os.urandom` function now uses the ``getrandom()`` syscall on " "Linux 3.17 or newer, and ``getentropy()`` on OpenBSD 5.6 and newer, removing " @@ -2345,27 +2368,29 @@ msgid "" "descriptor exhaustion. (Contributed by Victor Stinner in :issue:`22181`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1500 +#: ../../whatsnew/3.5.rst:1499 msgid "" "New :func:`~os.get_blocking` and :func:`~os.set_blocking` functions allow " -"getting and setting a file descriptor's blocking mode " -"(:const:`~os.O_NONBLOCK`.) (Contributed by Victor Stinner in :issue:`22054`.)" +"getting and setting a file descriptor's blocking mode (:const:`~os." +"O_NONBLOCK`.) (Contributed by Victor Stinner in :issue:`22054`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1504 +#: ../../whatsnew/3.5.rst:1503 msgid "" "The :func:`~os.truncate` and :func:`~os.ftruncate` functions are now " "supported on Windows. (Contributed by Steve Dower in :issue:`23668`.)" msgstr "" +"Windows 現在支援 :func:`~os.truncate` 和 :func:`~os.ftruncate` 函式。(由 Steve " +"Dower 在 :issue:`23668` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1507 +#: ../../whatsnew/3.5.rst:1506 msgid "" "There is a new :func:`os.path.commonpath` function returning the longest " -"common sub-path of each passed pathname. Unlike " -"the :func:`os.path.commonprefix` function, it always returns a valid path::" +"common sub-path of each passed pathname. Unlike the :func:`os.path." +"commonprefix` function, it always returns a valid path::" msgstr "" -#: ../../whatsnew/3.5.rst:1512 +#: ../../whatsnew/3.5.rst:1511 msgid "" ">>> os.path.commonprefix(['/usr/lib', '/usr/local/lib'])\n" "'/usr/l'\n" @@ -2379,22 +2404,22 @@ msgstr "" ">>> os.path.commonpath(['/usr/lib', '/usr/local/lib'])\n" "'/usr'" -#: ../../whatsnew/3.5.rst:1518 +#: ../../whatsnew/3.5.rst:1517 msgid "(Contributed by Rafik Draoui and Serhiy Storchaka in :issue:`10395`.)" msgstr "(由 Rafik Draoui 和 Serhiy Storchaka 在 :issue:`10395` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1522 +#: ../../whatsnew/3.5.rst:1521 msgid "pathlib" msgstr "pathlib" -#: ../../whatsnew/3.5.rst:1524 +#: ../../whatsnew/3.5.rst:1523 msgid "" "The new :meth:`Path.samefile() ` method can be used " "to check whether the path points to the same file as another path, which can " "be either another :class:`~pathlib.Path` object, or a string::" msgstr "" -#: ../../whatsnew/3.5.rst:1528 +#: ../../whatsnew/3.5.rst:1527 msgid "" ">>> import pathlib\n" ">>> p1 = pathlib.Path('/etc/hosts')\n" @@ -2408,49 +2433,48 @@ msgstr "" ">>> p1.samefile(p2)\n" "True" -#: ../../whatsnew/3.5.rst:1534 +#: ../../whatsnew/3.5.rst:1533 msgid "(Contributed by Vajrasky Kok and Antoine Pitrou in :issue:`19775`.)" msgstr "(由 Vajrasky Kok 和 Antoine Pitrou 在 :issue:`19775` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1536 +#: ../../whatsnew/3.5.rst:1535 msgid "" "The :meth:`Path.mkdir() ` method now accepts a new " "optional *exist_ok* argument to match ``mkdir -p`` and :func:`os.makedirs` " "functionality. (Contributed by Berker Peksag in :issue:`21539`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1540 +#: ../../whatsnew/3.5.rst:1539 msgid "" "There is a new :meth:`Path.expanduser() ` method to " "expand ``~`` and ``~user`` prefixes. (Contributed by Serhiy Storchaka and " "Claudiu Popa in :issue:`19776`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1544 +#: ../../whatsnew/3.5.rst:1543 msgid "" "A new :meth:`Path.home() ` class method can be used to " "get a :class:`~pathlib.Path` instance representing the user’s home " -"directory. (Contributed by Victor Salgado and Mayank Tripathi " -"in :issue:`19777`.)" +"directory. (Contributed by Victor Salgado and Mayank Tripathi in :issue:" +"`19777`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1549 +#: ../../whatsnew/3.5.rst:1548 msgid "" -"New :meth:`Path.write_text() " -"`, :meth:`Path.read_text() " -"`, :meth:`Path.write_bytes() " -"`, :meth:`Path.read_bytes() " -"` methods to simplify read/write operations on " -"files." +"New :meth:`Path.write_text() `, :meth:`Path." +"read_text() `, :meth:`Path.write_bytes() `, :meth:`Path.read_bytes() ` " +"methods to simplify read/write operations on files." msgstr "" -#: ../../whatsnew/3.5.rst:1555 +#: ../../whatsnew/3.5.rst:1554 msgid "" "The following code snippet will create or rewrite existing file ``~/" "spam42``::" msgstr "" +"以下程式碼片段將會建立或重寫已存在的檔案 ``~/spam42``: ::" -#: ../../whatsnew/3.5.rst:1558 +#: ../../whatsnew/3.5.rst:1557 msgid "" ">>> import pathlib\n" ">>> p = pathlib.Path('~/spam42')\n" @@ -2462,15 +2486,15 @@ msgstr "" ">>> p.expanduser().write_text('ham')\n" "3" -#: ../../whatsnew/3.5.rst:1563 +#: ../../whatsnew/3.5.rst:1562 msgid "(Contributed by Christopher Welborn in :issue:`20218`.)" msgstr "(由 Christopher Welborn 在 :issue:`20218` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1567 +#: ../../whatsnew/3.5.rst:1566 msgid "pickle" msgstr "pickle" -#: ../../whatsnew/3.5.rst:1569 +#: ../../whatsnew/3.5.rst:1568 msgid "" "Nested objects, such as unbound methods or nested classes, can now be " "pickled using :ref:`pickle protocols ` older than protocol " @@ -2478,28 +2502,28 @@ msgid "" "Serhiy Storchaka in :issue:`23611`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1576 +#: ../../whatsnew/3.5.rst:1575 msgid "poplib" msgstr "poplib" -#: ../../whatsnew/3.5.rst:1578 +#: ../../whatsnew/3.5.rst:1577 msgid "" "A new :meth:`POP3.utf8() ` command enables :rfc:`6856` " "(Internationalized Email) support, if a POP server supports it. (Contributed " "by Milan OberKirch in :issue:`21804`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1584 +#: ../../whatsnew/3.5.rst:1583 msgid "re" msgstr "re" -#: ../../whatsnew/3.5.rst:1586 +#: ../../whatsnew/3.5.rst:1585 msgid "" "References and conditional references to groups with fixed length are now " "allowed in lookbehind assertions::" msgstr "" -#: ../../whatsnew/3.5.rst:1589 +#: ../../whatsnew/3.5.rst:1588 msgid "" ">>> import re\n" ">>> pat = re.compile(r'(a|b).(?<=\\1)c')\n" @@ -2515,32 +2539,33 @@ msgstr "" ">>> pat.match('bbc')\n" "<_sre.SRE_Match object; span=(0, 3), match='bbc'>" -#: ../../whatsnew/3.5.rst:1596 +#: ../../whatsnew/3.5.rst:1595 msgid "(Contributed by Serhiy Storchaka in :issue:`9179`.)" msgstr "(由 Serhiy Storchaka 在 :issue:`9179` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1598 +#: ../../whatsnew/3.5.rst:1597 msgid "" "The number of capturing groups in regular expressions is no longer limited " "to 100. (Contributed by Serhiy Storchaka in :issue:`22437`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1601 +#: ../../whatsnew/3.5.rst:1600 msgid "" "The :func:`~re.sub` and :func:`~re.subn` functions now replace unmatched " "groups with empty strings instead of raising an exception. (Contributed by " "Serhiy Storchaka in :issue:`1519638`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1605 +#: ../../whatsnew/3.5.rst:1604 msgid "" -"The :class:`re.error` exceptions have new " -"attributes, :attr:`~re.error.msg`, :attr:`~re.error.pattern`, :attr:`~re.error.pos`, :attr:`~re.error.lineno`, " -"and :attr:`~re.error.colno`, that provide better context information about " -"the error::" +"The :class:`re.error ` exceptions have new attributes, :" +"attr:`~re.PatternError.msg`, :attr:`~re.PatternError.pattern`, :attr:`~re." +"PatternError.pos`, :attr:`~re.PatternError.lineno`, and :attr:`~re." +"PatternError.colno`, that provide better context information about the " +"error::" msgstr "" -#: ../../whatsnew/3.5.rst:1611 +#: ../../whatsnew/3.5.rst:1610 msgid "" ">>> re.compile(\"\"\"\n" "... (?x)\n" @@ -2558,36 +2583,36 @@ msgstr "" " ...\n" "sre_constants.error: multiple repeat at position 16 (line 3, column 7)" -#: ../../whatsnew/3.5.rst:1619 +#: ../../whatsnew/3.5.rst:1618 msgid "(Contributed by Serhiy Storchaka in :issue:`22578`.)" msgstr "(由 Serhiy Storchaka 在 :issue:`22578` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1623 +#: ../../whatsnew/3.5.rst:1622 msgid "readline" msgstr "readline" -#: ../../whatsnew/3.5.rst:1625 +#: ../../whatsnew/3.5.rst:1624 msgid "" "A new :func:`~readline.append_history_file` function can be used to append " "the specified number of trailing elements in history to the given file. " "(Contributed by Bruno Cauet in :issue:`22940`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1631 +#: ../../whatsnew/3.5.rst:1630 msgid "selectors" msgstr "selectors" -#: ../../whatsnew/3.5.rst:1633 +#: ../../whatsnew/3.5.rst:1632 msgid "" "The new :class:`~selectors.DevpollSelector` supports efficient ``/dev/poll`` " "polling on Solaris. (Contributed by Giampaolo Rodola' in :issue:`18931`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1639 +#: ../../whatsnew/3.5.rst:1638 msgid "shutil" msgstr "shutil" -#: ../../whatsnew/3.5.rst:1641 +#: ../../whatsnew/3.5.rst:1640 msgid "" "The :func:`~shutil.move` function now accepts a *copy_function* argument, " "allowing, for example, the :func:`~shutil.copy` function to be used instead " @@ -2595,23 +2620,25 @@ msgid "" "metadata when moving. (Contributed by Claudiu Popa in :issue:`19840`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1647 +#: ../../whatsnew/3.5.rst:1646 msgid "" "The :func:`~shutil.make_archive` function now supports the *xztar* format. " "(Contributed by Serhiy Storchaka in :issue:`5411`.)" msgstr "" +":func:`~shutil.make_archive` 函式現在支援 *xztar* 格式。(由 Serhiy Storchaka " +"在 :issue:`5411` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1652 +#: ../../whatsnew/3.5.rst:1651 msgid "signal" msgstr "signal" -#: ../../whatsnew/3.5.rst:1654 +#: ../../whatsnew/3.5.rst:1653 msgid "" "On Windows, the :func:`~signal.set_wakeup_fd` function now also supports " "socket handles. (Contributed by Victor Stinner in :issue:`22018`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1657 +#: ../../whatsnew/3.5.rst:1656 msgid "" "Various ``SIG*`` constants in the :mod:`signal` module have been converted " "into :mod:`Enums `. This allows meaningful names to be printed during " @@ -2619,11 +2646,11 @@ msgid "" "Rodola' in :issue:`21076`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1664 +#: ../../whatsnew/3.5.rst:1663 msgid "smtpd" msgstr "smtpd" -#: ../../whatsnew/3.5.rst:1666 +#: ../../whatsnew/3.5.rst:1665 msgid "" "Both the :class:`!SMTPServer` and :class:`!SMTPChannel` classes now accept a " "*decode_data* keyword argument to determine if the ``DATA`` portion of the " @@ -2635,16 +2662,16 @@ msgid "" "arguments. (Contributed by Maciej Szulik in :issue:`19662`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1677 +#: ../../whatsnew/3.5.rst:1676 msgid "" -"The :class:`!SMTPServer` class now advertises the ``8BITMIME`` extension " -"(:rfc:`6152`) if *decode_data* has been set ``True``. If the client " -"specifies ``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to :meth:`!" +"The :class:`!SMTPServer` class now advertises the ``8BITMIME`` extension (:" +"rfc:`6152`) if *decode_data* has been set ``True``. If the client specifies " +"``BODY=8BITMIME`` on the ``MAIL`` command, it is passed to :meth:`!" "SMTPServer.process_message` via the *mail_options* keyword. (Contributed by " "Milan Oberkirch and R. David Murray in :issue:`21795`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1684 +#: ../../whatsnew/3.5.rst:1683 msgid "" "The :class:`!SMTPServer` class now also supports the ``SMTPUTF8`` extension " "(:rfc:`6531`: Internationalized Email). If the client specified ``SMTPUTF8 " @@ -2654,71 +2681,70 @@ msgid "" "``SMTPUTF8`` data. (Contributed by Milan Oberkirch in :issue:`21725`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1692 +#: ../../whatsnew/3.5.rst:1691 msgid "" "It is now possible to provide, directly or via name resolution, IPv6 " "addresses in the :class:`!SMTPServer` constructor, and have it successfully " "connect. (Contributed by Milan Oberkirch in :issue:`14758`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1698 +#: ../../whatsnew/3.5.rst:1697 msgid "smtplib" msgstr "smtplib" -#: ../../whatsnew/3.5.rst:1700 +#: ../../whatsnew/3.5.rst:1699 msgid "" "A new :meth:`SMTP.auth() ` method provides a convenient " "way to implement custom authentication mechanisms. (Contributed by Milan " "Oberkirch in :issue:`15014`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1704 +#: ../../whatsnew/3.5.rst:1703 msgid "" "The :meth:`SMTP.set_debuglevel() ` method now " "accepts an additional debuglevel (2), which enables timestamps in debug " -"messages. (Contributed by Gavin Chappell and Maciej Szulik " -"in :issue:`16914`.)" +"messages. (Contributed by Gavin Chappell and Maciej Szulik in :issue:" +"`16914`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1708 +#: ../../whatsnew/3.5.rst:1707 msgid "" -"Both the :meth:`SMTP.sendmail() ` " -"and :meth:`SMTP.send_message() ` methods now " -"support :rfc:`6531` (SMTPUTF8). (Contributed by Milan Oberkirch and R. David " -"Murray in :issue:`22027`.)" +"Both the :meth:`SMTP.sendmail() ` and :meth:`SMTP." +"send_message() ` methods now support :rfc:`6531` " +"(SMTPUTF8). (Contributed by Milan Oberkirch and R. David Murray in :issue:" +"`22027`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1715 +#: ../../whatsnew/3.5.rst:1714 msgid "sndhdr" msgstr "sndhdr" -#: ../../whatsnew/3.5.rst:1717 +#: ../../whatsnew/3.5.rst:1716 msgid "" -"The :func:`!what` and :func:`!whathdr` functions now return " -"a :func:`~collections.namedtuple`. (Contributed by Claudiu Popa " -"in :issue:`18615`.)" +"The :func:`!what` and :func:`!whathdr` functions now return a :func:" +"`~collections.namedtuple`. (Contributed by Claudiu Popa in :issue:`18615`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1723 +#: ../../whatsnew/3.5.rst:1722 msgid "socket" msgstr "socket" -#: ../../whatsnew/3.5.rst:1725 +#: ../../whatsnew/3.5.rst:1724 msgid "" "Functions with timeouts now use a monotonic clock, instead of a system " "clock. (Contributed by Victor Stinner in :issue:`22043`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1728 +#: ../../whatsnew/3.5.rst:1727 msgid "" "A new :meth:`socket.sendfile() ` method allows " -"sending a file over a socket by using the high-" -"performance :func:`os.sendfile` function on UNIX, resulting in uploads being " -"from 2 to 3 times faster than when using plain :meth:`socket.send() " -"`. (Contributed by Giampaolo Rodola' in :issue:`17552`.)" +"sending a file over a socket by using the high-performance :func:`os." +"sendfile` function on UNIX, resulting in uploads being from 2 to 3 times " +"faster than when using plain :meth:`socket.send() `. " +"(Contributed by Giampaolo Rodola' in :issue:`17552`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1734 +#: ../../whatsnew/3.5.rst:1733 msgid "" "The :meth:`socket.sendall() ` method no longer resets " "the socket timeout every time bytes are received or sent. The socket " @@ -2726,144 +2752,141 @@ msgid "" "Victor Stinner in :issue:`23853`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1739 +#: ../../whatsnew/3.5.rst:1738 msgid "" "The *backlog* argument of the :meth:`socket.listen() ` " -"method is now optional. By default it is set to :data:`SOMAXCONN " -"` or to ``128``, whichever is less. (Contributed by " -"Charles-François Natali in :issue:`21455`.)" +"method is now optional. By default it is set to :data:`SOMAXCONN ` or to ``128``, whichever is less. (Contributed by Charles-" +"François Natali in :issue:`21455`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1746 +#: ../../whatsnew/3.5.rst:1745 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.5.rst:1751 +#: ../../whatsnew/3.5.rst:1750 msgid "Memory BIO Support" -msgstr "" +msgstr "記憶體 BIO 支援" -#: ../../whatsnew/3.5.rst:1753 +#: ../../whatsnew/3.5.rst:1752 msgid "(Contributed by Geert Jansen in :issue:`21965`.)" msgstr "(由 Geert Jansen 在 :issue:`21965` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1755 +#: ../../whatsnew/3.5.rst:1754 msgid "" "The new :class:`~ssl.SSLObject` class has been added to provide SSL protocol " -"support for cases when the network I/O capabilities " -"of :class:`~ssl.SSLSocket` are not necessary or are suboptimal. " -"``SSLObject`` represents an SSL protocol instance, but does not implement " -"any network I/O methods, and instead provides a memory buffer interface. " -"The new :class:`~ssl.MemoryBIO` class can be used to pass data between " -"Python and an SSL protocol instance." +"support for cases when the network I/O capabilities of :class:`~ssl." +"SSLSocket` are not necessary or are suboptimal. ``SSLObject`` represents an " +"SSL protocol instance, but does not implement any network I/O methods, and " +"instead provides a memory buffer interface. The new :class:`~ssl.MemoryBIO` " +"class can be used to pass data between Python and an SSL protocol instance." msgstr "" -#: ../../whatsnew/3.5.rst:1762 +#: ../../whatsnew/3.5.rst:1761 msgid "" "The memory BIO SSL support is primarily intended to be used in frameworks " "implementing asynchronous I/O for which :class:`~ssl.SSLSocket`'s readiness " "model (\"select/poll\") is inefficient." msgstr "" -#: ../../whatsnew/3.5.rst:1766 +#: ../../whatsnew/3.5.rst:1765 msgid "" "A new :meth:`SSLContext.wrap_bio() ` method can be " "used to create a new ``SSLObject`` instance." msgstr "" -#: ../../whatsnew/3.5.rst:1771 +#: ../../whatsnew/3.5.rst:1770 msgid "Application-Layer Protocol Negotiation Support" msgstr "" -#: ../../whatsnew/3.5.rst:1773 +#: ../../whatsnew/3.5.rst:1772 msgid "(Contributed by Benjamin Peterson in :issue:`20188`.)" msgstr "(由 Benjamin Peterson 在 :issue:`20188` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1775 +#: ../../whatsnew/3.5.rst:1774 msgid "" "Where OpenSSL support is present, the :mod:`ssl` module now implements the " -"*Application-Layer Protocol Negotiation* TLS extension as described " -"in :rfc:`7301`." +"*Application-Layer Protocol Negotiation* TLS extension as described in :rfc:" +"`7301`." msgstr "" -#: ../../whatsnew/3.5.rst:1779 +#: ../../whatsnew/3.5.rst:1778 msgid "" -"The new :meth:`SSLContext.set_alpn_protocols() " -"` can be used to specify which protocols " -"a socket should advertise during the TLS handshake." +"The new :meth:`SSLContext.set_alpn_protocols() ` can be used to specify which protocols a socket should " +"advertise during the TLS handshake." msgstr "" -#: ../../whatsnew/3.5.rst:1783 +#: ../../whatsnew/3.5.rst:1782 msgid "" -"The new :meth:`SSLSocket.selected_alpn_protocol() " -"` returns the protocol that was " -"selected during the TLS handshake. The :const:`~ssl.HAS_ALPN` flag indicates " -"whether ALPN support is present." +"The new :meth:`SSLSocket.selected_alpn_protocol() ` returns the protocol that was selected during the " +"TLS handshake. The :const:`~ssl.HAS_ALPN` flag indicates whether ALPN " +"support is present." msgstr "" -#: ../../whatsnew/3.5.rst:1790 +#: ../../whatsnew/3.5.rst:1789 msgid "Other Changes" -msgstr "" +msgstr "其他變更" -#: ../../whatsnew/3.5.rst:1792 +#: ../../whatsnew/3.5.rst:1791 msgid "" "There is a new :meth:`SSLSocket.version() ` method to " -"query the actual protocol version in use. (Contributed by Antoine Pitrou " -"in :issue:`20421`.)" +"query the actual protocol version in use. (Contributed by Antoine Pitrou in :" +"issue:`20421`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1796 +#: ../../whatsnew/3.5.rst:1795 msgid "" -"The :class:`~ssl.SSLSocket` class now implements " -"a :meth:`SSLSocket.sendfile() ` method. (Contributed " -"by Giampaolo Rodola' in :issue:`17552`.)" +"The :class:`~ssl.SSLSocket` class now implements a :meth:`!SSLSocket." +"sendfile` method. (Contributed by Giampaolo Rodola' in :issue:`17552`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1800 +#: ../../whatsnew/3.5.rst:1799 msgid "" -"The :meth:`SSLSocket.send() ` method now raises either " -"the :exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on " -"a non-blocking socket if the operation would block. Previously, it would " -"return ``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)" +"The :meth:`!SSLSocket.send` method now raises either the :exc:`ssl." +"SSLWantReadError` or :exc:`ssl.SSLWantWriteError` exception on a non-" +"blocking socket if the operation would block. Previously, it would return " +"``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1805 +#: ../../whatsnew/3.5.rst:1804 msgid "" "The :func:`~ssl.cert_time_to_seconds` function now interprets the input time " "as UTC and not as local time, per :rfc:`5280`. Additionally, the return " "value is always an :class:`int`. (Contributed by Akira Li in :issue:`19940`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1809 +#: ../../whatsnew/3.5.rst:1808 msgid "" -"New :meth:`SSLObject.shared_ciphers() ` " -"and :meth:`SSLSocket.shared_ciphers() ` " -"methods return the list of ciphers sent by the client during the handshake. " -"(Contributed by Benjamin Peterson in :issue:`23186`.)" +"New :meth:`!SSLObject.shared_ciphers` and :meth:`SSLSocket.shared_ciphers() " +"` methods return the list of ciphers sent by " +"the client during the handshake. (Contributed by Benjamin Peterson in :issue:" +"`23186`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1814 +#: ../../whatsnew/3.5.rst:1813 msgid "" -"The :meth:`SSLSocket.do_handshake() " -"`, :meth:`SSLSocket.read() " -"`, :meth:`SSLSocket.shutdown() " -"`, and :meth:`SSLSocket.write() " -"` methods of the :class:`~ssl.SSLSocket` class no " -"longer reset the socket timeout every time bytes are received or sent. The " -"socket timeout is now the maximum total duration of the method. (Contributed " -"by Victor Stinner in :issue:`23853`.)" +"The :meth:`SSLSocket.do_handshake() `, :meth:" +"`SSLSocket.read() `, :meth:`!SSLSocket.shutdown`, and :" +"meth:`SSLSocket.write() ` methods of the :class:`~ssl." +"SSLSocket` class no longer reset the socket timeout every time bytes are " +"received or sent. The socket timeout is now the maximum total duration of " +"the method. (Contributed by Victor Stinner in :issue:`23853`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1822 +#: ../../whatsnew/3.5.rst:1821 msgid "" -"The :func:`~ssl.match_hostname` function now supports matching of IP " -"addresses. (Contributed by Antoine Pitrou in :issue:`23239`.)" +"The :func:`!match_hostname` function now supports matching of IP addresses. " +"(Contributed by Antoine Pitrou in :issue:`23239`.)" msgstr "" +":func:`!match_hostname` 函式現在支援 IP 位址的比對。(由 Antoine Pitrou 在 :issue:`23239` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1827 +#: ../../whatsnew/3.5.rst:1826 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.5.rst:1829 +#: ../../whatsnew/3.5.rst:1828 msgid "" "The :class:`~sqlite3.Row` class now fully supports the sequence protocol, in " "particular :func:`reversed` iteration and slice indexing. (Contributed by " @@ -2871,11 +2894,11 @@ msgid "" "Serhiy Storchaka in :issue:`13583`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1838 +#: ../../whatsnew/3.5.rst:1837 msgid "subprocess" msgstr "subprocess" -#: ../../whatsnew/3.5.rst:1840 +#: ../../whatsnew/3.5.rst:1839 msgid "" "The new :func:`~subprocess.run` function has been added. It runs the " "specified command and returns a :class:`~subprocess.CompletedProcess` " @@ -2884,8 +2907,12 @@ msgid "" "does not need to maintain compatibility with earlier Python versions. " "(Contributed by Thomas Kluyver in :issue:`23342`.)" msgstr "" +"新增 :func:`~subprocess.run` 函式。它運行指定的命令並回傳一個 " +":class:`~subprocess.CompletedProcess` 物件,該物件描述了一個已完成的行程。" +"新的 API 更加一致,並且是以較為推薦方法來叫用子行程,適用於不需要與早期 Python 版本保" +"持相容性的 Python 程式碼。(由 Thomas Kluyver 在 :issue:`23342` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1850 +#: ../../whatsnew/3.5.rst:1849 msgid "" ">>> subprocess.run([\"ls\", \"-l\"]) # doesn't capture output\n" "CompletedProcess(args=['ls', '-l'], returncode=0)\n" @@ -2913,62 +2940,61 @@ msgstr "" "CompletedProcess(args=['ls', '-l', '/dev/null'], returncode=0,\n" "stdout=b'crw-rw-rw- 1 root root 1, 3 Jan 23 16:23 /dev/null\\n')" -#: ../../whatsnew/3.5.rst:1864 +#: ../../whatsnew/3.5.rst:1863 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.5.rst:1866 +#: ../../whatsnew/3.5.rst:1865 msgid "" -"A new :func:`~sys.set_coroutine_wrapper` function allows setting a global " -"hook that will be called whenever a :term:`coroutine object ` is " -"created by an :keyword:`async def` function. A " -"corresponding :func:`~sys.get_coroutine_wrapper` can be used to obtain a " -"currently set wrapper. Both functions are :term:`provisional `, and are intended for debugging purposes only. (Contributed by Yury " -"Selivanov in :issue:`24017`.)" +"A new :func:`!set_coroutine_wrapper` function allows setting a global hook " +"that will be called whenever a :term:`coroutine object ` is " +"created by an :keyword:`async def` function. A corresponding :func:`!" +"get_coroutine_wrapper` can be used to obtain a currently set wrapper. Both " +"functions are :term:`provisional `, and are intended for " +"debugging purposes only. (Contributed by Yury Selivanov in :issue:`24017`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1874 +#: ../../whatsnew/3.5.rst:1873 msgid "" "A new :func:`~sys.is_finalizing` function can be used to check if the Python " "interpreter is :term:`shutting down `. (Contributed by " "Antoine Pitrou in :issue:`22696`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1880 +#: ../../whatsnew/3.5.rst:1879 msgid "sysconfig" msgstr "sysconfig" -#: ../../whatsnew/3.5.rst:1882 +#: ../../whatsnew/3.5.rst:1881 msgid "" "The name of the user scripts directory on Windows now includes the first two " -"components of the Python version. (Contributed by Paul Moore " -"in :issue:`23437`.)" +"components of the Python version. (Contributed by Paul Moore in :issue:" +"`23437`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1888 +#: ../../whatsnew/3.5.rst:1887 msgid "tarfile" msgstr "tarfile" -#: ../../whatsnew/3.5.rst:1890 +#: ../../whatsnew/3.5.rst:1889 msgid "" "The *mode* argument of the :func:`~tarfile.open` function now accepts " -"``\"x\"`` to request exclusive creation. (Contributed by Berker Peksag " -"in :issue:`21717`.)" +"``\"x\"`` to request exclusive creation. (Contributed by Berker Peksag in :" +"issue:`21717`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1893 +#: ../../whatsnew/3.5.rst:1892 msgid "" -"The :meth:`TarFile.extractall() ` " -"and :meth:`TarFile.extract() ` methods now take a " -"keyword argument *numeric_owner*. If set to ``True``, the extracted files " -"and directories will be owned by the numeric ``uid`` and ``gid`` from the " +"The :meth:`TarFile.extractall() ` and :meth:" +"`TarFile.extract() ` methods now take a keyword " +"argument *numeric_owner*. If set to ``True``, the extracted files and " +"directories will be owned by the numeric ``uid`` and ``gid`` from the " "tarfile. If set to ``False`` (the default, and the behavior in versions " "prior to 3.5), they will be owned by the named user and group in the " "tarfile. (Contributed by Michael Vogt and Eric Smith in :issue:`23193`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1901 +#: ../../whatsnew/3.5.rst:1900 msgid "" "The :meth:`TarFile.list() ` now accepts an optional " "*members* keyword argument that can be set to a subset of the list returned " @@ -2976,51 +3002,51 @@ msgid "" "by Serhiy Storchaka in :issue:`21549`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1908 +#: ../../whatsnew/3.5.rst:1907 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.5.rst:1910 +#: ../../whatsnew/3.5.rst:1909 msgid "" -"Both the :meth:`Lock.acquire() ` " -"and :meth:`RLock.acquire() ` methods now use a " -"monotonic clock for timeout management. (Contributed by Victor Stinner " -"in :issue:`22043`.)" +"Both the :meth:`Lock.acquire() ` and :meth:`RLock." +"acquire() ` methods now use a monotonic clock for " +"timeout management. (Contributed by Victor Stinner in :issue:`22043`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1917 +#: ../../whatsnew/3.5.rst:1916 msgid "time" msgstr "time" -#: ../../whatsnew/3.5.rst:1919 +#: ../../whatsnew/3.5.rst:1918 msgid "" "The :func:`~time.monotonic` function is now always available. (Contributed " "by Victor Stinner in :issue:`22043`.)" msgstr "" +":func:`~time.monotonic` 函式現在總是可用的。(由 Victor Stinner 在 :issue:`22043` 中貢獻。)" -#: ../../whatsnew/3.5.rst:1924 +#: ../../whatsnew/3.5.rst:1923 msgid "timeit" msgstr "timeit" -#: ../../whatsnew/3.5.rst:1926 +#: ../../whatsnew/3.5.rst:1925 msgid "" "A new command line option ``-u`` or :samp:`--unit={U}` can be used to " "specify the time unit for the timer output. Supported options are ``usec``, " "``msec``, or ``sec``. (Contributed by Julian Gindi in :issue:`18983`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1930 +#: ../../whatsnew/3.5.rst:1929 msgid "" "The :func:`~timeit.timeit` function has a new *globals* parameter for " "specifying the namespace in which the code will be running. (Contributed by " "Ben Roberts in :issue:`2527`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1936 +#: ../../whatsnew/3.5.rst:1935 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.5.rst:1938 +#: ../../whatsnew/3.5.rst:1937 msgid "" "The :mod:`!tkinter._fix` module used for setting up the Tcl/Tk environment " "on Windows has been replaced by a private function in the :mod:`!_tkinter` " @@ -3028,124 +3054,124 @@ msgid "" "(Contributed by Zachary Ware in :issue:`20035`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1947 +#: ../../whatsnew/3.5.rst:1946 msgid "traceback" msgstr "traceback" -#: ../../whatsnew/3.5.rst:1949 +#: ../../whatsnew/3.5.rst:1948 msgid "" "New :func:`~traceback.walk_stack` and :func:`~traceback.walk_tb` functions " "to conveniently traverse frame and :ref:`traceback objects `. (Contributed by Robert Collins in :issue:`17911`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1954 +#: ../../whatsnew/3.5.rst:1953 msgid "" -"New lightweight " -"classes: :class:`~traceback.TracebackException`, :class:`~traceback.StackSummary`, " -"and :class:`~traceback.FrameSummary`. (Contributed by Robert Collins " -"in :issue:`17911`.)" +"New lightweight classes: :class:`~traceback.TracebackException`, :class:" +"`~traceback.StackSummary`, and :class:`~traceback.FrameSummary`. " +"(Contributed by Robert Collins in :issue:`17911`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1958 +#: ../../whatsnew/3.5.rst:1957 msgid "" "Both the :func:`~traceback.print_tb` and :func:`~traceback.print_stack` " "functions now support negative values for the *limit* argument. (Contributed " "by Dmitry Kazakov in :issue:`22619`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1964 +#: ../../whatsnew/3.5.rst:1963 msgid "types" msgstr "types" -#: ../../whatsnew/3.5.rst:1966 +#: ../../whatsnew/3.5.rst:1965 msgid "" "A new :func:`~types.coroutine` function to transform :term:`generator " -"` and :class:`generator-like " -"` objects into :term:`awaitables `. " -"(Contributed by Yury Selivanov in :issue:`24017`.)" +"` and :class:`generator-like ` objects into :term:`awaitables `. (Contributed by " +"Yury Selivanov in :issue:`24017`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1972 +#: ../../whatsnew/3.5.rst:1971 msgid "" -"A new type called :class:`~types.CoroutineType`, which is used " -"for :term:`coroutine` objects created by :keyword:`async def` functions. " -"(Contributed by Yury Selivanov in :issue:`24400`.)" +"A new type called :class:`~types.CoroutineType`, which is used for :term:" +"`coroutine` objects created by :keyword:`async def` functions. (Contributed " +"by Yury Selivanov in :issue:`24400`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1978 +#: ../../whatsnew/3.5.rst:1977 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.5.rst:1980 +#: ../../whatsnew/3.5.rst:1979 msgid "" "The :mod:`unicodedata` module now uses data from `Unicode 8.0.0 `_." msgstr "" +":mod:`unicodedata` 模組現在使用來自 `Unicode 8.0.0 `_ 的資料。" -#: ../../whatsnew/3.5.rst:1985 +#: ../../whatsnew/3.5.rst:1984 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.5.rst:1987 +#: ../../whatsnew/3.5.rst:1986 msgid "" -"The :meth:`TestLoader.loadTestsFromModule() " -"` method now accepts a keyword-only " -"argument *pattern* which is passed to ``load_tests`` as the third argument. " -"Found packages are now checked for ``load_tests`` regardless of whether " -"their path matches *pattern*, because it is impossible for a package name to " -"match the default pattern. (Contributed by Robert Collins and Barry A. " -"Warsaw in :issue:`16662`.)" +"The :meth:`TestLoader.loadTestsFromModule() ` method now accepts a keyword-only argument *pattern* " +"which is passed to ``load_tests`` as the third argument. Found packages are " +"now checked for ``load_tests`` regardless of whether their path matches " +"*pattern*, because it is impossible for a package name to match the default " +"pattern. (Contributed by Robert Collins and Barry A. Warsaw in :issue:" +"`16662`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1994 +#: ../../whatsnew/3.5.rst:1993 msgid "" "Unittest discovery errors now are exposed in the :data:`TestLoader.errors " "` attribute of the :class:`~unittest.TestLoader` " "instance. (Contributed by Robert Collins in :issue:`19746`.)" msgstr "" -#: ../../whatsnew/3.5.rst:1999 +#: ../../whatsnew/3.5.rst:1998 msgid "" "A new command line option ``--locals`` to show local variables in " "tracebacks. (Contributed by Robert Collins in :issue:`22936`.)" msgstr "" -#: ../../whatsnew/3.5.rst:2004 +#: ../../whatsnew/3.5.rst:2003 msgid "unittest.mock" msgstr "unittest.mock" -#: ../../whatsnew/3.5.rst:2006 +#: ../../whatsnew/3.5.rst:2005 msgid "The :class:`~unittest.mock.Mock` class has the following improvements:" msgstr ":class:`~unittest.mock.Mock` 類別有以下改進:" -#: ../../whatsnew/3.5.rst:2008 +#: ../../whatsnew/3.5.rst:2007 msgid "" "The class constructor has a new *unsafe* parameter, which causes mock " "objects to raise :exc:`AttributeError` on attribute names starting with " "``\"assert\"``. (Contributed by Kushal Das in :issue:`21238`.)" msgstr "" -#: ../../whatsnew/3.5.rst:2013 +#: ../../whatsnew/3.5.rst:2012 msgid "" -"A new :meth:`Mock.assert_not_called() " -"` method to check if the mock object " -"was called. (Contributed by Kushal Das in :issue:`21262`.)" +"A new :meth:`Mock.assert_not_called() ` method to check if the mock object was called. " +"(Contributed by Kushal Das in :issue:`21262`.)" msgstr "" -#: ../../whatsnew/3.5.rst:2017 +#: ../../whatsnew/3.5.rst:2016 msgid "" -"The :class:`~unittest.mock.MagicMock` class now " -"supports :meth:`__truediv__`, :meth:`__divmod__` and :meth:`__matmul__` " +"The :class:`~unittest.mock.MagicMock` class now supports :meth:`~object." +"__truediv__`, :meth:`~object.__divmod__` and :meth:`~object.__matmul__` " "operators. (Contributed by Johannes Baiter in :issue:`20968`, and Håkan " "Lövdahl in :issue:`23581` and :issue:`23568`.)" msgstr "" #: ../../whatsnew/3.5.rst:2022 msgid "" -"It is no longer necessary to explicitly pass ``create=True`` to " -"the :func:`~unittest.mock.patch` function when patching builtin names. " -"(Contributed by Kushal Das in :issue:`17660`.)" +"It is no longer necessary to explicitly pass ``create=True`` to the :func:" +"`~unittest.mock.patch` function when patching builtin names. (Contributed by " +"Kushal Das in :issue:`17660`.)" msgstr "" #: ../../whatsnew/3.5.rst:2028 @@ -3154,38 +3180,35 @@ msgstr "urllib" #: ../../whatsnew/3.5.rst:2030 msgid "" -"A new :class:`request.HTTPPasswordMgrWithPriorAuth " -"` class allows HTTP Basic " -"Authentication credentials to be managed so as to eliminate unnecessary " -"``401`` response handling, or to unconditionally send credentials on the " -"first request in order to communicate with servers that return a ``404`` " -"response instead of a ``401`` if the ``Authorization`` header is not sent. " -"(Contributed by Matej Cepl in :issue:`19494` and Akshit Khurana " -"in :issue:`7159`.)" +"A new :class:`request.HTTPPasswordMgrWithPriorAuth ` class allows HTTP Basic Authentication " +"credentials to be managed so as to eliminate unnecessary ``401`` response " +"handling, or to unconditionally send credentials on the first request in " +"order to communicate with servers that return a ``404`` response instead of " +"a ``401`` if the ``Authorization`` header is not sent. (Contributed by Matej " +"Cepl in :issue:`19494` and Akshit Khurana in :issue:`7159`.)" msgstr "" #: ../../whatsnew/3.5.rst:2039 msgid "" -"A new *quote_via* argument for the :func:`parse.urlencode() " -"` function provides a way to control the encoding of " -"query parts if needed. (Contributed by Samwyse and Arnon Yaari " -"in :issue:`13866`.)" +"A new *quote_via* argument for the :func:`parse.urlencode() ` function provides a way to control the encoding of query parts " +"if needed. (Contributed by Samwyse and Arnon Yaari in :issue:`13866`.)" msgstr "" #: ../../whatsnew/3.5.rst:2044 msgid "" -"The :func:`request.urlopen() ` function accepts " -"an :class:`ssl.SSLContext` object as a *context* argument, which will be " -"used for the HTTPS connection. (Contributed by Alex Gaynor " -"in :issue:`22366`.)" +"The :func:`request.urlopen() ` function accepts an :" +"class:`ssl.SSLContext` object as a *context* argument, which will be used " +"for the HTTPS connection. (Contributed by Alex Gaynor in :issue:`22366`.)" msgstr "" #: ../../whatsnew/3.5.rst:2048 msgid "" -"The :func:`parse.urljoin() ` was updated to use " -"the :rfc:`3986` semantics for the resolution of relative URLs, rather " -"than :rfc:`1808` and :rfc:`2396`. (Contributed by Demian Brecht and Senthil " -"Kumaran in :issue:`22118`.)" +"The :func:`parse.urljoin() ` was updated to use the :" +"rfc:`3986` semantics for the resolution of relative URLs, rather than :rfc:" +"`1808` and :rfc:`2396`. (Contributed by Demian Brecht and Senthil Kumaran " +"in :issue:`22118`.)" msgstr "" #: ../../whatsnew/3.5.rst:2055 @@ -3194,9 +3217,9 @@ msgstr "wsgiref" #: ../../whatsnew/3.5.rst:2057 msgid "" -"The *headers* argument of the :class:`headers.Headers " -"` class constructor is now optional. (Contributed " -"by Pablo Torres Navarrete and SilentGhost in :issue:`5800`.)" +"The *headers* argument of the :class:`headers.Headers ` class constructor is now optional. (Contributed by Pablo Torres " +"Navarrete and SilentGhost in :issue:`5800`.)" msgstr "" #: ../../whatsnew/3.5.rst:2063 @@ -3223,9 +3246,9 @@ msgstr "xml.sax" #: ../../whatsnew/3.5.rst:2077 msgid "" -"SAX parsers now support a character stream of " -"the :class:`xmlreader.InputSource ` object. " -"(Contributed by Serhiy Storchaka in :issue:`2175`.)" +"SAX parsers now support a character stream of the :class:`xmlreader." +"InputSource ` object. (Contributed by Serhiy " +"Storchaka in :issue:`2175`.)" msgstr "" #: ../../whatsnew/3.5.rst:2081 @@ -3233,6 +3256,8 @@ msgid "" ":func:`~xml.sax.parseString` now accepts a :class:`str` instance. " "(Contributed by Serhiy Storchaka in :issue:`10590`.)" msgstr "" +":func:`~xml.sax.parseString` 現在接受一個 :class:`str` 實例。" +"(由 Serhiy Storchaka 在 :issue:`10590` 中貢獻。)" #: ../../whatsnew/3.5.rst:2086 msgid "zipfile" @@ -3253,14 +3278,14 @@ msgstr "" #: ../../whatsnew/3.5.rst:2097 msgid "Other module-level changes" -msgstr "" +msgstr "其他模組層級的變更" #: ../../whatsnew/3.5.rst:2099 msgid "" -"Many functions in the :mod:`mmap`, :mod:`!" -"ossaudiodev`, :mod:`socket`, :mod:`ssl`, and :mod:`codecs` modules now " -"accept writable :term:`bytes-like objects `. (Contributed " -"by Serhiy Storchaka in :issue:`23001`.)" +"Many functions in the :mod:`mmap`, :mod:`!ossaudiodev`, :mod:`socket`, :mod:" +"`ssl`, and :mod:`codecs` modules now accept writable :term:`bytes-like " +"objects `. (Contributed by Serhiy Storchaka in :issue:" +"`23001`.)" msgstr "" #: ../../whatsnew/3.5.rst:2106 @@ -3270,9 +3295,9 @@ msgstr "最佳化" #: ../../whatsnew/3.5.rst:2108 msgid "" "The :func:`os.walk` function has been sped up by 3 to 5 times on POSIX " -"systems, and by 7 to 20 times on Windows. This was done using the " -"new :func:`os.scandir` function, which exposes file information from the " -"underlying ``readdir`` or ``FindFirstFile``/``FindNextFile`` system calls. " +"systems, and by 7 to 20 times on Windows. This was done using the new :func:" +"`os.scandir` function, which exposes file information from the underlying " +"``readdir`` or ``FindFirstFile``/``FindNextFile`` system calls. " "(Contributed by Ben Hoyt with help from Victor Stinner in :issue:`23605`.)" msgstr "" @@ -3280,18 +3305,19 @@ msgstr "" msgid "" "Construction of ``bytes(int)`` (filled by zero bytes) is faster and uses " "less memory for large objects. ``calloc()`` is used instead of ``malloc()`` " -"to allocate memory for these objects. (Contributed by Victor Stinner " -"in :issue:`21233`.)" +"to allocate memory for these objects. (Contributed by Victor Stinner in :" +"issue:`21233`.)" msgstr "" #: ../../whatsnew/3.5.rst:2119 msgid "" -"Some operations on :mod:`ipaddress` :class:`~ipaddress.IPv4Network` " -"and :class:`~ipaddress.IPv6Network` have been massively sped up, such " -"as :meth:`~ipaddress.IPv4Network.subnets`, :meth:`~ipaddress.IPv4Network.supernet`, :func:`~ipaddress.summarize_address_range`, :func:`~ipaddress.collapse_addresses`. " -"The speed up can range from 3 to 15 times. (Contributed by Antoine Pitrou, " -"Michel Albert, and Markus " -"in :issue:`21486`, :issue:`21487`, :issue:`20826`, :issue:`23266`.)" +"Some operations on :mod:`ipaddress` :class:`~ipaddress.IPv4Network` and :" +"class:`~ipaddress.IPv6Network` have been massively sped up, such as :meth:" +"`~ipaddress.IPv4Network.subnets`, :meth:`~ipaddress.IPv4Network.supernet`, :" +"func:`~ipaddress.summarize_address_range`, :func:`~ipaddress." +"collapse_addresses`. The speed up can range from 3 to 15 times. (Contributed " +"by Antoine Pitrou, Michel Albert, and Markus in :issue:`21486`, :issue:" +"`21487`, :issue:`20826`, :issue:`23266`.)" msgstr "" #: ../../whatsnew/3.5.rst:2127 @@ -3303,16 +3329,16 @@ msgstr "" #: ../../whatsnew/3.5.rst:2130 msgid "" "Many operations on :class:`io.BytesIO` are now 50% to 100% faster. " -"(Contributed by Serhiy Storchaka in :issue:`15381` and David Wilson " -"in :issue:`22003`.)" +"(Contributed by Serhiy Storchaka in :issue:`15381` and David Wilson in :" +"issue:`22003`.)" msgstr "" #: ../../whatsnew/3.5.rst:2134 msgid "" "The :func:`marshal.dumps` function is now faster: 65--85% with versions 3 " "and 4, 20--25% with versions 0 to 2 on typical data, and up to 5 times in " -"best cases. (Contributed by Serhiy Storchaka in :issue:`20416` " -"and :issue:`23344`.)" +"best cases. (Contributed by Serhiy Storchaka in :issue:`20416` and :issue:" +"`23344`.)" msgstr "" #: ../../whatsnew/3.5.rst:2139 @@ -3337,16 +3363,16 @@ msgstr "" #: ../../whatsnew/3.5.rst:2149 msgid "" "The :c:func:`PyObject_IsInstance` and :c:func:`PyObject_IsSubclass` " -"functions have been sped up in the common case that the second argument " -"has :class:`type` as its metaclass. (Contributed Georg Brandl by " -"in :issue:`22540`.)" +"functions have been sped up in the common case that the second argument has :" +"class:`type` as its metaclass. (Contributed Georg Brandl by in :issue:" +"`22540`.)" msgstr "" #: ../../whatsnew/3.5.rst:2154 msgid "" "Method caching was slightly improved, yielding up to 5% performance " -"improvement in some benchmarks. (Contributed by Antoine Pitrou " -"in :issue:`22847`.)" +"improvement in some benchmarks. (Contributed by Antoine Pitrou in :issue:" +"`22847`.)" msgstr "" #: ../../whatsnew/3.5.rst:2158 @@ -3366,14 +3392,14 @@ msgid "" "Instantiation of :class:`fractions.Fraction` is now up to 30% faster. " "(Contributed by Stefan Behnel in :issue:`22464`.)" msgstr "" +":class:`fractions.Fraction` 的實例化現在快了 30%。(由 Stefan Behnel 在 :issue:`22464` 中貢獻。)" #: ../../whatsnew/3.5.rst:2167 msgid "" -"String " -"methods :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`, :meth:`~str.partition` " -"and the :keyword:`in` string operator are now significantly faster for " -"searching 1-character substrings. (Contributed by Serhiy Storchaka " -"in :issue:`23573`.)" +"String methods :meth:`~str.find`, :meth:`~str.rfind`, :meth:`~str.split`, :" +"meth:`~str.partition` and the :keyword:`in` string operator are now " +"significantly faster for searching 1-character substrings. (Contributed by " +"Serhiy Storchaka in :issue:`23573`.)" msgstr "" #: ../../whatsnew/3.5.rst:2174 @@ -3382,7 +3408,7 @@ msgstr "建置和 C API 變更" #: ../../whatsnew/3.5.rst:2176 msgid "New ``calloc`` functions were added:" -msgstr "" +msgstr "新增了 ``calloc`` 函式:" #: ../../whatsnew/3.5.rst:2178 msgid ":c:func:`PyMem_RawCalloc`," @@ -3419,15 +3445,15 @@ msgstr "(由 Victor Stinner 在 :issue:`18395` 中貢獻。)" #: ../../whatsnew/3.5.rst:2191 msgid "" "A new :c:func:`PyCodec_NameReplaceErrors` function to replace the unicode " -"encode error with ``\\N{...}`` escapes. (Contributed by Serhiy Storchaka " -"in :issue:`19676`.)" +"encode error with ``\\N{...}`` escapes. (Contributed by Serhiy Storchaka in :" +"issue:`19676`.)" msgstr "" #: ../../whatsnew/3.5.rst:2195 msgid "" "A new :c:func:`PyErr_FormatV` function similar to :c:func:`PyErr_Format`, " -"but accepts a :c:type:`va_list` argument. (Contributed by Antoine Pitrou " -"in :issue:`18711`.)" +"but accepts a :c:type:`va_list` argument. (Contributed by Antoine Pitrou in :" +"issue:`18711`.)" msgstr "" #: ../../whatsnew/3.5.rst:2199 @@ -3435,27 +3461,29 @@ msgid "" "A new :c:data:`PyExc_RecursionError` exception. (Contributed by Georg Brandl " "in :issue:`19235`.)" msgstr "" +"新增 :c:data:`PyExc_RecursionError` 例外。(由 Georg Brandl 在 :issue:`19235` 中貢獻。)" #: ../../whatsnew/3.5.rst:2202 msgid "" "New :c:func:`PyModule_FromDefAndSpec`, :c:func:`PyModule_FromDefAndSpec2`, " "and :c:func:`PyModule_ExecDef` functions introduced by :pep:`489` -- multi-" -"phase extension module initialization. (Contributed by Petr Viktorin " -"in :issue:`24268`.)" +"phase extension module initialization. (Contributed by Petr Viktorin in :" +"issue:`24268`.)" msgstr "" #: ../../whatsnew/3.5.rst:2207 msgid "" -"New :c:func:`PyNumber_MatrixMultiply` " -"and :c:func:`PyNumber_InPlaceMatrixMultiply` functions to perform matrix " -"multiplication. (Contributed by Benjamin Peterson in :issue:`21176`. See " -"also :pep:`465` for details.)" +"New :c:func:`PyNumber_MatrixMultiply` and :c:func:" +"`PyNumber_InPlaceMatrixMultiply` functions to perform matrix multiplication. " +"(Contributed by Benjamin Peterson in :issue:`21176`. See also :pep:`465` " +"for details.)" msgstr "" #: ../../whatsnew/3.5.rst:2213 msgid "" "The :c:member:`PyTypeObject.tp_finalize` slot is now part of the stable ABI." msgstr "" +":c:member:`PyTypeObject.tp_finalize` 插槽現在是穩定 ABI 的一部分。" #: ../../whatsnew/3.5.rst:2215 msgid "" @@ -3482,13 +3510,13 @@ msgstr "" msgid "" "```` is the major number of the Python version; for Python 3.5 this " "is ``3``." -msgstr "" +msgstr "```` 是 Python 版本的主要號碼;對於 Python 3.5 來說這是 ``3``。" #: ../../whatsnew/3.5.rst:2229 ../../whatsnew/3.5.rst:2246 msgid "" "```` is the minor number of the Python version; for Python 3.5 this " "is ``5``." -msgstr "" +msgstr "```` 是 Python 版本的次要號碼;對於 Python 3.5 來說這是 ``5``。" #: ../../whatsnew/3.5.rst:2232 msgid "" @@ -3540,7 +3568,7 @@ msgstr "已棄用" #: ../../whatsnew/3.5.rst:2266 msgid "New Keywords" -msgstr "" +msgstr "新關鍵字" #: ../../whatsnew/3.5.rst:2268 msgid "" @@ -3551,20 +3579,20 @@ msgstr "" #: ../../whatsnew/3.5.rst:2274 msgid "Deprecated Python Behavior" -msgstr "" +msgstr "已棄用的 Python 行為" #: ../../whatsnew/3.5.rst:2276 msgid "" "Raising the :exc:`StopIteration` exception inside a generator will now " "generate a silent :exc:`PendingDeprecationWarning`, which will become a non-" -"silent deprecation warning in Python 3.6 and will trigger " -"a :exc:`RuntimeError` in Python 3.7. See :ref:`PEP 479: Change StopIteration " +"silent deprecation warning in Python 3.6 and will trigger a :exc:" +"`RuntimeError` in Python 3.7. See :ref:`PEP 479: Change StopIteration " "handling inside generators ` for details." msgstr "" #: ../../whatsnew/3.5.rst:2284 msgid "Unsupported Operating Systems" -msgstr "" +msgstr "不支援的作業系統" #: ../../whatsnew/3.5.rst:2286 msgid "" @@ -3574,18 +3602,18 @@ msgstr "" #: ../../whatsnew/3.5.rst:2291 msgid "Deprecated Python modules, functions and methods" -msgstr "" +msgstr "已棄用的 Python 模組、函式和方法" #: ../../whatsnew/3.5.rst:2293 msgid "" -"The :mod:`formatter` module has now graduated to full deprecation and is " +"The :mod:`!formatter` module has now graduated to full deprecation and is " "still slated for removal in Python 3.6." msgstr "" #: ../../whatsnew/3.5.rst:2296 msgid "" -"The :func:`asyncio.async` function is deprecated in favor " -"of :func:`~asyncio.ensure_future`." +"The :func:`!asyncio.async` function is deprecated in favor of :func:" +"`~asyncio.ensure_future`." msgstr "" #: ../../whatsnew/3.5.rst:2299 @@ -3599,36 +3627,35 @@ msgstr "" #: ../../whatsnew/3.5.rst:2305 msgid "" -"Directly assigning values to " -"the :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel.value` " -"and :attr:`~http.cookies.Morsel.coded_value` of :class:`http.cookies.Morsel` " -"objects is deprecated. Use the :meth:`~http.cookies.Morsel.set` method " -"instead. In addition, the undocumented *LegalChars* parameter " -"of :meth:`~http.cookies.Morsel.set` is deprecated, and is now ignored." +"Directly assigning values to the :attr:`~http.cookies.Morsel.key`, :attr:" +"`~http.cookies.Morsel.value` and :attr:`~http.cookies.Morsel.coded_value` " +"of :class:`http.cookies.Morsel` objects is deprecated. Use the :meth:`~http." +"cookies.Morsel.set` method instead. In addition, the undocumented " +"*LegalChars* parameter of :meth:`~http.cookies.Morsel.set` is deprecated, " +"and is now ignored." msgstr "" #: ../../whatsnew/3.5.rst:2312 msgid "" -"Passing a format string as keyword argument *format_string* to " -"the :meth:`~string.Formatter.format` method of the :class:`string.Formatter` " -"class has been deprecated. (Contributed by Serhiy Storchaka " -"in :issue:`23671`.)" +"Passing a format string as keyword argument *format_string* to the :meth:" +"`~string.Formatter.format` method of the :class:`string.Formatter` class has " +"been deprecated. (Contributed by Serhiy Storchaka in :issue:`23671`.)" msgstr "" #: ../../whatsnew/3.5.rst:2317 msgid "" -"The :func:`platform.dist` and :func:`platform.linux_distribution` functions " -"are now deprecated. Linux distributions use too many different ways of " -"describing themselves, so the functionality is left to a package. " +"The :func:`!platform.dist` and :func:`!platform.linux_distribution` " +"functions are now deprecated. Linux distributions use too many different " +"ways of describing themselves, so the functionality is left to a package. " "(Contributed by Vajrasky Kok and Berker Peksag in :issue:`1322`.)" msgstr "" #: ../../whatsnew/3.5.rst:2322 msgid "" "The previously undocumented ``from_function`` and ``from_builtin`` methods " -"of :class:`inspect.Signature` are deprecated. Use the " -"new :meth:`Signature.from_callable() ` " -"method instead. (Contributed by Yury Selivanov in :issue:`24248`.)" +"of :class:`inspect.Signature` are deprecated. Use the new :meth:`Signature." +"from_callable() ` method instead. " +"(Contributed by Yury Selivanov in :issue:`24248`.)" msgstr "" #: ../../whatsnew/3.5.rst:2327 @@ -3639,10 +3666,10 @@ msgstr "" #: ../../whatsnew/3.5.rst:2330 msgid "" -"The :mod:`inspect` :func:`~inspect.getfullargspec`, :func:`~inspect.getcallargs`, " -"and :func:`~inspect.formatargspec` functions are deprecated in favor of " -"the :func:`inspect.signature` API. (Contributed by Yury Selivanov " -"in :issue:`20438`.)" +"The :mod:`inspect` :func:`~inspect.getfullargspec`, :func:`~inspect." +"getcallargs`, and :func:`!formatargspec` functions are deprecated in favor " +"of the :func:`inspect.signature` API. (Contributed by Yury Selivanov in :" +"issue:`20438`.)" msgstr "" #: ../../whatsnew/3.5.rst:2335 @@ -3667,10 +3694,10 @@ msgstr "" #: ../../whatsnew/3.5.rst:2346 msgid "" -"The undocumented and unofficial *use_load_tests* default argument of " -"the :meth:`unittest.TestLoader.loadTestsFromModule` method now is deprecated " -"and ignored. (Contributed by Robert Collins and Barry A. Warsaw " -"in :issue:`16662`.)" +"The undocumented and unofficial *use_load_tests* default argument of the :" +"meth:`unittest.TestLoader.loadTestsFromModule` method now is deprecated and " +"ignored. (Contributed by Robert Collins and Barry A. Warsaw in :issue:" +"`16662`.)" msgstr "" #: ../../whatsnew/3.5.rst:2353 @@ -3702,7 +3729,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:2369 msgid "The concept of ``.pyo`` files has been removed." -msgstr "" +msgstr "已移除 ``.pyo`` 檔案的概念。" #: ../../whatsnew/3.5.rst:2371 msgid "" @@ -3760,16 +3787,16 @@ msgstr "" msgid "" "Before Python 3.5, a :class:`datetime.time` object was considered to be " "false if it represented midnight in UTC. This behavior was considered " -"obscure and error-prone and has been removed in Python 3.5. " -"See :issue:`13936` for full details." +"obscure and error-prone and has been removed in Python 3.5. See :issue:" +"`13936` for full details." msgstr "" #: ../../whatsnew/3.5.rst:2408 msgid "" -"The :meth:`ssl.SSLSocket.send` method now raises " -"either :exc:`ssl.SSLWantReadError` or :exc:`ssl.SSLWantWriteError` on a non-" -"blocking socket if the operation would block. Previously, it would return " -"``0``. (Contributed by Nikolaus Rath in :issue:`20951`.)" +"The :meth:`!ssl.SSLSocket.send` method now raises either :exc:`ssl." +"SSLWantReadError` or :exc:`ssl.SSLWantWriteError` on a non-blocking socket " +"if the operation would block. Previously, it would return ``0``. " +"(Contributed by Nikolaus Rath in :issue:`20951`.)" msgstr "" #: ../../whatsnew/3.5.rst:2413 @@ -3783,12 +3810,12 @@ msgstr "" #: ../../whatsnew/3.5.rst:2420 msgid "" -"The deprecated \"strict\" mode and argument " -"of :class:`~html.parser.HTMLParser`, :meth:`!HTMLParser.error`, and " -"the :exc:`!HTMLParserError` exception have been removed. (Contributed by " -"Ezio Melotti in :issue:`15114`.) The *convert_charrefs* argument " -"of :class:`~html.parser.HTMLParser` is now ``True`` by default. " -"(Contributed by Berker Peksag in :issue:`21047`.)" +"The deprecated \"strict\" mode and argument of :class:`~html.parser." +"HTMLParser`, :meth:`!HTMLParser.error`, and the :exc:`!HTMLParserError` " +"exception have been removed. (Contributed by Ezio Melotti in :issue:" +"`15114`.) The *convert_charrefs* argument of :class:`~html.parser." +"HTMLParser` is now ``True`` by default. (Contributed by Berker Peksag in :" +"issue:`21047`.)" msgstr "" #: ../../whatsnew/3.5.rst:2426 @@ -3802,11 +3829,11 @@ msgstr "" #: ../../whatsnew/3.5.rst:2432 msgid "" -"If the current directory is set to a directory that no longer exists " -"then :exc:`FileNotFoundError` will no longer be raised and " -"instead :meth:`~importlib.machinery.FileFinder.find_spec` will return " -"``None`` **without** caching ``None`` in :data:`sys.path_importer_cache`, " -"which is different than the typical case (:issue:`22834`)." +"If the current directory is set to a directory that no longer exists then :" +"exc:`FileNotFoundError` will no longer be raised and instead :meth:" +"`~importlib.machinery.FileFinder.find_spec` will return ``None`` **without** " +"caching ``None`` in :data:`sys.path_importer_cache`, which is different than " +"the typical case (:issue:`22834`)." msgstr "" #: ../../whatsnew/3.5.rst:2438 @@ -3819,12 +3846,11 @@ msgstr "" #: ../../whatsnew/3.5.rst:2443 msgid "" -"When an import loader defines :meth:`importlib.machinery.Loader.exec_module` " -"it is now expected to also " -"define :meth:`~importlib.machinery.Loader.create_module` (raises " -"a :exc:`DeprecationWarning` now, will be an error in Python 3.6). If the " -"loader inherits from :class:`importlib.abc.Loader` then there is nothing to " -"do, else simply define :meth:`~importlib.machinery.Loader.create_module` to " +"When an import loader defines :meth:`~importlib.abc.Loader.exec_module` it " +"is now expected to also define :meth:`~importlib.abc.Loader.create_module` " +"(raises a :exc:`DeprecationWarning` now, will be an error in Python 3.6). If " +"the loader inherits from :class:`importlib.abc.Loader` then there is nothing " +"to do, else simply define :meth:`~importlib.abc.Loader.create_module` to " "return ``None``. (Contributed by Brett Cannon in :issue:`23014`.)" msgstr "" @@ -3842,29 +3868,28 @@ msgstr "" #: ../../whatsnew/3.5.rst:2459 msgid "" "The :class:`http.cookies.Morsel` dict-like interface has been made self " -"consistent: morsel comparison now takes " -"the :attr:`~http.cookies.Morsel.key` and :attr:`~http.cookies.Morsel.value` " -"into account, :meth:`~http.cookies.Morsel.copy` now results in " -"a :class:`~http.cookies.Morsel` instance rather than a :class:`dict`, " -"and :meth:`~http.cookies.Morsel.update` will now raise an exception if any " -"of the keys in the update dictionary are invalid. In addition, the " -"undocumented *LegalChars* parameter of :func:`~http.cookies.Morsel.set` is " -"deprecated and is now ignored. (Contributed by Demian Brecht " -"in :issue:`2211`.)" +"consistent: morsel comparison now takes the :attr:`~http.cookies.Morsel." +"key` and :attr:`~http.cookies.Morsel.value` into account, :meth:`~http." +"cookies.Morsel.copy` now results in a :class:`~http.cookies.Morsel` instance " +"rather than a :class:`dict`, and :meth:`~http.cookies.Morsel.update` will " +"now raise an exception if any of the keys in the update dictionary are " +"invalid. In addition, the undocumented *LegalChars* parameter of :func:" +"`~http.cookies.Morsel.set` is deprecated and is now ignored. (Contributed " +"by Demian Brecht in :issue:`2211`.)" msgstr "" #: ../../whatsnew/3.5.rst:2469 msgid "" ":pep:`488` has removed ``.pyo`` files from Python and introduced the " -"optional ``opt-`` tag in ``.pyc`` file names. " -"The :func:`importlib.util.cache_from_source` has gained an *optimization* " -"parameter to help control the ``opt-`` tag. Because of this, the " -"*debug_override* parameter of the function is now deprecated. ``.pyo`` files " -"are also no longer supported as a file argument to the Python interpreter " -"and thus serve no purpose when distributed on their own (i.e. sourceless " -"code distribution). Due to the fact that the magic number for bytecode has " -"changed in Python 3.5, all old ``.pyo`` files from previous versions of " -"Python are invalid regardless of this PEP." +"optional ``opt-`` tag in ``.pyc`` file names. The :func:`importlib.util." +"cache_from_source` has gained an *optimization* parameter to help control " +"the ``opt-`` tag. Because of this, the *debug_override* parameter of the " +"function is now deprecated. ``.pyo`` files are also no longer supported as a " +"file argument to the Python interpreter and thus serve no purpose when " +"distributed on their own (i.e. sourceless code distribution). Due to the " +"fact that the magic number for bytecode has changed in Python 3.5, all old " +"``.pyo`` files from previous versions of Python are invalid regardless of " +"this PEP." msgstr "" #: ../../whatsnew/3.5.rst:2480 @@ -3889,7 +3914,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:2490 msgid "" "The :mod:`smtplib` module now uses :data:`sys.stderr` instead of the " -"previous module-level :data:`stderr` variable for debug output. If your " +"previous module-level :data:`!stderr` variable for debug output. If your " "(test) program depends on patching the module-level variable to capture the " "debug output, you will need to update it to capture sys.stderr instead." msgstr "" @@ -3908,17 +3933,16 @@ msgid "" "duplicated if the inherited documentation is appropriate. To suppress an " "inherited string, an empty string must be specified (or the documentation " "may be filled in). This change affects the output of the :mod:`pydoc` " -"module and the :func:`help` function. (Contributed by Serhiy Storchaka " -"in :issue:`15582`.)" +"module and the :func:`help` function. (Contributed by Serhiy Storchaka in :" +"issue:`15582`.)" msgstr "" #: ../../whatsnew/3.5.rst:2507 msgid "" "Nested :func:`functools.partial` calls are now flattened. If you were " -"relying on the previous behavior, you can now either add an attribute to " -"a :func:`functools.partial` object or you can create a subclass " -"of :func:`functools.partial`. (Contributed by Alexander Belopolsky " -"in :issue:`7830`.)" +"relying on the previous behavior, you can now either add an attribute to a :" +"func:`functools.partial` object or you can create a subclass of :func:" +"`functools.partial`. (Contributed by Alexander Belopolsky in :issue:`7830`.)" msgstr "" #: ../../whatsnew/3.5.rst:2514 @@ -3927,16 +3951,15 @@ msgstr "C API 中的改動" #: ../../whatsnew/3.5.rst:2516 msgid "" -"The undocumented :c:member:`!format` member of the (non-" -"public) :c:type:`PyMemoryViewObject` structure has been removed. All " -"extensions relying on the relevant parts in ``memoryobject.h`` must be " -"rebuilt." +"The undocumented :c:member:`!format` member of the (non-public) :c:type:`!" +"PyMemoryViewObject` structure has been removed. All extensions relying on " +"the relevant parts in ``memoryobject.h`` must be rebuilt." msgstr "" #: ../../whatsnew/3.5.rst:2521 msgid "" -"The :c:type:`PyMemAllocator` structure was renamed " -"to :c:type:`PyMemAllocatorEx` and a new ``calloc`` field was added." +"The :c:type:`!PyMemAllocator` structure was renamed to :c:type:" +"`PyMemAllocatorEx` and a new ``calloc`` field was added." msgstr "" #: ../../whatsnew/3.5.rst:2524 @@ -3951,17 +3974,17 @@ msgstr "" msgid "" "Because the lack of the :attr:`~type.__module__` attribute breaks pickling " "and introspection, a deprecation warning is now raised for builtin types " -"without the :attr:`~type.__module__` attribute. This will be " -"an :exc:`AttributeError` in the future. (Contributed by Serhiy Storchaka " -"in :issue:`20204`.)" +"without the :attr:`~type.__module__` attribute. This will be an :exc:" +"`AttributeError` in the future. (Contributed by Serhiy Storchaka in :issue:" +"`20204`.)" msgstr "" #: ../../whatsnew/3.5.rst:2535 msgid "" -"As part of the :pep:`492` implementation, the ``tp_reserved`` slot " -"of :c:type:`PyTypeObject` was replaced with " -"a :c:member:`~PyTypeObject.tp_as_async` slot. Refer to :ref:`coro-objects` " -"for new types, structures and functions." +"As part of the :pep:`492` implementation, the ``tp_reserved`` slot of :c:" +"type:`PyTypeObject` was replaced with a :c:member:`~PyTypeObject." +"tp_as_async` slot. Refer to :ref:`coro-objects` for new types, structures " +"and functions." msgstr "" #: ../../whatsnew/3.5.rst:2542 @@ -3989,8 +4012,8 @@ msgstr "" #: ../../whatsnew/3.5.rst:2556 msgid "" -"More selective regeneration targets are also defined - " -"see :source:`Makefile.pre.in` for details." +"More selective regeneration targets are also defined - see :source:`Makefile." +"pre.in` for details." msgstr "" #: ../../whatsnew/3.5.rst:2559 ../../whatsnew/3.5.rst:2572 @@ -3999,7 +4022,7 @@ msgstr "(由 Victor Stinner 在 :issue:`23404` 中貢獻。)" #: ../../whatsnew/3.5.rst:2565 msgid "Removal of ``make touch`` build target" -msgstr "" +msgstr "移除 ``make touch`` 建置目標" #: ../../whatsnew/3.5.rst:2567 msgid "" @@ -4010,4 +4033,4 @@ msgstr "" #: ../../whatsnew/3.5.rst:2570 msgid "It has been replaced by the new ``make regen-all`` target." -msgstr "" +msgstr "它已被新的 ``make regen-all`` 目標取代。" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index caa8a48d91..9550eabaa9 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-26 00:14+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -84,12 +84,12 @@ msgstr "CPython 實作改進:" #: ../../whatsnew/3.6.rst:80 msgid "" -"The :ref:`dict ` type has been reimplemented to use " -"a :ref:`more compact representation ` based on `a " -"proposal by Raymond Hettinger `_ and similar to the `PyPy dict " -"implementation`_. This resulted in dictionaries using 20% to 25% less " -"memory when compared to Python 3.5." +"The :ref:`dict ` type has been reimplemented to use a :ref:" +"`more compact representation ` based on `a proposal " +"by Raymond Hettinger `_ and similar to the `PyPy dict implementation`_. " +"This resulted in dictionaries using 20% to 25% less memory when compared to " +"Python 3.5." msgstr "" #: ../../whatsnew/3.6.rst:87 @@ -182,7 +182,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:140 msgid "The :mod:`hashlib` and :mod:`ssl` modules now support OpenSSL 1.1.0." -msgstr "" +msgstr ":mod:`hashlib` 與 :mod:`ssl` 模組現在支援 OpenSSL 1.1.0。" #: ../../whatsnew/3.6.rst:142 msgid "" @@ -198,7 +198,7 @@ msgstr "" #: ../../whatsnew/3.6.rst:149 msgid "Windows improvements:" -msgstr "" +msgstr "Windows 改進:" #: ../../whatsnew/3.6.rst:151 msgid "" @@ -217,8 +217,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:159 msgid "" "``python.exe`` and ``pythonw.exe`` have been marked as long-path aware, " -"which means that the 260 character path limit may no longer apply. " -"See :ref:`removing the MAX_PATH limitation ` for details." +"which means that the 260 character path limit may no longer apply. See :ref:" +"`removing the MAX_PATH limitation ` for details." msgstr "" #: ../../whatsnew/3.6.rst:163 @@ -230,9 +230,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:167 msgid "" -"A ``python36.zip`` file now works as a landmark to " -"infer :envvar:`PYTHONHOME`. See :ref:`the documentation " -"` for more information." +"A ``python36.zip`` file now works as a landmark to infer :envvar:" +"`PYTHONHOME`. See :ref:`the documentation ` for " +"more information." msgstr "" #: ../../whatsnew/3.6.rst:176 @@ -245,8 +245,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:183 msgid "" -":pep:`498` introduces a new kind of string literals: *f-strings*, " -"or :ref:`formatted string literals `." +":pep:`498` introduces a new kind of string literals: *f-strings*, or :ref:" +"`formatted string literals `." msgstr "" #: ../../whatsnew/3.6.rst:186 @@ -494,9 +494,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:348 msgid "" -"In order to allow zero-argument :func:`super` calls to work correctly " -"from :meth:`~object.__init_subclass__` implementations, custom metaclasses " -"must ensure that the new ``__classcell__`` namespace entry is propagated to " +"In order to allow zero-argument :func:`super` calls to work correctly from :" +"meth:`~object.__init_subclass__` implementations, custom metaclasses must " +"ensure that the new ``__classcell__`` namespace entry is propagated to " "``type.__new__`` (as described in :ref:`class-object-creation`)." msgstr "" @@ -518,13 +518,13 @@ msgstr "" #: ../../whatsnew/3.6.rst:366 msgid "" -":pep:`487` extends the descriptor protocol to include the new " -"optional :meth:`~object.__set_name__` method. Whenever a new class is " -"defined, the new method will be called on all descriptors included in the " -"definition, providing them with a reference to the class being defined and " -"the name given to the descriptor within the class namespace. In other " -"words, instances of descriptors can now know the attribute name of the " -"descriptor in the owner class::" +":pep:`487` extends the descriptor protocol to include the new optional :meth:" +"`~object.__set_name__` method. Whenever a new class is defined, the new " +"method will be called on all descriptors included in the definition, " +"providing them with a reference to the class being defined and the name " +"given to the descriptor within the class namespace. In other words, " +"instances of descriptors can now know the attribute name of the descriptor " +"in the owner class::" msgstr "" #: ../../whatsnew/3.6.rst:374 @@ -556,13 +556,13 @@ msgstr "" #: ../../whatsnew/3.6.rst:404 msgid "" -"File system paths have historically been represented as :class:`str` " -"or :class:`bytes` objects. This has led to people who write code which " -"operate on file system paths to assume that such objects are only one of " -"those two types (an :class:`int` representing a file descriptor does not " -"count as that is not a file path). Unfortunately that assumption prevents " -"alternative object representations of file system paths like :mod:`pathlib` " -"from working with pre-existing code, including Python's standard library." +"File system paths have historically been represented as :class:`str` or :" +"class:`bytes` objects. This has led to people who write code which operate " +"on file system paths to assume that such objects are only one of those two " +"types (an :class:`int` representing a file descriptor does not count as that " +"is not a file path). Unfortunately that assumption prevents alternative " +"object representations of file system paths like :mod:`pathlib` from working " +"with pre-existing code, including Python's standard library." msgstr "" #: ../../whatsnew/3.6.rst:413 @@ -572,8 +572,8 @@ msgid "" "method, an object signals that it represents a path. An object can then " "provide a low-level representation of a file system path as a :class:`str` " "or :class:`bytes` object. This means an object is considered :term:`path-" -"like ` if it implements :class:`os.PathLike` or is " -"a :class:`str` or :class:`bytes` object which represents a file system path. " +"like ` if it implements :class:`os.PathLike` or is a :" +"class:`str` or :class:`bytes` object which represents a file system path. " "Code can use :func:`os.fspath`, :func:`os.fsdecode`, or :func:`os.fsencode` " "to explicitly get a :class:`str` and/or :class:`bytes` representation of a " "path-like object." @@ -581,28 +581,26 @@ msgstr "" #: ../../whatsnew/3.6.rst:426 msgid "" -"The built-in :func:`open` function has been updated to " -"accept :class:`os.PathLike` objects, as have all relevant functions in " -"the :mod:`os` and :mod:`os.path` modules, and most other functions and " -"classes in the standard library. The :class:`os.DirEntry` class and " -"relevant classes in :mod:`pathlib` have also been updated to " -"implement :class:`os.PathLike`." +"The built-in :func:`open` function has been updated to accept :class:`os." +"PathLike` objects, as have all relevant functions in the :mod:`os` and :mod:" +"`os.path` modules, and most other functions and classes in the standard " +"library. The :class:`os.DirEntry` class and relevant classes in :mod:" +"`pathlib` have also been updated to implement :class:`os.PathLike`." msgstr "" #: ../../whatsnew/3.6.rst:433 msgid "" "The hope is that updating the fundamental functions for operating on file " -"system paths will lead to third-party code to implicitly support " -"all :term:`path-like objects ` without any code changes, " -"or at least very minimal ones (e.g. calling :func:`os.fspath` at the " -"beginning of code before operating on a path-like object)." +"system paths will lead to third-party code to implicitly support all :term:" +"`path-like objects ` without any code changes, or at least " +"very minimal ones (e.g. calling :func:`os.fspath` at the beginning of code " +"before operating on a path-like object)." msgstr "" #: ../../whatsnew/3.6.rst:440 msgid "" -"Here are some examples of how the new interface allows " -"for :class:`pathlib.Path` to be used more easily and transparently with pre-" -"existing code::" +"Here are some examples of how the new interface allows for :class:`pathlib." +"Path` to be used more easily and transparently with pre-existing code::" msgstr "" #: ../../whatsnew/3.6.rst:444 @@ -662,10 +660,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:476 msgid "" -":pep:`495` adds the new *fold* attribute to instances " -"of :class:`datetime.datetime` and :class:`datetime.time` classes to " -"differentiate between two moments in time for which local times are the " -"same::" +":pep:`495` adds the new *fold* attribute to instances of :class:`datetime." +"datetime` and :class:`datetime.time` classes to differentiate between two " +"moments in time for which local times are the same::" msgstr "" #: ../../whatsnew/3.6.rst:480 @@ -724,17 +721,17 @@ msgstr "" msgid "" "Prior to Python 3.6, data loss could result when using bytes paths on " "Windows. With this change, using bytes to represent paths is now supported " -"on Windows, provided those bytes are encoded with the encoding returned " -"by :func:`sys.getfilesystemencoding`, which now defaults to ``'utf-8'``." +"on Windows, provided those bytes are encoded with the encoding returned by :" +"func:`sys.getfilesystemencoding`, which now defaults to ``'utf-8'``." msgstr "" #: ../../whatsnew/3.6.rst:516 msgid "" -"Applications that do not use str to represent paths should " -"use :func:`os.fsencode` and :func:`os.fsdecode` to ensure their bytes are " -"correctly encoded. To revert to the previous behaviour, " -"set :envvar:`PYTHONLEGACYWINDOWSFSENCODING` or " -"call :func:`sys._enablelegacywindowsfsencoding`." +"Applications that do not use str to represent paths should use :func:`os." +"fsencode` and :func:`os.fsdecode` to ensure their bytes are correctly " +"encoded. To revert to the previous behaviour, set :envvar:" +"`PYTHONLEGACYWINDOWSFSENCODING` or call :func:`sys." +"_enablelegacywindowsfsencoding`." msgstr "" #: ../../whatsnew/3.6.rst:522 @@ -750,8 +747,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:531 msgid "" "The default console on Windows will now accept all Unicode characters and " -"provide correctly read str objects to Python code. ``sys.stdin``, " -"``sys.stdout`` and ``sys.stderr`` now default to utf-8 encoding." +"provide correctly read str objects to Python code. ``sys.stdin``, ``sys." +"stdout`` and ``sys.stderr`` now default to utf-8 encoding." msgstr "" #: ../../whatsnew/3.6.rst:535 @@ -782,9 +779,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:554 msgid "" -"Also, the effective default class *execution* namespace (returned " -"from :ref:`type.__prepare__() `) is now an insertion-order-" -"preserving mapping." +"Also, the effective default class *execution* namespace (returned from :ref:" +"`type.__prepare__() `) is now an insertion-order-preserving mapping." msgstr "" #: ../../whatsnew/3.6.rst:560 @@ -818,9 +814,9 @@ msgid "" "The :ref:`dict ` type now uses a \"compact\" representation " "based on `a proposal by Raymond Hettinger `_ which was `first implemented by PyPy " -"`_. The memory usage of the new :func:`dict` is between 20% and " -"25% smaller compared to Python 3.5." +"`_. The memory usage of the new :func:`dict` is between 20% and 25% " +"smaller compared to Python 3.5." msgstr "" #: ../../whatsnew/3.6.rst:591 @@ -831,8 +827,8 @@ msgid "" "language for a few releases before changing the language spec to mandate " "order-preserving semantics for all current and future Python " "implementations; this also helps preserve backwards-compatibility with older " -"versions of the language where random iteration order is still in effect, " -"e.g. Python 3.5)." +"versions of the language where random iteration order is still in effect, e." +"g. Python 3.5)." msgstr "" #: ../../whatsnew/3.6.rst:600 @@ -907,9 +903,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:647 msgid "" -"Detect violations of the Python memory allocator API. For " -"example, :c:func:`PyObject_Free` called on a memory block allocated " -"by :c:func:`PyMem_Malloc`." +"Detect violations of the Python memory allocator API. For example, :c:func:" +"`PyObject_Free` called on a memory block allocated by :c:func:`PyMem_Malloc`." msgstr "" #: ../../whatsnew/3.6.rst:650 @@ -948,9 +943,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:666 msgid "" -"On error, the debug hooks on Python memory allocators now use " -"the :mod:`tracemalloc` module to get the traceback where a memory block was " -"allocated." +"On error, the debug hooks on Python memory allocators now use the :mod:" +"`tracemalloc` module to get the traceback where a memory block was allocated." msgstr "" #: ../../whatsnew/3.6.rst:670 @@ -1091,16 +1085,17 @@ msgstr "" #: ../../whatsnew/3.6.rst:742 msgid "" "A ``global`` or ``nonlocal`` statement must now textually appear before the " -"first use of the affected name in the same scope. Previously this was " -"a :exc:`SyntaxWarning`." +"first use of the affected name in the same scope. Previously this was a :exc:" +"`SyntaxWarning`." msgstr "" #: ../../whatsnew/3.6.rst:746 msgid "" "It is now possible to set a :ref:`special method ` to ``None`` " "to indicate that the corresponding operation is not available. For example, " -"if a class sets :meth:`__iter__` to ``None``, the class is not iterable. " -"(Contributed by Andrew Barnert and Ivan Levkivskyi in :issue:`25958`.)" +"if a class sets :meth:`~object.__iter__` to ``None``, the class is not " +"iterable. (Contributed by Andrew Barnert and Ivan Levkivskyi in :issue:" +"`25958`.)" msgstr "" #: ../../whatsnew/3.6.rst:752 @@ -1112,10 +1107,10 @@ msgstr "" #: ../../whatsnew/3.6.rst:757 msgid "" -"Import now raises the new exception :exc:`ModuleNotFoundError` (subclass " -"of :exc:`ImportError`) when it cannot find a module. Code that currently " -"checks for ImportError (in try-except) will still work. (Contributed by Eric " -"Snow in :issue:`15767`.)" +"Import now raises the new exception :exc:`ModuleNotFoundError` (subclass of :" +"exc:`ImportError`) when it cannot find a module. Code that currently checks " +"for ImportError (in try-except) will still work. (Contributed by Eric Snow " +"in :issue:`15767`.)" msgstr "" #: ../../whatsnew/3.6.rst:762 @@ -1144,8 +1139,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:781 msgid "" "Note that the pseudo-random generators in the :mod:`random` module should " -"*NOT* be used for security purposes. Use :mod:`secrets` on Python 3.6+ " -"and :func:`os.urandom` on Python 3.5 and earlier." +"*NOT* be used for security purposes. Use :mod:`secrets` on Python 3.6+ and :" +"func:`os.urandom` on Python 3.5 and earlier." msgstr "" #: ../../whatsnew/3.6.rst:787 @@ -1250,9 +1245,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:850 msgid "" -"New :meth:`loop.get_exception_handler() " -"` method to get the current exception " -"handler. (Contributed by Yury Selivanov in :issue:`27040`.)" +"New :meth:`loop.get_exception_handler() ` method to get the current exception handler. " +"(Contributed by Yury Selivanov in :issue:`27040`.)" msgstr "" #: ../../whatsnew/3.6.rst:854 @@ -1264,9 +1259,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:859 msgid "" -"The performance of :meth:`StreamReader.readexactly() " -"` has been improved. (Contributed by Mark " -"Korenberg in :issue:`28370`.)" +"The performance of :meth:`StreamReader.readexactly() ` has been improved. (Contributed by Mark Korenberg in :issue:" +"`28370`.)" msgstr "" #: ../../whatsnew/3.6.rst:863 @@ -1286,16 +1281,16 @@ msgstr "" #: ../../whatsnew/3.6.rst:874 msgid "" -":meth:`Future.set_exception ` will now " -"raise :exc:`TypeError` when passed an instance of the :exc:`StopIteration` " +":meth:`Future.set_exception ` will now raise :" +"exc:`TypeError` when passed an instance of the :exc:`StopIteration` " "exception. (Contributed by Chris Angelico in :issue:`26221`.)" msgstr "" #: ../../whatsnew/3.6.rst:879 msgid "" -"New :meth:`loop.connect_accepted_socket() " -"` method to be used by servers that " -"accept connections outside of asyncio, but that use asyncio to handle them. " +"New :meth:`loop.connect_accepted_socket() ` method to be used by servers that accept " +"connections outside of asyncio, but that use asyncio to handle them. " "(Contributed by Jim Fulton in :issue:`27392`.)" msgstr "" @@ -1343,10 +1338,10 @@ msgstr "" #: ../../whatsnew/3.6.rst:914 msgid "" -"New constants: :const:`cmath.inf` and :const:`cmath.nan` to " -"match :const:`math.inf` and :const:`math.nan`, and also :const:`cmath.infj` " -"and :const:`cmath.nanj` to match the format used by complex repr. " -"(Contributed by Mark Dickinson in :issue:`23229`.)" +"New constants: :const:`cmath.inf` and :const:`cmath.nan` to match :const:" +"`math.inf` and :const:`math.nan`, and also :const:`cmath.infj` and :const:" +"`cmath.nanj` to match the format used by complex repr. (Contributed by Mark " +"Dickinson in :issue:`23229`.)" msgstr "" #: ../../whatsnew/3.6.rst:921 @@ -1363,26 +1358,26 @@ msgstr "" #: ../../whatsnew/3.6.rst:927 msgid "" "The new :class:`~collections.abc.Reversible` abstract base class represents " -"iterable classes that also provide the :meth:`__reversed__` method. " +"iterable classes that also provide the :meth:`~object.__reversed__` method. " "(Contributed by Ivan Levkivskyi in :issue:`25987`.)" msgstr "" #: ../../whatsnew/3.6.rst:931 msgid "" "The new :class:`~collections.abc.AsyncGenerator` abstract base class " -"represents asynchronous generators. (Contributed by Yury Selivanov " -"in :issue:`28720`.)" +"represents asynchronous generators. (Contributed by Yury Selivanov in :issue:" +"`28720`.)" msgstr "" #: ../../whatsnew/3.6.rst:935 msgid "" "The :func:`~collections.namedtuple` function now accepts an optional keyword " -"argument *module*, which, when specified, is used for " -"the :attr:`~type.__module__` attribute of the returned named tuple class. " -"(Contributed by Raymond Hettinger in :issue:`17941`.)" +"argument *module*, which, when specified, is used for the :attr:`~type." +"__module__` attribute of the returned named tuple class. (Contributed by " +"Raymond Hettinger in :issue:`17941`.)" msgstr "" -#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2295 +#: ../../whatsnew/3.6.rst:940 ../../whatsnew/3.6.rst:2297 msgid "" "The *verbose* and *rename* arguments for :func:`~collections.namedtuple` are " "now keyword-only. (Contributed by Raymond Hettinger in :issue:`25628`.)" @@ -1415,9 +1410,9 @@ msgid "" "The :class:`contextlib.AbstractContextManager` class has been added to " "provide an abstract base class for context managers. It provides a sensible " "default implementation for ``__enter__()`` which returns ``self`` and leaves " -"``__exit__()`` an abstract method. A matching class has been added to " -"the :mod:`typing` module as :class:`typing.ContextManager`. (Contributed by " -"Brett Cannon in :issue:`25609`.)" +"``__exit__()`` an abstract method. A matching class has been added to the :" +"mod:`typing` module as :class:`typing.ContextManager`. (Contributed by Brett " +"Cannon in :issue:`25609`.)" msgstr "" #: ../../whatsnew/3.6.rst:971 @@ -1427,8 +1422,8 @@ msgstr "datetime" #: ../../whatsnew/3.6.rst:973 msgid "" "The :class:`~datetime.datetime` and :class:`~datetime.time` classes have the " -"new :attr:`~time.fold` attribute used to disambiguate local time when " -"necessary. Many functions in the :mod:`datetime` have been updated to " +"new :attr:`~datetime.time.fold` attribute used to disambiguate local time " +"when necessary. Many functions in the :mod:`datetime` have been updated to " "support local time disambiguation. See :ref:`Local Time Disambiguation " "` section for more information. (Contributed by Alexander " "Belopolsky in :issue:`24773`.)" @@ -1436,10 +1431,10 @@ msgstr "" #: ../../whatsnew/3.6.rst:981 msgid "" -"The :meth:`datetime.strftime() ` " -"and :meth:`date.strftime() ` methods now support ISO " -"8601 date directives ``%G``, ``%u`` and ``%V``. (Contributed by Ashley " -"Anderson in :issue:`12006`.)" +"The :meth:`datetime.strftime() ` and :meth:`date." +"strftime() ` methods now support ISO 8601 date " +"directives ``%G``, ``%u`` and ``%V``. (Contributed by Ashley Anderson in :" +"issue:`12006`.)" msgstr "" #: ../../whatsnew/3.6.rst:986 @@ -1453,8 +1448,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:991 msgid "" "The :meth:`datetime.combine() ` now accepts an " -"optional *tzinfo* argument. (Contributed by Alexander Belopolsky " -"in :issue:`27661`.)" +"optional *tzinfo* argument. (Contributed by Alexander Belopolsky in :issue:" +"`27661`.)" msgstr "" #: ../../whatsnew/3.6.rst:997 @@ -1464,9 +1459,9 @@ msgstr "decimal" #: ../../whatsnew/3.6.rst:999 msgid "" "New :meth:`Decimal.as_integer_ratio() ` " -"method that returns a pair ``(n, d)`` of integers that represent the " -"given :class:`~decimal.Decimal` instance as a fraction, in lowest terms and " -"with a positive denominator::" +"method that returns a pair ``(n, d)`` of integers that represent the given :" +"class:`~decimal.Decimal` instance as a fraction, in lowest terms and with a " +"positive denominator::" msgstr "" #: ../../whatsnew/3.6.rst:1004 @@ -1487,9 +1482,9 @@ msgstr "distutils" #: ../../whatsnew/3.6.rst:1014 msgid "" -"The ``default_format`` attribute has been removed from " -"``distutils.command.sdist.sdist`` and the ``formats`` attribute defaults to " -"``['gztar']``. Although not anticipated, any code relying on the presence of " +"The ``default_format`` attribute has been removed from ``distutils.command." +"sdist.sdist`` and the ``formats`` attribute defaults to ``['gztar']``. " +"Although not anticipated, any code relying on the presence of " "``default_format`` may need to be adapted. See :issue:`27819` for more " "details." msgstr "" @@ -1503,8 +1498,8 @@ msgid "" "The new email API, enabled via the *policy* keyword to various constructors, " "is no longer provisional. The :mod:`email` documentation has been " "reorganized and rewritten to focus on the new API, while retaining the old " -"documentation for the legacy API. (Contributed by R. David Murray " -"in :issue:`24277`.)" +"documentation for the legacy API. (Contributed by R. David Murray in :issue:" +"`24277`.)" msgstr "" #: ../../whatsnew/3.6.rst:1029 @@ -1521,13 +1516,12 @@ msgstr "" #: ../../whatsnew/3.6.rst:1035 msgid "" -"There is a new :mod:`~email.policy` " -"attribute, :attr:`~email.policy.Policy.message_factory`, that controls what " -"class is used by default when the parser creates new message objects. For " -"the :attr:`email.policy.compat32` policy this " -"is :class:`~email.message.Message`, for the new policies it " -"is :class:`~email.message.EmailMessage`. (Contributed by R. David Murray " -"in :issue:`20476`.)" +"There is a new :mod:`~email.policy` attribute, :attr:`~email.policy.Policy." +"message_factory`, that controls what class is used by default when the " +"parser creates new message objects. For the :attr:`email.policy.compat32` " +"policy this is :class:`~email.message.Message`, for the new policies it is :" +"class:`~email.message.EmailMessage`. (Contributed by R. David Murray in :" +"issue:`20476`.)" msgstr "" #: ../../whatsnew/3.6.rst:1044 @@ -1547,16 +1541,16 @@ msgstr "enum" #: ../../whatsnew/3.6.rst:1054 msgid "" -"Two new enumeration base classes have been added to the :mod:`enum` " -"module: :class:`~enum.Flag` and :class:`~enum.IntFlags`. Both are used to " -"define constants that can be combined using the bitwise operators. " -"(Contributed by Ethan Furman in :issue:`23591`.)" +"Two new enumeration base classes have been added to the :mod:`enum` module: :" +"class:`~enum.Flag` and :class:`~enum.IntFlag`. Both are used to define " +"constants that can be combined using the bitwise operators. (Contributed by " +"Ethan Furman in :issue:`23591`.)" msgstr "" #: ../../whatsnew/3.6.rst:1059 msgid "" -"Many standard library modules have been updated to use " -"the :class:`~enum.IntFlags` class for their constants." +"Many standard library modules have been updated to use the :class:`~enum." +"IntFlag` class for their constants." msgstr "" #: ../../whatsnew/3.6.rst:1062 @@ -1627,19 +1621,19 @@ msgstr "" #: ../../whatsnew/3.6.rst:1102 msgid "" -"The SHA-3 hash " -"functions :func:`~hashlib.sha3_224`, :func:`~hashlib.sha3_256`, :func:`~hashlib.sha3_384`, :func:`~hashlib.sha3_512`, " -"and SHAKE hash functions :func:`~hashlib.shake_128` " -"and :func:`~hashlib.shake_256` were added. (Contributed by Christian Heimes " -"in :issue:`16113`. Keccak Code Package by Guido Bertoni, Joan Daemen, " -"Michaël Peeters, Gilles Van Assche, and Ronny Van Keer.)" +"The SHA-3 hash functions :func:`~hashlib.sha3_224`, :func:`~hashlib." +"sha3_256`, :func:`~hashlib.sha3_384`, :func:`~hashlib.sha3_512`, and SHAKE " +"hash functions :func:`~hashlib.shake_128` and :func:`~hashlib.shake_256` " +"were added. (Contributed by Christian Heimes in :issue:`16113`. Keccak Code " +"Package by Guido Bertoni, Joan Daemen, Michaël Peeters, Gilles Van Assche, " +"and Ronny Van Keer.)" msgstr "" #: ../../whatsnew/3.6.rst:1109 msgid "" "The password-based key derivation function :func:`~hashlib.scrypt` is now " -"available with OpenSSL 1.1.0 and newer. (Contributed by Christian Heimes " -"in :issue:`27928`.)" +"available with OpenSSL 1.1.0 and newer. (Contributed by Christian Heimes in :" +"issue:`27928`.)" msgstr "" #: ../../whatsnew/3.6.rst:1114 @@ -1648,15 +1642,15 @@ msgstr "http.client" #: ../../whatsnew/3.6.rst:1116 msgid "" -":meth:`HTTPConnection.request() ` " -"and :meth:`~http.client.HTTPConnection.endheaders` both now support chunked " -"encoding request bodies. (Contributed by Demian Brecht and Rolf Krahl " -"in :issue:`12319`.)" +":meth:`HTTPConnection.request() ` and :" +"meth:`~http.client.HTTPConnection.endheaders` both now support chunked " +"encoding request bodies. (Contributed by Demian Brecht and Rolf Krahl in :" +"issue:`12319`.)" msgstr "" #: ../../whatsnew/3.6.rst:1123 msgid "idlelib and IDLE" -msgstr "" +msgstr "idlelib 與 IDLE" #: ../../whatsnew/3.6.rst:1125 msgid "" @@ -1674,10 +1668,10 @@ msgid "" "renaming of files with partial uppercase names is similar to the renaming " "of, for instance, Tkinter and TkFont to tkinter and tkinter.font in 3.0. As " "a result, imports of idlelib files that worked in 3.5 will usually not work " -"in 3.6. At least a module name change will be needed (see idlelib/" -"README.txt), sometimes more. (Name changes contributed by Al Swiegart and " -"Terry Reedy in :issue:`24225`. Most idlelib patches since have been and " -"will be part of the process.)" +"in 3.6. At least a module name change will be needed (see idlelib/README." +"txt), sometimes more. (Name changes contributed by Al Swiegart and Terry " +"Reedy in :issue:`24225`. Most idlelib patches since have been and will be " +"part of the process.)" msgstr "" #: ../../whatsnew/3.6.rst:1141 @@ -1693,8 +1687,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1147 msgid "" -"Multiple fixes for autocompletion. (Contributed by Louie Lu " -"in :issue:`15786`.)" +"Multiple fixes for autocompletion. (Contributed by Louie Lu in :issue:" +"`15786`.)" msgstr "" #: ../../whatsnew/3.6.rst:1149 @@ -1745,8 +1739,8 @@ msgid "" "Editor code context option revised. Box displays all context lines up to " "maxlines. Clicking on a context line jumps the editor to that line. " "Context colors for custom themes is added to Highlights tab of Settings " -"dialog. (Contributed by Cheryl Sabella and Terry Jan Reedy " -"in :issue:`33642`, :issue:`33768`, and :issue:`33679`.)" +"dialog. (Contributed by Cheryl Sabella and Terry Jan Reedy in :issue:" +"`33642`, :issue:`33768`, and :issue:`33679`.)" msgstr "" #: ../../whatsnew/3.6.rst:1182 @@ -1778,26 +1772,26 @@ msgstr "importlib" #: ../../whatsnew/3.6.rst:1201 msgid "" -"Import now raises the new exception :exc:`ModuleNotFoundError` (subclass " -"of :exc:`ImportError`) when it cannot find a module. Code that current " -"checks for ``ImportError`` (in try-except) will still work. (Contributed by " -"Eric Snow in :issue:`15767`.)" +"Import now raises the new exception :exc:`ModuleNotFoundError` (subclass of :" +"exc:`ImportError`) when it cannot find a module. Code that current checks " +"for ``ImportError`` (in try-except) will still work. (Contributed by Eric " +"Snow in :issue:`15767`.)" msgstr "" #: ../../whatsnew/3.6.rst:1206 msgid "" -":class:`importlib.util.LazyLoader` now " -"calls :meth:`~importlib.abc.Loader.create_module` on the wrapped loader, " -"removing the restriction that :class:`importlib.machinery.BuiltinImporter` " -"and :class:`importlib.machinery.ExtensionFileLoader` couldn't be used " -"with :class:`importlib.util.LazyLoader`." +":class:`importlib.util.LazyLoader` now calls :meth:`~importlib.abc.Loader." +"create_module` on the wrapped loader, removing the restriction that :class:" +"`importlib.machinery.BuiltinImporter` and :class:`importlib.machinery." +"ExtensionFileLoader` couldn't be used with :class:`importlib.util." +"LazyLoader`." msgstr "" #: ../../whatsnew/3.6.rst:1212 msgid "" -":func:`importlib.util.cache_from_source`, :func:`importlib.util.source_from_cache`, " -"and :func:`importlib.util.spec_from_file_location` now accept a :term:`path-" -"like object`." +":func:`importlib.util.cache_from_source`, :func:`importlib.util." +"source_from_cache`, and :func:`importlib.util.spec_from_file_location` now " +"accept a :term:`path-like object`." msgstr "" #: ../../whatsnew/3.6.rst:1219 @@ -1814,12 +1808,12 @@ msgstr "" #: ../../whatsnew/3.6.rst:1226 msgid "" -"To reduce code churn when upgrading from Python 2.7 and the " -"legacy :func:`inspect.getargspec` API, the previously documented deprecation " -"of :func:`inspect.getfullargspec` has been reversed. While this function is " -"convenient for single/source Python 2/3 code bases, the " -"richer :func:`inspect.signature` interface remains the recommended approach " -"for new code. (Contributed by Nick Coghlan in :issue:`27172`)" +"To reduce code churn when upgrading from Python 2.7 and the legacy :func:" +"`inspect.getargspec` API, the previously documented deprecation of :func:" +"`inspect.getfullargspec` has been reversed. While this function is " +"convenient for single/source Python 2/3 code bases, the richer :func:" +"`inspect.signature` interface remains the recommended approach for new code. " +"(Contributed by Nick Coghlan in :issue:`27172`)" msgstr "" #: ../../whatsnew/3.6.rst:1235 @@ -1839,10 +1833,10 @@ msgstr "logging" #: ../../whatsnew/3.6.rst:1245 msgid "" -"The new :meth:`WatchedFileHandler.reopenIfNeeded() " -"` method has been added " -"to add the ability to check if the log file needs to be reopened. " -"(Contributed by Marian Horban in :issue:`24884`.)" +"The new :meth:`WatchedFileHandler.reopenIfNeeded() ` method has been added to add the ability " +"to check if the log file needs to be reopened. (Contributed by Marian Horban " +"in :issue:`24884`.)" msgstr "" #: ../../whatsnew/3.6.rst:1252 @@ -1862,9 +1856,9 @@ msgstr "multiprocessing" #: ../../whatsnew/3.6.rst:1262 msgid "" -":ref:`Proxy Objects ` returned " -"by :func:`multiprocessing.Manager` can now be nested. (Contributed by Davin " -"Potts in :issue:`6766`.)" +":ref:`Proxy Objects ` returned by :func:" +"`multiprocessing.Manager` can now be nested. (Contributed by Davin Potts in :" +"issue:`6766`.)" msgstr "" #: ../../whatsnew/3.6.rst:1268 ../../whatsnew/3.6.rst:2021 @@ -1884,12 +1878,11 @@ msgstr "" #: ../../whatsnew/3.6.rst:1276 msgid "" -"A new :meth:`~os.scandir.close` method allows explicitly closing " -"a :func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now " -"supports the :term:`context manager` protocol. If a :func:`scandir` " -"iterator is neither exhausted nor explicitly closed a :exc:`ResourceWarning` " -"will be emitted in its destructor. (Contributed by Serhiy Storchaka " -"in :issue:`25994`.)" +"A new :meth:`~os.scandir.close` method allows explicitly closing a :func:" +"`~os.scandir` iterator. The :func:`~os.scandir` iterator now supports the :" +"term:`context manager` protocol. If a :func:`!scandir` iterator is neither " +"exhausted nor explicitly closed a :exc:`ResourceWarning` will be emitted in " +"its destructor. (Contributed by Serhiy Storchaka in :issue:`25994`.)" msgstr "" #: ../../whatsnew/3.6.rst:1286 @@ -1979,24 +1972,24 @@ msgstr "re" #: ../../whatsnew/3.6.rst:1347 msgid "" -"Added support of modifier spans in regular expressions. Examples: ``'(?" -"i:p)ython'`` matches ``'python'`` and ``'Python'``, but not ``'PYTHON'``; " -"``'(?i)g(?-i:v)r'`` matches ``'GvR'`` and ``'gvr'``, but not ``'GVR'``. " +"Added support of modifier spans in regular expressions. Examples: ``'(?i:" +"p)ython'`` matches ``'python'`` and ``'Python'``, but not ``'PYTHON'``; ``'(?" +"i)g(?-i:v)r'`` matches ``'GvR'`` and ``'gvr'``, but not ``'GVR'``. " "(Contributed by Serhiy Storchaka in :issue:`433028`.)" msgstr "" #: ../../whatsnew/3.6.rst:1352 msgid "" "Match object groups can be accessed by ``__getitem__``, which is equivalent " -"to ``group()``. So ``mo['name']`` is now equivalent to " -"``mo.group('name')``. (Contributed by Eric Smith in :issue:`24454`.)" +"to ``group()``. So ``mo['name']`` is now equivalent to ``mo." +"group('name')``. (Contributed by Eric Smith in :issue:`24454`.)" msgstr "" #: ../../whatsnew/3.6.rst:1356 msgid "" -":class:`~re.Match` objects now support :meth:`index-like objects " -"` as group indices. (Contributed by Jeroen Demeyer and " -"Xiang Zhang in :issue:`27177`.)" +":class:`~re.Match` objects now support :meth:`index-like objects ` as group indices. (Contributed by Jeroen Demeyer and Xiang Zhang " +"in :issue:`27177`.)" msgstr "" #: ../../whatsnew/3.6.rst:1363 @@ -2006,8 +1999,8 @@ msgstr "readline" #: ../../whatsnew/3.6.rst:1365 msgid "" "Added :func:`~readline.set_auto_history` to enable or disable automatic " -"addition of input to the history list. (Contributed by Tyler Crompton " -"in :issue:`26870`.)" +"addition of input to the history list. (Contributed by Tyler Crompton in :" +"issue:`26870`.)" msgstr "" #: ../../whatsnew/3.6.rst:1371 @@ -2018,8 +2011,8 @@ msgstr "rlcompleter" msgid "" "Private and special attribute names now are omitted unless the prefix starts " "with underscores. A space or a colon is added after some completed " -"keywords. (Contributed by Serhiy Storchaka in :issue:`25011` " -"and :issue:`25209`.)" +"keywords. (Contributed by Serhiy Storchaka in :issue:`25011` and :issue:" +"`25209`.)" msgstr "" #: ../../whatsnew/3.6.rst:1379 @@ -2061,9 +2054,9 @@ msgstr "socket" #: ../../whatsnew/3.6.rst:1406 msgid "" -"The :func:`~socket.socket.ioctl` function now supports " -"the :const:`~socket.SIO_LOOPBACK_FAST_PATH` control code. (Contributed by " -"Daniel Stokes in :issue:`26536`.)" +"The :func:`~socket.socket.ioctl` function now supports the :const:`~socket." +"SIO_LOOPBACK_FAST_PATH` control code. (Contributed by Daniel Stokes in :" +"issue:`26536`.)" msgstr "" #: ../../whatsnew/3.6.rst:1410 @@ -2076,16 +2069,16 @@ msgstr "" #: ../../whatsnew/3.6.rst:1414 msgid "" "The :meth:`~socket.socket.setsockopt` now supports the ``setsockopt(level, " -"optname, None, optlen: int)`` form. (Contributed by Christian Heimes " -"in :issue:`27744`.)" +"optname, None, optlen: int)`` form. (Contributed by Christian Heimes in :" +"issue:`27744`.)" msgstr "" #: ../../whatsnew/3.6.rst:1418 msgid "" "The socket module now supports the address family :const:`~socket.AF_ALG` to " -"interface with Linux Kernel crypto API. ``ALG_*``, ``SOL_ALG`` " -"and :meth:`~socket.socket.sendmsg_afalg` were added. (Contributed by " -"Christian Heimes in :issue:`27744` with support from Victor Stinner.)" +"interface with Linux Kernel crypto API. ``ALG_*``, ``SOL_ALG`` and :meth:" +"`~socket.socket.sendmsg_afalg` were added. (Contributed by Christian Heimes " +"in :issue:`27744` with support from Victor Stinner.)" msgstr "" #: ../../whatsnew/3.6.rst:1424 @@ -2100,19 +2093,19 @@ msgstr "socketserver" #: ../../whatsnew/3.6.rst:1431 msgid "" -"Servers based on the :mod:`socketserver` module, including those defined " -"in :mod:`http.server`, :mod:`xmlrpc.server` " -"and :mod:`wsgiref.simple_server`, now support the :term:`context manager` " -"protocol. (Contributed by Aviv Palivoda in :issue:`26404`.)" +"Servers based on the :mod:`socketserver` module, including those defined in :" +"mod:`http.server`, :mod:`xmlrpc.server` and :mod:`wsgiref.simple_server`, " +"now support the :term:`context manager` protocol. (Contributed by Aviv " +"Palivoda in :issue:`26404`.)" msgstr "" #: ../../whatsnew/3.6.rst:1437 msgid "" -"The :attr:`~socketserver.StreamRequestHandler.wfile` attribute " -"of :class:`~socketserver.StreamRequestHandler` classes now implements " -"the :class:`io.BufferedIOBase` writable interface. In particular, " -"calling :meth:`~io.BufferedIOBase.write` is now guaranteed to send the data " -"in full. (Contributed by Martin Panter in :issue:`26721`.)" +"The :attr:`wfile ` attribute of :" +"class:`~socketserver.StreamRequestHandler` classes now implements the :class:" +"`io.BufferedIOBase` writable interface. In particular, calling :meth:`~io." +"BufferedIOBase.write` is now guaranteed to send the data in full. " +"(Contributed by Martin Panter in :issue:`26721`.)" msgstr "" #: ../../whatsnew/3.6.rst:1445 ../../whatsnew/3.6.rst:2037 @@ -2128,8 +2121,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1450 msgid "" "3DES has been removed from the default cipher suites and ChaCha20 Poly1305 " -"cipher suites have been added. (Contributed by Christian Heimes " -"in :issue:`27850` and :issue:`27766`.)" +"cipher suites have been added. (Contributed by Christian Heimes in :issue:" +"`27850` and :issue:`27766`.)" msgstr "" #: ../../whatsnew/3.6.rst:1454 @@ -2154,9 +2147,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1467 msgid "" -"All constants and flags have been converted to :class:`~enum.IntEnum` " -"and :class:`~enum.IntFlags`. (Contributed by Christian Heimes " -"in :issue:`28025`.)" +"All constants and flags have been converted to :class:`~enum.IntEnum` and :" +"class:`~enum.IntFlag`. (Contributed by Christian Heimes in :issue:`28025`.)" msgstr "" #: ../../whatsnew/3.6.rst:1471 @@ -2167,10 +2159,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:1475 msgid "" -"Added :attr:`ssl.SSLContext.post_handshake_auth` to enable " -"and :meth:`ssl.SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 " -"post-handshake authentication. (Contributed by Christian Heimes " -"in :gh:`78851`.)" +"Added :attr:`ssl.SSLContext.post_handshake_auth` to enable and :meth:`ssl." +"SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 post-handshake " +"authentication. (Contributed by Christian Heimes in :gh:`78851`.)" msgstr "" #: ../../whatsnew/3.6.rst:1481 @@ -2190,8 +2181,8 @@ msgstr "struct" #: ../../whatsnew/3.6.rst:1490 msgid "" ":mod:`struct` now supports IEEE 754 half-precision floats via the ``'e'`` " -"format specifier. (Contributed by Eli Stevens, Mark Dickinson " -"in :issue:`11734`.)" +"format specifier. (Contributed by Eli Stevens, Mark Dickinson in :issue:" +"`11734`.)" msgstr "" #: ../../whatsnew/3.6.rst:1496 @@ -2202,9 +2193,9 @@ msgstr "subprocess" msgid "" ":class:`subprocess.Popen` destructor now emits a :exc:`ResourceWarning` " "warning if the child process is still running. Use the context manager " -"protocol (``with proc: ...``) or explicitly call " -"the :meth:`~subprocess.Popen.wait` method to read the exit status of the " -"child process. (Contributed by Victor Stinner in :issue:`26741`.)" +"protocol (``with proc: ...``) or explicitly call the :meth:`~subprocess." +"Popen.wait` method to read the exit status of the child process. " +"(Contributed by Victor Stinner in :issue:`26741`.)" msgstr "" #: ../../whatsnew/3.6.rst:1504 @@ -2251,8 +2242,8 @@ msgstr "time" #: ../../whatsnew/3.6.rst:1534 msgid "" -"The :class:`~time.struct_time` attributes :attr:`tm_gmtoff` " -"and :attr:`tm_zone` are now available on all platforms." +"The :class:`~time.struct_time` attributes :attr:`!tm_gmtoff` and :attr:`!" +"tm_zone` are now available on all platforms." msgstr "" #: ../../whatsnew/3.6.rst:1539 @@ -2279,12 +2270,10 @@ msgstr "tkinter" #: ../../whatsnew/3.6.rst:1554 msgid "" -"Added " -"methods :meth:`~tkinter.Variable.trace_add`, :meth:`~tkinter.Variable.trace_remove` " -"and :meth:`~tkinter.Variable.trace_info` in the :class:`tkinter.Variable` " -"class. They replace old " -"methods :meth:`~tkinter.Variable.trace_variable`, :meth:`~tkinter.Variable.trace`, :meth:`~tkinter.Variable.trace_vdelete` " -"and :meth:`~tkinter.Variable.trace_vinfo` that use obsolete Tcl commands and " +"Added methods :meth:`!Variable.trace_add`, :meth:`!Variable.trace_remove` " +"and :meth:`!trace_info` in the :class:`!tkinter.Variable` class. They " +"replace old methods :meth:`!trace_variable`, :meth:`!trace`, :meth:`!" +"trace_vdelete` and :meth:`!trace_vinfo` that use obsolete Tcl commands and " "might not work in future versions of Tcl. (Contributed by Serhiy Storchaka " "in :issue:`22115`)." msgstr "" @@ -2362,22 +2351,22 @@ msgstr "" msgid "" "The :mod:`typing` module has a much improved support for generic type " "aliases. For example ``Dict[str, Tuple[S, T]]`` is now a valid type " -"annotation. (Contributed by Guido van Rossum in `Github #195 `_.)" +"annotation. (Contributed by Guido van Rossum in `Github #195 `_.)" msgstr "" #: ../../whatsnew/3.6.rst:1614 msgid "" -"The :class:`typing.ContextManager` class has been added for " -"representing :class:`contextlib.AbstractContextManager`. (Contributed by " -"Brett Cannon in :issue:`25609`.)" +"The :class:`typing.ContextManager` class has been added for representing :" +"class:`contextlib.AbstractContextManager`. (Contributed by Brett Cannon in :" +"issue:`25609`.)" msgstr "" #: ../../whatsnew/3.6.rst:1618 msgid "" -"The :class:`typing.Collection` class has been added for " -"representing :class:`collections.abc.Collection`. (Contributed by Ivan " -"Levkivskyi in :issue:`27598`.)" +"The :class:`typing.Collection` class has been added for representing :class:" +"`collections.abc.Collection`. (Contributed by Ivan Levkivskyi in :issue:" +"`27598`.)" msgstr "" #: ../../whatsnew/3.6.rst:1622 @@ -2386,16 +2375,16 @@ msgid "" "variables. As introduced in :pep:`526`, a variable annotation wrapped in " "ClassVar indicates that a given attribute is intended to be used as a class " "variable and should not be set on instances of that class. (Contributed by " -"Ivan Levkivskyi in `Github #280 `_.)" +"Ivan Levkivskyi in `Github #280 `_.)" msgstr "" #: ../../whatsnew/3.6.rst:1629 msgid "" "A new :const:`~typing.TYPE_CHECKING` constant that is assumed to be ``True`` " "by the static type checkers, but is ``False`` at runtime. (Contributed by " -"Guido van Rossum in `Github #230 `_.)" +"Guido van Rossum in `Github #230 `_.)" msgstr "" #: ../../whatsnew/3.6.rst:1634 @@ -2443,10 +2432,10 @@ msgstr ":class:`~unittest.mock.Mock` 類別有以下改進:" #: ../../whatsnew/3.6.rst:1660 msgid "" -"Two new methods, :meth:`Mock.assert_called() " -"` and :meth:`Mock.assert_called_once() " -"` to check if the mock object was " -"called. (Contributed by Amit Saha in :issue:`26323`.)" +"Two new methods, :meth:`Mock.assert_called() ` and :meth:`Mock.assert_called_once() ` to check if the mock object was called. (Contributed by " +"Amit Saha in :issue:`26323`.)" msgstr "" #: ../../whatsnew/3.6.rst:1666 @@ -2463,10 +2452,10 @@ msgstr "urllib.request" #: ../../whatsnew/3.6.rst:1675 msgid "" "If a HTTP request has a file or iterable body (other than a bytes object) " -"but no ``Content-Length`` header, rather than throwing an " -"error, :class:`~urllib.request.AbstractHTTPHandler` now falls back to use " -"chunked transfer encoding. (Contributed by Demian Brecht and Rolf Krahl " -"in :issue:`12319`.)" +"but no ``Content-Length`` header, rather than throwing an error, :class:" +"`AbstractHTTPHandler ` now falls back to use " +"chunked transfer encoding. (Contributed by Demian Brecht and Rolf Krahl in :" +"issue:`12319`.)" msgstr "" #: ../../whatsnew/3.6.rst:1683 @@ -2497,11 +2486,11 @@ msgstr "warnings" #: ../../whatsnew/3.6.rst:1701 msgid "" -"A new optional *source* parameter has been added to " -"the :func:`warnings.warn_explicit` function: the destroyed object which " -"emitted a :exc:`ResourceWarning`. A *source* attribute has also been added " -"to :class:`warnings.WarningMessage` (contributed by Victor Stinner " -"in :issue:`26568` and :issue:`26567`)." +"A new optional *source* parameter has been added to the :func:`warnings." +"warn_explicit` function: the destroyed object which emitted a :exc:" +"`ResourceWarning`. A *source* attribute has also been added to :class:`!" +"warnings.WarningMessage` (contributed by Victor Stinner in :issue:`26568` " +"and :issue:`26567`)." msgstr "" #: ../../whatsnew/3.6.rst:1707 @@ -2559,9 +2548,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:1730 msgid "" -"The \"Object allocated at\" traceback is new and is only displayed " -"if :mod:`tracemalloc` is tracing Python memory allocations and if " -"the :mod:`warnings` module was already imported." +"The \"Object allocated at\" traceback is new and is only displayed if :mod:" +"`tracemalloc` is tracing Python memory allocations and if the :mod:" +"`warnings` module was already imported." msgstr "" #: ../../whatsnew/3.6.rst:1736 @@ -2580,9 +2569,9 @@ msgstr "winsound" #: ../../whatsnew/3.6.rst:1745 msgid "" -"Allowed keyword arguments to be passed to :func:`Beep " -"`, :func:`MessageBeep `, " -"and :func:`PlaySound ` (:issue:`27982`)." +"Allowed keyword arguments to be passed to :func:`Beep `, :" +"func:`MessageBeep `, and :func:`PlaySound ` (:issue:`27982`)." msgstr "" #: ../../whatsnew/3.6.rst:1751 @@ -2635,8 +2624,8 @@ msgstr "最佳化" msgid "" "The Python interpreter now uses a 16-bit wordcode instead of bytecode which " "made a number of opcode optimizations possible. (Contributed by Demur Rumed " -"with input and reviews from Serhiy Storchaka and Victor Stinner " -"in :issue:`26647` and :issue:`28050`.)" +"with input and reviews from Serhiy Storchaka and Victor Stinner in :issue:" +"`26647` and :issue:`28050`.)" msgstr "" #: ../../whatsnew/3.6.rst:1790 @@ -2668,8 +2657,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1804 msgid "" "The ASCII and the Latin1 encoders are now up to 3 times as fast for the " -"error handler ``surrogateescape`` (Contributed by Victor Stinner " -"in :issue:`25227`)." +"error handler ``surrogateescape`` (Contributed by Victor Stinner in :issue:" +"`25227`)." msgstr "" #: ../../whatsnew/3.6.rst:1808 @@ -2701,8 +2690,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1822 msgid "" "Optimize :meth:`bytes.fromhex` and :meth:`bytearray.fromhex`: they are now " -"between 2x and 3.5x faster. (Contributed by Victor Stinner " -"in :issue:`25401`)." +"between 2x and 3.5x faster. (Contributed by Victor Stinner in :issue:" +"`25401`)." msgstr "" #: ../../whatsnew/3.6.rst:1825 @@ -2713,19 +2702,19 @@ msgstr "" #: ../../whatsnew/3.6.rst:1828 msgid "" -"Allocator functions of the :c:func:`PyMem_Malloc` domain " -"(:c:macro:`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc memory allocator " -"` instead of :c:func:`malloc` function of the C library. The " -"pymalloc allocator is optimized for objects smaller or equal to 512 bytes " -"with a short lifetime, and use :c:func:`malloc` for larger memory blocks. " +"Allocator functions of the :c:func:`PyMem_Malloc` domain (:c:macro:" +"`PYMEM_DOMAIN_MEM`) now use the :ref:`pymalloc memory allocator ` " +"instead of :c:func:`malloc` function of the C library. The pymalloc " +"allocator is optimized for objects smaller or equal to 512 bytes with a " +"short lifetime, and use :c:func:`malloc` for larger memory blocks. " "(Contributed by Victor Stinner in :issue:`26249`)." msgstr "" #: ../../whatsnew/3.6.rst:1835 msgid "" ":func:`pickle.load` and :func:`pickle.loads` are now up to 10% faster when " -"deserializing many small objects (Contributed by Victor Stinner " -"in :issue:`27056`)." +"deserializing many small objects (Contributed by Victor Stinner in :issue:" +"`27056`)." msgstr "" #: ../../whatsnew/3.6.rst:1839 @@ -2739,30 +2728,30 @@ msgstr "" #: ../../whatsnew/3.6.rst:1845 msgid "" -"Optimized :func:`~glob.glob` and :func:`~glob.iglob` functions in " -"the :mod:`glob` module; they are now about 3--6 times faster. (Contributed " -"by Serhiy Storchaka in :issue:`25596`)." +"Optimized :func:`~glob.glob` and :func:`~glob.iglob` functions in the :mod:" +"`glob` module; they are now about 3--6 times faster. (Contributed by Serhiy " +"Storchaka in :issue:`25596`)." msgstr "" #: ../../whatsnew/3.6.rst:1849 msgid "" "Optimized globbing in :mod:`pathlib` by using :func:`os.scandir`; it is now " -"about 1.5--4 times faster. (Contributed by Serhiy Storchaka " -"in :issue:`26032`)." +"about 1.5--4 times faster. (Contributed by Serhiy Storchaka in :issue:" +"`26032`)." msgstr "" #: ../../whatsnew/3.6.rst:1853 msgid "" ":class:`xml.etree.ElementTree` parsing, iteration and deepcopy performance " -"has been significantly improved. (Contributed by Serhiy Storchaka " -"in :issue:`25638`, :issue:`25873`, and :issue:`25869`.)" +"has been significantly improved. (Contributed by Serhiy Storchaka in :issue:" +"`25638`, :issue:`25873`, and :issue:`25869`.)" msgstr "" #: ../../whatsnew/3.6.rst:1858 msgid "" "Creation of :class:`fractions.Fraction` instances from floats and decimals " -"is now 2 to 3 times faster. (Contributed by Serhiy Storchaka " -"in :issue:`25971`.)" +"is now 2 to 3 times faster. (Contributed by Serhiy Storchaka in :issue:" +"`25971`.)" msgstr "" #: ../../whatsnew/3.6.rst:1864 @@ -2773,8 +2762,8 @@ msgstr "建置和 C API 變更" msgid "" "Python now requires some C99 support in the toolchain to build. Most " "notably, Python now uses standard integer types and macros in place of " -"custom macros like ``PY_LONG_LONG``. For more information, see :pep:`7` " -"and :issue:`17884`." +"custom macros like ``PY_LONG_LONG``. For more information, see :pep:`7` and :" +"issue:`17884`." msgstr "" #: ../../whatsnew/3.6.rst:1871 @@ -2782,8 +2771,8 @@ msgid "" "Cross-compiling CPython with the Android NDK and the Android API level set " "to 21 (Android 5.0 Lollipop) or greater runs successfully. While Android is " "not yet a supported platform, the Python test suite runs on the Android " -"emulator with only about 16 tests failures. See the Android meta-" -"issue :issue:`26865`." +"emulator with only about 16 tests failures. See the Android meta-issue :" +"issue:`26865`." msgstr "" #: ../../whatsnew/3.6.rst:1876 @@ -2830,8 +2819,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:1901 msgid "" -"The new :c:func:`PyErr_ResourceWarning` function can be used to generate " -"a :exc:`ResourceWarning` providing the source of the resource allocation. " +"The new :c:func:`PyErr_ResourceWarning` function can be used to generate a :" +"exc:`ResourceWarning` providing the source of the resource allocation. " "(Contributed by Victor Stinner in :issue:`26567`.)" msgstr "" @@ -2897,19 +2886,19 @@ msgstr "" #: ../../whatsnew/3.6.rst:1945 msgid "" -"The :meth:`__aiter__` method is now expected to return an asynchronous " -"iterator directly instead of returning an awaitable as previously. Doing the " -"former will trigger a :exc:`DeprecationWarning`. Backward compatibility " -"will be removed in Python 3.7. (Contributed by Yury Selivanov " -"in :issue:`27243`.)" +"The :meth:`~object.__aiter__` method is now expected to return an " +"asynchronous iterator directly instead of returning an awaitable as " +"previously. Doing the former will trigger a :exc:`DeprecationWarning`. " +"Backward compatibility will be removed in Python 3.7. (Contributed by Yury " +"Selivanov in :issue:`27243`.)" msgstr "" #: ../../whatsnew/3.6.rst:1951 msgid "" "A backslash-character pair that is not a valid escape sequence now generates " -"a :exc:`DeprecationWarning`. Although this will eventually become " -"a :exc:`SyntaxError`, that will not be for several Python releases. " -"(Contributed by Emanuel Barry in :issue:`27364`.)" +"a :exc:`DeprecationWarning`. Although this will eventually become a :exc:" +"`SyntaxError`, that will not be for several Python releases. (Contributed by " +"Emanuel Barry in :issue:`27364`.)" msgstr "" #: ../../whatsnew/3.6.rst:1956 @@ -2960,8 +2949,8 @@ msgstr "" msgid "" "The undocumented ``extra_path`` argument to the ``distutils.Distribution`` " "constructor is now considered deprecated and will raise a warning if set. " -"Support for this parameter will be removed in a future Python release. " -"See :issue:`27919` for details." +"Support for this parameter will be removed in a future Python release. See :" +"issue:`27919` for details." msgstr "" #: ../../whatsnew/3.6.rst:1999 @@ -2976,12 +2965,12 @@ msgstr "" #: ../../whatsnew/3.6.rst:2009 msgid "" -"The :meth:`importlib.machinery.SourceFileLoader.load_module` " -"and :meth:`importlib.machinery.SourcelessFileLoader.load_module` methods are " -"now deprecated. They were the only remaining implementations " -"of :meth:`importlib.abc.Loader.load_module` in :mod:`importlib` that had not " -"been deprecated in previous versions of Python in favour " -"of :meth:`importlib.abc.Loader.exec_module`." +"The :meth:`importlib.machinery.SourceFileLoader.load_module` and :meth:" +"`importlib.machinery.SourcelessFileLoader.load_module` methods are now " +"deprecated. They were the only remaining implementations of :meth:`importlib." +"abc.Loader.load_module` in :mod:`importlib` that had not been deprecated in " +"previous versions of Python in favour of :meth:`importlib.abc.Loader." +"exec_module`." msgstr "" #: ../../whatsnew/3.6.rst:2016 @@ -2995,8 +2984,8 @@ msgstr "" msgid "" "Undocumented support of general :term:`bytes-like objects ` as paths in :mod:`os` functions, :func:`compile` and similar " -"functions is now deprecated. (Contributed by Serhiy Storchaka " -"in :issue:`25791` and :issue:`26754`.)" +"functions is now deprecated. (Contributed by Serhiy Storchaka in :issue:" +"`25791` and :issue:`26754`.)" msgstr "" #: ../../whatsnew/3.6.rst:2031 @@ -3017,9 +3006,9 @@ msgstr "" #: ../../whatsnew/3.6.rst:2043 msgid "" "SSL-related arguments like ``certfile``, ``keyfile`` and ``check_hostname`` " -"in :mod:`ftplib`, :mod:`http.client`, :mod:`imaplib`, :mod:`poplib`, " -"and :mod:`smtplib` have been deprecated in favor of ``context``. " -"(Contributed by Christian Heimes in :issue:`28022`.)" +"in :mod:`ftplib`, :mod:`http.client`, :mod:`imaplib`, :mod:`poplib`, and :" +"mod:`smtplib` have been deprecated in favor of ``context``. (Contributed by " +"Christian Heimes in :issue:`28022`.)" msgstr "" #: ../../whatsnew/3.6.rst:2048 @@ -3050,10 +3039,9 @@ msgstr "xml" #: ../../whatsnew/3.6.rst:2073 msgid "" -"As mitigation against DTD and external entity retrieval, " -"the :mod:`xml.dom.minidom` and :mod:`xml.sax` modules no longer process " -"external entities by default. (Contributed by Christian Heimes " -"in :gh:`61441`.)" +"As mitigation against DTD and external entity retrieval, the :mod:`xml.dom." +"minidom` and :mod:`xml.sax` modules no longer process external entities by " +"default. (Contributed by Christian Heimes in :gh:`61441`.)" msgstr "" #: ../../whatsnew/3.6.rst:2080 @@ -3063,9 +3051,9 @@ msgstr "C API 的已棄用函式和型別" #: ../../whatsnew/3.6.rst:2082 msgid "" "Undocumented functions :c:func:`!PyUnicode_AsEncodedObject`, :c:func:`!" -"PyUnicode_AsDecodedObject`, :c:func:`!PyUnicode_AsEncodedUnicode` " -"and :c:func:`!PyUnicode_AsDecodedUnicode` are deprecated now. Use " -"the :ref:`generic codec based API ` instead." +"PyUnicode_AsDecodedObject`, :c:func:`!PyUnicode_AsEncodedUnicode` and :c:" +"func:`!PyUnicode_AsDecodedUnicode` are deprecated now. Use the :ref:`generic " +"codec based API ` instead." msgstr "" #: ../../whatsnew/3.6.rst:2089 @@ -3092,45 +3080,46 @@ msgstr "API 與功能的移除" #: ../../whatsnew/3.6.rst:2104 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter in regular " -"expressions will now cause an error. In replacement templates " -"for :func:`re.sub` they are still allowed, but deprecated. " -"The :const:`re.LOCALE` flag can now only be used with binary patterns." +"expressions will now cause an error. In replacement templates for :func:`re." +"sub` they are still allowed, but deprecated. The :const:`re.LOCALE` flag can " +"now only be used with binary patterns." msgstr "" #: ../../whatsnew/3.6.rst:2109 msgid "" -"``inspect.getmoduleinfo()`` was removed (was deprecated since CPython " -"3.3). :func:`inspect.getmodulename` should be used for obtaining the module " -"name for a given path. (Contributed by Yury Selivanov in :issue:`13248`.)" +"``inspect.getmoduleinfo()`` was removed (was deprecated since CPython 3.3). :" +"func:`inspect.getmodulename` should be used for obtaining the module name " +"for a given path. (Contributed by Yury Selivanov in :issue:`13248`.)" msgstr "" #: ../../whatsnew/3.6.rst:2114 msgid "" "``traceback.Ignore`` class and ``traceback.usage``, ``traceback.modname``, " -"``traceback.fullmodname``, ``traceback.find_lines_from_code``, " -"``traceback.find_lines``, ``traceback.find_strings``, " -"``traceback.find_executable_lines`` methods were removed from " -"the :mod:`traceback` module. They were undocumented methods deprecated since " -"Python 3.2 and equivalent functionality is available from private methods." +"``traceback.fullmodname``, ``traceback.find_lines_from_code``, ``traceback." +"find_lines``, ``traceback.find_strings``, ``traceback." +"find_executable_lines`` methods were removed from the :mod:`traceback` " +"module. They were undocumented methods deprecated since Python 3.2 and " +"equivalent functionality is available from private methods." msgstr "" ":mod:`traceback` 模組中的 ``traceback.Ignore`` 類別和 ``traceback.usage``、" -"``traceback.modname``、``traceback.fullmodname``、``traceback.find_lines_from_code``、" -"``traceback.find_lines``、``traceback.find_strings`` 和 ``traceback.find_executable_lines`` " -"方法已被移除。它們是自 Python 3.2 以來已棄用的未記錄方法,等效的功能現在可從私有方法獲得。" +"``traceback.modname``、``traceback.fullmodname``、``traceback." +"find_lines_from_code``、``traceback.find_lines``、``traceback.find_strings`` " +"和 ``traceback.find_executable_lines`` 方法已被移除。它們是自 Python 3.2 以來" +"已棄用的未記錄方法,等效的功能現在可從私有方法獲得。" #: ../../whatsnew/3.6.rst:2121 msgid "" -"The ``tk_menuBar()`` and ``tk_bindForTraversal()`` dummy methods " -"in :mod:`tkinter` widget classes were removed (corresponding Tk commands " -"were obsolete since Tk 4.0)." +"The ``tk_menuBar()`` and ``tk_bindForTraversal()`` dummy methods in :mod:" +"`tkinter` widget classes were removed (corresponding Tk commands were " +"obsolete since Tk 4.0)." msgstr "" #: ../../whatsnew/3.6.rst:2125 msgid "" "The :meth:`~zipfile.ZipFile.open` method of the :class:`zipfile.ZipFile` " "class no longer supports the ``'U'`` mode (was deprecated since Python 3.4). " -"Use :class:`io.TextIOWrapper` for reading compressed text files " -"in :term:`universal newlines` mode." +"Use :class:`io.TextIOWrapper` for reading compressed text files in :term:" +"`universal newlines` mode." msgstr "" #: ../../whatsnew/3.6.rst:2130 @@ -3167,8 +3156,8 @@ msgid "" "The output of a special Python build with defined ``COUNT_ALLOCS``, " "``SHOW_ALLOC_COUNT`` or ``SHOW_TRACK_COUNT`` macros is now off by default. " "It can be re-enabled using the ``-X showalloccount`` option. It now outputs " -"to ``stderr`` instead of ``stdout``. (Contributed by Serhiy Storchaka " -"in :issue:`23034`.)" +"to ``stderr`` instead of ``stdout``. (Contributed by Serhiy Storchaka in :" +"issue:`23034`.)" msgstr "" #: ../../whatsnew/3.6.rst:2158 @@ -3178,8 +3167,8 @@ msgstr "Python API 的變更" #: ../../whatsnew/3.6.rst:2160 msgid "" ":func:`open() ` will no longer allow combining the ``'U'`` mode flag " -"with ``'+'``. (Contributed by Jeff Balogh and John O'Connor " -"in :issue:`2091`.)" +"with ``'+'``. (Contributed by Jeff Balogh and John O'Connor in :issue:" +"`2091`.)" msgstr "" #: ../../whatsnew/3.6.rst:2164 @@ -3196,8 +3185,8 @@ msgstr "" #: ../../whatsnew/3.6.rst:2170 msgid "" -"When :meth:`importlib.abc.Loader.exec_module` is " -"defined, :meth:`importlib.abc.Loader.create_module` must also be defined." +"When :meth:`importlib.abc.Loader.exec_module` is defined, :meth:`importlib." +"abc.Loader.create_module` must also be defined." msgstr "" #: ../../whatsnew/3.6.rst:2173 @@ -3210,14 +3199,13 @@ msgstr "" msgid "" "The format of the :attr:`~codeobject.co_lnotab` attribute of code objects " "changed to support a negative line number delta. By default, Python does not " -"emit bytecode with a negative line number delta. Functions " -"using :attr:`frame.f_lineno`, ``PyFrame_GetLineNumber()`` or " -"``PyCode_Addr2Line()`` are not affected. Functions directly decoding :attr:`!" -"co_lnotab` should be updated to use a signed 8-bit integer type for the line " -"number delta, but this is only required to support applications using a " -"negative line number delta. See ``Objects/lnotab_notes.txt`` for the :attr:`!" -"co_lnotab` format and how to decode it, and see the :pep:`511` for the " -"rationale." +"emit bytecode with a negative line number delta. Functions using :attr:" +"`frame.f_lineno`, ``PyFrame_GetLineNumber()`` or ``PyCode_Addr2Line()`` are " +"not affected. Functions directly decoding :attr:`!co_lnotab` should be " +"updated to use a signed 8-bit integer type for the line number delta, but " +"this is only required to support applications using a negative line number " +"delta. See ``Objects/lnotab_notes.txt`` for the :attr:`!co_lnotab` format " +"and how to decode it, and see the :pep:`511` for the rationale." msgstr "" #: ../../whatsnew/3.6.rst:2187 @@ -3230,26 +3218,27 @@ msgstr "" #: ../../whatsnew/3.6.rst:2192 msgid "" -"Reading the :attr:`~urllib.parse.SplitResult.port` attribute " -"of :func:`urllib.parse.urlsplit` and :func:`~urllib.parse.urlparse` results " -"now raises :exc:`ValueError` for out-of-range values, rather than " -"returning :const:`None`. See :issue:`20059`." +"Reading the :attr:`!port` attribute of :func:`urllib.parse.urlsplit` and :" +"func:`~urllib.parse.urlparse` results now raises :exc:`ValueError` for out-" +"of-range values, rather than returning :const:`None`. See :issue:`20059`." msgstr "" #: ../../whatsnew/3.6.rst:2197 msgid "" -"The :mod:`!imp` module now raises a :exc:`DeprecationWarning` instead " -"of :exc:`PendingDeprecationWarning`." +"The :mod:`!imp` module now raises a :exc:`DeprecationWarning` instead of :" +"exc:`PendingDeprecationWarning`." msgstr "" #: ../../whatsnew/3.6.rst:2200 msgid "" -"The following modules have had missing APIs added to their :attr:`__all__` " -"attributes to match the documented APIs: :mod:`calendar`, :mod:`!" -"cgi`, :mod:`csv`, :mod:`~xml.etree.ElementTree`, :mod:`enum`, :mod:`fileinput`, :mod:`ftplib`, :mod:`logging`, :mod:`mailbox`, :mod:`mimetypes`, :mod:`optparse`, :mod:`plistlib`, :mod:`!" -"smtpd`, :mod:`subprocess`, :mod:`tarfile`, :mod:`threading` " -"and :mod:`wave`. This means they will export new symbols when ``import *`` " -"is used. (Contributed by Joel Taddei and Jacek Kołodziej in :issue:`23883`.)" +"The following modules have had missing APIs added to their :attr:`~module." +"__all__` attributes to match the documented APIs: :mod:`calendar`, :mod:`!" +"cgi`, :mod:`csv`, :mod:`~xml.etree.ElementTree`, :mod:`enum`, :mod:" +"`fileinput`, :mod:`ftplib`, :mod:`logging`, :mod:`mailbox`, :mod:" +"`mimetypes`, :mod:`optparse`, :mod:`plistlib`, :mod:`!smtpd`, :mod:" +"`subprocess`, :mod:`tarfile`, :mod:`threading` and :mod:`wave`. This means " +"they will export new symbols when ``import *`` is used. (Contributed by Joel " +"Taddei and Jacek Kołodziej in :issue:`23883`.)" msgstr "" #: ../../whatsnew/3.6.rst:2211 @@ -3261,27 +3250,26 @@ msgstr "" #: ../../whatsnew/3.6.rst:2215 msgid "" -"When a relative import is performed and no parent package is known, " -"then :exc:`ImportError` will be raised. Previously, :exc:`SystemError` could " -"be raised. (Contributed by Brett Cannon in :issue:`18018`.)" +"When a relative import is performed and no parent package is known, then :" +"exc:`ImportError` will be raised. Previously, :exc:`SystemError` could be " +"raised. (Contributed by Brett Cannon in :issue:`18018`.)" msgstr "" #: ../../whatsnew/3.6.rst:2219 msgid "" -"Servers based on the :mod:`socketserver` module, including those defined " -"in :mod:`http.server`, :mod:`xmlrpc.server` " -"and :mod:`wsgiref.simple_server`, now only catch exceptions derived " -"from :exc:`Exception`. Therefore if a request handler raises an exception " -"like :exc:`SystemExit` " -"or :exc:`KeyboardInterrupt`, :meth:`~socketserver.BaseServer.handle_error` " -"is no longer called, and the exception will stop a single-threaded server. " +"Servers based on the :mod:`socketserver` module, including those defined in :" +"mod:`http.server`, :mod:`xmlrpc.server` and :mod:`wsgiref.simple_server`, " +"now only catch exceptions derived from :exc:`Exception`. Therefore if a " +"request handler raises an exception like :exc:`SystemExit` or :exc:" +"`KeyboardInterrupt`, :meth:`~socketserver.BaseServer.handle_error` is no " +"longer called, and the exception will stop a single-threaded server. " "(Contributed by Martin Panter in :issue:`23430`.)" msgstr "" #: ../../whatsnew/3.6.rst:2228 msgid "" -":func:`!spwd.getspnam` now raises a :exc:`PermissionError` instead " -"of :exc:`KeyError` if the user doesn't have privileges." +":func:`!spwd.getspnam` now raises a :exc:`PermissionError` instead of :exc:" +"`KeyError` if the user doesn't have privileges." msgstr "" #: ../../whatsnew/3.6.rst:2231 @@ -3303,17 +3291,17 @@ msgstr "" #: ../../whatsnew/3.6.rst:2243 msgid "" -"All optional arguments of " -"the :func:`~json.dump`, :func:`~json.dumps`, :func:`~json.load` " -"and :func:`~json.loads` functions and :class:`~json.JSONEncoder` " -"and :class:`~json.JSONDecoder` class constructors in the :mod:`json` module " -"are now :ref:`keyword-only `. (Contributed by Serhiy " -"Storchaka in :issue:`18726`.)" +"All optional arguments of the :func:`~json.dump`, :func:`~json.dumps`, :func:" +"`~json.load` and :func:`~json.loads` functions and :class:`~json." +"JSONEncoder` and :class:`~json.JSONDecoder` class constructors in the :mod:" +"`json` module are now :ref:`keyword-only `. " +"(Contributed by Serhiy Storchaka in :issue:`18726`.)" msgstr "" -"在 :mod:`json` 模組中,:func:`~json.dump`、:func:`~json.dumps`、:func:`~json.load` " -"和 :func:`~json.loads` 函式以及 :class:`~json.JSONEncoder` 和 :class:`~json.JSONDecoder` " -"類別建構函式的所有可選引數現在都是\\ :ref:`僅限關鍵字 `\\ 引數。" -"(由 Serhiy Storchaka 在 :issue:`18726` 中貢獻。)" +"在 :mod:`json` 模組中,:func:`~json.dump`、:func:`~json.dumps`、:func:`~json." +"load` 和 :func:`~json.loads` 函式以及 :class:`~json.JSONEncoder` 和 :class:" +"`~json.JSONDecoder` 類別建構函式的所有可選引數現在都是\\ :ref:`僅限關鍵字 " +"`\\ 引數。(由 Serhiy Storchaka 在 :issue:`18726` 中" +"貢獻。)" #: ../../whatsnew/3.6.rst:2250 msgid "" @@ -3323,18 +3311,18 @@ msgstr "" #: ../../whatsnew/3.6.rst:2253 msgid "" -"As part of :pep:`487`, the handling of keyword arguments passed " -"to :class:`type` (other than the metaclass hint, ``metaclass``) is now " -"consistently delegated to :meth:`object.__init_subclass__`. This means " -"that :meth:`type.__new__` and :meth:`type.__init__` both now accept " -"arbitrary keyword arguments, but :meth:`object.__init_subclass__` (which is " -"called from :meth:`type.__new__`) will reject them by default. Custom " -"metaclasses accepting additional keyword arguments will need to adjust their " -"calls to :meth:`type.__new__` (whether direct or via :class:`super`) " -"accordingly." +"As part of :pep:`487`, the handling of keyword arguments passed to :class:" +"`type` (other than the metaclass hint, ``metaclass``) is now consistently " +"delegated to :meth:`object.__init_subclass__`. This means that :meth:`type." +"__new__ ` and :meth:`type.__init__ ` both " +"now accept arbitrary keyword arguments, but :meth:`object.__init_subclass__` " +"(which is called from :meth:`type.__new__ `) will reject " +"them by default. Custom metaclasses accepting additional keyword arguments " +"will need to adjust their calls to :meth:`type.__new__ ` " +"(whether direct or via :class:`super`) accordingly." msgstr "" -#: ../../whatsnew/3.6.rst:2262 +#: ../../whatsnew/3.6.rst:2264 msgid "" "In ``distutils.command.sdist.sdist``, the ``default_format`` attribute has " "been removed and is no longer honored. Instead, the gzipped tarfile format " @@ -3344,7 +3332,7 @@ msgid "" "containing the following:" msgstr "" -#: ../../whatsnew/3.6.rst:2270 +#: ../../whatsnew/3.6.rst:2272 msgid "" "[sdist]\n" "formats=zip" @@ -3352,65 +3340,63 @@ msgstr "" "[sdist]\n" "formats=zip" -#: ../../whatsnew/3.6.rst:2275 +#: ../../whatsnew/3.6.rst:2277 msgid "" "This behavior has also been backported to earlier Python versions by " "Setuptools 26.0.0." msgstr "" -#: ../../whatsnew/3.6.rst:2278 +#: ../../whatsnew/3.6.rst:2280 msgid "" -"In the :mod:`urllib.request` module and " -"the :meth:`http.client.HTTPConnection.request` method, if no Content-Length " -"header field has been specified and the request body is a file object, it is " -"now sent with HTTP 1.1 chunked encoding. If a file object has to be sent to " -"a HTTP 1.0 server, the Content-Length value now has to be specified by the " -"caller. (Contributed by Demian Brecht and Rolf Krahl with tweaks from Martin " -"Panter in :issue:`12319`.)" +"In the :mod:`urllib.request` module and the :meth:`http.client." +"HTTPConnection.request` method, if no Content-Length header field has been " +"specified and the request body is a file object, it is now sent with HTTP " +"1.1 chunked encoding. If a file object has to be sent to a HTTP 1.0 server, " +"the Content-Length value now has to be specified by the caller. (Contributed " +"by Demian Brecht and Rolf Krahl with tweaks from Martin Panter in :issue:" +"`12319`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2287 +#: ../../whatsnew/3.6.rst:2289 msgid "" -"The :class:`~csv.DictReader` now returns rows of " -"type :class:`~collections.OrderedDict`. (Contributed by Steve Holden " -"in :issue:`27842`.)" +"The :class:`~csv.DictReader` now returns rows of type :class:`~collections." +"OrderedDict`. (Contributed by Steve Holden in :issue:`27842`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2291 +#: ../../whatsnew/3.6.rst:2293 msgid "" -"The :const:`!crypt.METHOD_CRYPT` will no longer be added to " -"``crypt.methods`` if unsupported by the platform. (Contributed by Victor " -"Stinner in :issue:`25287`.)" +"The :const:`!crypt.METHOD_CRYPT` will no longer be added to ``crypt." +"methods`` if unsupported by the platform. (Contributed by Victor Stinner in :" +"issue:`25287`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2299 +#: ../../whatsnew/3.6.rst:2301 msgid "" "On Linux, :func:`ctypes.util.find_library` now looks in ``LD_LIBRARY_PATH`` " "for shared libraries. (Contributed by Vinay Sajip in :issue:`9998`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2303 +#: ../../whatsnew/3.6.rst:2305 msgid "" "The :class:`imaplib.IMAP4` class now handles flags containing the ``']'`` " "character in messages sent from the server to improve real-world " "compatibility. (Contributed by Lita Cho in :issue:`21815`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2308 +#: ../../whatsnew/3.6.rst:2310 msgid "" -"The :func:`mmap.write() ` function now returns the number of " -"bytes written like other write methods. (Contributed by Jakub Stasiak " -"in :issue:`26335`.)" +"The :func:`mmap.mmap.write` function now returns the number of bytes written " +"like other write methods. (Contributed by Jakub Stasiak in :issue:`26335`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2312 +#: ../../whatsnew/3.6.rst:2314 msgid "" "The :func:`pkgutil.iter_modules` and :func:`pkgutil.walk_packages` functions " "now return :class:`~pkgutil.ModuleInfo` named tuples. (Contributed by " "Ramchandra Apte in :issue:`17211`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2316 +#: ../../whatsnew/3.6.rst:2318 msgid "" ":func:`re.sub` now raises an error for invalid numerical group references in " "replacement templates even if the pattern is not found in the string. The " @@ -3419,17 +3405,17 @@ msgid "" "in :issue:`25953`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2322 +#: ../../whatsnew/3.6.rst:2324 msgid "" ":class:`zipfile.ZipFile` will now raise :exc:`NotImplementedError` for " "unrecognized compression values. Previously a plain :exc:`RuntimeError` was " "raised. Additionally, calling :class:`~zipfile.ZipFile` methods on a closed " "ZipFile or calling the :meth:`~zipfile.ZipFile.write` method on a ZipFile " -"created with mode ``'r'`` will raise a :exc:`ValueError`. Previously, " -"a :exc:`RuntimeError` was raised in those scenarios." +"created with mode ``'r'`` will raise a :exc:`ValueError`. Previously, a :exc:" +"`RuntimeError` was raised in those scenarios." msgstr "" -#: ../../whatsnew/3.6.rst:2329 +#: ../../whatsnew/3.6.rst:2331 msgid "" "when custom metaclasses are combined with zero-argument :func:`super` or " "direct references from methods to the implicit ``__class__`` closure " @@ -3439,25 +3425,24 @@ msgid "" "Python 3.8." msgstr "" -#: ../../whatsnew/3.6.rst:2336 +#: ../../whatsnew/3.6.rst:2338 msgid "" "With the introduction of :exc:`ModuleNotFoundError`, import system consumers " "may start expecting import system replacements to raise that more specific " -"exception when appropriate, rather than the less-" -"specific :exc:`ImportError`. To provide future compatibility with such " -"consumers, implementers of alternative import systems that completely " -"replace :func:`__import__` will need to update their implementations to " -"raise the new subclass when a module can't be found at all. Implementers of " -"compliant plugins to the default import system shouldn't need to make any " -"changes, as the default import system will raise the new subclass when " -"appropriate." +"exception when appropriate, rather than the less-specific :exc:" +"`ImportError`. To provide future compatibility with such consumers, " +"implementers of alternative import systems that completely replace :func:" +"`__import__` will need to update their implementations to raise the new " +"subclass when a module can't be found at all. Implementers of compliant " +"plugins to the default import system shouldn't need to make any changes, as " +"the default import system will raise the new subclass when appropriate." msgstr "" -#: ../../whatsnew/3.6.rst:2348 +#: ../../whatsnew/3.6.rst:2350 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.6.rst:2350 +#: ../../whatsnew/3.6.rst:2352 msgid "" "The :c:func:`PyMem_Malloc` allocator family now uses the :ref:`pymalloc " "allocator ` rather than the system :c:func:`malloc`. Applications " @@ -3466,71 +3451,71 @@ msgid "" "usage of memory allocators in your application. See :issue:`26249`." msgstr "" -#: ../../whatsnew/3.6.rst:2356 +#: ../../whatsnew/3.6.rst:2358 msgid "" ":c:func:`Py_Exit` (and the main interpreter) now override the exit status " "with 120 if flushing buffered data failed. See :issue:`5319`." msgstr "" -#: ../../whatsnew/3.6.rst:2361 +#: ../../whatsnew/3.6.rst:2363 msgid "CPython bytecode changes" msgstr "CPython 位元組碼變更" -#: ../../whatsnew/3.6.rst:2363 +#: ../../whatsnew/3.6.rst:2365 msgid "" "There have been several major changes to the :term:`bytecode` in Python 3.6." msgstr "" -#: ../../whatsnew/3.6.rst:2365 +#: ../../whatsnew/3.6.rst:2367 msgid "" "The Python interpreter now uses a 16-bit wordcode instead of bytecode. " "(Contributed by Demur Rumed with input and reviews from Serhiy Storchaka and " "Victor Stinner in :issue:`26647` and :issue:`28050`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2369 +#: ../../whatsnew/3.6.rst:2371 msgid "" "The new :opcode:`!FORMAT_VALUE` and :opcode:`BUILD_STRING` opcodes as part " "of the :ref:`formatted string literal ` implementation. " -"(Contributed by Eric Smith in :issue:`25483` and Serhiy Storchaka " -"in :issue:`27078`.)" +"(Contributed by Eric Smith in :issue:`25483` and Serhiy Storchaka in :issue:" +"`27078`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2374 +#: ../../whatsnew/3.6.rst:2376 msgid "" "The new :opcode:`BUILD_CONST_KEY_MAP` opcode to optimize the creation of " -"dictionaries with constant keys. (Contributed by Serhiy Storchaka " -"in :issue:`27140`.)" +"dictionaries with constant keys. (Contributed by Serhiy Storchaka in :issue:" +"`27140`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2378 +#: ../../whatsnew/3.6.rst:2380 msgid "" "The function call opcodes have been heavily reworked for better performance " "and simpler implementation. The :opcode:`MAKE_FUNCTION`, :opcode:`!" "CALL_FUNCTION`, :opcode:`!CALL_FUNCTION_KW` and :opcode:`!" -"BUILD_MAP_UNPACK_WITH_CALL` opcodes have been modified, the " -"new :opcode:`CALL_FUNCTION_EX` and :opcode:`!BUILD_TUPLE_UNPACK_WITH_CALL` " -"have been added, and ``CALL_FUNCTION_VAR``, ``CALL_FUNCTION_VAR_KW`` and " -"``MAKE_CLOSURE`` opcodes have been removed. (Contributed by Demur Rumed " -"in :issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.)" +"BUILD_MAP_UNPACK_WITH_CALL` opcodes have been modified, the new :opcode:" +"`CALL_FUNCTION_EX` and :opcode:`!BUILD_TUPLE_UNPACK_WITH_CALL` have been " +"added, and ``CALL_FUNCTION_VAR``, ``CALL_FUNCTION_VAR_KW`` and " +"``MAKE_CLOSURE`` opcodes have been removed. (Contributed by Demur Rumed in :" +"issue:`27095`, and Serhiy Storchaka in :issue:`27213`, :issue:`28257`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2389 +#: ../../whatsnew/3.6.rst:2391 msgid "" "The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`!STORE_ANNOTATION` opcodes " "have been added to support the new :term:`variable annotation` syntax. " "(Contributed by Ivan Levkivskyi in :issue:`27985`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2395 +#: ../../whatsnew/3.6.rst:2397 msgid "Notable changes in Python 3.6.2" msgstr "Python 3.6.2 中顯著的變更" -#: ../../whatsnew/3.6.rst:2398 +#: ../../whatsnew/3.6.rst:2400 msgid "New ``make regen-all`` build target" msgstr "新增 ``make regen-all`` 建置目標" -#: ../../whatsnew/3.6.rst:2400 +#: ../../whatsnew/3.6.rst:2402 msgid "" "To simplify cross-compilation, and to ensure that CPython can reliably be " "compiled without requiring an existing version of Python to already be " @@ -3538,72 +3523,72 @@ msgid "" "recompile generated files based on file modification times." msgstr "" -#: ../../whatsnew/3.6.rst:2405 +#: ../../whatsnew/3.6.rst:2407 msgid "" "Instead, a new ``make regen-all`` command has been added to force " "regeneration of these files when desired (e.g. after an initial version of " "Python has already been built based on the pregenerated versions)." msgstr "" -#: ../../whatsnew/3.6.rst:2409 +#: ../../whatsnew/3.6.rst:2411 msgid "" -"More selective regeneration targets are also defined - " -"see :source:`Makefile.pre.in` for details." +"More selective regeneration targets are also defined - see :source:`Makefile." +"pre.in` for details." msgstr "" -#: ../../whatsnew/3.6.rst:2412 ../../whatsnew/3.6.rst:2425 +#: ../../whatsnew/3.6.rst:2414 ../../whatsnew/3.6.rst:2427 msgid "(Contributed by Victor Stinner in :issue:`23404`.)" msgstr "(由 Victor Stinner 於 :issue:`23404` 中貢獻。)" -#: ../../whatsnew/3.6.rst:2418 +#: ../../whatsnew/3.6.rst:2420 msgid "Removal of ``make touch`` build target" msgstr "移除 ``make touch`` 建置目標" -#: ../../whatsnew/3.6.rst:2420 +#: ../../whatsnew/3.6.rst:2422 msgid "" "The ``make touch`` build target previously used to request implicit " "regeneration of generated files by updating their modification times has " "been removed." msgstr "" -#: ../../whatsnew/3.6.rst:2423 +#: ../../whatsnew/3.6.rst:2425 msgid "It has been replaced by the new ``make regen-all`` target." msgstr "它已被新的 ``make regen-all`` 目標取代。" -#: ../../whatsnew/3.6.rst:2431 +#: ../../whatsnew/3.6.rst:2433 msgid "Notable changes in Python 3.6.4" msgstr "Python 3.6.4 中顯著的變更" -#: ../../whatsnew/3.6.rst:2433 +#: ../../whatsnew/3.6.rst:2435 msgid "" "The ``PyExc_RecursionErrorInst`` singleton that was part of the public API " "has been removed as its members being never cleared may cause a segfault " -"during finalization of the interpreter. (Contributed by Xavier de Gaye " -"in :issue:`22898` and :issue:`30697`.)" +"during finalization of the interpreter. (Contributed by Xavier de Gaye in :" +"issue:`22898` and :issue:`30697`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2440 +#: ../../whatsnew/3.6.rst:2442 msgid "Notable changes in Python 3.6.5" msgstr "Python 3.6.5 中顯著的變更" -#: ../../whatsnew/3.6.rst:2442 +#: ../../whatsnew/3.6.rst:2444 msgid "" "The :func:`locale.localeconv` function now sets temporarily the ``LC_CTYPE`` " "locale to the ``LC_NUMERIC`` locale in some cases. (Contributed by Victor " "Stinner in :issue:`31900`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2448 +#: ../../whatsnew/3.6.rst:2450 msgid "Notable changes in Python 3.6.7" msgstr "Python 3.6.7 中顯著的變更" -#: ../../whatsnew/3.6.rst:2450 +#: ../../whatsnew/3.6.rst:2452 msgid "" ":mod:`xml.dom.minidom` and :mod:`xml.sax` modules no longer process external " "entities by default. See also :gh:`61441`." msgstr "" -#: ../../whatsnew/3.6.rst:2453 +#: ../../whatsnew/3.6.rst:2455 msgid "" "In 3.6.7 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " "when provided with input that does not have a trailing new line. This " @@ -3611,42 +3596,41 @@ msgid "" "Ammar Askar in :issue:`33899`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2459 +#: ../../whatsnew/3.6.rst:2461 msgid "Notable changes in Python 3.6.10" msgstr "Python 3.6.10 中顯著的變更" -#: ../../whatsnew/3.6.rst:2461 +#: ../../whatsnew/3.6.rst:2463 msgid "" -"Due to significant security concerns, the *reuse_address* parameter " -"of :meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. " -"This is because of the behavior of the socket option ``SO_REUSEADDR`` in " -"UDP. For more details, see the documentation for " -"``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine " -"Pitrou, and Yury Selivanov in :issue:`37228`.)" +"Due to significant security concerns, the *reuse_address* parameter of :meth:" +"`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " +"because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For " +"more details, see the documentation for ``loop.create_datagram_endpoint()``. " +"(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in :issue:" +"`37228`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2469 +#: ../../whatsnew/3.6.rst:2471 msgid "Notable changes in Python 3.6.13" msgstr "Python 3.6.13 中顯著的變更" -#: ../../whatsnew/3.6.rst:2471 +#: ../../whatsnew/3.6.rst:2473 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " -"parameter separators in :func:`urllib.parse.parse_qs` " -"and :func:`urllib.parse.parse_qsl`. Due to security concerns, and to " -"conform with newer W3C recommendations, this has been changed to allow only " -"a single separator key, with ``&`` as the default. This change also " -"affects :func:`!cgi.parse` and :func:`!cgi.parse_multipart` as they use the " -"affected functions internally. For more details, please see their respective " -"documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin " -"in :issue:`42967`.)" +"parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." +"parse.parse_qsl`. Due to security concerns, and to conform with newer W3C " +"recommendations, this has been changed to allow only a single separator key, " +"with ``&`` as the default. This change also affects :func:`!cgi.parse` and :" +"func:`!cgi.parse_multipart` as they use the affected functions internally. " +"For more details, please see their respective documentation. (Contributed by " +"Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)" msgstr "" -#: ../../whatsnew/3.6.rst:2482 +#: ../../whatsnew/3.6.rst:2484 msgid "Notable changes in Python 3.6.14" msgstr "Python 3.6.14 中顯著的變更" -#: ../../whatsnew/3.6.rst:2484 +#: ../../whatsnew/3.6.rst:2486 msgid "" "A security fix alters the :class:`ftplib.FTP` behavior to not trust the IPv4 " "address sent from the remote server when setting up a passive data channel. " @@ -3655,12 +3639,12 @@ msgid "" "instance to ``True``. (See :gh:`87451`)" msgstr "" -#: ../../whatsnew/3.6.rst:2490 +#: ../../whatsnew/3.6.rst:2492 msgid "" "The presence of newline or tab characters in parts of a URL allows for some " "forms of attacks. Following the WHATWG specification that updates RFC 3986, " "ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` characters are stripped from " "the URL by the parser :func:`urllib.parse` preventing such attacks. The " -"removal characters are controlled by a new module level variable " -"``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" +"removal characters are controlled by a new module level variable ``urllib." +"parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" msgstr "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 25a4bd766c..52e0a25335 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-26 00:14+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -29,8 +29,8 @@ msgstr "Elvis Pranskevichus " #: ../../whatsnew/3.7.rst:47 msgid "" "This article explains the new features in Python 3.7, compared to 3.6. " -"Python 3.7 was released on June 27, 2018. For full details, see " -"the :ref:`changelog `." +"Python 3.7 was released on June 27, 2018. For full details, see the :ref:" +"`changelog `." msgstr "" "本文介紹了 Python 3.7 與 3.6 相比多了哪些新功能。Python 3.7 已於 2018 年 6 " "月 27 日發布。有關完整詳細資訊,請參閱 :ref:`changelog `。" @@ -111,9 +111,8 @@ msgstr "標準函式庫中的顯著改進" #: ../../whatsnew/3.7.rst:92 msgid "" -"The :mod:`asyncio` module has received new features, " -"significant :ref:`usability and performance improvements " -"`." +"The :mod:`asyncio` module has received new features, significant :ref:" +"`usability and performance improvements `." msgstr "" #: ../../whatsnew/3.7.rst:95 @@ -171,14 +170,14 @@ msgstr "" #: ../../whatsnew/3.7.rst:116 msgid "" "New documentation translations: `Japanese `_, " -"`French `_, and `Korean `_." +"`French `_, and `Korean `_." msgstr "" #: ../../whatsnew/3.7.rst:120 msgid "" -"This release features notable performance improvements in many areas. " -"The :ref:`whatsnew37-perf` section lists them in detail." +"This release features notable performance improvements in many areas. The :" +"ref:`whatsnew37-perf` section lists them in detail." msgstr "" #: ../../whatsnew/3.7.rst:123 @@ -296,9 +295,9 @@ msgid "" "automatically coerce that locale to an available UTF-8 based locale as " "described in the documentation of the new :envvar:`PYTHONCOERCECLOCALE` " "environment variable. Automatically setting ``LC_CTYPE`` this way means that " -"both the core interpreter and locale-aware C extensions (such " -"as :mod:`readline`) will assume the use of UTF-8 as the default text " -"encoding, rather than ASCII." +"both the core interpreter and locale-aware C extensions (such as :mod:" +"`readline`) will assume the use of UTF-8 as the default text encoding, " +"rather than ASCII." msgstr "" #: ../../whatsnew/3.7.rst:200 @@ -311,17 +310,16 @@ msgstr "" msgid "" "As part of this change, the default error handler for :data:`~sys.stdin` " "and :data:`~sys.stdout` is now ``surrogateescape`` (rather than ``strict``) " -"when using any of the defined coercion target locales (currently " -"``C.UTF-8``, ``C.utf8``, and ``UTF-8``). The default error handler " -"for :data:`~sys.stderr` continues to be ``backslashreplace``, regardless of " -"locale." +"when using any of the defined coercion target locales (currently ``C." +"UTF-8``, ``C.utf8``, and ``UTF-8``). The default error handler for :data:" +"`~sys.stderr` continues to be ``backslashreplace``, regardless of locale." msgstr "" #: ../../whatsnew/3.7.rst:209 msgid "" "Locale coercion is silent by default, but to assist in debugging potentially " -"locale related integration problems, explicit warnings (emitted directly " -"on :data:`~sys.stderr`) can be requested by setting " +"locale related integration problems, explicit warnings (emitted directly on :" +"data:`~sys.stderr`) can be requested by setting " "``PYTHONCOERCECLOCALE=warn``. This setting will also cause the Python " "runtime to emit a warning if the legacy C locale remains active when the " "core interpreter is initialized." @@ -360,8 +358,8 @@ msgstr "" #: ../../whatsnew/3.7.rst:238 msgid "" "When in UTF-8 mode, CPython ignores the locale settings, and uses the UTF-8 " -"encoding by default. The error handlers for :data:`sys.stdin` " -"and :data:`sys.stdout` streams are set to ``surrogateescape``." +"encoding by default. The error handlers for :data:`sys.stdin` and :data:" +"`sys.stdout` streams are set to ``surrogateescape``." msgstr "" #: ../../whatsnew/3.7.rst:242 @@ -412,10 +410,9 @@ msgid "" "Built-in ``breakpoint()`` calls :func:`sys.breakpointhook`. By default, the " "latter imports :mod:`pdb` and then calls ``pdb.set_trace()``, but by binding " "``sys.breakpointhook()`` to the function of your choosing, ``breakpoint()`` " -"can enter any debugger. Additionally, the environment " -"variable :envvar:`PYTHONBREAKPOINT` can be set to the callable of your " -"debugger of choice. Set ``PYTHONBREAKPOINT=0`` to completely disable built-" -"in ``breakpoint()``." +"can enter any debugger. Additionally, the environment variable :envvar:" +"`PYTHONBREAKPOINT` can be set to the callable of your debugger of choice. " +"Set ``PYTHONBREAKPOINT=0`` to completely disable built-in ``breakpoint()``." msgstr "" #: ../../whatsnew/3.7.rst:282 @@ -444,11 +441,11 @@ msgid "" ":pep:`539` changes this by providing a new :ref:`Thread Specific Storage " "(TSS) API ` to CPython which supersedes use of " "the existing TLS API within the CPython interpreter, while deprecating the " -"existing API. The TSS API uses a new type :c:type:`Py_tss_t` instead " -"of :c:expr:`int` to represent TSS keys--an opaque type the definition of " -"which may depend on the underlying TLS implementation. Therefore, this will " -"allow to build CPython on platforms where the native TLS key is defined in a " -"way that cannot be safely cast to :c:expr:`int`." +"existing API. The TSS API uses a new type :c:type:`Py_tss_t` instead of :c:" +"expr:`int` to represent TSS keys--an opaque type the definition of which may " +"depend on the underlying TLS implementation. Therefore, this will allow to " +"build CPython on platforms where the native TLS key is defined in a way that " +"cannot be safely cast to :c:expr:`int`." msgstr "" #: ../../whatsnew/3.7.rst:306 @@ -474,9 +471,9 @@ msgstr "" #: ../../whatsnew/3.7.rst:323 msgid "" -"Python 3.7 allows defining :meth:`__getattr__` on modules and will call it " -"whenever a module attribute is otherwise not found. " -"Defining :meth:`__dir__` on modules is now also allowed." +"Python 3.7 allows defining :meth:`~module.__getattr__` on modules and will " +"call it whenever a module attribute is otherwise not found. Defining :meth:" +"`~module.__dir__` on modules is now also allowed." msgstr "" #: ../../whatsnew/3.7.rst:327 @@ -506,27 +503,27 @@ msgid "" "module:" msgstr "" -#: ../../whatsnew/3.7.rst:347 ../../whatsnew/3.7.rst:1451 +#: ../../whatsnew/3.7.rst:347 ../../whatsnew/3.7.rst:1455 msgid ":func:`time.clock_gettime_ns`" msgstr ":func:`time.clock_gettime_ns`" -#: ../../whatsnew/3.7.rst:348 ../../whatsnew/3.7.rst:1452 +#: ../../whatsnew/3.7.rst:348 ../../whatsnew/3.7.rst:1456 msgid ":func:`time.clock_settime_ns`" msgstr ":func:`time.clock_settime_ns`" -#: ../../whatsnew/3.7.rst:349 ../../whatsnew/3.7.rst:1453 +#: ../../whatsnew/3.7.rst:349 ../../whatsnew/3.7.rst:1457 msgid ":func:`time.monotonic_ns`" msgstr ":func:`time.monotonic_ns`" -#: ../../whatsnew/3.7.rst:350 ../../whatsnew/3.7.rst:1454 +#: ../../whatsnew/3.7.rst:350 ../../whatsnew/3.7.rst:1458 msgid ":func:`time.perf_counter_ns`" msgstr ":func:`time.perf_counter_ns`" -#: ../../whatsnew/3.7.rst:351 ../../whatsnew/3.7.rst:1455 +#: ../../whatsnew/3.7.rst:351 ../../whatsnew/3.7.rst:1459 msgid ":func:`time.process_time_ns`" msgstr ":func:`time.process_time_ns`" -#: ../../whatsnew/3.7.rst:352 ../../whatsnew/3.7.rst:1456 +#: ../../whatsnew/3.7.rst:352 ../../whatsnew/3.7.rst:1460 msgid ":func:`time.time_ns`" msgstr ":func:`time.time_ns`" @@ -590,11 +587,10 @@ msgstr "" #: ../../whatsnew/3.7.rst:393 msgid "" -"Previously both :exc:`DeprecationWarning` " -"and :exc:`PendingDeprecationWarning` were only visible when running tests, " -"which meant that developers primarily writing single file scripts or using " -"Python interactively could be surprised by breaking changes in the APIs they " -"used." +"Previously both :exc:`DeprecationWarning` and :exc:" +"`PendingDeprecationWarning` were only visible when running tests, which " +"meant that developers primarily writing single file scripts or using Python " +"interactively could be surprised by breaking changes in the APIs they used." msgstr "" #: ../../whatsnew/3.7.rst:400 @@ -612,10 +608,10 @@ msgstr "" #: ../../whatsnew/3.7.rst:409 msgid "" "Initially :pep:`484` was designed in such way that it would not introduce " -"*any* changes to the core CPython interpreter. Now type hints and " -"the :mod:`typing` module are extensively used by the community, so this " -"restriction is removed. The PEP introduces two special " -"methods :meth:`__class_getitem__` and ``__mro_entries__``, these methods are " +"*any* changes to the core CPython interpreter. Now type hints and the :mod:" +"`typing` module are extensively used by the community, so this restriction " +"is removed. The PEP introduces two special methods :meth:`~object." +"__class_getitem__` and :meth:`~object.__mro_entries__`, these methods are " "now used by most classes and special constructs in :mod:`typing`. As a " "result, the speed of various operations with types increased up to 7 times, " "the generic types can be used without metaclass conflicts, and several long " @@ -648,8 +644,8 @@ msgid "" "used for invalidation instead of the source timestamp. Such ``.pyc`` files " "are called \"hash-based\". By default, Python still uses timestamp-based " "invalidation and does not generate hash-based ``.pyc`` files at runtime. " -"Hash-based ``.pyc`` files may be generated with :mod:`py_compile` " -"or :mod:`compileall`." +"Hash-based ``.pyc`` files may be generated with :mod:`py_compile` or :mod:" +"`compileall`." msgstr "" #: ../../whatsnew/3.7.rst:445 @@ -716,12 +712,12 @@ msgstr "" #: ../../whatsnew/3.7.rst:486 msgid "" -"The new :option:`-X` ``dev`` command line option or the " -"new :envvar:`PYTHONDEVMODE` environment variable can be used to " -"enable :ref:`Python Development Mode `. When in development mode, " -"Python performs additional runtime checks that are too expensive to be " -"enabled by default. See :ref:`Python Development Mode ` " -"documentation for the full description." +"The new :option:`-X` ``dev`` command line option or the new :envvar:" +"`PYTHONDEVMODE` environment variable can be used to enable :ref:`Python " +"Development Mode `. When in development mode, Python performs " +"additional runtime checks that are too expensive to be enabled by default. " +"See :ref:`Python Development Mode ` documentation for the full " +"description." msgstr "" #: ../../whatsnew/3.7.rst:495 @@ -730,17 +726,17 @@ msgstr "其他語言更動" #: ../../whatsnew/3.7.rst:497 msgid "" -"An :keyword:`await` expression and comprehensions containing " -"an :keyword:`async for` clause were illegal in the expressions " -"in :ref:`formatted string literals ` due to a problem with the " -"implementation. In Python 3.7 this restriction was lifted." +"An :keyword:`await` expression and comprehensions containing an :keyword:" +"`async for` clause were illegal in the expressions in :ref:`formatted string " +"literals ` due to a problem with the implementation. In Python " +"3.7 this restriction was lifted." msgstr "" #: ../../whatsnew/3.7.rst:502 msgid "" "More than 255 arguments can now be passed to a function, and a function can " -"now have more than 255 parameters. (Contributed by Serhiy Storchaka " -"in :issue:`12844` and :issue:`18896`.)" +"now have more than 255 parameters. (Contributed by Serhiy Storchaka in :" +"issue:`12844` and :issue:`18896`.)" msgstr "" #: ../../whatsnew/3.7.rst:506 @@ -760,8 +756,8 @@ msgstr "" #: ../../whatsnew/3.7.rst:514 msgid "" ":exc:`ImportError` now displays module name and module ``__file__`` path " -"when ``from ... import ...`` fails. (Contributed by Matthias Bussonnier " -"in :issue:`29546`.)" +"when ``from ... import ...`` fails. (Contributed by Matthias Bussonnier in :" +"issue:`29546`.)" msgstr "" #: ../../whatsnew/3.7.rst:518 @@ -773,17 +769,16 @@ msgstr "" #: ../../whatsnew/3.7.rst:522 msgid "" "``object.__format__(x, '')`` is now equivalent to ``str(x)`` rather than " -"``format(str(self), '')``. (Contributed by Serhiy Storchaka " -"in :issue:`28974`.)" +"``format(str(self), '')``. (Contributed by Serhiy Storchaka in :issue:" +"`28974`.)" msgstr "" #: ../../whatsnew/3.7.rst:526 msgid "" -"In order to better support dynamic creation of stack " -"traces, :class:`types.TracebackType` can now be instantiated from Python " -"code, and the :attr:`~traceback.tb_next` attribute on :ref:`tracebacks " -"` is now writable. (Contributed by Nathaniel J. Smith " -"in :issue:`30579`.)" +"In order to better support dynamic creation of stack traces, :class:`types." +"TracebackType` can now be instantiated from Python code, and the :attr:" +"`~traceback.tb_next` attribute on :ref:`tracebacks ` is " +"now writable. (Contributed by Nathaniel J. Smith in :issue:`30579`.)" msgstr "" #: ../../whatsnew/3.7.rst:532 @@ -796,10 +791,9 @@ msgstr "" #: ../../whatsnew/3.7.rst:538 msgid "" -"The new :option:`-X` ``importtime`` option or " -"the :envvar:`PYTHONPROFILEIMPORTTIME` environment variable can be used to " -"show the timing of each module import. (Contributed by Inada Naoki " -"in :issue:`31415`.)" +"The new :option:`-X` ``importtime`` option or the :envvar:" +"`PYTHONPROFILEIMPORTTIME` environment variable can be used to show the " +"timing of each module import. (Contributed by Inada Naoki in :issue:`31415`.)" msgstr "" #: ../../whatsnew/3.7.rst:545 @@ -842,9 +836,9 @@ msgstr "dataclasses" msgid "" "The new :func:`~dataclasses.dataclass` decorator provides a way to declare " "*data classes*. A data class describes its attributes using class variable " -"annotations. Its constructor and other magic methods, such " -"as :meth:`~object.__repr__`, :meth:`~object.__eq__`, " -"and :meth:`~object.__hash__` are generated automatically." +"annotations. Its constructor and other magic methods, such as :meth:" +"`~object.__repr__`, :meth:`~object.__eq__`, and :meth:`~object.__hash__` are " +"generated automatically." msgstr "" #: ../../whatsnew/3.7.rst:580 @@ -880,10 +874,10 @@ msgid "" "The new :mod:`importlib.resources` module provides several new APIs and one " "new ABC for access to, opening, and reading *resources* inside packages. " "Resources are roughly similar to files inside packages, but they needn't be " -"actual files on the physical file system. Module loaders can provide " -"a :meth:`get_resource_reader` function which returns " -"a :class:`importlib.abc.ResourceReader` instance to support this new API. " -"Built-in file path loaders and zip file loaders both support this." +"actual files on the physical file system. Module loaders can provide a :" +"meth:`!get_resource_reader` function which returns a :class:`importlib.abc." +"ResourceReader` instance to support this new API. Built-in file path " +"loaders and zip file loaders both support this." msgstr "" #: ../../whatsnew/3.7.rst:610 @@ -906,40 +900,40 @@ msgstr "argparse" #: ../../whatsnew/3.7.rst:625 msgid "" -"The new :meth:`ArgumentParser.parse_intermixed_args() " -"` method allows intermixing " -"options and positional arguments. (Contributed by paul.j3 in :issue:`14191`.)" +"The new :meth:`ArgumentParser.parse_intermixed_args() ` method allows intermixing options and " +"positional arguments. (Contributed by paul.j3 in :issue:`14191`.)" msgstr "" -#: ../../whatsnew/3.7.rst:634 ../../whatsnew/3.7.rst:1964 +#: ../../whatsnew/3.7.rst:634 ../../whatsnew/3.7.rst:1968 msgid "asyncio" msgstr "asyncio" #: ../../whatsnew/3.7.rst:636 msgid "" -"The :mod:`asyncio` module has received many new features, usability " -"and :ref:`performance improvements `. Notable " -"changes include:" +"The :mod:`asyncio` module has received many new features, usability and :ref:" +"`performance improvements `. Notable changes " +"include:" msgstr "" #: ../../whatsnew/3.7.rst:640 msgid "" "The new :term:`provisional ` :func:`asyncio.run` function " "can be used to run a coroutine from synchronous code by automatically " -"creating and destroying the event loop. (Contributed by Yury Selivanov " -"in :issue:`32314`.)" +"creating and destroying the event loop. (Contributed by Yury Selivanov in :" +"issue:`32314`.)" msgstr "" #: ../../whatsnew/3.7.rst:645 msgid "" "asyncio gained support for :mod:`contextvars`. :meth:`loop.call_soon() " -"`, :meth:`loop.call_soon_threadsafe() " -"`, :meth:`loop.call_later() " -"`, :meth:`loop.call_at() `, " -"and :meth:`Future.add_done_callback() ` " -"have a new optional keyword-only *context* parameter. :class:`Tasks " -"` now track their context automatically. See :pep:`567` for " -"more details. (Contributed by Yury Selivanov in :issue:`32436`.)" +"`, :meth:`loop.call_soon_threadsafe() `, :meth:`loop.call_later() `, :meth:`loop.call_at() `, and :meth:" +"`Future.add_done_callback() ` have a new " +"optional keyword-only *context* parameter. :class:`Tasks ` now " +"track their context automatically. See :pep:`567` for more details. " +"(Contributed by Yury Selivanov in :issue:`32436`.)" msgstr "" #: ../../whatsnew/3.7.rst:656 @@ -952,26 +946,25 @@ msgstr "" #: ../../whatsnew/3.7.rst:660 msgid "" "The new :meth:`loop.start_tls() ` method can be used " -"to upgrade an existing connection to TLS. (Contributed by Yury Selivanov " -"in :issue:`23749`.)" +"to upgrade an existing connection to TLS. (Contributed by Yury Selivanov in :" +"issue:`23749`.)" msgstr "" #: ../../whatsnew/3.7.rst:664 msgid "" "The new :meth:`loop.sock_recv_into() ` method " "allows reading data from a socket directly into a provided buffer making it " -"possible to reduce data copies. (Contributed by Antoine Pitrou " -"in :issue:`31819`.)" +"possible to reduce data copies. (Contributed by Antoine Pitrou in :issue:" +"`31819`.)" msgstr "" #: ../../whatsnew/3.7.rst:669 msgid "" -"The new :func:`asyncio.current_task` function returns the currently " -"running :class:`~asyncio.Task` instance, and the " -"new :func:`asyncio.all_tasks` function returns a set of all existing " -"``Task`` instances in a given loop. The :meth:`!Task.current_task` " -"and :meth:`!Task.all_tasks` methods have been deprecated. (Contributed by " -"Andrew Svetlov in :issue:`32250`.)" +"The new :func:`asyncio.current_task` function returns the currently running :" +"class:`~asyncio.Task` instance, and the new :func:`asyncio.all_tasks` " +"function returns a set of all existing ``Task`` instances in a given loop. " +"The :meth:`!Task.current_task` and :meth:`!Task.all_tasks` methods have been " +"deprecated. (Contributed by Andrew Svetlov in :issue:`32250`.)" msgstr "" #: ../../whatsnew/3.7.rst:676 @@ -986,17 +979,17 @@ msgid "" "The new :func:`asyncio.get_running_loop` function returns the currently " "running loop, and raises a :exc:`RuntimeError` if no loop is running. This " "is in contrast with :func:`asyncio.get_event_loop`, which will *create* a " -"new event loop if none is running. (Contributed by Yury Selivanov " -"in :issue:`32269`.)" +"new event loop if none is running. (Contributed by Yury Selivanov in :issue:" +"`32269`.)" msgstr "" #: ../../whatsnew/3.7.rst:686 msgid "" -"The new :meth:`StreamWriter.wait_closed() " -"` coroutine method allows waiting until " -"the stream writer is closed. The new :meth:`StreamWriter.is_closing() " -"` method can be used to determine if the " -"writer is closing. (Contributed by Andrew Svetlov in :issue:`32391`.)" +"The new :meth:`StreamWriter.wait_closed() ` coroutine method allows waiting until the stream writer is " +"closed. The new :meth:`StreamWriter.is_closing() ` method can be used to determine if the writer is closing. " +"(Contributed by Andrew Svetlov in :issue:`32391`.)" msgstr "" #: ../../whatsnew/3.7.rst:692 @@ -1008,27 +1001,27 @@ msgstr "" #: ../../whatsnew/3.7.rst:696 msgid "" -"The new :meth:`Future.get_loop() ` and " -"``Task.get_loop()`` methods return the instance of the loop on which a task " -"or a future were created. :meth:`Server.get_loop() " -"` allows doing the same for :class:`asyncio.Server` " -"objects. (Contributed by Yury Selivanov in :issue:`32415` and Srinivas Reddy " -"Thatiparthy in :issue:`32418`.)" +"The new :meth:`Future.get_loop() ` and ``Task." +"get_loop()`` methods return the instance of the loop on which a task or a " +"future were created. :meth:`Server.get_loop() ` " +"allows doing the same for :class:`asyncio.Server` objects. (Contributed by " +"Yury Selivanov in :issue:`32415` and Srinivas Reddy Thatiparthy in :issue:" +"`32418`.)" msgstr "" #: ../../whatsnew/3.7.rst:704 msgid "" "It is now possible to control how instances of :class:`asyncio.Server` begin " "serving. Previously, the server would start serving immediately when " -"created. The new *start_serving* keyword argument " -"to :meth:`loop.create_server() ` " -"and :meth:`loop.create_unix_server() `, as " -"well as :meth:`Server.start_serving() `, " -"and :meth:`Server.serve_forever() ` can be " -"used to decouple server instantiation and serving. The " -"new :meth:`Server.is_serving() ` method returns " -"``True`` if the server is serving. :class:`~asyncio.Server` objects are now " -"asynchronous context managers::" +"created. The new *start_serving* keyword argument to :meth:`loop." +"create_server() ` and :meth:`loop." +"create_unix_server() `, as well as :meth:" +"`Server.start_serving() `, and :meth:`Server." +"serve_forever() ` can be used to decouple " +"server instantiation and serving. The new :meth:`Server.is_serving() " +"` method returns ``True`` if the server is " +"serving. :class:`~asyncio.Server` objects are now asynchronous context " +"managers::" msgstr "" #: ../../whatsnew/3.7.rst:716 @@ -1047,27 +1040,27 @@ msgstr "(由 Yury Selivanov 在 :issue:`32662` 中貢獻。)" #: ../../whatsnew/3.7.rst:725 msgid "" -"Callback objects returned by :func:`loop.call_later() " -"` gained the new :meth:`when() " -"` method which returns an absolute scheduled " -"callback timestamp. (Contributed by Andrew Svetlov in :issue:`32741`.)" +"Callback objects returned by :func:`loop.call_later() ` gained the new :meth:`when() ` method " +"which returns an absolute scheduled callback timestamp. (Contributed by " +"Andrew Svetlov in :issue:`32741`.)" msgstr "" #: ../../whatsnew/3.7.rst:731 msgid "" -"The :meth:`loop.create_datagram_endpoint() \\ " -"` method gained support for Unix " -"sockets. (Contributed by Quentin Dawans in :issue:`31245`.)" +"The :meth:`loop.create_datagram_endpoint() \\ ` method gained support for Unix sockets. " +"(Contributed by Quentin Dawans in :issue:`31245`.)" msgstr "" #: ../../whatsnew/3.7.rst:736 msgid "" "The :func:`asyncio.open_connection`, :func:`asyncio.start_server` " -"functions, :meth:`loop.create_connection() " -"`, :meth:`loop.create_server() " -"`, :meth:`loop.create_accepted_socket() " -"` methods and their corresponding UNIX " -"socket variants now accept the *ssl_handshake_timeout* keyword argument. " +"functions, :meth:`loop.create_connection() `, :meth:`loop.create_server() `, :meth:`loop.create_accepted_socket() ` methods and their corresponding UNIX socket " +"variants now accept the *ssl_handshake_timeout* keyword argument. " "(Contributed by Neil Aspinall in :issue:`29970`.)" msgstr "" @@ -1080,35 +1073,32 @@ msgstr "" #: ../../whatsnew/3.7.rst:748 msgid "" -"The asyncio source has been converted to use " -"the :keyword:`async`/:keyword:`await` syntax. (Contributed by Andrew Svetlov " -"in :issue:`32193`.)" +"The asyncio source has been converted to use the :keyword:`async`/:keyword:" +"`await` syntax. (Contributed by Andrew Svetlov in :issue:`32193`.)" msgstr "" #: ../../whatsnew/3.7.rst:752 msgid "" -"The new :meth:`ReadTransport.is_reading() " -"` method can be used to determine the " -"reading state of the transport. Additionally, calls " -"to :meth:`ReadTransport.resume_reading() " -"` " -"and :meth:`ReadTransport.pause_reading() " -"` are now idempotent. (Contributed by " -"Yury Selivanov in :issue:`32356`.)" +"The new :meth:`ReadTransport.is_reading() ` method can be used to determine the reading state of the " +"transport. Additionally, calls to :meth:`ReadTransport.resume_reading() " +"` and :meth:`ReadTransport." +"pause_reading() ` are now idempotent. " +"(Contributed by Yury Selivanov in :issue:`32356`.)" msgstr "" #: ../../whatsnew/3.7.rst:760 msgid "" "Loop methods which accept socket paths now support passing :term:`path-like " -"objects `. (Contributed by Yury Selivanov " -"in :issue:`32066`.)" +"objects `. (Contributed by Yury Selivanov in :issue:" +"`32066`.)" msgstr "" #: ../../whatsnew/3.7.rst:764 msgid "" "In :mod:`asyncio` TCP sockets on Linux are now created with ``TCP_NODELAY`` " -"flag set by default. (Contributed by Yury Selivanov and Victor Stinner " -"in :issue:`27456`.)" +"flag set by default. (Contributed by Yury Selivanov and Victor Stinner in :" +"issue:`27456`.)" msgstr "" #: ../../whatsnew/3.7.rst:768 @@ -1152,7 +1142,7 @@ msgid "" "(Contributed by Oz Tiram in :issue:`30095`.)" msgstr "" -#: ../../whatsnew/3.7.rst:796 ../../whatsnew/3.7.rst:1978 +#: ../../whatsnew/3.7.rst:796 ../../whatsnew/3.7.rst:1982 msgid "collections" msgstr "collections" @@ -1181,8 +1171,8 @@ msgstr "concurrent.futures" #: ../../whatsnew/3.7.rst:816 msgid "" -":class:`ProcessPoolExecutor ` " -"and :class:`ThreadPoolExecutor ` now " +":class:`ProcessPoolExecutor ` and :" +"class:`ThreadPoolExecutor ` now " "support the new *initializer* and *initargs* constructor arguments. " "(Contributed by Antoine Pitrou in :issue:`21423`.)" msgstr "" @@ -1207,12 +1197,11 @@ msgstr "" #: ../../whatsnew/3.7.rst:833 msgid "" -"The " -"new :func:`~contextlib.asynccontextmanager`, :class:`~contextlib.AbstractAsyncContextManager`, " -"and :class:`~contextlib.AsyncExitStack` have been added to complement their " -"synchronous counterparts. (Contributed by Jelle Zijlstra in :issue:`29679` " -"and :issue:`30241`, and by Alexander Mohr and Ilya Kulakov " -"in :issue:`29302`.)" +"The new :func:`~contextlib.asynccontextmanager`, :class:`~contextlib." +"AbstractAsyncContextManager`, and :class:`~contextlib.AsyncExitStack` have " +"been added to complement their synchronous counterparts. (Contributed by " +"Jelle Zijlstra in :issue:`29679` and :issue:`30241`, and by Alexander Mohr " +"and Ilya Kulakov in :issue:`29302`.)" msgstr "" #: ../../whatsnew/3.7.rst:842 @@ -1222,8 +1211,8 @@ msgstr "cProfile" #: ../../whatsnew/3.7.rst:844 msgid "" "The :mod:`cProfile` command line now accepts ``-m module_name`` as an " -"alternative to script path. (Contributed by Sanyam Khurana " -"in :issue:`21862`.)" +"alternative to script path. (Contributed by Sanyam Khurana in :issue:" +"`21862`.)" msgstr "" #: ../../whatsnew/3.7.rst:849 @@ -1250,9 +1239,8 @@ msgstr "datetime" msgid "" "The new :meth:`datetime.fromisoformat() ` " "method constructs a :class:`~datetime.datetime` object from a string in one " -"of the formats output by :meth:`datetime.isoformat() " -"`. (Contributed by Paul Ganssle " -"in :issue:`15873`.)" +"of the formats output by :meth:`datetime.isoformat() `. (Contributed by Paul Ganssle in :issue:`15873`.)" msgstr "" #: ../../whatsnew/3.7.rst:867 @@ -1261,7 +1249,7 @@ msgid "" "(Contributed by Alexander Belopolsky in :issue:`5288`.)" msgstr "" -#: ../../whatsnew/3.7.rst:872 ../../whatsnew/3.7.rst:1988 +#: ../../whatsnew/3.7.rst:872 ../../whatsnew/3.7.rst:1992 msgid "dbm" msgstr "dbm" @@ -1278,8 +1266,8 @@ msgstr "decimal" #: ../../whatsnew/3.7.rst:881 msgid "" "The :mod:`decimal` module now uses :ref:`context variables ` to store the decimal context. (Contributed by Yury Selivanov " -"in :issue:`32630`.)" +"pep567>` to store the decimal context. (Contributed by Yury Selivanov in :" +"issue:`32630`.)" msgstr "" #: ../../whatsnew/3.7.rst:887 @@ -1306,7 +1294,7 @@ msgid "" "in :issue:`11913`.)" msgstr "" -#: ../../whatsnew/3.7.rst:906 ../../whatsnew/3.7.rst:1998 +#: ../../whatsnew/3.7.rst:906 ../../whatsnew/3.7.rst:2002 msgid "enum" msgstr "enum" @@ -1319,12 +1307,12 @@ msgstr "" #: ../../whatsnew/3.7.rst:913 msgid "" -"In Python 3.8, attempting to check for non-Enum objects in :class:`Enum` " -"classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); similarly, " -"attempting to check for non-Flag objects in a :class:`Flag` member will " -"raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both operations " -"return :const:`False` instead and are deprecated. (Contributed by Ethan " -"Furman in :issue:`33217`.)" +"In Python 3.8, attempting to check for non-Enum objects in :class:`~enum." +"Enum` classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); " +"similarly, attempting to check for non-Flag objects in a :class:`~enum.Flag` " +"member will raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both " +"operations return :const:`False` instead and are deprecated. (Contributed by " +"Ethan Furman in :issue:`33217`.)" msgstr "" #: ../../whatsnew/3.7.rst:922 @@ -1348,8 +1336,8 @@ msgid "" "be used before a POSIX ``fork()`` call to make the GC copy-on-write friendly " "or to speed up collection. The new :func:`gc.unfreeze` functions reverses " "this operation. Additionally, :func:`gc.get_freeze_count` can be used to " -"obtain the number of frozen objects. (Contributed by Li Zekun " -"in :issue:`31558`.)" +"obtain the number of frozen objects. (Contributed by Li Zekun in :issue:" +"`31558`.)" msgstr "" #: ../../whatsnew/3.7.rst:942 @@ -1369,10 +1357,9 @@ msgstr "http.client" #: ../../whatsnew/3.7.rst:952 msgid "" -":class:`~http.client.HTTPConnection` " -"and :class:`~http.client.HTTPSConnection` now support the new *blocksize* " -"argument for improved upload throughput. (Contributed by Nir Soffer " -"in :issue:`31945`.)" +":class:`~http.client.HTTPConnection` and :class:`~http.client." +"HTTPSConnection` now support the new *blocksize* argument for improved " +"upload throughput. (Contributed by Nir Soffer in :issue:`31945`.)" msgstr "" #: ../../whatsnew/3.7.rst:958 @@ -1399,19 +1386,19 @@ msgstr "" #: ../../whatsnew/3.7.rst:971 msgid "" "The new :class:`ThreadingHTTPServer ` class " -"uses threads to handle requests using :class:`~socketserver.ThreadingMixin`. " +"uses threads to handle requests using :class:`~socketserver.ThreadingMixIn`. " "It is used when ``http.server`` is run with ``-m``. (Contributed by Julien " "Palard in :issue:`31639`.)" msgstr "" #: ../../whatsnew/3.7.rst:978 msgid "idlelib and IDLE" -msgstr "" +msgstr "idlelib 與 IDLE" #: ../../whatsnew/3.7.rst:980 msgid "" -"Multiple fixes for autocompletion. (Contributed by Louie Lu " -"in :issue:`15786`.)" +"Multiple fixes for autocompletion. (Contributed by Louie Lu in :issue:" +"`15786`.)" msgstr "" #: ../../whatsnew/3.7.rst:982 @@ -1450,8 +1437,8 @@ msgid "" "Editor code context option revised. Box displays all context lines up to " "maxlines. Clicking on a context line jumps the editor to that line. " "Context colors for custom themes is added to Highlights tab of Settings " -"dialog. (Contributed by Cheryl Sabella and Terry Jan Reedy " -"in :issue:`33642`, :issue:`33768`, and :issue:`33679`.)" +"dialog. (Contributed by Cheryl Sabella and Terry Jan Reedy in :issue:" +"`33642`, :issue:`33768`, and :issue:`33679`.)" msgstr "" #: ../../whatsnew/3.7.rst:1009 @@ -1503,20 +1490,20 @@ msgid "" "Add optional line numbers for IDLE editor windows. Windows open without line " "numbers unless set otherwise in the General tab of the configuration " "dialog. Line numbers for an existing window are shown and hidden in the " -"Options menu. (Contributed by Tal Einat and Saimadhav Heblikar " -"in :issue:`17535`.)" +"Options menu. (Contributed by Tal Einat and Saimadhav Heblikar in :issue:" +"`17535`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1044 ../../whatsnew/3.7.rst:2017 +#: ../../whatsnew/3.7.rst:1044 ../../whatsnew/3.7.rst:2021 msgid "importlib" msgstr "importlib" #: ../../whatsnew/3.7.rst:1046 msgid "" "The :class:`importlib.abc.ResourceReader` ABC was introduced to support the " -"loading of resources from packages. See " -"also :ref:`whatsnew37_importlib_resources`. (Contributed by Barry Warsaw, " -"Brett Cannon in :issue:`32248`.)" +"loading of resources from packages. See also :ref:" +"`whatsnew37_importlib_resources`. (Contributed by Barry Warsaw, Brett Cannon " +"in :issue:`32248`.)" msgstr "" #: ../../whatsnew/3.7.rst:1051 @@ -1527,17 +1514,17 @@ msgstr "" #: ../../whatsnew/3.7.rst:1055 msgid "" -":func:`importlib.find_spec` now raises :exc:`ModuleNotFoundError` instead " -"of :exc:`AttributeError` if the specified parent module is not a package " -"(i.e. lacks a ``__path__`` attribute). (Contributed by Milan Oberkirch " -"in :issue:`30436`.)" +":func:`importlib.util.find_spec` now raises :exc:`ModuleNotFoundError` " +"instead of :exc:`AttributeError` if the specified parent module is not a " +"package (i.e. lacks a ``__path__`` attribute). (Contributed by Milan " +"Oberkirch in :issue:`30436`.)" msgstr "" #: ../../whatsnew/3.7.rst:1060 msgid "" -"The new :func:`importlib.source_hash` can be used to compute the hash of the " -"passed source. A :ref:`hash-based .pyc file ` embeds the " -"value returned by this function." +"The new :func:`importlib.util.source_hash` can be used to compute the hash " +"of the passed source. A :ref:`hash-based .pyc file ` " +"embeds the value returned by this function." msgstr "" #: ../../whatsnew/3.7.rst:1066 @@ -1548,8 +1535,8 @@ msgstr "io" msgid "" "The new :meth:`TextIOWrapper.reconfigure() ` " "method can be used to reconfigure the text stream with the new settings. " -"(Contributed by Antoine Pitrou in :issue:`30526` and INADA Naoki " -"in :issue:`15216`.)" +"(Contributed by Antoine Pitrou in :issue:`30526` and INADA Naoki in :issue:" +"`15216`.)" msgstr "" #: ../../whatsnew/3.7.rst:1075 @@ -1558,10 +1545,10 @@ msgstr "ipaddress" #: ../../whatsnew/3.7.rst:1077 msgid "" -"The new ``subnet_of()`` and ``supernet_of()`` methods " -"of :class:`ipaddress.IPv6Network` and :class:`ipaddress.IPv4Network` can be " -"used for network containment tests. (Contributed by Michel Albert and Cheryl " -"Sabella in :issue:`20825`.)" +"The new ``subnet_of()`` and ``supernet_of()`` methods of :class:`ipaddress." +"IPv6Network` and :class:`ipaddress.IPv4Network` can be used for network " +"containment tests. (Contributed by Michel Albert and Cheryl Sabella in :" +"issue:`20825`.)" msgstr "" #: ../../whatsnew/3.7.rst:1084 @@ -1570,12 +1557,12 @@ msgstr "itertools" #: ../../whatsnew/3.7.rst:1086 msgid "" -":func:`itertools.islice` now accepts :meth:`integer-like objects " -"` as start, stop, and slice arguments. (Contributed by " -"Will Roberts in :issue:`30537`.)" +":func:`itertools.islice` now accepts :meth:`integer-like objects ` as start, stop, and slice arguments. (Contributed by Will " +"Roberts in :issue:`30537`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1093 ../../whatsnew/3.7.rst:2035 +#: ../../whatsnew/3.7.rst:1093 ../../whatsnew/3.7.rst:2039 msgid "locale" msgstr "locale" @@ -1662,8 +1649,8 @@ msgstr "" #: ../../whatsnew/3.7.rst:1150 msgid "" "The new :meth:`Process.kill() ` method can be " -"used to terminate the process using the :data:`SIGKILL` signal on Unix. " -"(Contributed by Vitor Pereira in :issue:`30794`.)" +"used to terminate the process using the :data:`~signal.SIGKILL` signal on " +"Unix. (Contributed by Vitor Pereira in :issue:`30794`.)" msgstr "" #: ../../whatsnew/3.7.rst:1154 @@ -1691,16 +1678,16 @@ msgstr "" #: ../../whatsnew/3.7.rst:1168 msgid "" "The new :func:`~os.register_at_fork` function allows registering Python " -"callbacks to be executed at process fork. (Contributed by Antoine Pitrou " -"in :issue:`16500`.)" +"callbacks to be executed at process fork. (Contributed by Antoine Pitrou in :" +"issue:`16500`.)" msgstr "" #: ../../whatsnew/3.7.rst:1172 msgid "" -"Added :func:`os.preadv` (combine the functionality of :func:`os.readv` " -"and :func:`os.pread`) and :func:`os.pwritev` functions (combine the " -"functionality of :func:`os.writev` and :func:`os.pwrite`). (Contributed by " -"Pablo Galindo in :issue:`31368`.)" +"Added :func:`os.preadv` (combine the functionality of :func:`os.readv` and :" +"func:`os.pread`) and :func:`os.pwritev` functions (combine the functionality " +"of :func:`os.writev` and :func:`os.pwrite`). (Contributed by Pablo Galindo " +"in :issue:`31368`.)" msgstr "" #: ../../whatsnew/3.7.rst:1177 @@ -1718,9 +1705,9 @@ msgstr "" #: ../../whatsnew/3.7.rst:1185 msgid "" -"The structure returned by :func:`os.stat` now contains " -"the :attr:`~os.stat_result.st_fstype` attribute on Solaris and its " -"derivatives. (Contributed by Jesús Cea Avión in :issue:`32659`.)" +"The structure returned by :func:`os.stat` now contains the :attr:`~os." +"stat_result.st_fstype` attribute on Solaris and its derivatives. " +"(Contributed by Jesús Cea Avión in :issue:`32659`.)" msgstr "" #: ../../whatsnew/3.7.rst:1191 @@ -1760,9 +1747,9 @@ msgid "" ":func:`py_compile.compile` -- and by extension, :mod:`compileall` -- now " "respects the :envvar:`SOURCE_DATE_EPOCH` environment variable by " "unconditionally creating ``.pyc`` files for hash-based validation. This " -"allows for guaranteeing `reproducible builds `_ of ``.pyc`` files when they are created eagerly. (Contributed " -"by Bernhard M. Wiedemann in :issue:`29708`.)" +"allows for guaranteeing `reproducible builds `_ of ``.pyc`` files when they are created eagerly. (Contributed by " +"Bernhard M. Wiedemann in :issue:`29708`.)" msgstr "" #: ../../whatsnew/3.7.rst:1222 @@ -1772,8 +1759,8 @@ msgstr "pydoc" #: ../../whatsnew/3.7.rst:1224 msgid "" "The pydoc server can now bind to an arbitrary hostname specified by the new " -"``-n`` command-line argument. (Contributed by Feanil Patel " -"in :issue:`31128`.)" +"``-n`` command-line argument. (Contributed by Feanil Patel in :issue:" +"`31128`.)" msgstr "" #: ../../whatsnew/3.7.rst:1230 @@ -1793,8 +1780,8 @@ msgstr "re" #: ../../whatsnew/3.7.rst:1239 msgid "" "The flags :const:`re.ASCII`, :const:`re.LOCALE` and :const:`re.UNICODE` can " -"be set within the scope of a group. (Contributed by Serhiy Storchaka " -"in :issue:`31690`.)" +"be set within the scope of a group. (Contributed by Serhiy Storchaka in :" +"issue:`31690`.)" msgstr "" #: ../../whatsnew/3.7.rst:1243 @@ -1816,15 +1803,15 @@ msgstr "" msgid "" ":exc:`FutureWarning` is now emitted if a regular expression contains " "character set constructs that will change semantically in the future, such " -"as nested sets and set operations. (Contributed by Serhiy Storchaka " -"in :issue:`30349`.)" +"as nested sets and set operations. (Contributed by Serhiy Storchaka in :" +"issue:`30349`.)" msgstr "" #: ../../whatsnew/3.7.rst:1257 msgid "" -"Compiled regular expression and match objects can now be copied " -"using :func:`copy.copy` and :func:`copy.deepcopy`. (Contributed by Serhiy " -"Storchaka in :issue:`10076`.)" +"Compiled regular expression and match objects can now be copied using :func:" +"`copy.copy` and :func:`copy.deepcopy`. (Contributed by Serhiy Storchaka in :" +"issue:`10076`.)" msgstr "" #: ../../whatsnew/3.7.rst:1263 @@ -1839,7 +1826,7 @@ msgid "" "in :issue:`30050`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1272 ../../whatsnew/3.7.rst:2058 +#: ../../whatsnew/3.7.rst:1272 ../../whatsnew/3.7.rst:2062 msgid "socket" msgstr "socket" @@ -1854,88 +1841,88 @@ msgstr "" msgid "" "The new :func:`socket.close` function closes the passed socket file " "descriptor. This function should be used instead of :func:`os.close` for " -"better compatibility across platforms. (Contributed by Christian Heimes " -"in :issue:`32454`.)" +"better compatibility across platforms. (Contributed by Christian Heimes in :" +"issue:`32454`.)" msgstr "" #: ../../whatsnew/3.7.rst:1283 msgid "" -"The :mod:`socket` module now exposes the :const:`socket.TCP_CONGESTION` " -"(Linux 2.6.13), :const:`socket.TCP_USER_TIMEOUT` (Linux 2.6.37), " -"and :const:`socket.TCP_NOTSENT_LOWAT` (Linux 3.12) constants. (Contributed " -"by Omar Sandoval in :issue:`26273` and Nathaniel J. Smith in :issue:`29728`.)" +"The :mod:`socket` module now exposes the :ref:`socket.TCP_CONGESTION ` (Linux 2.6.13), :ref:`socket.TCP_USER_TIMEOUT ` (Linux 2.6.37), and :ref:`socket.TCP_NOTSENT_LOWAT ` (Linux 3.12) constants. (Contributed by Omar Sandoval in :issue:" +"`26273` and Nathaniel J. Smith in :issue:`29728`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1289 +#: ../../whatsnew/3.7.rst:1290 msgid "" "Support for :const:`socket.AF_VSOCK` sockets has been added to allow " "communication between virtual machines and their hosts. (Contributed by " "Cathy Avery in :issue:`27584`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1293 +#: ../../whatsnew/3.7.rst:1294 msgid "" "Sockets now auto-detect family, type and protocol from file descriptor by " "default. (Contributed by Christian Heimes in :issue:`28134`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1299 +#: ../../whatsnew/3.7.rst:1300 msgid "socketserver" msgstr "socketserver" -#: ../../whatsnew/3.7.rst:1301 +#: ../../whatsnew/3.7.rst:1302 msgid "" -":meth:`socketserver.ThreadingMixIn.server_close` now waits until all non-" -"daemon threads complete. :meth:`socketserver.ForkingMixIn.server_close` now " -"waits until all child processes complete." +":meth:`socketserver.ThreadingMixIn.server_close ` now waits until all non-daemon threads complete. :meth:" +"`socketserver.ForkingMixIn.server_close ` now waits until all child processes complete." msgstr "" -#: ../../whatsnew/3.7.rst:1305 +#: ../../whatsnew/3.7.rst:1308 msgid "" -"Add a new :attr:`socketserver.ForkingMixIn.block_on_close` class attribute " -"to :class:`socketserver.ForkingMixIn` " -"and :class:`socketserver.ThreadingMixIn` classes. Set the class attribute to " -"``False`` to get the pre-3.7 behaviour." +"Add a new :attr:`socketserver.ForkingMixIn.block_on_close ` class attribute to :class:`socketserver." +"ForkingMixIn` and :class:`socketserver.ThreadingMixIn` classes. Set the " +"class attribute to ``False`` to get the pre-3.7 behaviour." msgstr "" -#: ../../whatsnew/3.7.rst:1311 +#: ../../whatsnew/3.7.rst:1315 msgid "sqlite3" msgstr "sqlite3" -#: ../../whatsnew/3.7.rst:1313 +#: ../../whatsnew/3.7.rst:1317 msgid "" -":class:`sqlite3.Connection` now exposes " -"the :meth:`~sqlite3.Connection.backup` method when the underlying SQLite " -"library is at version 3.6.11 or higher. (Contributed by Lele Gaifax " -"in :issue:`27645`.)" +":class:`sqlite3.Connection` now exposes the :meth:`~sqlite3.Connection." +"backup` method when the underlying SQLite library is at version 3.6.11 or " +"higher. (Contributed by Lele Gaifax in :issue:`27645`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1317 +#: ../../whatsnew/3.7.rst:1321 msgid "" -"The *database* argument of :func:`sqlite3.connect` now accepts " -"any :term:`path-like object`, instead of just a string. (Contributed by " -"Anders Lorentsen in :issue:`31843`.)" +"The *database* argument of :func:`sqlite3.connect` now accepts any :term:" +"`path-like object`, instead of just a string. (Contributed by Anders " +"Lorentsen in :issue:`31843`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1323 ../../whatsnew/3.7.rst:2067 +#: ../../whatsnew/3.7.rst:1327 ../../whatsnew/3.7.rst:2071 msgid "ssl" msgstr "ssl" -#: ../../whatsnew/3.7.rst:1325 -msgid "" -"The :mod:`ssl` module now uses OpenSSL's builtin API instead " -"of :func:`~ssl.match_hostname` to check a host name or an IP address. " -"Values are validated during TLS handshake. Any certificate validation error " -"including failing the host name check now " -"raises :exc:`~ssl.SSLCertVerificationError` and aborts the handshake with a " -"proper TLS Alert message. The new exception contains additional " -"information. Host name validation can be customized " -"with :attr:`SSLContext.hostname_checks_common_name " -"`. (Contributed by Christian " -"Heimes in :issue:`31399`.)" +#: ../../whatsnew/3.7.rst:1329 +msgid "" +"The :mod:`ssl` module now uses OpenSSL's builtin API instead of :func:`!" +"match_hostname` to check a host name or an IP address. Values are validated " +"during TLS handshake. Any certificate validation error including failing " +"the host name check now raises :exc:`~ssl.SSLCertVerificationError` and " +"aborts the handshake with a proper TLS Alert message. The new exception " +"contains additional information. Host name validation can be customized " +"with :attr:`SSLContext.hostname_checks_common_name `. (Contributed by Christian Heimes in :issue:" +"`31399`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1336 +#: ../../whatsnew/3.7.rst:1340 msgid "" "The improved host name check requires a *libssl* implementation compatible " "with OpenSSL 1.0.2 or 1.1. Consequently, OpenSSL 0.9.8 and 1.0.1 are no " @@ -1943,20 +1930,20 @@ msgid "" "The ssl module is mostly compatible with LibreSSL 2.7.2 and newer." msgstr "" -#: ../../whatsnew/3.7.rst:1341 +#: ../../whatsnew/3.7.rst:1345 msgid "" "The ``ssl`` module no longer sends IP addresses in SNI TLS extension. " "(Contributed by Christian Heimes in :issue:`32185`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1344 +#: ../../whatsnew/3.7.rst:1348 msgid "" -":func:`~ssl.match_hostname` no longer supports partial wildcards like " -"``www*.example.org``. (Contributed by Mandeep Singh in :issue:`23033` and " -"Christian Heimes in :issue:`31399`.)" +":func:`!match_hostname` no longer supports partial wildcards like ``www*." +"example.org``. (Contributed by Mandeep Singh in :issue:`23033` and Christian " +"Heimes in :issue:`31399`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1349 +#: ../../whatsnew/3.7.rst:1353 msgid "" "The default cipher suite selection of the ``ssl`` module now uses a " "blacklist approach rather than a hard-coded whitelist. Python no longer re-" @@ -1965,71 +1952,68 @@ msgid "" "Christian Heimes in :issue:`31429`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1355 +#: ../../whatsnew/3.7.rst:1359 msgid "" "Validation of server certificates containing internationalized domain names " -"(IDNs) is now supported. As part of this change, " -"the :attr:`SSLSocket.server_hostname ` " -"attribute now stores the expected hostname in A-label form (``\"xn--pythn-" -"mua.org\"``), rather than the U-label form (``\"pythön.org\"``). " -"(Contributed by Nathaniel J. Smith and Christian Heimes in :issue:`28414`.)" +"(IDNs) is now supported. As part of this change, the :attr:`SSLSocket." +"server_hostname ` attribute now stores the " +"expected hostname in A-label form (``\"xn--pythn-mua.org\"``), rather than " +"the U-label form (``\"pythön.org\"``). (Contributed by Nathaniel J. Smith " +"and Christian Heimes in :issue:`28414`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1362 +#: ../../whatsnew/3.7.rst:1366 msgid "" "The ``ssl`` module has preliminary and experimental support for TLS 1.3 and " "OpenSSL 1.1.1. At the time of Python 3.7.0 release, OpenSSL 1.1.1 is still " "under development and TLS 1.3 hasn't been finalized yet. The TLS 1.3 " "handshake and protocol behaves slightly differently than TLS 1.2 and " -"earlier, see :ref:`ssl-tlsv1_3`. (Contributed by Christian Heimes " -"in :issue:`32947`, :issue:`20995`, :issue:`29136`, :issue:`30622` " -"and :issue:`33618`)" +"earlier, see :ref:`ssl-tlsv1_3`. (Contributed by Christian Heimes in :issue:" +"`32947`, :issue:`20995`, :issue:`29136`, :issue:`30622` and :issue:`33618`)" msgstr "" -#: ../../whatsnew/3.7.rst:1370 +#: ../../whatsnew/3.7.rst:1374 msgid "" ":class:`~ssl.SSLSocket` and :class:`~ssl.SSLObject` no longer have a public " "constructor. Direct instantiation was never a documented and supported " -"feature. Instances must be created with :class:`~ssl.SSLContext` " -"methods :meth:`~ssl.SSLContext.wrap_socket` " -"and :meth:`~ssl.SSLContext.wrap_bio`. (Contributed by Christian Heimes " -"in :issue:`32951`)" +"feature. Instances must be created with :class:`~ssl.SSLContext` methods :" +"meth:`~ssl.SSLContext.wrap_socket` and :meth:`~ssl.SSLContext.wrap_bio`. " +"(Contributed by Christian Heimes in :issue:`32951`)" msgstr "" -#: ../../whatsnew/3.7.rst:1376 +#: ../../whatsnew/3.7.rst:1380 msgid "" "OpenSSL 1.1 APIs for setting the minimum and maximum TLS protocol version " -"are available as :attr:`SSLContext.minimum_version " -"` and :attr:`SSLContext.maximum_version " -"`. Supported protocols are indicated by " -"several new flags, such as :data:`~ssl.HAS_TLSv1_1`. (Contributed by " -"Christian Heimes in :issue:`32609`.)" +"are available as :attr:`SSLContext.minimum_version ` and :attr:`SSLContext.maximum_version `. Supported protocols are indicated by several new flags, " +"such as :data:`~ssl.HAS_TLSv1_1`. (Contributed by Christian Heimes in :issue:" +"`32609`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1383 +#: ../../whatsnew/3.7.rst:1387 msgid "" -"Added :attr:`ssl.SSLContext.post_handshake_auth` to enable " -"and :meth:`ssl.SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 " -"post-handshake authentication. (Contributed by Christian Heimes " -"in :gh:`78851`.)" +"Added :attr:`ssl.SSLContext.post_handshake_auth` to enable and :meth:`ssl." +"SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 post-handshake " +"authentication. (Contributed by Christian Heimes in :gh:`78851`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1389 +#: ../../whatsnew/3.7.rst:1393 msgid "string" msgstr "string" -#: ../../whatsnew/3.7.rst:1391 +#: ../../whatsnew/3.7.rst:1395 msgid "" ":class:`string.Template` now lets you to optionally modify the regular " "expression pattern for braced placeholders and non-braced placeholders " "separately. (Contributed by Barry Warsaw in :issue:`1198569`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1397 +#: ../../whatsnew/3.7.rst:1401 msgid "subprocess" msgstr "subprocess" -#: ../../whatsnew/3.7.rst:1399 +#: ../../whatsnew/3.7.rst:1403 msgid "" "The :func:`subprocess.run` function accepts the new *capture_output* keyword " "argument. When true, stdout and stderr will be captured. This is equivalent " @@ -2037,122 +2021,120 @@ msgid "" "(Contributed by Bo Bayles in :issue:`32102`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1405 +#: ../../whatsnew/3.7.rst:1409 msgid "" "The ``subprocess.run`` function and the :class:`subprocess.Popen` " "constructor now accept the *text* keyword argument as an alias to " "*universal_newlines*. (Contributed by Andrew Clegg in :issue:`31756`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1410 +#: ../../whatsnew/3.7.rst:1414 msgid "" "On Windows the default for *close_fds* was changed from ``False`` to " "``True`` when redirecting the standard handles. It's now possible to set " -"*close_fds* to true when redirecting the standard handles. " -"See :class:`subprocess.Popen`. This means that *close_fds* now defaults to " -"``True`` on all supported platforms. (Contributed by Segev Finer " -"in :issue:`19764`.)" +"*close_fds* to true when redirecting the standard handles. See :class:" +"`subprocess.Popen`. This means that *close_fds* now defaults to ``True`` on " +"all supported platforms. (Contributed by Segev Finer in :issue:`19764`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1417 +#: ../../whatsnew/3.7.rst:1421 msgid "" -"The subprocess module is now more graceful when " -"handling :exc:`KeyboardInterrupt` " -"during :func:`subprocess.call`, :func:`subprocess.run`, or in " -"a :class:`~subprocess.Popen` context manager. It now waits a short amount " -"of time for the child to exit, before continuing the handling of the " -"``KeyboardInterrupt`` exception. (Contributed by Gregory P. Smith " -"in :issue:`25942`.)" +"The subprocess module is now more graceful when handling :exc:" +"`KeyboardInterrupt` during :func:`subprocess.call`, :func:`subprocess.run`, " +"or in a :class:`~subprocess.Popen` context manager. It now waits a short " +"amount of time for the child to exit, before continuing the handling of the " +"``KeyboardInterrupt`` exception. (Contributed by Gregory P. Smith in :issue:" +"`25942`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1427 ../../whatsnew/3.7.rst:2083 +#: ../../whatsnew/3.7.rst:1431 ../../whatsnew/3.7.rst:2087 msgid "sys" msgstr "sys" -#: ../../whatsnew/3.7.rst:1429 +#: ../../whatsnew/3.7.rst:1433 msgid "" -"The new :func:`sys.breakpointhook` hook function is called by the built-" -"in :func:`breakpoint`. (Contributed by Barry Warsaw in :issue:`31353`.)" +"The new :func:`sys.breakpointhook` hook function is called by the built-in :" +"func:`breakpoint`. (Contributed by Barry Warsaw in :issue:`31353`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1433 +#: ../../whatsnew/3.7.rst:1437 msgid "" "On Android, the new :func:`sys.getandroidapilevel` returns the build-time " "Android API version. (Contributed by Victor Stinner in :issue:`28740`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1437 +#: ../../whatsnew/3.7.rst:1441 msgid "" "The new :func:`sys.get_coroutine_origin_tracking_depth` function returns the " -"current coroutine origin tracking depth, as set by the " -"new :func:`sys.set_coroutine_origin_tracking_depth`. :mod:`asyncio` has " -"been converted to use this new API instead of the " -"deprecated :func:`sys.set_coroutine_wrapper`. (Contributed by Nathaniel J. " -"Smith in :issue:`32591`.)" +"current coroutine origin tracking depth, as set by the new :func:`sys." +"set_coroutine_origin_tracking_depth`. :mod:`asyncio` has been converted to " +"use this new API instead of the deprecated :func:`!sys." +"set_coroutine_wrapper`. (Contributed by Nathaniel J. Smith in :issue:" +"`32591`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1446 +#: ../../whatsnew/3.7.rst:1450 msgid "time" msgstr "time" -#: ../../whatsnew/3.7.rst:1448 +#: ../../whatsnew/3.7.rst:1452 msgid "" -":pep:`564` adds six new functions with nanosecond resolution to " -"the :mod:`time` module:" +":pep:`564` adds six new functions with nanosecond resolution to the :mod:" +"`time` module:" msgstr "" -#: ../../whatsnew/3.7.rst:1458 +#: ../../whatsnew/3.7.rst:1462 msgid "New clock identifiers have been added:" msgstr "" -#: ../../whatsnew/3.7.rst:1460 +#: ../../whatsnew/3.7.rst:1464 msgid "" -":const:`time.CLOCK_BOOTTIME` (Linux): Identical " -"to :const:`time.CLOCK_MONOTONIC`, except it also includes any time that the " -"system is suspended." +":const:`time.CLOCK_BOOTTIME` (Linux): Identical to :const:`time." +"CLOCK_MONOTONIC`, except it also includes any time that the system is " +"suspended." msgstr "" -#: ../../whatsnew/3.7.rst:1463 +#: ../../whatsnew/3.7.rst:1467 msgid "" ":const:`time.CLOCK_PROF` (FreeBSD, NetBSD and OpenBSD): High-resolution per-" "process CPU timer." msgstr "" -#: ../../whatsnew/3.7.rst:1465 +#: ../../whatsnew/3.7.rst:1469 msgid "" ":const:`time.CLOCK_UPTIME` (FreeBSD, OpenBSD): Time whose absolute value is " "the time the system has been running and not suspended, providing accurate " "uptime measurement." msgstr "" -#: ../../whatsnew/3.7.rst:1469 +#: ../../whatsnew/3.7.rst:1473 msgid "" "The new :func:`time.thread_time` and :func:`time.thread_time_ns` functions " "can be used to get per-thread CPU time measurements. (Contributed by Antoine " "Pitrou in :issue:`32025`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1473 +#: ../../whatsnew/3.7.rst:1477 msgid "" "The new :func:`time.pthread_getcpuclockid` function returns the clock ID of " "the thread-specific CPU-time clock." msgstr "" -#: ../../whatsnew/3.7.rst:1478 +#: ../../whatsnew/3.7.rst:1482 msgid "tkinter" msgstr "tkinter" -#: ../../whatsnew/3.7.rst:1480 +#: ../../whatsnew/3.7.rst:1484 msgid "" "The new :class:`tkinter.ttk.Spinbox` class is now available. (Contributed by " "Alan Moore in :issue:`32585`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1485 +#: ../../whatsnew/3.7.rst:1489 msgid "tracemalloc" msgstr "tracemalloc" -#: ../../whatsnew/3.7.rst:1487 +#: ../../whatsnew/3.7.rst:1491 msgid "" ":class:`tracemalloc.Traceback` behaves more like regular tracebacks, sorting " "the frames from oldest to most recent. :meth:`Traceback.format() " @@ -2162,106 +2144,104 @@ msgid "" "by Jesse Bakker in :issue:`32121`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1497 +#: ../../whatsnew/3.7.rst:1501 msgid "types" msgstr "types" -#: ../../whatsnew/3.7.rst:1499 +#: ../../whatsnew/3.7.rst:1503 msgid "" -"The " -"new :class:`~types.WrapperDescriptorType`, :class:`~types.MethodWrapperType`, :class:`~types.MethodDescriptorType`, " -"and :class:`~types.ClassMethodDescriptorType` classes are now available. " -"(Contributed by Manuel Krebber and Guido van Rossum in :issue:`29377`, and " -"Serhiy Storchaka in :issue:`32265`.)" +"The new :class:`~types.WrapperDescriptorType`, :class:`~types." +"MethodWrapperType`, :class:`~types.MethodDescriptorType`, and :class:`~types." +"ClassMethodDescriptorType` classes are now available. (Contributed by Manuel " +"Krebber and Guido van Rossum in :issue:`29377`, and Serhiy Storchaka in :" +"issue:`32265`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1505 +#: ../../whatsnew/3.7.rst:1509 msgid "" "The new :func:`types.resolve_bases` function resolves MRO entries " -"dynamically as specified by :pep:`560`. (Contributed by Ivan Levkivskyi " -"in :issue:`32717`.)" +"dynamically as specified by :pep:`560`. (Contributed by Ivan Levkivskyi in :" +"issue:`32717`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1511 +#: ../../whatsnew/3.7.rst:1515 msgid "unicodedata" msgstr "unicodedata" -#: ../../whatsnew/3.7.rst:1513 +#: ../../whatsnew/3.7.rst:1517 msgid "" "The internal :mod:`unicodedata` database has been upgraded to use `Unicode " "11 `_. (Contributed by " "Benjamin Peterson.)" msgstr "" -#: ../../whatsnew/3.7.rst:1519 +#: ../../whatsnew/3.7.rst:1523 msgid "unittest" msgstr "unittest" -#: ../../whatsnew/3.7.rst:1521 +#: ../../whatsnew/3.7.rst:1525 msgid "" "The new ``-k`` command-line option allows filtering tests by a name " "substring or a Unix shell-like pattern. For example, ``python -m unittest -k " -"foo`` runs ``foo_tests.SomeTest.test_something``, " -"``bar_tests.SomeTest.test_foo``, but not " -"``bar_tests.FooTest.test_something``. (Contributed by Jonas Haag " -"in :issue:`32071`.)" +"foo`` runs ``foo_tests.SomeTest.test_something``, ``bar_tests.SomeTest." +"test_foo``, but not ``bar_tests.FooTest.test_something``. (Contributed by " +"Jonas Haag in :issue:`32071`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1530 +#: ../../whatsnew/3.7.rst:1534 msgid "unittest.mock" msgstr "unittest.mock" -#: ../../whatsnew/3.7.rst:1532 +#: ../../whatsnew/3.7.rst:1536 msgid "" "The :const:`~unittest.mock.sentinel` attributes now preserve their identity " "when they are :mod:`copied ` or :mod:`pickled `. (Contributed " "by Serhiy Storchaka in :issue:`20804`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1536 +#: ../../whatsnew/3.7.rst:1540 msgid "" -"The new :func:`~unittest.mock.seal` function allows " -"sealing :class:`~unittest.mock.Mock` instances, which will disallow further " -"creation of attribute mocks. The seal is applied recursively to all " -"attributes that are themselves mocks. (Contributed by Mario Corchero " -"in :issue:`30541`.)" +"The new :func:`~unittest.mock.seal` function allows sealing :class:" +"`~unittest.mock.Mock` instances, which will disallow further creation of " +"attribute mocks. The seal is applied recursively to all attributes that are " +"themselves mocks. (Contributed by Mario Corchero in :issue:`30541`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1544 +#: ../../whatsnew/3.7.rst:1548 msgid "urllib.parse" msgstr "urllib.parse" -#: ../../whatsnew/3.7.rst:1546 +#: ../../whatsnew/3.7.rst:1550 msgid "" ":func:`urllib.parse.quote` has been updated from :rfc:`2396` to :rfc:`3986`, " "adding ``~`` to the set of characters that are never quoted by default. " "(Contributed by Christian Theune and Ratnadeep Debnath in :issue:`16285`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1552 +#: ../../whatsnew/3.7.rst:1556 msgid "uu" msgstr "uu" -#: ../../whatsnew/3.7.rst:1554 +#: ../../whatsnew/3.7.rst:1558 msgid "" "The :func:`!uu.encode` function now accepts an optional *backtick* keyword " "argument. When it's true, zeros are represented by ``'`'`` instead of " "spaces. (Contributed by Xiang Zhang in :issue:`30103`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1560 +#: ../../whatsnew/3.7.rst:1564 msgid "uuid" msgstr "uuid" -#: ../../whatsnew/3.7.rst:1562 +#: ../../whatsnew/3.7.rst:1566 msgid "" "The new :attr:`UUID.is_safe ` attribute relays " "information from the platform about whether generated UUIDs are generated " -"with a multiprocessing-safe method. (Contributed by Barry Warsaw " -"in :issue:`22807`.)" +"with a multiprocessing-safe method. (Contributed by Barry Warsaw in :issue:" +"`22807`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1567 +#: ../../whatsnew/3.7.rst:1571 msgid "" ":func:`uuid.getnode` now prefers universally administered MAC addresses over " "locally administered MAC addresses. This makes a better guarantee for global " @@ -2270,119 +2250,117 @@ msgid "" "returned. (Contributed by Barry Warsaw in :issue:`32107`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1576 +#: ../../whatsnew/3.7.rst:1580 msgid "warnings" msgstr "warnings" -#: ../../whatsnew/3.7.rst:1578 +#: ../../whatsnew/3.7.rst:1582 msgid "" "The initialization of the default warnings filters has changed as follows:" msgstr "" -#: ../../whatsnew/3.7.rst:1580 +#: ../../whatsnew/3.7.rst:1584 msgid "" "warnings enabled via command line options (including those for :option:`-b` " "and the new CPython-specific :option:`-X` ``dev`` option) are always passed " "to the warnings machinery via the :data:`sys.warnoptions` attribute." msgstr "" -#: ../../whatsnew/3.7.rst:1584 +#: ../../whatsnew/3.7.rst:1588 msgid "" "warnings filters enabled via the command line or the environment now have " "the following order of precedence:" msgstr "" -#: ../../whatsnew/3.7.rst:1587 +#: ../../whatsnew/3.7.rst:1591 msgid "the ``BytesWarning`` filter for :option:`-b` (or ``-bb``)" msgstr "" -#: ../../whatsnew/3.7.rst:1588 +#: ../../whatsnew/3.7.rst:1592 msgid "any filters specified with the :option:`-W` option" msgstr "" -#: ../../whatsnew/3.7.rst:1589 +#: ../../whatsnew/3.7.rst:1593 msgid "" "any filters specified with the :envvar:`PYTHONWARNINGS` environment variable" msgstr "" -#: ../../whatsnew/3.7.rst:1591 +#: ../../whatsnew/3.7.rst:1595 msgid "" "any other CPython specific filters (e.g. the ``default`` filter added for " "the new ``-X dev`` mode)" msgstr "" -#: ../../whatsnew/3.7.rst:1593 +#: ../../whatsnew/3.7.rst:1597 msgid "any implicit filters defined directly by the warnings machinery" msgstr "" -#: ../../whatsnew/3.7.rst:1595 +#: ../../whatsnew/3.7.rst:1599 msgid "" "in :ref:`CPython debug builds `, all warnings are now displayed " "by default (the implicit filter list is empty)" msgstr "" -#: ../../whatsnew/3.7.rst:1598 +#: ../../whatsnew/3.7.rst:1602 msgid "" -"(Contributed by Nick Coghlan and Victor Stinner " -"in :issue:`20361`, :issue:`32043`, and :issue:`32230`.)" +"(Contributed by Nick Coghlan and Victor Stinner in :issue:`20361`, :issue:" +"`32043`, and :issue:`32230`.)" msgstr "" -"(由 Nick Coghlan 和 Victor Stinner 在 :issue:`20361`、:issue:`32043` " -"和 :issue:`32230` 中貢獻。)" +"(由 Nick Coghlan 和 Victor Stinner 在 :issue:`20361`、:issue:`32043` 和 :" +"issue:`32230` 中貢獻。)" -#: ../../whatsnew/3.7.rst:1601 +#: ../../whatsnew/3.7.rst:1605 msgid "" "Deprecation warnings are once again shown by default in single-file scripts " "and at the interactive prompt. See :ref:`whatsnew37-pep565` for details. " "(Contributed by Nick Coghlan in :issue:`31975`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1607 +#: ../../whatsnew/3.7.rst:1611 msgid "xml" msgstr "xml" -#: ../../whatsnew/3.7.rst:1609 +#: ../../whatsnew/3.7.rst:1613 msgid "" -"As mitigation against DTD and external entity retrieval, " -"the :mod:`xml.dom.minidom` and :mod:`xml.sax` modules no longer process " -"external entities by default. (Contributed by Christian Heimes " -"in :gh:`61441`.)" +"As mitigation against DTD and external entity retrieval, the :mod:`xml.dom." +"minidom` and :mod:`xml.sax` modules no longer process external entities by " +"default. (Contributed by Christian Heimes in :gh:`61441`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1616 +#: ../../whatsnew/3.7.rst:1620 msgid "xml.etree" msgstr "xml.etree" -#: ../../whatsnew/3.7.rst:1618 +#: ../../whatsnew/3.7.rst:1622 msgid "" -":ref:`ElementPath ` predicates in the :meth:`find` " +":ref:`ElementPath ` predicates in the :meth:`!find` " "methods can now compare text of the current node with ``[. = \"text\"]``, " "not only text in children. Predicates also allow adding spaces for better " "readability. (Contributed by Stefan Behnel in :issue:`31648`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1625 +#: ../../whatsnew/3.7.rst:1629 msgid "xmlrpc.server" msgstr "xmlrpc.server" -#: ../../whatsnew/3.7.rst:1627 +#: ../../whatsnew/3.7.rst:1631 msgid "" -":meth:`SimpleXMLRPCDispatcher.register_function " -"` can now be used as a decorator. " -"(Contributed by Xiang Zhang in :issue:`7769`.)" +":meth:`!SimpleXMLRPCDispatcher.register_function` can now be used as a " +"decorator. (Contributed by Xiang Zhang in :issue:`7769`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1633 +#: ../../whatsnew/3.7.rst:1637 msgid "zipapp" msgstr "zipapp" -#: ../../whatsnew/3.7.rst:1635 +#: ../../whatsnew/3.7.rst:1639 msgid "" "Function :func:`~zipapp.create_archive` now accepts an optional *filter* " "argument to allow the user to select which files should be included in the " "archive. (Contributed by Irmen de Jong in :issue:`31072`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1639 +#: ../../whatsnew/3.7.rst:1643 msgid "" "Function :func:`~zipapp.create_archive` now accepts an optional *compressed* " "argument to generate a compressed archive. A command line option ``--" @@ -2390,201 +2368,198 @@ msgid "" "Zhiming Wang in :issue:`31638`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1646 +#: ../../whatsnew/3.7.rst:1650 msgid "zipfile" msgstr "zipfile" -#: ../../whatsnew/3.7.rst:1648 +#: ../../whatsnew/3.7.rst:1652 msgid "" ":class:`~zipfile.ZipFile` now accepts the new *compresslevel* parameter to " "control the compression level. (Contributed by Bo Bayles in :issue:`21417`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1652 +#: ../../whatsnew/3.7.rst:1656 msgid "" "Subdirectories in archives created by ``ZipFile`` are now stored in " "alphabetical order. (Contributed by Bernhard M. Wiedemann in :issue:`30693`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1658 +#: ../../whatsnew/3.7.rst:1662 msgid "C API Changes" msgstr "C API 變更" -#: ../../whatsnew/3.7.rst:1660 +#: ../../whatsnew/3.7.rst:1664 msgid "" -"A new API for thread-local storage has been implemented. " -"See :ref:`whatsnew37-pep539` for an overview and :ref:`thread-specific-" -"storage-api` for a complete reference. (Contributed by Masayuki Yamamoto " -"in :issue:`25658`.)" +"A new API for thread-local storage has been implemented. See :ref:" +"`whatsnew37-pep539` for an overview and :ref:`thread-specific-storage-api` " +"for a complete reference. (Contributed by Masayuki Yamamoto in :issue:" +"`25658`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1665 +#: ../../whatsnew/3.7.rst:1669 msgid "" "The new :ref:`context variables ` functionality exposes a " "number of :ref:`new C APIs `." msgstr "" -#: ../../whatsnew/3.7.rst:1668 +#: ../../whatsnew/3.7.rst:1672 msgid "" "The new :c:func:`PyImport_GetModule` function returns the previously " -"imported module with the given name. (Contributed by Eric Snow " -"in :issue:`28411`.)" +"imported module with the given name. (Contributed by Eric Snow in :issue:" +"`28411`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1672 +#: ../../whatsnew/3.7.rst:1676 msgid "" "The new :c:macro:`Py_RETURN_RICHCOMPARE` macro eases writing rich comparison " "functions. (Contributed by Petr Victorin in :issue:`23699`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1676 +#: ../../whatsnew/3.7.rst:1680 msgid "" "The new :c:macro:`Py_UNREACHABLE` macro can be used to mark unreachable code " "paths. (Contributed by Barry Warsaw in :issue:`31338`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1680 +#: ../../whatsnew/3.7.rst:1684 msgid "" -"The :mod:`tracemalloc` now exposes a C API through the " -"new :c:func:`PyTraceMalloc_Track` and :c:func:`PyTraceMalloc_Untrack` " -"functions. (Contributed by Victor Stinner in :issue:`30054`.)" +"The :mod:`tracemalloc` now exposes a C API through the new :c:func:" +"`PyTraceMalloc_Track` and :c:func:`PyTraceMalloc_Untrack` functions. " +"(Contributed by Victor Stinner in :issue:`30054`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1685 +#: ../../whatsnew/3.7.rst:1689 msgid "" -"The new :c:func:`import__find__load__start` " -"and :c:func:`import__find__load__done` static markers can be used to trace " -"module imports. (Contributed by Christian Heimes in :issue:`31574`.)" +"The new :ref:`import__find__load__start ` and :ref:" +"`import__find__load__done ` static markers can be used to " +"trace module imports. (Contributed by Christian Heimes in :issue:`31574`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1690 +#: ../../whatsnew/3.7.rst:1694 msgid "" -"The fields :c:member:`!name` and :c:member:`!doc` of " -"structures :c:type:`PyMemberDef`, :c:type:`PyGetSetDef`, :c:type:`PyStructSequence_Field`, :c:type:`PyStructSequence_Desc`, " -"and :c:struct:`wrapperbase` are now of type ``const char *`` rather of " -"``char *``. (Contributed by Serhiy Storchaka in :issue:`28761`.)" +"The fields :c:member:`!name` and :c:member:`!doc` of structures :c:type:" +"`PyMemberDef`, :c:type:`PyGetSetDef`, :c:type:`PyStructSequence_Field`, :c:" +"type:`PyStructSequence_Desc`, and :c:struct:`!wrapperbase` are now of type " +"``const char *`` rather of ``char *``. (Contributed by Serhiy Storchaka in :" +"issue:`28761`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1696 +#: ../../whatsnew/3.7.rst:1700 msgid "" -"The result of :c:func:`PyUnicode_AsUTF8AndSize` " -"and :c:func:`PyUnicode_AsUTF8` is now of type ``const char *`` rather of " -"``char *``. (Contributed by Serhiy Storchaka in :issue:`28769`.)" +"The result of :c:func:`PyUnicode_AsUTF8AndSize` and :c:func:" +"`PyUnicode_AsUTF8` is now of type ``const char *`` rather of ``char *``. " +"(Contributed by Serhiy Storchaka in :issue:`28769`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1700 +#: ../../whatsnew/3.7.rst:1704 msgid "" -"The result of :c:func:`PyMapping_Keys`, :c:func:`PyMapping_Values` " -"and :c:func:`PyMapping_Items` is now always a list, rather than a list or a " -"tuple. (Contributed by Oren Milman in :issue:`28280`.)" +"The result of :c:func:`PyMapping_Keys`, :c:func:`PyMapping_Values` and :c:" +"func:`PyMapping_Items` is now always a list, rather than a list or a tuple. " +"(Contributed by Oren Milman in :issue:`28280`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1704 +#: ../../whatsnew/3.7.rst:1708 msgid "" -"Added functions :c:func:`PySlice_Unpack` " -"and :c:func:`PySlice_AdjustIndices`. (Contributed by Serhiy Storchaka " -"in :issue:`27867`.)" +"Added functions :c:func:`PySlice_Unpack` and :c:func:" +"`PySlice_AdjustIndices`. (Contributed by Serhiy Storchaka in :issue:`27867`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1707 +#: ../../whatsnew/3.7.rst:1711 msgid "" -":c:func:`PyOS_AfterFork` is deprecated in favour of the new " -"functions :c:func:`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` " -"and :c:func:`PyOS_AfterFork_Child`. (Contributed by Antoine Pitrou " -"in :issue:`16500`.)" +":c:func:`PyOS_AfterFork` is deprecated in favour of the new functions :c:" +"func:`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` and :c:func:" +"`PyOS_AfterFork_Child`. (Contributed by Antoine Pitrou in :issue:`16500`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1712 +#: ../../whatsnew/3.7.rst:1716 msgid "" "The ``PyExc_RecursionErrorInst`` singleton that was part of the public API " "has been removed as its members being never cleared may cause a segfault " -"during finalization of the interpreter. Contributed by Xavier de Gaye " -"in :issue:`22898` and :issue:`30697`." +"during finalization of the interpreter. Contributed by Xavier de Gaye in :" +"issue:`22898` and :issue:`30697`." msgstr "" -#: ../../whatsnew/3.7.rst:1717 +#: ../../whatsnew/3.7.rst:1721 msgid "" -"Added C API support for timezones with timezone " -"constructors :c:func:`PyTimeZone_FromOffset` " -"and :c:func:`PyTimeZone_FromOffsetAndName`, and access to the UTC singleton " -"with :c:data:`PyDateTime_TimeZone_UTC`. Contributed by Paul Ganssle " -"in :issue:`10381`." +"Added C API support for timezones with timezone constructors :c:func:" +"`PyTimeZone_FromOffset` and :c:func:`PyTimeZone_FromOffsetAndName`, and " +"access to the UTC singleton with :c:data:`PyDateTime_TimeZone_UTC`. " +"Contributed by Paul Ganssle in :issue:`10381`." msgstr "" -#: ../../whatsnew/3.7.rst:1722 +#: ../../whatsnew/3.7.rst:1726 msgid "" -"The type of results of :c:func:`PyThread_start_new_thread` " -"and :c:func:`PyThread_get_thread_ident`, and the *id* parameter " -"of :c:func:`PyThreadState_SetAsyncExc` changed from :c:expr:`long` " -"to :c:expr:`unsigned long`. (Contributed by Serhiy Storchaka " -"in :issue:`6532`.)" +"The type of results of :c:func:`!PyThread_start_new_thread` and :c:func:`!" +"PyThread_get_thread_ident`, and the *id* parameter of :c:func:" +"`PyThreadState_SetAsyncExc` changed from :c:expr:`long` to :c:expr:`unsigned " +"long`. (Contributed by Serhiy Storchaka in :issue:`6532`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1728 +#: ../../whatsnew/3.7.rst:1732 msgid "" ":c:func:`PyUnicode_AsWideCharString` now raises a :exc:`ValueError` if the " "second argument is ``NULL`` and the :c:expr:`wchar_t*` string contains null " "characters. (Contributed by Serhiy Storchaka in :issue:`30708`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1732 +#: ../../whatsnew/3.7.rst:1736 msgid "" "Changes to the startup sequence and the management of dynamic memory " -"allocators mean that the long documented requirement to " -"call :c:func:`Py_Initialize` before calling most C API functions is now " -"relied on more heavily, and failing to abide by it may lead to segfaults in " -"embedding applications. See the :ref:`porting-to-python-37` section in this " -"document and the :ref:`pre-init-safe` section in the C API documentation for " -"more details." +"allocators mean that the long documented requirement to call :c:func:" +"`Py_Initialize` before calling most C API functions is now relied on more " +"heavily, and failing to abide by it may lead to segfaults in embedding " +"applications. See the :ref:`porting-to-python-37` section in this document " +"and the :ref:`pre-init-safe` section in the C API documentation for more " +"details." msgstr "" -#: ../../whatsnew/3.7.rst:1740 +#: ../../whatsnew/3.7.rst:1744 msgid "" "The new :c:func:`PyInterpreterState_GetID` returns the unique ID for a given " "interpreter. (Contributed by Eric Snow in :issue:`29102`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1744 +#: ../../whatsnew/3.7.rst:1748 msgid "" ":c:func:`Py_DecodeLocale`, :c:func:`Py_EncodeLocale` now use the UTF-8 " "encoding when the :ref:`UTF-8 mode ` is enabled. " "(Contributed by Victor Stinner in :issue:`29240`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1748 +#: ../../whatsnew/3.7.rst:1752 msgid "" ":c:func:`PyUnicode_DecodeLocaleAndSize` and :c:func:`PyUnicode_EncodeLocale` " "now use the current locale encoding for ``surrogateescape`` error handler. " "(Contributed by Victor Stinner in :issue:`29240`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1752 +#: ../../whatsnew/3.7.rst:1756 msgid "" "The *start* and *end* parameters of :c:func:`PyUnicode_FindChar` are now " -"adjusted to behave like string slices. (Contributed by Xiang Zhang " -"in :issue:`28822`.)" +"adjusted to behave like string slices. (Contributed by Xiang Zhang in :issue:" +"`28822`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1758 +#: ../../whatsnew/3.7.rst:1762 msgid "Build Changes" msgstr "建置變更" -#: ../../whatsnew/3.7.rst:1760 +#: ../../whatsnew/3.7.rst:1764 msgid "" -"Support for building ``--without-threads`` has been removed. " -"The :mod:`threading` module is now always available. (Contributed by Antoine " -"Pitrou in :issue:`31370`.)." +"Support for building ``--without-threads`` has been removed. The :mod:" +"`threading` module is now always available. (Contributed by Antoine Pitrou " +"in :issue:`31370`.)." msgstr "" -#: ../../whatsnew/3.7.rst:1764 +#: ../../whatsnew/3.7.rst:1768 msgid "" -"A full copy of libffi is no longer bundled for use when building " -"the :mod:`_ctypes ` module on non-OSX UNIX platforms. An installed " -"copy of libffi is now required when building ``_ctypes`` on such platforms. " +"A full copy of libffi is no longer bundled for use when building the :mod:" +"`_ctypes ` module on non-OSX UNIX platforms. An installed copy of " +"libffi is now required when building ``_ctypes`` on such platforms. " "(Contributed by Zachary Ware in :issue:`27979`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1769 +#: ../../whatsnew/3.7.rst:1773 msgid "" "The Windows build process no longer depends on Subversion to pull in " "external sources, a Python script is used to download zipfiles from GitHub " @@ -2593,7 +2568,7 @@ msgid "" "by Zachary Ware in :issue:`30450`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1775 +#: ../../whatsnew/3.7.rst:1779 msgid "" "The :mod:`ssl` module requires OpenSSL 1.0.2 or 1.1 compatible libssl. " "OpenSSL 1.0.1 has reached end of lifetime on 2016-12-31 and is no longer " @@ -2601,99 +2576,97 @@ msgid "" "up to version 2.6.4 are missing required OpenSSL 1.0.2 APIs." msgstr "" -#: ../../whatsnew/3.7.rst:1784 +#: ../../whatsnew/3.7.rst:1788 msgid "Optimizations" msgstr "最佳化" -#: ../../whatsnew/3.7.rst:1786 +#: ../../whatsnew/3.7.rst:1790 msgid "" "The overhead of calling many methods of various standard library classes " "implemented in C has been significantly reduced by porting more code to use " -"the ``METH_FASTCALL`` convention. (Contributed by Victor Stinner " -"in :issue:`29300`, :issue:`29507`, :issue:`29452`, and :issue:`29286`.)" +"the ``METH_FASTCALL`` convention. (Contributed by Victor Stinner in :issue:" +"`29300`, :issue:`29507`, :issue:`29452`, and :issue:`29286`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1792 +#: ../../whatsnew/3.7.rst:1796 msgid "" "Various optimizations have reduced Python startup time by 10% on Linux and " -"up to 30% on macOS. (Contributed by Victor Stinner, INADA Naoki " -"in :issue:`29585`, and Ivan Levkivskyi in :issue:`31333`.)" +"up to 30% on macOS. (Contributed by Victor Stinner, INADA Naoki in :issue:" +"`29585`, and Ivan Levkivskyi in :issue:`31333`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1797 +#: ../../whatsnew/3.7.rst:1801 msgid "" "Method calls are now up to 20% faster due to the bytecode changes which " "avoid creating bound method instances. (Contributed by Yury Selivanov and " "INADA Naoki in :issue:`26110`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1803 +#: ../../whatsnew/3.7.rst:1807 msgid "" "The :mod:`asyncio` module received a number of notable optimizations for " "commonly used functions:" msgstr "" -#: ../../whatsnew/3.7.rst:1806 +#: ../../whatsnew/3.7.rst:1810 msgid "" "The :func:`asyncio.get_event_loop` function has been reimplemented in C to " -"make it up to 15 times faster. (Contributed by Yury Selivanov " -"in :issue:`32296`.)" +"make it up to 15 times faster. (Contributed by Yury Selivanov in :issue:" +"`32296`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1810 +#: ../../whatsnew/3.7.rst:1814 msgid "" ":class:`asyncio.Future` callback management has been optimized. (Contributed " "by Yury Selivanov in :issue:`32348`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1813 +#: ../../whatsnew/3.7.rst:1817 msgid "" ":func:`asyncio.gather` is now up to 15% faster. (Contributed by Yury " "Selivanov in :issue:`32355`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1816 +#: ../../whatsnew/3.7.rst:1820 msgid "" ":func:`asyncio.sleep` is now up to 2 times faster when the *delay* argument " "is zero or negative. (Contributed by Andrew Svetlov in :issue:`32351`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1820 +#: ../../whatsnew/3.7.rst:1824 msgid "" "The performance overhead of asyncio debug mode has been reduced. " "(Contributed by Antoine Pitrou in :issue:`31970`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1823 +#: ../../whatsnew/3.7.rst:1827 msgid "" -"As a result of :ref:`PEP 560 work `, the import time " -"of :mod:`typing` has been reduced by a factor of 7, and many typing " -"operations are now faster. (Contributed by Ivan Levkivskyi " -"in :issue:`32226`.)" +"As a result of :ref:`PEP 560 work `, the import time of :" +"mod:`typing` has been reduced by a factor of 7, and many typing operations " +"are now faster. (Contributed by Ivan Levkivskyi in :issue:`32226`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1828 +#: ../../whatsnew/3.7.rst:1832 msgid "" ":func:`sorted` and :meth:`list.sort` have been optimized for common cases to " -"be up to 40-75% faster. (Contributed by Elliot Gorokhovsky " -"in :issue:`28685`.)" +"be up to 40-75% faster. (Contributed by Elliot Gorokhovsky in :issue:" +"`28685`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1832 +#: ../../whatsnew/3.7.rst:1836 msgid "" ":meth:`dict.copy` is now up to 5.5 times faster. (Contributed by Yury " "Selivanov in :issue:`31179`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1835 +#: ../../whatsnew/3.7.rst:1839 msgid "" ":func:`hasattr` and :func:`getattr` are now about 4 times faster when *name* " -"is not found and *obj* does not override :meth:`object.__getattr__` " -"or :meth:`object.__getattribute__`. (Contributed by INADA Naoki " -"in :issue:`32544`.)" +"is not found and *obj* does not override :meth:`object.__getattr__` or :meth:" +"`object.__getattribute__`. (Contributed by INADA Naoki in :issue:`32544`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1840 +#: ../../whatsnew/3.7.rst:1844 msgid "" "Searching for certain Unicode characters (like Ukrainian capital \"Є\") in a " "string was up to 25 times slower than searching for other characters. It is " @@ -2701,7 +2674,7 @@ msgid "" "in :issue:`24821`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1845 +#: ../../whatsnew/3.7.rst:1849 msgid "" "The :func:`collections.namedtuple` factory has been reimplemented to make " "the creation of named tuples 4 to 6 times faster. (Contributed by Jelle " @@ -2709,74 +2682,75 @@ msgid "" "Raymond Hettinger in :issue:`28638`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1850 +#: ../../whatsnew/3.7.rst:1854 msgid "" -":meth:`date.fromordinal` and :meth:`date.fromtimestamp` are now up to 30% " -"faster in the common case. (Contributed by Paul Ganssle in :issue:`32403`.)" +":meth:`datetime.date.fromordinal` and :meth:`datetime.date.fromtimestamp` " +"are now up to 30% faster in the common case. (Contributed by Paul Ganssle " +"in :issue:`32403`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1854 +#: ../../whatsnew/3.7.rst:1858 msgid "" "The :func:`os.fwalk` function is now up to 2 times faster thanks to the use " "of :func:`os.scandir`. (Contributed by Serhiy Storchaka in :issue:`25996`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1858 +#: ../../whatsnew/3.7.rst:1862 msgid "" "The speed of the :func:`shutil.rmtree` function has been improved by 20--40% " "thanks to the use of the :func:`os.scandir` function. (Contributed by Serhiy " "Storchaka in :issue:`28564`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1862 +#: ../../whatsnew/3.7.rst:1866 msgid "" "Optimized case-insensitive matching and searching of :mod:`regular " "expressions `. Searching some patterns can now be up to 20 times " "faster. (Contributed by Serhiy Storchaka in :issue:`30285`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1866 +#: ../../whatsnew/3.7.rst:1870 msgid "" ":func:`re.compile` now converts ``flags`` parameter to int object if it is " "``RegexFlag``. It is now as fast as Python 3.5, and faster than Python 3.6 " -"by about 10% depending on the pattern. (Contributed by INADA Naoki " -"in :issue:`31671`.)" +"by about 10% depending on the pattern. (Contributed by INADA Naoki in :issue:" +"`31671`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1871 +#: ../../whatsnew/3.7.rst:1875 msgid "" -"The :meth:`~selectors.BaseSelector.modify` methods of " -"classes :class:`selectors.EpollSelector`, :class:`selectors.PollSelector` " -"and :class:`selectors.DevpollSelector` may be around 10% faster under heavy " -"loads. (Contributed by Giampaolo Rodola' in :issue:`30014`)" +"The :meth:`~selectors.BaseSelector.modify` methods of classes :class:" +"`selectors.EpollSelector`, :class:`selectors.PollSelector` and :class:" +"`selectors.DevpollSelector` may be around 10% faster under heavy loads. " +"(Contributed by Giampaolo Rodola' in :issue:`30014`)" msgstr "" -#: ../../whatsnew/3.7.rst:1876 +#: ../../whatsnew/3.7.rst:1880 msgid "" "Constant folding has been moved from the peephole optimizer to the new AST " "optimizer, which is able perform optimizations more consistently. " -"(Contributed by Eugene Toder and INADA Naoki in :issue:`29469` " -"and :issue:`11549`.)" +"(Contributed by Eugene Toder and INADA Naoki in :issue:`29469` and :issue:" +"`11549`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1881 +#: ../../whatsnew/3.7.rst:1885 msgid "" "Most functions and methods in :mod:`abc` have been rewritten in C. This " -"makes creation of abstract base classes, and calling :func:`isinstance` " -"and :func:`issubclass` on them 1.5x faster. This also reduces Python start-" -"up time by up to 10%. (Contributed by Ivan Levkivskyi and INADA Naoki " -"in :issue:`31333`)" +"makes creation of abstract base classes, and calling :func:`isinstance` and :" +"func:`issubclass` on them 1.5x faster. This also reduces Python start-up " +"time by up to 10%. (Contributed by Ivan Levkivskyi and INADA Naoki in :issue:" +"`31333`)" msgstr "" -#: ../../whatsnew/3.7.rst:1887 +#: ../../whatsnew/3.7.rst:1891 msgid "" -"Significant speed improvements to alternate constructors " -"for :class:`datetime.date` and :class:`datetime.datetime` by using fast-path " +"Significant speed improvements to alternate constructors for :class:" +"`datetime.date` and :class:`datetime.datetime` by using fast-path " "constructors when not constructing subclasses. (Contributed by Paul Ganssle " "in :issue:`32403`)" msgstr "" -#: ../../whatsnew/3.7.rst:1892 +#: ../../whatsnew/3.7.rst:1896 msgid "" "The speed of comparison of :class:`array.array` instances has been improved " "considerably in certain cases. It is now from 10x to 70x faster when " @@ -2784,57 +2758,56 @@ msgid "" "Adrian Wielgosik in :issue:`24700`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1897 +#: ../../whatsnew/3.7.rst:1901 msgid "" "The :func:`math.erf` and :func:`math.erfc` functions now use the (faster) C " "library implementation on most platforms. (Contributed by Serhiy Storchaka " "in :issue:`26121`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1903 +#: ../../whatsnew/3.7.rst:1907 msgid "Other CPython Implementation Changes" msgstr "" -#: ../../whatsnew/3.7.rst:1905 +#: ../../whatsnew/3.7.rst:1909 msgid "" "Trace hooks may now opt out of receiving the ``line`` and opt into receiving " -"the ``opcode`` events from the interpreter by setting the corresponding " -"new :attr:`~frame.f_trace_lines` and :attr:`~frame.f_trace_opcodes` " -"attributes on the frame being traced. (Contributed by Nick Coghlan " -"in :issue:`31344`.)" +"the ``opcode`` events from the interpreter by setting the corresponding new :" +"attr:`~frame.f_trace_lines` and :attr:`~frame.f_trace_opcodes` attributes on " +"the frame being traced. (Contributed by Nick Coghlan in :issue:`31344`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1910 +#: ../../whatsnew/3.7.rst:1914 msgid "" "Fixed some consistency problems with namespace package module attributes. " "Namespace module objects now have an ``__file__`` that is set to ``None`` " "(previously unset), and their ``__spec__.origin`` is also set to ``None`` " "(previously the string ``\"namespace\"``). See :issue:`32305`. Also, the " "namespace module object's ``__spec__.loader`` is set to the same value as " -"``__loader__`` (previously, the former was set to ``None``). " -"See :issue:`32303`." +"``__loader__`` (previously, the former was set to ``None``). See :issue:" +"`32303`." msgstr "" -#: ../../whatsnew/3.7.rst:1918 +#: ../../whatsnew/3.7.rst:1922 msgid "" "The :func:`locals` dictionary now displays in the lexical order that " "variables were defined. Previously, the order was undefined. (Contributed " "by Raymond Hettinger in :issue:`32690`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1922 +#: ../../whatsnew/3.7.rst:1926 msgid "" "The ``distutils`` ``upload`` command no longer tries to change CR end-of-" "line characters to CRLF. This fixes a corruption issue with sdists that " -"ended with a byte equivalent to CR. (Contributed by Bo Bayles " -"in :issue:`32304`.)" +"ended with a byte equivalent to CR. (Contributed by Bo Bayles in :issue:" +"`32304`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1929 +#: ../../whatsnew/3.7.rst:1933 msgid "Deprecated Python Behavior" -msgstr "" +msgstr "已棄用的 Python 行為" -#: ../../whatsnew/3.7.rst:1931 +#: ../../whatsnew/3.7.rst:1935 msgid "" "Yield expressions (both ``yield`` and ``yield from`` clauses) are now " "deprecated in comprehensions and generator expressions (aside from the " @@ -2848,47 +2821,46 @@ msgid "" "Storchaka in :issue:`10544`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1942 +#: ../../whatsnew/3.7.rst:1946 msgid "" "Returning a subclass of :class:`complex` from :meth:`object.__complex__` is " "deprecated and will be an error in future Python versions. This makes " -"``__complex__()`` consistent with :meth:`object.__int__` " -"and :meth:`object.__float__`. (Contributed by Serhiy Storchaka " -"in :issue:`28894`.)" +"``__complex__()`` consistent with :meth:`object.__int__` and :meth:`object." +"__float__`. (Contributed by Serhiy Storchaka in :issue:`28894`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1951 +#: ../../whatsnew/3.7.rst:1955 msgid "Deprecated Python modules, functions and methods" -msgstr "" +msgstr "已棄用的 Python 模組、函式和方法" -#: ../../whatsnew/3.7.rst:1954 +#: ../../whatsnew/3.7.rst:1958 msgid "aifc" msgstr "aifc" -#: ../../whatsnew/3.7.rst:1956 +#: ../../whatsnew/3.7.rst:1960 msgid "" ":func:`!aifc.openfp` has been deprecated and will be removed in Python 3.9. " -"Use :func:`!aifc.open` instead. (Contributed by Brian Curtin " -"in :issue:`31985`.)" +"Use :func:`!aifc.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1966 +#: ../../whatsnew/3.7.rst:1970 msgid "" "Support for directly ``await``-ing instances of :class:`asyncio.Lock` and " "other asyncio synchronization primitives has been deprecated. An " "asynchronous context manager must be used in order to acquire and release " -"the synchronization resource. (Contributed by Andrew Svetlov " -"in :issue:`32253`.)" +"the synchronization resource. (Contributed by Andrew Svetlov in :issue:" +"`32253`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1972 +#: ../../whatsnew/3.7.rst:1976 msgid "" "The :meth:`!asyncio.Task.current_task` and :meth:`!asyncio.Task.all_tasks` " -"methods have been deprecated. (Contributed by Andrew Svetlov " -"in :issue:`32250`.)" +"methods have been deprecated. (Contributed by Andrew Svetlov in :issue:" +"`32250`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1980 +#: ../../whatsnew/3.7.rst:1984 msgid "" "In Python 3.8, the abstract base classes in :mod:`collections.abc` will no " "longer be exposed in the regular :mod:`collections` module. This will help " @@ -2896,7 +2868,7 @@ msgid "" "base classes. (Contributed by Serhiy Storchaka in :issue:`25988`.)" msgstr "" -#: ../../whatsnew/3.7.rst:1990 +#: ../../whatsnew/3.7.rst:1994 msgid "" ":mod:`dbm.dumb` now supports reading read-only files and no longer writes " "the index file when it is not changed. A deprecation warning is now emitted " @@ -2905,152 +2877,149 @@ msgid "" "Storchaka in :issue:`28847`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2000 +#: ../../whatsnew/3.7.rst:2004 msgid "" -"In Python 3.8, attempting to check for non-Enum objects in :class:`Enum` " -"classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); similarly, " -"attempting to check for non-Flag objects in a :class:`Flag` member will " -"raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both operations " -"return :const:`False` instead. (Contributed by Ethan Furman " -"in :issue:`33217`.)" +"In Python 3.8, attempting to check for non-Enum objects in :class:`~enum." +"Enum` classes will raise a :exc:`TypeError` (e.g. ``1 in Color``); " +"similarly, attempting to check for non-Flag objects in a :class:`~enum.Flag` " +"member will raise :exc:`TypeError` (e.g. ``1 in Perm.RW``); currently, both " +"operations return :const:`False` instead. (Contributed by Ethan Furman in :" +"issue:`33217`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2009 +#: ../../whatsnew/3.7.rst:2013 msgid "gettext" msgstr "gettext" -#: ../../whatsnew/3.7.rst:2011 +#: ../../whatsnew/3.7.rst:2015 msgid "" "Using non-integer value for selecting a plural form in :mod:`gettext` is now " -"deprecated. It never correctly worked. (Contributed by Serhiy Storchaka " -"in :issue:`28692`.)" +"deprecated. It never correctly worked. (Contributed by Serhiy Storchaka in :" +"issue:`28692`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2019 +#: ../../whatsnew/3.7.rst:2023 msgid "" -"Methods :meth:`!MetaPathFinder.find_module` (replaced " -"by :meth:`MetaPathFinder.find_spec() " -"`) and :meth:`!" -"PathEntryFinder.find_loader` (replaced by :meth:`PathEntryFinder.find_spec() " -"`) both deprecated in Python 3.4 " -"now emit :exc:`DeprecationWarning`. (Contributed by Matthias Bussonnier " -"in :issue:`29576`.)" +"Methods :meth:`!MetaPathFinder.find_module` (replaced by :meth:" +"`MetaPathFinder.find_spec() `) and :" +"meth:`!PathEntryFinder.find_loader` (replaced by :meth:`PathEntryFinder." +"find_spec() `) both deprecated in " +"Python 3.4 now emit :exc:`DeprecationWarning`. (Contributed by Matthias " +"Bussonnier in :issue:`29576`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2030 +#: ../../whatsnew/3.7.rst:2034 msgid "" "The :class:`importlib.abc.ResourceLoader` ABC has been deprecated in favour " "of :class:`importlib.abc.ResourceReader`." msgstr "" -#: ../../whatsnew/3.7.rst:2037 +#: ../../whatsnew/3.7.rst:2041 msgid "" -":func:`locale.format` has been deprecated, use :meth:`locale.format_string` " +":func:`!locale.format` has been deprecated, use :meth:`locale.format_string` " "instead. (Contributed by Garvit in :issue:`10379`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2042 +#: ../../whatsnew/3.7.rst:2046 msgid "macpath" msgstr "macpath" -#: ../../whatsnew/3.7.rst:2044 +#: ../../whatsnew/3.7.rst:2048 msgid "" -"The :mod:`macpath` is now deprecated and will be removed in Python 3.8. " +"The :mod:`!macpath` is now deprecated and will be removed in Python 3.8. " "(Contributed by Chi Hsuan Yen in :issue:`9850`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2049 +#: ../../whatsnew/3.7.rst:2053 msgid "threading" msgstr "threading" -#: ../../whatsnew/3.7.rst:2051 +#: ../../whatsnew/3.7.rst:2055 msgid "" ":mod:`!dummy_threading` and :mod:`!_dummy_thread` have been deprecated. It " -"is no longer possible to build Python with threading disabled. " -"Use :mod:`threading` instead. (Contributed by Antoine Pitrou " -"in :issue:`31370`.)" +"is no longer possible to build Python with threading disabled. Use :mod:" +"`threading` instead. (Contributed by Antoine Pitrou in :issue:`31370`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2060 +#: ../../whatsnew/3.7.rst:2064 msgid "" -"The silent argument value truncation in :func:`socket.htons` " -"and :func:`socket.ntohs` has been deprecated. In future versions of Python, " -"if the passed argument is larger than 16 bits, an exception will be raised. " +"The silent argument value truncation in :func:`socket.htons` and :func:" +"`socket.ntohs` has been deprecated. In future versions of Python, if the " +"passed argument is larger than 16 bits, an exception will be raised. " "(Contributed by Oren Milman in :issue:`28332`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2069 +#: ../../whatsnew/3.7.rst:2073 msgid "" -":func:`ssl.wrap_socket` is deprecated. " -"Use :meth:`ssl.SSLContext.wrap_socket` instead. (Contributed by Christian " -"Heimes in :issue:`28124`.)" +":func:`!ssl.wrap_socket` is deprecated. Use :meth:`ssl.SSLContext." +"wrap_socket` instead. (Contributed by Christian Heimes in :issue:`28124`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2075 +#: ../../whatsnew/3.7.rst:2079 msgid "sunau" msgstr "sunau" -#: ../../whatsnew/3.7.rst:2077 +#: ../../whatsnew/3.7.rst:2081 msgid "" ":func:`!sunau.openfp` has been deprecated and will be removed in Python 3.9. " -"Use :func:`!sunau.open` instead. (Contributed by Brian Curtin " -"in :issue:`31985`.)" +"Use :func:`!sunau.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2085 +#: ../../whatsnew/3.7.rst:2089 msgid "" -"Deprecated :func:`sys.set_coroutine_wrapper` " -"and :func:`sys.get_coroutine_wrapper`." +"Deprecated :func:`!sys.set_coroutine_wrapper` and :func:`!sys." +"get_coroutine_wrapper`." msgstr "" -#: ../../whatsnew/3.7.rst:2088 +#: ../../whatsnew/3.7.rst:2092 msgid "" "The undocumented ``sys.callstats()`` function has been deprecated and will " -"be removed in a future Python version. (Contributed by Victor Stinner " -"in :issue:`28799`.)" +"be removed in a future Python version. (Contributed by Victor Stinner in :" +"issue:`28799`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2094 +#: ../../whatsnew/3.7.rst:2098 msgid "wave" msgstr "wave" -#: ../../whatsnew/3.7.rst:2096 +#: ../../whatsnew/3.7.rst:2100 msgid "" -":func:`wave.openfp` has been deprecated and will be removed in Python 3.9. " -"Use :func:`wave.open` instead. (Contributed by Brian Curtin " -"in :issue:`31985`.)" +":func:`!wave.openfp` has been deprecated and will be removed in Python 3.9. " +"Use :func:`wave.open` instead. (Contributed by Brian Curtin in :issue:" +"`31985`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2102 +#: ../../whatsnew/3.7.rst:2106 msgid "Deprecated functions and types of the C API" msgstr "" -#: ../../whatsnew/3.7.rst:2104 +#: ../../whatsnew/3.7.rst:2108 msgid "" "Function :c:func:`PySlice_GetIndicesEx` is deprecated and replaced with a " "macro if ``Py_LIMITED_API`` is not set or set to a value in the range " "between ``0x03050400`` and ``0x03060000`` (not inclusive), or is " -"``0x03060100`` or higher. (Contributed by Serhiy Storchaka " -"in :issue:`27867`.)" +"``0x03060100`` or higher. (Contributed by Serhiy Storchaka in :issue:" +"`27867`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2109 +#: ../../whatsnew/3.7.rst:2113 msgid "" -":c:func:`PyOS_AfterFork` has been deprecated. " -"Use :c:func:`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` " -"or :c:func:`PyOS_AfterFork_Child()` instead. (Contributed by Antoine Pitrou " -"in :issue:`16500`.)" +":c:func:`PyOS_AfterFork` has been deprecated. Use :c:func:" +"`PyOS_BeforeFork`, :c:func:`PyOS_AfterFork_Parent` or :c:func:" +"`PyOS_AfterFork_Child()` instead. (Contributed by Antoine Pitrou in :issue:" +"`16500`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2117 +#: ../../whatsnew/3.7.rst:2121 msgid "Platform Support Removals" msgstr "" -#: ../../whatsnew/3.7.rst:2119 +#: ../../whatsnew/3.7.rst:2123 msgid "FreeBSD 9 and older are no longer officially supported." msgstr "" -#: ../../whatsnew/3.7.rst:2120 +#: ../../whatsnew/3.7.rst:2124 msgid "" "For full Unicode support, including within extension modules, \\*nix " "platforms are now expected to provide at least one of ``C.UTF-8`` (full " @@ -3058,7 +3027,7 @@ msgid "" "an alternative to the legacy ``ASCII``-based ``C`` locale." msgstr "" -#: ../../whatsnew/3.7.rst:2124 +#: ../../whatsnew/3.7.rst:2128 msgid "" "OpenSSL 0.9.8 and 1.0.1 are no longer supported, which means building " "CPython 3.7 with SSL/TLS support on older platforms still using these " @@ -3066,14 +3035,14 @@ msgid "" "OpenSSL." msgstr "" -#: ../../whatsnew/3.7.rst:2128 +#: ../../whatsnew/3.7.rst:2132 msgid "" "Notably, this issue affects the Debian 8 (aka \"jessie\") and Ubuntu 14.04 " "(aka \"Trusty\") LTS Linux distributions, as they still use OpenSSL 1.0.1 by " "default." msgstr "" -#: ../../whatsnew/3.7.rst:2132 +#: ../../whatsnew/3.7.rst:2136 msgid "" "Debian 9 (\"stretch\") and Ubuntu 16.04 (\"xenial\"), as well as recent " "releases of other LTS Linux releases (e.g. RHEL/CentOS 7.5, SLES 12-SP3), " @@ -3081,50 +3050,50 @@ msgid "" "configuration." msgstr "" -#: ../../whatsnew/3.7.rst:2136 +#: ../../whatsnew/3.7.rst:2140 msgid "" "CPython's own `CI configuration file `_ provides an example of using the " -"SSL :source:`compatibility testing infrastructure ` in CPython's test suite to build and link against OpenSSL " -"1.1.0 rather than an outdated system provided OpenSSL." +"v3.7.13/.travis.yml>`_ provides an example of using the SSL :source:" +"`compatibility testing infrastructure ` in " +"CPython's test suite to build and link against OpenSSL 1.1.0 rather than an " +"outdated system provided OpenSSL." msgstr "" -#: ../../whatsnew/3.7.rst:2145 +#: ../../whatsnew/3.7.rst:2149 msgid "API and Feature Removals" msgstr "API 與功能的移除" -#: ../../whatsnew/3.7.rst:2147 +#: ../../whatsnew/3.7.rst:2151 msgid "The following features and APIs have been removed from Python 3.7:" msgstr "" -#: ../../whatsnew/3.7.rst:2149 +#: ../../whatsnew/3.7.rst:2153 msgid "" "The ``os.stat_float_times()`` function has been removed. It was introduced " "in Python 2.3 for backward compatibility with Python 2.2, and was deprecated " "since Python 3.1." msgstr "" -#: ../../whatsnew/3.7.rst:2153 +#: ../../whatsnew/3.7.rst:2157 msgid "" "Unknown escapes consisting of ``'\\'`` and an ASCII letter in replacement " "templates for :func:`re.sub` were deprecated in Python 3.5, and will now " "cause an error." msgstr "" -#: ../../whatsnew/3.7.rst:2157 +#: ../../whatsnew/3.7.rst:2161 msgid "" "Removed support of the *exclude* argument in :meth:`tarfile.TarFile.add`. It " "was deprecated in Python 2.7 and 3.2. Use the *filter* argument instead." msgstr "" -#: ../../whatsnew/3.7.rst:2160 +#: ../../whatsnew/3.7.rst:2164 msgid "" "The :func:`!ntpath.splitunc` function was deprecated in Python 3.1, and has " "now been removed. Use :func:`~os.path.splitdrive` instead." msgstr "" -#: ../../whatsnew/3.7.rst:2164 +#: ../../whatsnew/3.7.rst:2168 msgid "" ":func:`collections.namedtuple` no longer supports the *verbose* parameter or " "``_source`` attribute which showed the generated source code for the named " @@ -3133,23 +3102,23 @@ msgid "" "Naoki, Serhiy Storchaka, and Raymond Hettinger in :issue:`28638`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2170 +#: ../../whatsnew/3.7.rst:2174 msgid "" "Functions :func:`bool`, :func:`float`, :func:`list` and :func:`tuple` no " "longer take keyword arguments. The first argument of :func:`int` can now be " "passed only as positional argument." msgstr "" -#: ../../whatsnew/3.7.rst:2174 +#: ../../whatsnew/3.7.rst:2178 msgid "" "Removed previously deprecated in Python 2.4 classes ``Plist``, ``Dict`` and " "``_InternalDict`` in the :mod:`plistlib` module. Dict values in the result " -"of functions :func:`~plistlib.readPlist` " -"and :func:`~plistlib.readPlistFromBytes` are now normal dicts. You no " -"longer can use attribute access to access items of these dictionaries." +"of functions :func:`!readPlist` and :func:`!readPlistFromBytes` are now " +"normal dicts. You no longer can use attribute access to access items of " +"these dictionaries." msgstr "" -#: ../../whatsnew/3.7.rst:2180 +#: ../../whatsnew/3.7.rst:2184 msgid "" "The ``asyncio.windows_utils.socketpair()`` function has been removed. Use " "the :func:`socket.socketpair` function instead, it is available on all " @@ -3157,33 +3126,33 @@ msgid "" "alias to ``socket.socketpair`` on Python 3.5 and newer." msgstr "" -#: ../../whatsnew/3.7.rst:2186 +#: ../../whatsnew/3.7.rst:2190 msgid "" ":mod:`asyncio` no longer exports the :mod:`selectors` and :mod:`!" "_overlapped` modules as ``asyncio.selectors`` and ``asyncio._overlapped``. " "Replace ``from asyncio import selectors`` with ``import selectors``." msgstr "" -#: ../../whatsnew/3.7.rst:2191 +#: ../../whatsnew/3.7.rst:2195 msgid "" "Direct instantiation of :class:`ssl.SSLSocket` and :class:`ssl.SSLObject` " "objects is now prohibited. The constructors were never documented, tested, " -"or designed as public constructors. Users were supposed to " -"use :func:`ssl.wrap_socket` or :class:`ssl.SSLContext`. (Contributed by " -"Christian Heimes in :issue:`32951`.)" +"or designed as public constructors. Users were supposed to use :func:`!ssl." +"wrap_socket` or :class:`ssl.SSLContext`. (Contributed by Christian Heimes " +"in :issue:`32951`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2197 +#: ../../whatsnew/3.7.rst:2201 msgid "" "The unused ``distutils`` ``install_misc`` command has been removed. " "(Contributed by Eric N. Vander Weele in :issue:`29218`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2202 +#: ../../whatsnew/3.7.rst:2206 msgid "Module Removals" msgstr "" -#: ../../whatsnew/3.7.rst:2204 +#: ../../whatsnew/3.7.rst:2208 msgid "" "The ``fpectl`` module has been removed. It was never enabled by default, " "never worked correctly on x86-64, and it changed the Python ABI in ways that " @@ -3191,11 +3160,11 @@ msgid "" "Smith in :issue:`29137`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2211 ../../whatsnew/3.7.rst:2487 +#: ../../whatsnew/3.7.rst:2215 ../../whatsnew/3.7.rst:2494 msgid "Windows-only Changes" msgstr "" -#: ../../whatsnew/3.7.rst:2213 +#: ../../whatsnew/3.7.rst:2217 msgid "" "The python launcher, (py.exe), can accept 32 & 64 bit specifiers **without** " "having to specify a minor version as well. So ``py -3-32`` and ``py -3-64`` " @@ -3205,7 +3174,7 @@ msgid "" "(Contributed by Steve Barnes in :issue:`30291`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2220 +#: ../../whatsnew/3.7.rst:2224 msgid "" "The launcher can be run as ``py -0`` to produce a list of the installed " "pythons, *with default marked with an asterisk*. Running ``py -0p`` will " @@ -3214,48 +3183,48 @@ msgid "" "(Contributed by Steve Barnes in :issue:`30362`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2230 +#: ../../whatsnew/3.7.rst:2234 msgid "Porting to Python 3.7" msgstr "移植至 Python 3.7" -#: ../../whatsnew/3.7.rst:2232 +#: ../../whatsnew/3.7.rst:2236 msgid "" "This section lists previously described changes and other bugfixes that may " "require changes to your code." msgstr "" -#: ../../whatsnew/3.7.rst:2237 +#: ../../whatsnew/3.7.rst:2241 msgid "Changes in Python Behavior" msgstr "Python 行為的改變" -#: ../../whatsnew/3.7.rst:2239 +#: ../../whatsnew/3.7.rst:2243 msgid "" ":keyword:`async` and :keyword:`await` names are now reserved keywords. Code " "using these names as identifiers will now raise a :exc:`SyntaxError`. " "(Contributed by Jelle Zijlstra in :issue:`30406`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2243 +#: ../../whatsnew/3.7.rst:2247 msgid "" -":pep:`479` is enabled for all code in Python 3.7, meaning " -"that :exc:`StopIteration` exceptions raised directly or indirectly in " -"coroutines and generators are transformed into :exc:`RuntimeError` " -"exceptions. (Contributed by Yury Selivanov in :issue:`32670`.)" +":pep:`479` is enabled for all code in Python 3.7, meaning that :exc:" +"`StopIteration` exceptions raised directly or indirectly in coroutines and " +"generators are transformed into :exc:`RuntimeError` exceptions. (Contributed " +"by Yury Selivanov in :issue:`32670`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2249 +#: ../../whatsnew/3.7.rst:2253 msgid "" ":meth:`object.__aiter__` methods can no longer be declared as asynchronous. " "(Contributed by Yury Selivanov in :issue:`31709`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2252 +#: ../../whatsnew/3.7.rst:2256 msgid "" "Due to an oversight, earlier Python versions erroneously accepted the " "following syntax::" msgstr "" -#: ../../whatsnew/3.7.rst:2255 +#: ../../whatsnew/3.7.rst:2259 msgid "" "f(1 for x in [1],)\n" "\n" @@ -3267,16 +3236,16 @@ msgstr "" "class C(1 for x in [1]):\n" " pass" -#: ../../whatsnew/3.7.rst:2260 +#: ../../whatsnew/3.7.rst:2264 msgid "" "Python 3.7 now correctly raises a :exc:`SyntaxError`, as a generator " "expression always needs to be directly inside a set of parentheses and " "cannot have a comma on either side, and the duplication of the parentheses " -"can be omitted only on calls. (Contributed by Serhiy Storchaka " -"in :issue:`32012` and :issue:`32023`.)" +"can be omitted only on calls. (Contributed by Serhiy Storchaka in :issue:" +"`32012` and :issue:`32023`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2266 +#: ../../whatsnew/3.7.rst:2270 msgid "" "When using the :option:`-m` switch, the initial working directory is now " "added to :data:`sys.path`, rather than an empty string (which dynamically " @@ -3288,60 +3257,60 @@ msgid "" "place)." msgstr "" -#: ../../whatsnew/3.7.rst:2276 +#: ../../whatsnew/3.7.rst:2280 msgid "Changes in the Python API" msgstr "Python API 的變更" -#: ../../whatsnew/3.7.rst:2278 +#: ../../whatsnew/3.7.rst:2282 msgid "" -":meth:`socketserver.ThreadingMixIn.server_close` now waits until all non-" -"daemon threads complete. Set the " +":meth:`socketserver.ThreadingMixIn.server_close ` now waits until all non-daemon threads complete. Set the " "new :attr:`socketserver.ThreadingMixIn.block_on_close` class attribute to " -"``False`` to get the pre-3.7 behaviour. (Contributed by Victor Stinner " -"in :issue:`31233` and :issue:`33540`.)" +"``False`` to get the pre-3.7 behaviour. (Contributed by Victor Stinner in :" +"issue:`31233` and :issue:`33540`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2284 +#: ../../whatsnew/3.7.rst:2289 msgid "" -":meth:`socketserver.ForkingMixIn.server_close` now waits until all child " -"processes complete. Set the " -"new :attr:`socketserver.ForkingMixIn.block_on_close` class attribute to " -"``False`` to get the pre-3.7 behaviour. (Contributed by Victor Stinner " -"in :issue:`31151` and :issue:`33540`.)" +":meth:`socketserver.ForkingMixIn.server_close ` now waits until all child processes complete. Set the new :" +"attr:`socketserver.ForkingMixIn.block_on_close ` class attribute to ``False`` to get the pre-3.7 behaviour. " +"(Contributed by Victor Stinner in :issue:`31151` and :issue:`33540`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2290 +#: ../../whatsnew/3.7.rst:2297 msgid "" "The :func:`locale.localeconv` function now temporarily sets the ``LC_CTYPE`` " "locale to the value of ``LC_NUMERIC`` in some cases. (Contributed by Victor " "Stinner in :issue:`31900`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2294 +#: ../../whatsnew/3.7.rst:2301 msgid "" ":meth:`pkgutil.walk_packages` now raises a :exc:`ValueError` if *path* is a " "string. Previously an empty list was returned. (Contributed by Sanyam " "Khurana in :issue:`24744`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2298 +#: ../../whatsnew/3.7.rst:2305 msgid "" -"A format string argument for :meth:`string.Formatter.format` is " -"now :ref:`positional-only `. Passing it as a " -"keyword argument was deprecated in Python 3.5. (Contributed by Serhiy " -"Storchaka in :issue:`29193`.)" +"A format string argument for :meth:`string.Formatter.format` is now :ref:" +"`positional-only `. Passing it as a keyword " +"argument was deprecated in Python 3.5. (Contributed by Serhiy Storchaka in :" +"issue:`29193`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2303 +#: ../../whatsnew/3.7.rst:2310 msgid "" -"Attributes :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel.value` " -"and :attr:`~http.cookies.Morsel.coded_value` of " -"class :class:`http.cookies.Morsel` are now read-only. Assigning to them was " -"deprecated in Python 3.5. Use the :meth:`~http.cookies.Morsel.set` method " -"for setting them. (Contributed by Serhiy Storchaka in :issue:`29192`.)" +"Attributes :attr:`~http.cookies.Morsel.key`, :attr:`~http.cookies.Morsel." +"value` and :attr:`~http.cookies.Morsel.coded_value` of class :class:`http." +"cookies.Morsel` are now read-only. Assigning to them was deprecated in " +"Python 3.5. Use the :meth:`~http.cookies.Morsel.set` method for setting " +"them. (Contributed by Serhiy Storchaka in :issue:`29192`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2311 +#: ../../whatsnew/3.7.rst:2318 msgid "" "The *mode* argument of :func:`os.makedirs` no longer affects the file " "permission bits of newly created intermediate-level directories. To set " @@ -3349,13 +3318,13 @@ msgid "" "``makedirs()``. (Contributed by Serhiy Storchaka in :issue:`19930`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2317 +#: ../../whatsnew/3.7.rst:2324 msgid "" -"The :attr:`struct.Struct.format` type is now :class:`str` instead " -"of :class:`bytes`. (Contributed by Victor Stinner in :issue:`21071`.)" +"The :attr:`struct.Struct.format` type is now :class:`str` instead of :class:" +"`bytes`. (Contributed by Victor Stinner in :issue:`21071`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2320 +#: ../../whatsnew/3.7.rst:2327 msgid "" ":func:`!cgi.parse_multipart` now accepts the *encoding* and *errors* " "arguments and returns the same results as :class:`!FieldStorage`: for non-" @@ -3363,35 +3332,35 @@ msgid "" "(Contributed by Pierre Quentel in :issue:`29979`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2326 +#: ../../whatsnew/3.7.rst:2333 msgid "" "Due to internal changes in :mod:`socket`, calling :func:`socket.fromshare` " "on a socket created by :func:`socket.share ` in older " "Python versions is not supported." msgstr "" -#: ../../whatsnew/3.7.rst:2330 +#: ../../whatsnew/3.7.rst:2337 msgid "" "``repr`` for :exc:`BaseException` has changed to not include the trailing " "comma. Most exceptions are affected by this change. (Contributed by Serhiy " "Storchaka in :issue:`30399`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2334 +#: ../../whatsnew/3.7.rst:2341 msgid "" "``repr`` for :class:`datetime.timedelta` has changed to include the keyword " "arguments in the output. (Contributed by Utkarsh Upadhyay in :issue:`30302`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2337 +#: ../../whatsnew/3.7.rst:2344 msgid "" -"Because :func:`shutil.rmtree` is now implemented using " -"the :func:`os.scandir` function, the user specified handler *onerror* is now " -"called with the first argument ``os.scandir`` instead of ``os.listdir`` when " -"listing the directory is failed." +"Because :func:`shutil.rmtree` is now implemented using the :func:`os." +"scandir` function, the user specified handler *onerror* is now called with " +"the first argument ``os.scandir`` instead of ``os.listdir`` when listing the " +"directory is failed." msgstr "" -#: ../../whatsnew/3.7.rst:2342 +#: ../../whatsnew/3.7.rst:2349 msgid "" "Support for nested sets and set operations in regular expressions as in " "`Unicode Technical Standard #18`_ might be added in the future. This would " @@ -3402,7 +3371,7 @@ msgid "" "with a backslash. (Contributed by Serhiy Storchaka in :issue:`30349`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2353 +#: ../../whatsnew/3.7.rst:2360 msgid "" "The result of splitting a string on a :mod:`regular expression ` that " "could match an empty string has been changed. For example splitting on " @@ -3413,7 +3382,7 @@ msgid "" "patterns since Python 3.5." msgstr "" -#: ../../whatsnew/3.7.rst:2362 +#: ../../whatsnew/3.7.rst:2369 msgid "" "For patterns that match both empty and non-empty strings, the result of " "searching for all matches may also be changed in other cases. For example " @@ -3423,7 +3392,7 @@ msgid "" "as ``r'(?m)^[^\\S\\n]*$'``." msgstr "" -#: ../../whatsnew/3.7.rst:2369 +#: ../../whatsnew/3.7.rst:2376 msgid "" ":func:`re.sub` now replaces empty matches adjacent to a previous non-empty " "match. For example ``re.sub('x*', '-', 'abxd')`` returns now ``'-a-b--d-'`` " @@ -3431,95 +3400,92 @@ msgid "" "and the second minus replaces an empty string between 'x' and 'd')." msgstr "" -#: ../../whatsnew/3.7.rst:2375 +#: ../../whatsnew/3.7.rst:2382 msgid "(Contributed by Serhiy Storchaka in :issue:`25054` and :issue:`32308`.)" msgstr "(由 Serhiy Storchaka 在 :issue:`25054` 和 :issue:`32308` 中貢獻。)" -#: ../../whatsnew/3.7.rst:2377 +#: ../../whatsnew/3.7.rst:2384 msgid "" "Change :func:`re.escape` to only escape regex special characters instead of " "escaping all characters other than ASCII letters, numbers, and ``'_'``. " "(Contributed by Serhiy Storchaka in :issue:`29995`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2381 +#: ../../whatsnew/3.7.rst:2388 msgid "" ":class:`tracemalloc.Traceback` frames are now sorted from oldest to most " "recent to be more consistent with :mod:`traceback`. (Contributed by Jesse " "Bakker in :issue:`32121`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2385 +#: ../../whatsnew/3.7.rst:2392 msgid "" -"On OSes that support :const:`socket.SOCK_NONBLOCK` " -"or :const:`socket.SOCK_CLOEXEC` bit flags, the :attr:`socket.type " -"` no longer has them applied. Therefore, checks like " -"``if sock.type == socket.SOCK_STREAM`` work as expected on all platforms. " -"(Contributed by Yury Selivanov in :issue:`32331`.)" +"On OSes that support :const:`socket.SOCK_NONBLOCK` or :const:`socket." +"SOCK_CLOEXEC` bit flags, the :attr:`socket.type ` no " +"longer has them applied. Therefore, checks like ``if sock.type == socket." +"SOCK_STREAM`` work as expected on all platforms. (Contributed by Yury " +"Selivanov in :issue:`32331`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2392 +#: ../../whatsnew/3.7.rst:2399 msgid "" -"On Windows the default for the *close_fds* argument " -"of :class:`subprocess.Popen` was changed from :const:`False` " -"to :const:`True` when redirecting the standard handles. If you previously " -"depended on handles being inherited when using :class:`subprocess.Popen` " -"with standard io redirection, you will have to pass ``close_fds=False`` to " -"preserve the previous behaviour, or use :attr:`STARTUPINFO.lpAttributeList " -"`." +"On Windows the default for the *close_fds* argument of :class:`subprocess." +"Popen` was changed from :const:`False` to :const:`True` when redirecting the " +"standard handles. If you previously depended on handles being inherited when " +"using :class:`subprocess.Popen` with standard io redirection, you will have " +"to pass ``close_fds=False`` to preserve the previous behaviour, or use :attr:" +"`STARTUPINFO.lpAttributeList `." msgstr "" -#: ../../whatsnew/3.7.rst:2400 +#: ../../whatsnew/3.7.rst:2407 msgid "" ":meth:`importlib.machinery.PathFinder.invalidate_caches` -- which implicitly " -"affects :func:`importlib.invalidate_caches` -- now deletes entries " -"in :data:`sys.path_importer_cache` which are set to ``None``. (Contributed " -"by Brett Cannon in :issue:`33169`.)" +"affects :func:`importlib.invalidate_caches` -- now deletes entries in :data:" +"`sys.path_importer_cache` which are set to ``None``. (Contributed by Brett " +"Cannon in :issue:`33169`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2405 +#: ../../whatsnew/3.7.rst:2412 msgid "" -"In :mod:`asyncio`, :meth:`loop.sock_recv() " -"`, :meth:`loop.sock_sendall() " -"`, :meth:`loop.sock_accept() " -"`, :meth:`loop.getaddrinfo() " -"`, :meth:`loop.getnameinfo() " -"` have been changed to be proper coroutine methods " -"to match their documentation. Previously, these methods " -"returned :class:`asyncio.Future` instances. (Contributed by Yury Selivanov " -"in :issue:`32327`.)" +"In :mod:`asyncio`, :meth:`loop.sock_recv() `, :meth:" +"`loop.sock_sendall() `, :meth:`loop.sock_accept() " +"`, :meth:`loop.getaddrinfo() `, :meth:`loop.getnameinfo() ` have " +"been changed to be proper coroutine methods to match their documentation. " +"Previously, these methods returned :class:`asyncio.Future` instances. " +"(Contributed by Yury Selivanov in :issue:`32327`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2416 +#: ../../whatsnew/3.7.rst:2423 msgid "" ":attr:`asyncio.Server.sockets` now returns a copy of the internal list of " "server sockets, instead of returning it directly. (Contributed by Yury " "Selivanov in :issue:`32662`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2420 +#: ../../whatsnew/3.7.rst:2427 msgid "" ":attr:`Struct.format ` is now a :class:`str` instance " -"instead of a :class:`bytes` instance. (Contributed by Victor Stinner " -"in :issue:`21071`.)" +"instead of a :class:`bytes` instance. (Contributed by Victor Stinner in :" +"issue:`21071`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2424 +#: ../../whatsnew/3.7.rst:2431 msgid "" ":mod:`argparse` subparsers can now be made mandatory by passing " -"``required=True`` to :meth:`ArgumentParser.add_subparsers() " -"`. (Contributed by Anthony Sottile " -"in :issue:`26510`.)" +"``required=True`` to :meth:`ArgumentParser.add_subparsers() `. (Contributed by Anthony Sottile in :issue:" +"`26510`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2428 +#: ../../whatsnew/3.7.rst:2435 msgid "" ":meth:`ast.literal_eval` is now stricter. Addition and subtraction of " "arbitrary numbers are no longer allowed. (Contributed by Serhiy Storchaka " "in :issue:`31778`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2432 +#: ../../whatsnew/3.7.rst:2439 msgid "" ":meth:`Calendar.itermonthdates ` will now " "consistently raise an exception when a date falls outside of the " @@ -3527,26 +3493,25 @@ msgid "" "cannot tolerate such exceptions, the new :meth:`Calendar.itermonthdays3 " "` and :meth:`Calendar.itermonthdays4 " "` can be used. The new methods return " -"tuples and are not restricted by the range supported " -"by :class:`datetime.date`. (Contributed by Alexander Belopolsky " -"in :issue:`28292`.)" +"tuples and are not restricted by the range supported by :class:`datetime." +"date`. (Contributed by Alexander Belopolsky in :issue:`28292`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2442 +#: ../../whatsnew/3.7.rst:2449 msgid "" ":class:`collections.ChainMap` now preserves the order of the underlying " "mappings. (Contributed by Raymond Hettinger in :issue:`32792`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2445 +#: ../../whatsnew/3.7.rst:2452 msgid "" "The ``submit()`` method of :class:`concurrent.futures.ThreadPoolExecutor` " -"and :class:`concurrent.futures.ProcessPoolExecutor` now raises " -"a :exc:`RuntimeError` if called during interpreter shutdown. (Contributed by " -"Mark Nemec in :issue:`33097`.)" +"and :class:`concurrent.futures.ProcessPoolExecutor` now raises a :exc:" +"`RuntimeError` if called during interpreter shutdown. (Contributed by Mark " +"Nemec in :issue:`33097`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2450 +#: ../../whatsnew/3.7.rst:2457 msgid "" "The :class:`configparser.ConfigParser` constructor now uses ``read_dict()`` " "to process the default values, making its behavior consistent with the rest " @@ -3555,59 +3520,59 @@ msgid "" "in :issue:`23835`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2456 +#: ../../whatsnew/3.7.rst:2463 msgid "" -"Several undocumented internal imports were removed. One example is that " -"``os.errno`` is no longer available; use ``import errno`` directly instead. " -"Note that such undocumented internal imports may be removed any time without " +"Several undocumented internal imports were removed. One example is that ``os." +"errno`` is no longer available; use ``import errno`` directly instead. Note " +"that such undocumented internal imports may be removed any time without " "notice, even in micro version releases." msgstr "" -#: ../../whatsnew/3.7.rst:2464 +#: ../../whatsnew/3.7.rst:2471 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.7.rst:2466 +#: ../../whatsnew/3.7.rst:2473 msgid "" "The function :c:func:`PySlice_GetIndicesEx` is considered unsafe for " -"resizable sequences. If the slice indices are not instances " -"of :class:`int`, but objects that implement the :meth:`!__index__` method, " -"the sequence can be resized after passing its length to :c:func:`!" +"resizable sequences. If the slice indices are not instances of :class:" +"`int`, but objects that implement the :meth:`!__index__` method, the " +"sequence can be resized after passing its length to :c:func:`!" "PySlice_GetIndicesEx`. This can lead to returning indices out of the length " -"of the sequence. For avoiding possible problems use new " -"functions :c:func:`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`. " -"(Contributed by Serhiy Storchaka in :issue:`27867`.)" +"of the sequence. For avoiding possible problems use new functions :c:func:" +"`PySlice_Unpack` and :c:func:`PySlice_AdjustIndices`. (Contributed by Serhiy " +"Storchaka in :issue:`27867`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2477 +#: ../../whatsnew/3.7.rst:2484 msgid "CPython bytecode changes" msgstr "CPython 位元組碼變更" -#: ../../whatsnew/3.7.rst:2479 +#: ../../whatsnew/3.7.rst:2486 msgid "" "There are two new opcodes: :opcode:`LOAD_METHOD` and :opcode:`!CALL_METHOD`. " "(Contributed by Yury Selivanov and INADA Naoki in :issue:`26110`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2482 +#: ../../whatsnew/3.7.rst:2489 msgid "" "The :opcode:`!STORE_ANNOTATION` opcode has been removed. (Contributed by " "Mark Shannon in :issue:`32550`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2489 +#: ../../whatsnew/3.7.rst:2496 msgid "" "The file used to override :data:`sys.path` is now called ``._pth`` instead of ``'sys.path'``. " -"See :ref:`windows_finding_modules` for more information. (Contributed by " -"Steve Dower in :issue:`28137`.)" +"executable>._pth`` instead of ``'sys.path'``. See :ref:" +"`windows_finding_modules` for more information. (Contributed by Steve Dower " +"in :issue:`28137`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2496 +#: ../../whatsnew/3.7.rst:2503 msgid "Other CPython implementation changes" msgstr "" -#: ../../whatsnew/3.7.rst:2498 +#: ../../whatsnew/3.7.rst:2505 msgid "" "In preparation for potential future changes to the public CPython runtime " "initialization API (see :pep:`432` for an initial, but somewhat outdated, " @@ -3622,31 +3587,31 @@ msgid "" "Stinner in a number of other issues). Some known details affected:" msgstr "" -#: ../../whatsnew/3.7.rst:2511 +#: ../../whatsnew/3.7.rst:2518 msgid "" ":c:func:`!PySys_AddWarnOptionUnicode` is not currently usable by embedding " "applications due to the requirement to create a Unicode object prior to " "calling ``Py_Initialize``. Use :c:func:`!PySys_AddWarnOption` instead." msgstr "" -#: ../../whatsnew/3.7.rst:2515 +#: ../../whatsnew/3.7.rst:2522 msgid "" "warnings filters added by an embedding application with :c:func:`!" "PySys_AddWarnOption` should now more consistently take precedence over the " "default filters set by the interpreter" msgstr "" -#: ../../whatsnew/3.7.rst:2519 +#: ../../whatsnew/3.7.rst:2526 msgid "" "Due to changes in the way the default warnings filters are configured, " "setting :c:data:`Py_BytesWarningFlag` to a value greater than one is no " "longer sufficient to both emit :exc:`BytesWarning` messages and have them " "converted to exceptions. Instead, the flag must be set (to cause the " -"warnings to be emitted in the first place), and an explicit " -"``error::BytesWarning`` warnings filter added to convert them to exceptions." +"warnings to be emitted in the first place), and an explicit ``error::" +"BytesWarning`` warnings filter added to convert them to exceptions." msgstr "" -#: ../../whatsnew/3.7.rst:2526 +#: ../../whatsnew/3.7.rst:2533 msgid "" "Due to a change in the way docstrings are handled by the compiler, the " "implicit ``return None`` in a function body consisting solely of a docstring " @@ -3654,7 +3619,7 @@ msgid "" "function's header line." msgstr "" -#: ../../whatsnew/3.7.rst:2531 +#: ../../whatsnew/3.7.rst:2538 msgid "" "The current exception state has been moved from the frame object to the co-" "routine. This simplified the interpreter and fixed a couple of obscure bugs " @@ -3662,29 +3627,28 @@ msgid "" "(Contributed by Mark Shannon in :issue:`25612`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2537 +#: ../../whatsnew/3.7.rst:2544 msgid "Notable changes in Python 3.7.1" msgstr "Python 3.7.1 中顯著的變更" -#: ../../whatsnew/3.7.rst:2539 +#: ../../whatsnew/3.7.rst:2546 msgid "" "Starting in 3.7.1, :c:func:`Py_Initialize` now consistently reads and " "respects all of the same environment settings as :c:func:`Py_Main` (in " "earlier Python versions, it respected an ill-defined subset of those " "environment variables, while in Python 3.7.0 it didn't read any of them due " -"to :issue:`34247`). If this behavior is unwanted, " -"set :c:data:`Py_IgnoreEnvironmentFlag` to 1 before " -"calling :c:func:`Py_Initialize`." +"to :issue:`34247`). If this behavior is unwanted, set :c:data:" +"`Py_IgnoreEnvironmentFlag` to 1 before calling :c:func:`Py_Initialize`." msgstr "" -#: ../../whatsnew/3.7.rst:2546 +#: ../../whatsnew/3.7.rst:2553 msgid "" "In 3.7.1 the C API for Context Variables :ref:`was updated " "` to use :c:type:`PyObject` " "pointers. See also :issue:`34762`." msgstr "" -#: ../../whatsnew/3.7.rst:2550 +#: ../../whatsnew/3.7.rst:2557 msgid "" "In 3.7.1 the :mod:`tokenize` module now implicitly emits a ``NEWLINE`` token " "when provided with input that does not have a trailing new line. This " @@ -3692,11 +3656,11 @@ msgid "" "Ammar Askar in :issue:`33899`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2556 +#: ../../whatsnew/3.7.rst:2563 msgid "Notable changes in Python 3.7.2" msgstr "Python 3.7.2 中顯著的變更" -#: ../../whatsnew/3.7.rst:2558 +#: ../../whatsnew/3.7.rst:2565 msgid "" "In 3.7.2, :mod:`venv` on Windows no longer copies the original binaries, but " "creates redirector scripts named ``python.exe`` and ``pythonw.exe`` instead. " @@ -3706,42 +3670,41 @@ msgid "" "to get the new scripts." msgstr "" -#: ../../whatsnew/3.7.rst:2566 +#: ../../whatsnew/3.7.rst:2573 msgid "Notable changes in Python 3.7.6" msgstr "Python 3.7.6 中顯著的變更" -#: ../../whatsnew/3.7.rst:2568 +#: ../../whatsnew/3.7.rst:2575 msgid "" -"Due to significant security concerns, the *reuse_address* parameter " -"of :meth:`asyncio.loop.create_datagram_endpoint` is no longer supported. " -"This is because of the behavior of the socket option ``SO_REUSEADDR`` in " -"UDP. For more details, see the documentation for " -"``loop.create_datagram_endpoint()``. (Contributed by Kyle Stanley, Antoine " -"Pitrou, and Yury Selivanov in :issue:`37228`.)" +"Due to significant security concerns, the *reuse_address* parameter of :meth:" +"`asyncio.loop.create_datagram_endpoint` is no longer supported. This is " +"because of the behavior of the socket option ``SO_REUSEADDR`` in UDP. For " +"more details, see the documentation for ``loop.create_datagram_endpoint()``. " +"(Contributed by Kyle Stanley, Antoine Pitrou, and Yury Selivanov in :issue:" +"`37228`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2576 +#: ../../whatsnew/3.7.rst:2583 msgid "Notable changes in Python 3.7.10" msgstr "Python 3.7.10 中顯著的變更" -#: ../../whatsnew/3.7.rst:2578 +#: ../../whatsnew/3.7.rst:2585 msgid "" "Earlier Python versions allowed using both ``;`` and ``&`` as query " -"parameter separators in :func:`urllib.parse.parse_qs` " -"and :func:`urllib.parse.parse_qsl`. Due to security concerns, and to " -"conform with newer W3C recommendations, this has been changed to allow only " -"a single separator key, with ``&`` as the default. This change also " -"affects :func:`!cgi.parse` and :func:`!cgi.parse_multipart` as they use the " -"affected functions internally. For more details, please see their respective " -"documentation. (Contributed by Adam Goldschmidt, Senthil Kumaran and Ken Jin " -"in :issue:`42967`.)" +"parameter separators in :func:`urllib.parse.parse_qs` and :func:`urllib." +"parse.parse_qsl`. Due to security concerns, and to conform with newer W3C " +"recommendations, this has been changed to allow only a single separator key, " +"with ``&`` as the default. This change also affects :func:`!cgi.parse` and :" +"func:`!cgi.parse_multipart` as they use the affected functions internally. " +"For more details, please see their respective documentation. (Contributed by " +"Adam Goldschmidt, Senthil Kumaran and Ken Jin in :issue:`42967`.)" msgstr "" -#: ../../whatsnew/3.7.rst:2589 +#: ../../whatsnew/3.7.rst:2596 msgid "Notable changes in Python 3.7.11" msgstr "Python 3.7.11 中顯著的變更" -#: ../../whatsnew/3.7.rst:2591 +#: ../../whatsnew/3.7.rst:2598 msgid "" "A security fix alters the :class:`ftplib.FTP` behavior to not trust the IPv4 " "address sent from the remote server when setting up a passive data channel. " @@ -3750,21 +3713,21 @@ msgid "" "instance to ``True``. (See :gh:`87451`)" msgstr "" -#: ../../whatsnew/3.7.rst:2598 +#: ../../whatsnew/3.7.rst:2605 msgid "" "The presence of newline or tab characters in parts of a URL allows for some " "forms of attacks. Following the WHATWG specification that updates RFC 3986, " "ASCII newline ``\\n``, ``\\r`` and tab ``\\t`` characters are stripped from " "the URL by the parser :func:`urllib.parse` preventing such attacks. The " -"removal characters are controlled by a new module level variable " -"``urllib.parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" +"removal characters are controlled by a new module level variable ``urllib." +"parse._UNSAFE_URL_BYTES_TO_REMOVE``. (See :gh:`88048`)" msgstr "" -#: ../../whatsnew/3.7.rst:2606 +#: ../../whatsnew/3.7.rst:2613 msgid "Notable security feature in 3.7.14" msgstr "" -#: ../../whatsnew/3.7.rst:2608 +#: ../../whatsnew/3.7.rst:2615 msgid "" "Converting between :class:`int` and :class:`str` in bases other than 2 " "(binary), 4, 8 (octal), 16 (hexadecimal), or 32 such as base 10 (decimal) " diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index ede4a80061..5831741671 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -1,4 +1,4 @@ -# Copyright (C) 2001-2024, Python Software Foundation +# Copyright (C) 2001-2025, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-26 00:14+0000\n" +"POT-Creation-Date: 2025-09-04 00:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -32,8 +32,8 @@ msgstr "Raymond Hettinger" #: ../../whatsnew/3.8.rst:47 msgid "" "This article explains the new features in Python 3.8, compared to 3.7. " -"Python 3.8 was released on October 14, 2019. For full details, see " -"the :ref:`changelog `." +"Python 3.8 was released on October 14, 2019. For full details, see the :ref:" +"`changelog `." msgstr "" "本文介紹了 Python 3.8 與 3.7 相比多了哪些新功能。Python 3.8 已於 2019 年 10 " "月 14 日發布。有關完整詳細資訊,請參閱 :ref:`changelog `。" @@ -54,9 +54,8 @@ msgstr "" msgid "" "There is new syntax ``:=`` that assigns values to variables as part of a " "larger expression. It is affectionately known as \"the walrus operator\" due " -"to its resemblance to `the eyes and tusks of a walrus `_." +"to its resemblance to `the eyes and tusks of a walrus `_." msgstr "" #: ../../whatsnew/3.8.rst:82 @@ -70,6 +69,8 @@ msgid "" "if (n := len(a)) > 10:\n" " print(f\"List is too long ({n} elements, expected <= 10)\")" msgstr "" +"if (n := len(a)) > 10:\n" +" print(f\"List is too long ({n} elements, expected <= 10)\")" #: ../../whatsnew/3.8.rst:88 msgid "" @@ -139,8 +140,8 @@ msgid "" "There is a new function parameter syntax ``/`` to indicate that some " "function parameters must be specified positionally and cannot be used as " "keyword arguments. This is the same notation shown by ``help()`` for C " -"functions annotated with Larry Hastings' `Argument Clinic `__ tool." +"functions annotated with Larry Hastings' `Argument Clinic `__ tool." msgstr "" #: ../../whatsnew/3.8.rst:128 @@ -175,6 +176,8 @@ msgid "" "f(10, b=20, c=30, d=40, e=50, f=60) # b cannot be a keyword argument\n" "f(10, 20, 30, 40, 50, f=60) # e must be a keyword argument" msgstr "" +"f(10, b=20, c=30, d=40, e=50, f=60) # b 不得為關鍵字引數\n" +"f(10, 20, 30, 40, 50, f=60) # e 必須為關鍵字引數" #: ../../whatsnew/3.8.rst:144 msgid "" @@ -273,9 +276,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:201 msgid "" -"The location of the cache is reported in :data:`sys.pycache_prefix` " -"(:const:`None` indicates the default location in ``__pycache__`` " -"subdirectories)." +"The location of the cache is reported in :data:`sys.pycache_prefix` (:const:" +"`None` indicates the default location in ``__pycache__`` subdirectories)." msgstr "" #: ../../whatsnew/3.8.rst:205 @@ -298,10 +300,10 @@ msgid "" "Release builds and :ref:`debug builds ` are now ABI compatible: " "defining the ``Py_DEBUG`` macro no longer implies the ``Py_TRACE_REFS`` " "macro, which introduces the only ABI incompatibility. The ``Py_TRACE_REFS`` " -"macro, which adds the :func:`sys.getobjects` function and " -"the :envvar:`PYTHONDUMPREFS` environment variable, can be set using the " -"new :option:`./configure --with-trace-refs <--with-trace-refs>` build " -"option. (Contributed by Victor Stinner in :issue:`36465`.)" +"macro, which adds the :func:`sys.getobjects` function and the :envvar:" +"`PYTHONDUMPREFS` environment variable, can be set using the new :option:`./" +"configure --with-trace-refs <--with-trace-refs>` build option. (Contributed " +"by Victor Stinner in :issue:`36465`.)" msgstr "" #: ../../whatsnew/3.8.rst:223 @@ -343,8 +345,8 @@ msgid "" "On the other hand, ``pkg-config python3.8 --libs`` no longer contains ``-" "lpython3.8``. C extensions must not be linked to libpython (except on " "Android and Cygwin, whose cases are handled by the script); this change is " -"backward incompatible on purpose. (Contributed by Victor Stinner " -"in :issue:`36721`.)" +"backward incompatible on purpose. (Contributed by Victor Stinner in :issue:" +"`36721`.)" msgstr "" #: ../../whatsnew/3.8.rst:256 @@ -578,9 +580,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:354 msgid "" ":ref:`vectorcall` is added to the Python/C API. It is meant to formalize " -"existing optimizations which were already done for various classes. " -"Any :ref:`static type ` implementing a callable can use this " -"protocol." +"existing optimizations which were already done for various classes. Any :ref:" +"`static type ` implementing a callable can use this protocol." msgstr "" #: ../../whatsnew/3.8.rst:360 @@ -595,8 +596,8 @@ msgstr "完整敘述請見 :pep:`590`。" #: ../../whatsnew/3.8.rst:365 msgid "" -"(Contributed by Jeroen Demeyer, Mark Shannon and Petr Viktorin " -"in :issue:`36974`.)" +"(Contributed by Jeroen Demeyer, Mark Shannon and Petr Viktorin in :issue:" +"`36974`.)" msgstr "" "(由 Jeroen Demeyer、Mark Shannon 和 Petr Viktorin 在 :issue:`36974` 中貢" "獻。)" @@ -642,19 +643,19 @@ msgstr "" #: ../../whatsnew/3.8.rst:393 msgid "" "The :class:`bool`, :class:`int`, and :class:`fractions.Fraction` types now " -"have an :meth:`~int.as_integer_ratio` method like that found " -"in :class:`float` and :class:`decimal.Decimal`. This minor API extension " -"makes it possible to write ``numerator, denominator = x.as_integer_ratio()`` " -"and have it work across multiple numeric types. (Contributed by Lisa Roach " -"in :issue:`33073` and Raymond Hettinger in :issue:`37819`.)" +"have an :meth:`~int.as_integer_ratio` method like that found in :class:" +"`float` and :class:`decimal.Decimal`. This minor API extension makes it " +"possible to write ``numerator, denominator = x.as_integer_ratio()`` and have " +"it work across multiple numeric types. (Contributed by Lisa Roach in :issue:" +"`33073` and Raymond Hettinger in :issue:`37819`.)" msgstr "" #: ../../whatsnew/3.8.rst:401 msgid "" "Constructors of :class:`int`, :class:`float` and :class:`complex` will now " "use the :meth:`~object.__index__` special method, if available and the " -"corresponding method :meth:`~object.__int__`, :meth:`~object.__float__` " -"or :meth:`~object.__complex__` is not available. (Contributed by Serhiy " +"corresponding method :meth:`~object.__int__`, :meth:`~object.__float__` or :" +"meth:`~object.__complex__` is not available. (Contributed by Serhiy " "Storchaka in :issue:`20092`.)" msgstr "" @@ -683,8 +684,8 @@ msgstr "(由 Jonathan Eunice 和 Serhiy Storchaka 在 :issue:`30688` 中貢獻 #: ../../whatsnew/3.8.rst:416 msgid "" -"Dict and dictviews are now iterable in reversed insertion order " -"using :func:`reversed`. (Contributed by Rémi Lapeyre in :issue:`33462`.)" +"Dict and dictviews are now iterable in reversed insertion order using :func:" +"`reversed`. (Contributed by Rémi Lapeyre in :issue:`33462`.)" msgstr "" #: ../../whatsnew/3.8.rst:419 @@ -692,8 +693,8 @@ msgid "" "The syntax allowed for keyword names in function calls was further " "restricted. In particular, ``f((keyword)=arg)`` is no longer allowed. It was " "never intended to permit more than a bare name on the left-hand side of a " -"keyword argument assignment term. (Contributed by Benjamin Peterson " -"in :issue:`34641`.)" +"keyword argument assignment term. (Contributed by Benjamin Peterson in :" +"issue:`34641`.)" msgstr "" #: ../../whatsnew/3.8.rst:425 @@ -733,13 +734,12 @@ msgstr "" #: ../../whatsnew/3.8.rst:445 msgid "" -"Arithmetic operations between subclasses of :class:`datetime.date` " -"or :class:`datetime.datetime` and :class:`datetime.timedelta` objects now " -"return an instance of the subclass, rather than the base class. This also " -"affects the return type of operations whose implementation (directly or " -"indirectly) uses :class:`datetime.timedelta` arithmetic, such " -"as :meth:`~datetime.datetime.astimezone`. (Contributed by Paul Ganssle " -"in :issue:`32417`.)" +"Arithmetic operations between subclasses of :class:`datetime.date` or :class:" +"`datetime.datetime` and :class:`datetime.timedelta` objects now return an " +"instance of the subclass, rather than the base class. This also affects the " +"return type of operations whose implementation (directly or indirectly) " +"uses :class:`datetime.timedelta` arithmetic, such as :meth:`~datetime." +"datetime.astimezone`. (Contributed by Paul Ganssle in :issue:`32417`.)" msgstr "" #: ../../whatsnew/3.8.rst:453 @@ -754,12 +754,12 @@ msgstr "" #: ../../whatsnew/3.8.rst:460 msgid "" -"Some advanced styles of programming require updating " -"the :class:`types.CodeType` object for an existing function. Since code " -"objects are immutable, a new code object needs to be created, one that is " -"modeled on the existing code object. With 19 parameters, this was somewhat " -"tedious. Now, the new ``replace()`` method makes it possible to create a " -"clone with a few altered parameters." +"Some advanced styles of programming require updating the :class:`types." +"CodeType` object for an existing function. Since code objects are " +"immutable, a new code object needs to be created, one that is modeled on the " +"existing code object. With 19 parameters, this was somewhat tedious. Now, " +"the new ``replace()`` method makes it possible to create a clone with a few " +"altered parameters." msgstr "" #: ../../whatsnew/3.8.rst:467 @@ -881,9 +881,9 @@ msgid "" "elements long. Formerly, five was the limit. The new, optional sixth " "element is a callable with a ``(obj, state)`` signature. This allows the " "direct control over the state-updating behavior of a specific object. If " -"not *None*, this callable will have priority over the " -"object's :meth:`~__setstate__` method. (Contributed by Pierre Glaser and " -"Olivier Grisel in :issue:`35900`.)" +"not *None*, this callable will have priority over the object's :meth:" +"`~object.__setstate__` method. (Contributed by Pierre Glaser and Olivier " +"Grisel in :issue:`35900`.)" msgstr "" #: ../../whatsnew/3.8.rst:543 @@ -946,12 +946,12 @@ msgstr "(由 Ivan Levkivskyi 在 :issue:`33416` 中貢獻。)" #: ../../whatsnew/3.8.rst:582 msgid "The :func:`ast.parse` function has some new flags:" -msgstr "" +msgstr ":func:`ast.parse` 函式有一些新旗標:" #: ../../whatsnew/3.8.rst:584 msgid "" -"``type_comments=True`` causes it to return the text of :pep:`484` " -"and :pep:`526` type comments associated with certain AST nodes;" +"``type_comments=True`` causes it to return the text of :pep:`484` and :pep:" +"`526` type comments associated with certain AST nodes;" msgstr "" #: ../../whatsnew/3.8.rst:587 @@ -963,8 +963,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:590 msgid "" "``feature_version=(3, N)`` allows specifying an earlier Python 3 version. " -"For example, ``feature_version=(3, 4)`` will treat :keyword:`async` " -"and :keyword:`await` as non-reserved words." +"For example, ``feature_version=(3, 4)`` will treat :keyword:`async` and :" +"keyword:`await` as non-reserved words." msgstr "" #: ../../whatsnew/3.8.rst:594 @@ -1036,9 +1036,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:629 msgid "" -"The actual implementation is significantly more complex. " -"Thus, :func:`asyncio.run` should be the preferred way of running asyncio " -"programs." +"The actual implementation is significantly more complex. Thus, :func:" +"`asyncio.run` should be the preferred way of running asyncio programs." msgstr "" #: ../../whatsnew/3.8.rst:632 @@ -1077,19 +1076,18 @@ msgstr "" msgid "(Contributed by Yury Selivanov in :issue:`37028`.)" msgstr "(由 Yury Selivanov 在 :issue:`37028` 中貢獻。)" -#: ../../whatsnew/3.8.rst:651 ../../whatsnew/3.8.rst:1970 +#: ../../whatsnew/3.8.rst:651 ../../whatsnew/3.8.rst:1973 msgid "" -"The exception :class:`asyncio.CancelledError` now inherits " -"from :class:`BaseException` rather than :class:`Exception` and no longer " -"inherits from :class:`concurrent.futures.CancelledError`. (Contributed by " -"Yury Selivanov in :issue:`32528`.)" +"The exception :class:`asyncio.CancelledError` now inherits from :class:" +"`BaseException` rather than :class:`Exception` and no longer inherits from :" +"class:`concurrent.futures.CancelledError`. (Contributed by Yury Selivanov " +"in :issue:`32528`.)" msgstr "" #: ../../whatsnew/3.8.rst:656 msgid "" -"On Windows, the default event loop is " -"now :class:`~asyncio.ProactorEventLoop`. (Contributed by Victor Stinner " -"in :issue:`34687`.)" +"On Windows, the default event loop is now :class:`~asyncio." +"ProactorEventLoop`. (Contributed by Victor Stinner in :issue:`34687`.)" msgstr "" #: ../../whatsnew/3.8.rst:659 @@ -1100,9 +1098,9 @@ msgstr "" #: ../../whatsnew/3.8.rst:662 msgid "" -":class:`~asyncio.ProactorEventLoop` can now be interrupted " -"by :exc:`KeyboardInterrupt` (\"CTRL+C\"). (Contributed by Vladimir Matveev " -"in :issue:`23057`.)" +":class:`~asyncio.ProactorEventLoop` can now be interrupted by :exc:" +"`KeyboardInterrupt` (\"CTRL+C\"). (Contributed by Vladimir Matveev in :issue:" +"`23057`.)" msgstr "" #: ../../whatsnew/3.8.rst:666 @@ -1114,12 +1112,12 @@ msgstr "" #: ../../whatsnew/3.8.rst:670 msgid "" "Asyncio tasks can now be named, either by passing the ``name`` keyword " -"argument to :func:`asyncio.create_task` or " -"the :meth:`~asyncio.loop.create_task` event loop method, or by calling " -"the :meth:`~asyncio.Task.set_name` method on the task object. The task name " -"is visible in the ``repr()`` output of :class:`asyncio.Task` and can also be " -"retrieved using the :meth:`~asyncio.Task.get_name` method. (Contributed by " -"Alex Grönholm in :issue:`34270`.)" +"argument to :func:`asyncio.create_task` or the :meth:`~asyncio.loop." +"create_task` event loop method, or by calling the :meth:`~asyncio.Task." +"set_name` method on the task object. The task name is visible in the " +"``repr()`` output of :class:`asyncio.Task` and can also be retrieved using " +"the :meth:`~asyncio.Task.get_name` method. (Contributed by Alex Grönholm in :" +"issue:`34270`.)" msgstr "" #: ../../whatsnew/3.8.rst:678 @@ -1138,12 +1136,12 @@ msgstr "builtins(內建)" #: ../../whatsnew/3.8.rst:690 msgid "" -"The :func:`compile` built-in has been improved to accept the " -"``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag. With this new flag " -"passed, :func:`compile` will allow top-level ``await``, ``async for`` and " -"``async with`` constructs that are usually considered invalid syntax. " -"Asynchronous code object marked with the ``CO_COROUTINE`` flag may then be " -"returned. (Contributed by Matthias Bussonnier in :issue:`34616`)" +"The :func:`compile` built-in has been improved to accept the ``ast." +"PyCF_ALLOW_TOP_LEVEL_AWAIT`` flag. With this new flag passed, :func:" +"`compile` will allow top-level ``await``, ``async for`` and ``async with`` " +"constructs that are usually considered invalid syntax. Asynchronous code " +"object marked with the ``CO_COROUTINE`` flag may then be returned. " +"(Contributed by Matthias Bussonnier in :issue:`34616`)" msgstr "" #: ../../whatsnew/3.8.rst:699 @@ -1152,13 +1150,13 @@ msgstr "collections" #: ../../whatsnew/3.8.rst:701 msgid "" -"The :meth:`~collections.somenamedtuple._asdict` method " -"for :func:`collections.namedtuple` now returns a :class:`dict` instead of " -"a :class:`collections.OrderedDict`. This works because regular dicts have " -"guaranteed ordering since Python 3.7. If the extra features " -"of :class:`OrderedDict` are required, the suggested remediation is to cast " -"the result to the desired type: ``OrderedDict(nt._asdict())``. (Contributed " -"by Raymond Hettinger in :issue:`35864`.)" +"The :meth:`~collections.somenamedtuple._asdict` method for :func:" +"`collections.namedtuple` now returns a :class:`dict` instead of a :class:" +"`collections.OrderedDict`. This works because regular dicts have guaranteed " +"ordering since Python 3.7. If the extra features of :class:`OrderedDict` are " +"required, the suggested remediation is to cast the result to the desired " +"type: ``OrderedDict(nt._asdict())``. (Contributed by Raymond Hettinger in :" +"issue:`35864`.)" msgstr "" #: ../../whatsnew/3.8.rst:711 @@ -1217,9 +1215,8 @@ msgid "" "parameter to specify flags for the underlying ``LoadLibraryEx`` call. The " "default flags are set to only load DLL dependencies from trusted locations, " "including the path where the DLL is stored (if a full or partial path is " -"used to load the initial DLL) and paths added " -"by :func:`~os.add_dll_directory`. (Contributed by Steve Dower " -"in :issue:`36085`.)" +"used to load the initial DLL) and paths added by :func:`~os." +"add_dll_directory`. (Contributed by Steve Dower in :issue:`36085`.)" msgstr "" #: ../../whatsnew/3.8.rst:754 @@ -1228,12 +1225,11 @@ msgstr "datetime" #: ../../whatsnew/3.8.rst:756 msgid "" -"Added new alternate constructors :meth:`datetime.date.fromisocalendar` " -"and :meth:`datetime.datetime.fromisocalendar`, which " -"construct :class:`~datetime.date` and :class:`~datetime.datetime` objects " -"respectively from ISO year, week number, and weekday; these are the inverse " -"of each class's ``isocalendar`` method. (Contributed by Paul Ganssle " -"in :issue:`36004`.)" +"Added new alternate constructors :meth:`datetime.date.fromisocalendar` and :" +"meth:`datetime.datetime.fromisocalendar`, which construct :class:`~datetime." +"date` and :class:`~datetime.datetime` objects respectively from ISO year, " +"week number, and weekday; these are the inverse of each class's " +"``isocalendar`` method. (Contributed by Paul Ganssle in :issue:`36004`.)" msgstr "" #: ../../whatsnew/3.8.rst:764 @@ -1306,8 +1302,8 @@ msgstr "(由 Carl Meyer 在 :issue:`21145` 中貢獻)" #: ../../whatsnew/3.8.rst:796 msgid "" "Added a new :func:`functools.singledispatchmethod` decorator that converts " -"methods into :term:`generic functions ` " -"using :term:`single dispatch`::" +"methods into :term:`generic functions ` using :term:" +"`single dispatch`::" msgstr "" #: ../../whatsnew/3.8.rst:800 @@ -1418,8 +1414,8 @@ msgid "" "Added optional line numbers for IDLE editor windows. Windows open without " "line numbers unless set otherwise in the General tab of the configuration " "dialog. Line numbers for an existing window are shown and hidden in the " -"Options menu. (Contributed by Tal Einat and Saimadhav Heblikar " -"in :issue:`17535`.)" +"Options menu. (Contributed by Tal Einat and Saimadhav Heblikar in :issue:" +"`17535`.)" msgstr "" #: ../../whatsnew/3.8.rst:869 @@ -1438,8 +1434,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:878 msgid "" -"Add option to toggle cursor blink off. (Contributed by Zackery Spytz " -"in :issue:`4603`.)" +"Add option to toggle cursor blink off. (Contributed by Zackery Spytz in :" +"issue:`4603`.)" msgstr "" #: ../../whatsnew/3.8.rst:881 @@ -1598,8 +1594,8 @@ msgstr "(由 Pablo Galindo 在 :issue:`35606` 中貢獻。)" #: ../../whatsnew/3.8.rst:975 msgid "" -"Added two new combinatoric functions :func:`math.perm` " -"and :func:`math.comb`::" +"Added two new combinatoric functions :func:`math.perm` and :func:`math." +"comb`::" msgstr "" #: ../../whatsnew/3.8.rst:977 @@ -1615,8 +1611,8 @@ msgid "" "(Contributed by Yash Aggarwal, Keller Fuchs, Serhiy Storchaka, and Raymond " "Hettinger in :issue:`37128`, :issue:`37178`, and :issue:`35431`.)" msgstr "" -"(由 Yash Aggarwal、Keller Fuchs、Serhiy Storchaka 和 Raymond Hettinger " -"在 :issue:`37128`、:issue:`37178` 和 :issue:`35431` 中貢獻。)" +"(由 Yash Aggarwal、Keller Fuchs、Serhiy Storchaka 和 Raymond Hettinger 在 :" +"issue:`37128`、:issue:`37178` 和 :issue:`35431` 中貢獻。)" #: ../../whatsnew/3.8.rst:985 msgid "" @@ -1659,8 +1655,8 @@ msgstr "mmap" #: ../../whatsnew/3.8.rst:1006 msgid "" "The :class:`mmap.mmap` class now has an :meth:`~mmap.mmap.madvise` method to " -"access the ``madvise()`` system call. (Contributed by Zackery Spytz " -"in :issue:`32941`.)" +"access the ``madvise()`` system call. (Contributed by Zackery Spytz in :" +"issue:`32941`.)" msgstr "" #: ../../whatsnew/3.8.rst:1012 @@ -1687,8 +1683,8 @@ msgstr "os" msgid "" "Added new function :func:`~os.add_dll_directory` on Windows for providing " "additional search paths for native dependencies when importing extension " -"modules or loading DLLs using :mod:`ctypes`. (Contributed by Steve Dower " -"in :issue:`36085`.)" +"modules or loading DLLs using :mod:`ctypes`. (Contributed by Steve Dower in :" +"issue:`36085`.)" msgstr "" #: ../../whatsnew/3.8.rst:1029 @@ -1704,11 +1700,11 @@ msgid "" "symlinks and directory junctions) has been delegated to the operating " "system. Specifically, :func:`os.stat` will now traverse anything supported " "by the operating system, while :func:`os.lstat` will only open reparse " -"points that identify as \"name surrogates\" while others are opened as " -"for :func:`os.stat`. In all cases, :attr:`stat_result.st_mode` will only " -"have ``S_IFLNK`` set for symbolic links and not other kinds of reparse " -"points. To identify other kinds of reparse point, check the " -"new :attr:`stat_result.st_reparse_tag` attribute." +"points that identify as \"name surrogates\" while others are opened as for :" +"func:`os.stat`. In all cases, :attr:`os.stat_result.st_mode` will only have " +"``S_IFLNK`` set for symbolic links and not other kinds of reparse points. To " +"identify other kinds of reparse point, check the new :attr:`os.stat_result." +"st_reparse_tag` attribute." msgstr "" #: ../../whatsnew/3.8.rst:1042 @@ -1716,8 +1712,8 @@ msgid "" "On Windows, :func:`os.readlink` is now able to read directory junctions. " "Note that :func:`~os.path.islink` will return ``False`` for directory " "junctions, and so code that checks ``islink`` first will continue to treat " -"junctions as directories, while code that handles errors " -"from :func:`os.readlink` may now treat junctions as links." +"junctions as directories, while code that handles errors from :func:`os." +"readlink` may now treat junctions as links." msgstr "" #: ../../whatsnew/3.8.rst:1048 ../../whatsnew/3.8.rst:1073 @@ -1730,21 +1726,21 @@ msgstr "os.path" #: ../../whatsnew/3.8.rst:1054 msgid "" -":mod:`os.path` functions that return a boolean result " -"like :func:`~os.path.exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`, :func:`~os.path.isfile`, :func:`~os.path.islink`, " -"and :func:`~os.path.ismount` now return ``False`` instead of " -"raising :exc:`ValueError` or its subclasses :exc:`UnicodeEncodeError` " -"and :exc:`UnicodeDecodeError` for paths that contain characters or bytes " -"unrepresentable at the OS level. (Contributed by Serhiy Storchaka " -"in :issue:`33721`.)" +":mod:`os.path` functions that return a boolean result like :func:`~os.path." +"exists`, :func:`~os.path.lexists`, :func:`~os.path.isdir`, :func:`~os.path." +"isfile`, :func:`~os.path.islink`, and :func:`~os.path.ismount` now return " +"``False`` instead of raising :exc:`ValueError` or its subclasses :exc:" +"`UnicodeEncodeError` and :exc:`UnicodeDecodeError` for paths that contain " +"characters or bytes unrepresentable at the OS level. (Contributed by Serhiy " +"Storchaka in :issue:`33721`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1062 ../../whatsnew/3.8.rst:1965 +#: ../../whatsnew/3.8.rst:1062 ../../whatsnew/3.8.rst:1968 msgid "" ":func:`~os.path.expanduser` on Windows now prefers the :envvar:`USERPROFILE` " "environment variable and does not use :envvar:`HOME`, which is not normally " -"set for regular user accounts. (Contributed by Anthony Sottile " -"in :issue:`36264`.)" +"set for regular user accounts. (Contributed by Anthony Sottile in :issue:" +"`36264`.)" msgstr "" #: ../../whatsnew/3.8.rst:1067 @@ -1765,12 +1761,14 @@ msgstr "pathlib" #: ../../whatsnew/3.8.rst:1079 msgid "" -":mod:`pathlib.Path` methods that return a boolean result " -"like :meth:`~pathlib.Path.exists`, :meth:`~pathlib.Path.is_dir`, :meth:`~pathlib.Path.is_file`, :meth:`~pathlib.Path.is_mount`, :meth:`~pathlib.Path.is_symlink`, :meth:`~pathlib.Path.is_block_device`, :meth:`~pathlib.Path.is_char_device`, :meth:`~pathlib.Path.is_fifo`, :meth:`~pathlib.Path.is_socket` " -"now return ``False`` instead of raising :exc:`ValueError` or its " -"subclass :exc:`UnicodeEncodeError` for paths that contain characters " -"unrepresentable at the OS level. (Contributed by Serhiy Storchaka " -"in :issue:`33721`.)" +":mod:`pathlib.Path` methods that return a boolean result like :meth:" +"`~pathlib.Path.exists`, :meth:`~pathlib.Path.is_dir`, :meth:`~pathlib.Path." +"is_file`, :meth:`~pathlib.Path.is_mount`, :meth:`~pathlib.Path.is_symlink`, :" +"meth:`~pathlib.Path.is_block_device`, :meth:`~pathlib.Path.is_char_device`, :" +"meth:`~pathlib.Path.is_fifo`, :meth:`~pathlib.Path.is_socket` now return " +"``False`` instead of raising :exc:`ValueError` or its subclass :exc:" +"`UnicodeEncodeError` for paths that contain characters unrepresentable at " +"the OS level. (Contributed by Serhiy Storchaka in :issue:`33721`.)" msgstr "" #: ../../whatsnew/3.8.rst:1089 @@ -1788,11 +1786,10 @@ msgstr "pickle" #: ../../whatsnew/3.8.rst:1100 msgid "" -":mod:`pickle` extensions subclassing the C-" -"optimized :class:`~pickle.Pickler` can now override the pickling logic of " -"functions and classes by defining the " -"special :meth:`~pickle.Pickler.reducer_override` method. (Contributed by " -"Pierre Glaser and Olivier Grisel in :issue:`35900`.)" +":mod:`pickle` extensions subclassing the C-optimized :class:`~pickle." +"Pickler` can now override the pickling logic of functions and classes by " +"defining the special :meth:`~pickle.Pickler.reducer_override` method. " +"(Contributed by Pierre Glaser and Olivier Grisel in :issue:`35900`.)" msgstr "" #: ../../whatsnew/3.8.rst:1107 @@ -1802,8 +1799,8 @@ msgstr "plistlib" #: ../../whatsnew/3.8.rst:1109 msgid "" "Added new :class:`plistlib.UID` and enabled support for reading and writing " -"NSKeyedArchiver-encoded binary plists. (Contributed by Jon Janzen " -"in :issue:`26707`.)" +"NSKeyedArchiver-encoded binary plists. (Contributed by Jon Janzen in :issue:" +"`26707`.)" msgstr "" #: ../../whatsnew/3.8.rst:1115 @@ -1828,8 +1825,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:1126 msgid "" ">>> from pprint import pprint, pp\n" -">>> d = dict(source='input.txt', operation='filter', " -"destination='output.txt')\n" +">>> d = dict(source='input.txt', operation='filter', destination='output." +"txt')\n" ">>> pp(d, width=40) # Original order\n" "{'source': 'input.txt',\n" " 'operation': 'filter',\n" @@ -1860,8 +1857,8 @@ msgstr "shlex" #: ../../whatsnew/3.8.rst:1150 msgid "" -"The new :func:`shlex.join` function acts as the inverse " -"of :func:`shlex.split`. (Contributed by Bo Bayles in :issue:`32102`.)" +"The new :func:`shlex.join` function acts as the inverse of :func:`shlex." +"split`. (Contributed by Bo Bayles in :issue:`32102`.)" msgstr "" #: ../../whatsnew/3.8.rst:1155 @@ -1885,8 +1882,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:1165 msgid "" ":func:`shutil.rmtree` on Windows now removes directory junctions without " -"recursively removing their contents first. (Contributed by Steve Dower " -"in :issue:`37834`.)" +"recursively removing their contents first. (Contributed by Steve Dower in :" +"issue:`37834`.)" msgstr "" #: ../../whatsnew/3.8.rst:1171 @@ -1903,9 +1900,9 @@ msgstr "" #: ../../whatsnew/3.8.rst:1178 msgid "" -"The :func:`socket.if_nameindex`, :func:`socket.if_nametoindex`, " -"and :func:`socket.if_indextoname` functions have been implemented on " -"Windows. (Contributed by Zackery Spytz in :issue:`37007`.)" +"The :func:`socket.if_nameindex`, :func:`socket.if_nametoindex`, and :func:" +"`socket.if_indextoname` functions have been implemented on Windows. " +"(Contributed by Zackery Spytz in :issue:`37007`.)" msgstr "" #: ../../whatsnew/3.8.rst:1184 @@ -1914,10 +1911,9 @@ msgstr "ssl" #: ../../whatsnew/3.8.rst:1186 msgid "" -"Added :attr:`~ssl.SSLContext.post_handshake_auth` to enable " -"and :meth:`~ssl.SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 " -"post-handshake authentication. (Contributed by Christian Heimes " -"in :issue:`34670`.)" +"Added :attr:`~ssl.SSLContext.post_handshake_auth` to enable and :meth:`~ssl." +"SSLSocket.verify_client_post_handshake` to initiate TLS 1.3 post-handshake " +"authentication. (Contributed by Christian Heimes in :issue:`34670`.)" msgstr "" #: ../../whatsnew/3.8.rst:1193 @@ -1926,9 +1922,9 @@ msgstr "statistics" #: ../../whatsnew/3.8.rst:1195 msgid "" -"Added :func:`statistics.fmean` as a faster, floating-point variant " -"of :func:`statistics.mean`. (Contributed by Raymond Hettinger and Steven " -"D'Aprano in :issue:`35904`.)" +"Added :func:`statistics.fmean` as a faster, floating-point variant of :func:" +"`statistics.mean`. (Contributed by Raymond Hettinger and Steven D'Aprano " +"in :issue:`35904`.)" msgstr "" #: ../../whatsnew/3.8.rst:1199 @@ -1936,8 +1932,8 @@ msgid "" "Added :func:`statistics.geometric_mean` (Contributed by Raymond Hettinger " "in :issue:`27181`.)" msgstr "" -"新增 :func:`statistics.geometric_mean`\\ (由 Raymond Hettinger " -"在 :issue:`27181` 中貢獻。)" +"新增 :func:`statistics.geometric_mean`\\ (由 Raymond Hettinger 在 :issue:" +"`27181` 中貢獻。)" #: ../../whatsnew/3.8.rst:1202 msgid "" @@ -1997,7 +1993,7 @@ msgid "" "(:func:`gc.collect`). (Contributed by Victor Stinner in :issue:`36829`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1250 ../../whatsnew/3.8.rst:2350 +#: ../../whatsnew/3.8.rst:1250 ../../whatsnew/3.8.rst:2353 msgid "tarfile" msgstr "tarfile" @@ -2016,21 +2012,20 @@ msgstr "threading" #: ../../whatsnew/3.8.rst:1262 msgid "" -"Add a new :func:`threading.excepthook` function which handles " -"uncaught :meth:`threading.Thread.run` exception. It can be overridden to " -"control how uncaught :meth:`threading.Thread.run` exceptions are handled. " -"(Contributed by Victor Stinner in :issue:`1230540`.)" +"Add a new :func:`threading.excepthook` function which handles uncaught :meth:" +"`threading.Thread.run` exception. It can be overridden to control how " +"uncaught :meth:`threading.Thread.run` exceptions are handled. (Contributed " +"by Victor Stinner in :issue:`1230540`.)" msgstr "" #: ../../whatsnew/3.8.rst:1267 msgid "" -"Add a new :func:`threading.get_native_id` function and " -"a :data:`~threading.Thread.native_id` attribute to " -"the :class:`threading.Thread` class. These return the native integral Thread " -"ID of the current thread assigned by the kernel. This feature is only " -"available on certain platforms, see :func:`get_native_id " -"` for more information. (Contributed by Jake Tesler " -"in :issue:`36084`.)" +"Add a new :func:`threading.get_native_id` function and a :data:`~threading." +"Thread.native_id` attribute to the :class:`threading.Thread` class. These " +"return the native integral Thread ID of the current thread assigned by the " +"kernel. This feature is only available on certain platforms, see :func:" +"`get_native_id ` for more information. (Contributed " +"by Jake Tesler in :issue:`36084`.)" msgstr "" #: ../../whatsnew/3.8.rst:1277 @@ -2051,24 +2046,22 @@ msgstr "tkinter" #: ../../whatsnew/3.8.rst:1288 msgid "" -"Added " -"methods :meth:`~tkinter.Spinbox.selection_from`, :meth:`~tkinter.Spinbox.selection_present`, :meth:`~tkinter.Spinbox.selection_range` " -"and :meth:`~tkinter.Spinbox.selection_to` in the :class:`tkinter.Spinbox` " +"Added methods :meth:`!selection_from`, :meth:`!selection_present`, :meth:`!" +"selection_range` and :meth:`!selection_to` in the :class:`!tkinter.Spinbox` " "class. (Contributed by Juliette Monsel in :issue:`34829`.)" msgstr "" #: ../../whatsnew/3.8.rst:1295 msgid "" -"Added method :meth:`~tkinter.Canvas.moveto` in the :class:`tkinter.Canvas` " -"class. (Contributed by Juliette Monsel in :issue:`23831`.)" +"Added method :meth:`!moveto` in the :class:`!tkinter.Canvas` class. " +"(Contributed by Juliette Monsel in :issue:`23831`.)" msgstr "" #: ../../whatsnew/3.8.rst:1299 msgid "" -"The :class:`tkinter.PhotoImage` class now " -"has :meth:`~tkinter.PhotoImage.transparency_get` " -"and :meth:`~tkinter.PhotoImage.transparency_set` methods. (Contributed by " -"Zackery Spytz in :issue:`25451`.)" +"The :class:`!tkinter.PhotoImage` class now has :meth:`!transparency_get` " +"and :meth:`!transparency_set` methods. (Contributed by Zackery Spytz in :" +"issue:`25451`.)" msgstr "" #: ../../whatsnew/3.8.rst:1306 @@ -2091,10 +2084,10 @@ msgstr "" #: ../../whatsnew/3.8.rst:1317 msgid "" -"A dictionary type with per-key types. See :pep:`589` " -"and :class:`typing.TypedDict`. TypedDict uses only string keys. By default, " -"every key is required to be present. Specify \"total=False\" to allow keys " -"to be optional::" +"A dictionary type with per-key types. See :pep:`589` and :class:`typing." +"TypedDict`. TypedDict uses only string keys. By default, every key is " +"required to be present. Specify \"total=False\" to allow keys to be " +"optional::" msgstr "" #: ../../whatsnew/3.8.rst:1322 @@ -2126,10 +2119,9 @@ msgstr "" #: ../../whatsnew/3.8.rst:1334 msgid "" -"\"Final\" variables, functions, methods and classes. " -"See :pep:`591`, :class:`typing.Final` and :func:`typing.final`. The final " -"qualifier instructs a static type checker to restrict subclassing, " -"overriding, or reassignment::" +"\"Final\" variables, functions, methods and classes. See :pep:`591`, :class:" +"`typing.Final` and :func:`typing.final`. The final qualifier instructs a " +"static type checker to restrict subclassing, overriding, or reassignment::" msgstr "" #: ../../whatsnew/3.8.rst:1339 @@ -2138,18 +2130,18 @@ msgstr "pi: Final[float] = 3.1415926536" #: ../../whatsnew/3.8.rst:1341 msgid "" -"Protocol definitions. See :pep:`544`, :class:`typing.Protocol` " -"and :func:`typing.runtime_checkable`. Simple ABCs " -"like :class:`typing.SupportsInt` are now ``Protocol`` subclasses." +"Protocol definitions. See :pep:`544`, :class:`typing.Protocol` and :func:" +"`typing.runtime_checkable`. Simple ABCs like :class:`typing.SupportsInt` " +"are now ``Protocol`` subclasses." msgstr "" #: ../../whatsnew/3.8.rst:1345 msgid "New protocol class :class:`typing.SupportsIndex`." -msgstr "" +msgstr "新的協定類別 :class:`typing.SupportsIndex`。" #: ../../whatsnew/3.8.rst:1347 msgid "New functions :func:`typing.get_origin` and :func:`typing.get_args`." -msgstr "" +msgstr "新的函式 :func:`typing.get_origin` 和 :func:`typing.get_args`。" #: ../../whatsnew/3.8.rst:1351 msgid "unicodedata" @@ -2177,17 +2169,16 @@ msgstr "unittest" msgid "" "Added :class:`~unittest.mock.AsyncMock` to support an asynchronous version " "of :class:`~unittest.mock.Mock`. Appropriate new assert functions for " -"testing have been added as well. (Contributed by Lisa Roach " -"in :issue:`26467`)." +"testing have been added as well. (Contributed by Lisa Roach in :issue:" +"`26467`)." msgstr "" #: ../../whatsnew/3.8.rst:1370 msgid "" -"Added :func:`~unittest.addModuleCleanup` " -"and :meth:`~unittest.TestCase.addClassCleanup` to unittest to support " -"cleanups for :func:`~unittest.setUpModule` " -"and :meth:`~unittest.TestCase.setUpClass`. (Contributed by Lisa Roach " -"in :issue:`24412`.)" +"Added :func:`~unittest.addModuleCleanup` and :meth:`~unittest.TestCase." +"addClassCleanup` to unittest to support cleanups for :func:`~unittest." +"setUpModule` and :meth:`~unittest.TestCase.setUpClass`. (Contributed by Lisa " +"Roach in :issue:`24412`.)" msgstr "" #: ../../whatsnew/3.8.rst:1376 @@ -2275,10 +2266,9 @@ msgstr "xml" #: ../../whatsnew/3.8.rst:1424 msgid "" -"As mitigation against DTD and external entity retrieval, " -"the :mod:`xml.dom.minidom` and :mod:`xml.sax` modules no longer process " -"external entities by default. (Contributed by Christian Heimes " -"in :issue:`17239`.)" +"As mitigation against DTD and external entity retrieval, the :mod:`xml.dom." +"minidom` and :mod:`xml.sax` modules no longer process external entities by " +"default. (Contributed by Christian Heimes in :issue:`17239`.)" msgstr "" #: ../../whatsnew/3.8.rst:1429 @@ -2291,20 +2281,19 @@ msgstr "" #: ../../whatsnew/3.8.rst:1434 msgid "" -"The :mod:`xml.etree.ElementTree` module provides a new function :func:`–" -"xml.etree.ElementTree.canonicalize` that implements C14N 2.0. (Contributed " -"by Stefan Behnel in :issue:`13611`.)" +"The :mod:`xml.etree.ElementTree` module provides a new function :func:`~xml." +"etree.ElementTree.canonicalize` that implements C14N 2.0. (Contributed by " +"Stefan Behnel in :issue:`13611`.)" msgstr "" #: ../../whatsnew/3.8.rst:1438 msgid "" "The target object of :class:`xml.etree.ElementTree.XMLParser` can receive " "namespace declaration events through the new callback methods ``start_ns()`` " -"and ``end_ns()``. Additionally, " -"the :class:`xml.etree.ElementTree.TreeBuilder` target can be configured to " -"process events about comments and processing instructions to include them in " -"the generated tree. (Contributed by Stefan Behnel in :issue:`36676` " -"and :issue:`36673`.)" +"and ``end_ns()``. Additionally, the :class:`xml.etree.ElementTree." +"TreeBuilder` target can be configured to process events about comments and " +"processing instructions to include them in the generated tree. (Contributed " +"by Stefan Behnel in :issue:`36676` and :issue:`36673`.)" msgstr "" #: ../../whatsnew/3.8.rst:1448 @@ -2351,15 +2340,15 @@ msgstr "(由 Joannah Nanjekye 和 Victor Stinner 在 :issue:`35537` 中貢獻 #: ../../whatsnew/3.8.rst:1471 msgid "" -":func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`, :func:`shutil.copytree` " -"and :func:`shutil.move` use platform-specific \"fast-copy\" syscalls on " -"Linux and macOS in order to copy the file more efficiently. \"fast-copy\" " -"means that the copying operation occurs within the kernel, avoiding the use " -"of userspace buffers in Python as in \"``outfd.write(infd.read())``\". On " -"Windows :func:`shutil.copyfile` uses a bigger default buffer size (1 MiB " -"instead of 16 KiB) and a :func:`memoryview`-based variant " -"of :func:`shutil.copyfileobj` is used. The speedup for copying a 512 MiB " -"file within the same partition is about +26% on Linux, +50% on macOS and " +":func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`, :func:" +"`shutil.copytree` and :func:`shutil.move` use platform-specific \"fast-" +"copy\" syscalls on Linux and macOS in order to copy the file more " +"efficiently. \"fast-copy\" means that the copying operation occurs within " +"the kernel, avoiding the use of userspace buffers in Python as in \"``outfd." +"write(infd.read())``\". On Windows :func:`shutil.copyfile` uses a bigger " +"default buffer size (1 MiB instead of 16 KiB) and a :func:`memoryview`-based " +"variant of :func:`shutil.copyfileobj` is used. The speedup for copying a 512 " +"MiB file within the same partition is about +26% on Linux, +50% on macOS and " "+40% on Windows. Also, much less CPU cycles are consumed. See :ref:`shutil-" "platform-dependent-efficient-copy-operations` section. (Contributed by " "Giampaolo Rodolà in :issue:`33671`.)" @@ -2431,15 +2420,15 @@ msgstr "" msgid "" "Reduced an overhead of converting arguments passed to many builtin functions " "and methods. This sped up calling some simple builtin functions and methods " -"up to 20--50%. (Contributed by Serhiy Storchaka " -"in :issue:`23867`, :issue:`35582` and :issue:`36127`.)" +"up to 20--50%. (Contributed by Serhiy Storchaka in :issue:`23867`, :issue:" +"`35582` and :issue:`36127`.)" msgstr "" #: ../../whatsnew/3.8.rst:1531 msgid "" "``LOAD_GLOBAL`` instruction now uses new \"per opcode cache\" mechanism. It " -"is about 40% faster now. (Contributed by Yury Selivanov and Inada Naoki " -"in :issue:`26219`.)" +"is about 40% faster now. (Contributed by Yury Selivanov and Inada Naoki in :" +"issue:`26219`.)" msgstr "" #: ../../whatsnew/3.8.rst:1537 @@ -2450,8 +2439,8 @@ msgstr "建置和 C API 變更" msgid "" "Default :data:`sys.abiflags` became an empty string: the ``m`` flag for " "pymalloc became useless (builds with and without pymalloc are ABI " -"compatible) and so has been removed. (Contributed by Victor Stinner " -"in :issue:`36707`.)" +"compatible) and so has been removed. (Contributed by Victor Stinner in :" +"issue:`36707`.)" msgstr "" #: ../../whatsnew/3.8.rst:1543 @@ -2527,14 +2516,16 @@ msgid ":c:func:`Py_XINCREF`, :c:func:`Py_XDECREF`" msgstr ":c:func:`Py_XINCREF`, :c:func:`Py_XDECREF`" #: ../../whatsnew/3.8.rst:1576 -msgid ":c:func:`PyObject_INIT`, :c:func:`PyObject_INIT_VAR`" -msgstr ":c:func:`PyObject_INIT`, :c:func:`PyObject_INIT_VAR`" +msgid ":c:macro:`!PyObject_INIT`, :c:macro:`!PyObject_INIT_VAR`" +msgstr ":c:macro:`!PyObject_INIT`, :c:macro:`!PyObject_INIT_VAR`" #: ../../whatsnew/3.8.rst:1577 msgid "" "Private functions: :c:func:`!_PyObject_GC_TRACK`, :c:func:`!" "_PyObject_GC_UNTRACK`, :c:func:`!_Py_Dealloc`" msgstr "" +"Private functions: :c:func:`!_PyObject_GC_TRACK`, :c:func:`!" +"_PyObject_GC_UNTRACK`, :c:func:`!_Py_Dealloc`" #: ../../whatsnew/3.8.rst:1580 msgid "(Contributed by Victor Stinner in :issue:`35059`.)" @@ -2551,8 +2542,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:1587 msgid "" "The result of :c:func:`PyExceptionClass_Name` is now of type ``const char " -"*`` rather of ``char *``. (Contributed by Serhiy Storchaka " -"in :issue:`33818`.)" +"*`` rather of ``char *``. (Contributed by Serhiy Storchaka in :issue:" +"`33818`.)" msgstr "" #: ../../whatsnew/3.8.rst:1591 @@ -2580,28 +2571,27 @@ msgstr "(由 Antoine Pitrou 在 :issue:`32430` 中貢獻。)" #: ../../whatsnew/3.8.rst:1606 msgid "" -"Functions that convert Python number to C integer " -"like :c:func:`PyLong_AsLong` and argument parsing functions " -"like :c:func:`PyArg_ParseTuple` with integer converting format units like " -"``'i'`` will now use the :meth:`~object.__index__` special method instead " -"of :meth:`~object.__int__`, if available. The deprecation warning will be " -"emitted for objects with the ``__int__()`` method but without the " -"``__index__()`` method (like :class:`~decimal.Decimal` " -"and :class:`~fractions.Fraction`). :c:func:`PyNumber_Check` will now return " -"``1`` for objects implementing " -"``__index__()``. :c:func:`PyNumber_Long`, :c:func:`PyNumber_Float` " -"and :c:func:`PyFloat_AsDouble` also now use the ``__index__()`` method if " -"available. (Contributed by Serhiy Storchaka in :issue:`36048` " -"and :issue:`20092`.)" +"Functions that convert Python number to C integer like :c:func:" +"`PyLong_AsLong` and argument parsing functions like :c:func:" +"`PyArg_ParseTuple` with integer converting format units like ``'i'`` will " +"now use the :meth:`~object.__index__` special method instead of :meth:" +"`~object.__int__`, if available. The deprecation warning will be emitted " +"for objects with the ``__int__()`` method but without the ``__index__()`` " +"method (like :class:`~decimal.Decimal` and :class:`~fractions.Fraction`). :" +"c:func:`PyNumber_Check` will now return ``1`` for objects implementing " +"``__index__()``. :c:func:`PyNumber_Long`, :c:func:`PyNumber_Float` and :c:" +"func:`PyFloat_AsDouble` also now use the ``__index__()`` method if " +"available. (Contributed by Serhiy Storchaka in :issue:`36048` and :issue:" +"`20092`.)" msgstr "" #: ../../whatsnew/3.8.rst:1620 msgid "" -"Heap-allocated type objects will now increase their reference count " -"in :c:func:`PyObject_Init` (and its parallel macro ``PyObject_INIT``) " -"instead of in :c:func:`PyType_GenericAlloc`. Types that modify instance " -"allocation or deallocation may need to be adjusted. (Contributed by Eddie " -"Elizondo in :issue:`35810`.)" +"Heap-allocated type objects will now increase their reference count in :c:" +"func:`PyObject_Init` (and its parallel macro ``PyObject_INIT``) instead of " +"in :c:func:`PyType_GenericAlloc`. Types that modify instance allocation or " +"deallocation may need to be adjusted. (Contributed by Eddie Elizondo in :" +"issue:`35810`.)" msgstr "" #: ../../whatsnew/3.8.rst:1626 @@ -2615,9 +2605,8 @@ msgstr "" #: ../../whatsnew/3.8.rst:1631 msgid "" ":c:func:`!Py_SetPath` now sets :data:`sys.executable` to the program full " -"path (:c:func:`Py_GetProgramFullPath`) rather than to the program name " -"(:c:func:`Py_GetProgramName`). (Contributed by Victor Stinner " -"in :issue:`38234`.)" +"path (:c:func:`Py_GetProgramFullPath`) rather than to the program name (:c:" +"func:`Py_GetProgramName`). (Contributed by Victor Stinner in :issue:`38234`.)" msgstr "" #: ../../whatsnew/3.8.rst:1638 @@ -2627,40 +2616,38 @@ msgstr "已棄用" #: ../../whatsnew/3.8.rst:1640 msgid "" "The distutils ``bdist_wininst`` command is now deprecated, use " -"``bdist_wheel`` (wheel packages) instead. (Contributed by Victor Stinner " -"in :issue:`37481`.)" +"``bdist_wheel`` (wheel packages) instead. (Contributed by Victor Stinner in :" +"issue:`37481`.)" msgstr "" #: ../../whatsnew/3.8.rst:1644 msgid "" -"Deprecated methods ``getchildren()`` and ``getiterator()`` in " -"the :mod:`~xml.etree.ElementTree` module now emit " -"a :exc:`DeprecationWarning` instead of :exc:`PendingDeprecationWarning`. " -"They will be removed in Python 3.9. (Contributed by Serhiy Storchaka " -"in :issue:`29209`.)" +"Deprecated methods ``getchildren()`` and ``getiterator()`` in the :mod:`~xml." +"etree.ElementTree` module now emit a :exc:`DeprecationWarning` instead of :" +"exc:`PendingDeprecationWarning`. They will be removed in Python 3.9. " +"(Contributed by Serhiy Storchaka in :issue:`29209`.)" msgstr "" #: ../../whatsnew/3.8.rst:1650 msgid "" -"Passing an object that is not an instance " -"of :class:`concurrent.futures.ThreadPoolExecutor` " -"to :meth:`loop.set_default_executor() ` " -"is deprecated and will be prohibited in Python 3.9. (Contributed by Elvis " -"Pranskevichus in :issue:`34075`.)" +"Passing an object that is not an instance of :class:`concurrent.futures." +"ThreadPoolExecutor` to :meth:`loop.set_default_executor() ` is deprecated and will be prohibited in Python 3.9. " +"(Contributed by Elvis Pranskevichus in :issue:`34075`.)" msgstr "" #: ../../whatsnew/3.8.rst:1656 msgid "" -"The :meth:`~object.__getitem__` methods " -"of :class:`xml.dom.pulldom.DOMEventStream`, :class:`wsgiref.util.FileWrapper` " -"and :class:`fileinput.FileInput` have been deprecated." +"The :meth:`~object.__getitem__` methods of :class:`xml.dom.pulldom." +"DOMEventStream`, :class:`wsgiref.util.FileWrapper` and :class:`fileinput." +"FileInput` have been deprecated." msgstr "" #: ../../whatsnew/3.8.rst:1660 msgid "" "Implementations of these methods have been ignoring their *index* parameter, " -"and returning the next item instead. (Contributed by Berker Peksag " -"in :issue:`9372`.)" +"and returning the next item instead. (Contributed by Berker Peksag in :issue:" +"`9372`.)" msgstr "" #: ../../whatsnew/3.8.rst:1664 @@ -2682,25 +2669,28 @@ msgstr "" msgid "" ":class:`ast.NodeVisitor` methods ``visit_Num()``, ``visit_Str()``, " "``visit_Bytes()``, ``visit_NameConstant()`` and ``visit_Ellipsis()`` are " -"deprecated now and will not be called in future Python versions. Add " -"the :meth:`~ast.NodeVisitor.visit_Constant` method to handle all constant " -"nodes. (Contributed by Serhiy Storchaka in :issue:`36917`.)" +"deprecated now and will not be called in future Python versions. Add the :" +"meth:`~ast.NodeVisitor.visit_Constant` method to handle all constant nodes. " +"(Contributed by Serhiy Storchaka in :issue:`36917`.)" msgstr "" #: ../../whatsnew/3.8.rst:1680 msgid "" -"The :func:`asyncio.coroutine` :term:`decorator` is deprecated and will be " -"removed in version 3.10. Instead of ``@asyncio.coroutine``, " -"use :keyword:`async def` instead. (Contributed by Andrew Svetlov " -"in :issue:`36921`.)" +"The :deco:`!asyncio.coroutine` :term:`decorator` is deprecated and will be " +"removed in version 3.10. Instead of ``@asyncio.coroutine``, use :keyword:" +"`async def` instead. (Contributed by Andrew Svetlov in :issue:`36921`.)" msgstr "" #: ../../whatsnew/3.8.rst:1685 msgid "" "In :mod:`asyncio`, the explicit passing of a *loop* argument has been " -"deprecated and will be removed in version 3.10 for the " -"following: :func:`asyncio.sleep`, :func:`asyncio.gather`, :func:`asyncio.shield`, :func:`asyncio.wait_for`, :func:`asyncio.wait`, :func:`asyncio.as_completed`, :class:`asyncio.Task`, :class:`asyncio.Lock`, :class:`asyncio.Event`, :class:`asyncio.Condition`, :class:`asyncio.Semaphore`, :class:`asyncio.BoundedSemaphore`, :class:`asyncio.Queue`, :func:`asyncio.create_subprocess_exec`, " -"and :func:`asyncio.create_subprocess_shell`." +"deprecated and will be removed in version 3.10 for the following: :func:" +"`asyncio.sleep`, :func:`asyncio.gather`, :func:`asyncio.shield`, :func:" +"`asyncio.wait_for`, :func:`asyncio.wait`, :func:`asyncio.as_completed`, :" +"class:`asyncio.Task`, :class:`asyncio.Lock`, :class:`asyncio.Event`, :class:" +"`asyncio.Condition`, :class:`asyncio.Semaphore`, :class:`asyncio." +"BoundedSemaphore`, :class:`asyncio.Queue`, :func:`asyncio." +"create_subprocess_exec`, and :func:`asyncio.create_subprocess_shell`." msgstr "" #: ../../whatsnew/3.8.rst:1695 @@ -2713,40 +2703,38 @@ msgstr "" #: ../../whatsnew/3.8.rst:1699 msgid "" "The following functions and methods are deprecated in the :mod:`gettext` " -"module: :func:`~gettext.lgettext`, :func:`~gettext.ldgettext`, :func:`~gettext.lngettext` " -"and :func:`~gettext.ldngettext`. They return encoded bytes, and it's " -"possible that you will get unexpected Unicode-related exceptions if there " -"are encoding problems with the translated strings. It's much better to use " -"alternatives which return Unicode strings in Python 3. These functions have " -"been broken for a long time." +"module: :func:`!lgettext`, :func:`!ldgettext`, :func:`!lngettext` and :func:" +"`!ldngettext`. They return encoded bytes, and it's possible that you will " +"get unexpected Unicode-related exceptions if there are encoding problems " +"with the translated strings. It's much better to use alternatives which " +"return Unicode strings in Python 3. These functions have been broken for a " +"long time." msgstr "" #: ../../whatsnew/3.8.rst:1707 msgid "" -"Function :func:`~gettext.bind_textdomain_codeset`, " -"methods :meth:`~gettext.NullTranslations.output_charset` " -"and :meth:`~gettext.NullTranslations.set_output_charset`, and the *codeset* " -"parameter of functions :func:`~gettext.translation` " -"and :func:`~gettext.install` are also deprecated, since they are only used " -"for the ``l*gettext()`` functions. (Contributed by Serhiy Storchaka " -"in :issue:`33710`.)" +"Function :func:`!bind_textdomain_codeset`, methods :meth:`!NullTranslations." +"output_charset` and :meth:`!NullTranslations.set_output_charset`, and the " +"*codeset* parameter of functions :func:`~gettext.translation` and :func:" +"`~gettext.install` are also deprecated, since they are only used for the " +"``l*gettext()`` functions. (Contributed by Serhiy Storchaka in :issue:" +"`33710`.)" msgstr "" #: ../../whatsnew/3.8.rst:1715 msgid "" -"The :meth:`~threading.Thread.isAlive` method of :class:`threading.Thread` " -"has been deprecated. (Contributed by Donghee Na in :issue:`35283`.)" +"The :meth:`!isAlive` method of :class:`threading.Thread` has been " +"deprecated. (Contributed by Donghee Na in :issue:`35283`.)" msgstr "" #: ../../whatsnew/3.8.rst:1719 msgid "" "Many builtin and extension functions that take integer arguments will now " -"emit a deprecation warning for :class:`~decimal.Decimal`\\ " -"s, :class:`~fractions.Fraction`\\ s and any other objects that can be " -"converted to integers only with a loss (e.g. that have " -"the :meth:`~object.__int__` method but do not have " -"the :meth:`~object.__index__` method). In future version they will be " -"errors. (Contributed by Serhiy Storchaka in :issue:`36048`.)" +"emit a deprecation warning for :class:`~decimal.Decimal`\\ s, :class:" +"`~fractions.Fraction`\\ s and any other objects that can be converted to " +"integers only with a loss (e.g. that have the :meth:`~object.__int__` method " +"but do not have the :meth:`~object.__index__` method). In future version " +"they will be errors. (Contributed by Serhiy Storchaka in :issue:`36048`.)" msgstr "" #: ../../whatsnew/3.8.rst:1727 @@ -2755,9 +2743,9 @@ msgstr "" #: ../../whatsnew/3.8.rst:1729 msgid "" -"*func* " -"in :func:`functools.partialmethod`, :func:`weakref.finalize`, :meth:`profile.Profile.runcall`, :meth:`cProfile.Profile.runcall`, :meth:`bdb.Bdb.runcall`, :meth:`trace.Trace.runfunc` " -"and :func:`curses.wrapper`." +"*func* in :func:`functools.partialmethod`, :func:`weakref.finalize`, :meth:" +"`profile.Profile.runcall`, :meth:`!cProfile.Profile.runcall`, :meth:`bdb.Bdb." +"runcall`, :meth:`trace.Trace.runfunc` and :func:`curses.wrapper`." msgstr "" #: ../../whatsnew/3.8.rst:1733 @@ -2766,23 +2754,22 @@ msgstr "" #: ../../whatsnew/3.8.rst:1734 msgid "" -"*fn* in the :meth:`~concurrent.futures.Executor.submit` method " -"of :class:`concurrent.futures.ThreadPoolExecutor` " -"and :class:`concurrent.futures.ProcessPoolExecutor`." +"*fn* in the :meth:`~concurrent.futures.Executor.submit` method of :class:" +"`concurrent.futures.ThreadPoolExecutor` and :class:`concurrent.futures." +"ProcessPoolExecutor`." msgstr "" #: ../../whatsnew/3.8.rst:1737 msgid "" -"*callback* " -"in :meth:`contextlib.ExitStack.callback`, :meth:`contextlib.AsyncExitStack.callback` " -"and :meth:`contextlib.AsyncExitStack.push_async_callback`." +"*callback* in :meth:`contextlib.ExitStack.callback`, :meth:`!contextlib." +"AsyncExitStack.callback` and :meth:`contextlib.AsyncExitStack." +"push_async_callback`." msgstr "" #: ../../whatsnew/3.8.rst:1740 msgid "" -"*c* and *typeid* in the :meth:`~multiprocessing.managers.Server.create` " -"method of :class:`multiprocessing.managers.Server` " -"and :class:`multiprocessing.managers.SharedMemoryServer`." +"*c* and *typeid* in the :meth:`!create` method of :class:`!multiprocessing." +"managers.Server` and :class:`!multiprocessing.managers.SharedMemoryServer`." msgstr "" #: ../../whatsnew/3.8.rst:1743 @@ -2813,24 +2800,23 @@ msgstr "" #: ../../whatsnew/3.8.rst:1760 msgid "" -"The :mod:`macpath` module, deprecated in Python 3.7, has been removed. " +"The :mod:`!macpath` module, deprecated in Python 3.7, has been removed. " "(Contributed by Victor Stinner in :issue:`35471`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1763 ../../whatsnew/3.8.rst:1882 +#: ../../whatsnew/3.8.rst:1763 ../../whatsnew/3.8.rst:1883 msgid "" -"The function :func:`platform.popen` has been removed, after having been " +"The function :func:`!platform.popen` has been removed, after having been " "deprecated since Python 3.3: use :func:`os.popen` instead. (Contributed by " "Victor Stinner in :issue:`35345`.)" msgstr "" #: ../../whatsnew/3.8.rst:1767 msgid "" -"The function :func:`time.clock` has been removed, after having been " -"deprecated since Python 3.3: use :func:`time.perf_counter` " -"or :func:`time.process_time` instead, depending on your requirements, to " -"have well-defined behavior. (Contributed by Matthias Bussonnier " -"in :issue:`36895`.)" +"The function :func:`!time.clock` has been removed, after having been " +"deprecated since Python 3.3: use :func:`time.perf_counter` or :func:`time." +"process_time` instead, depending on your requirements, to have well-defined " +"behavior. (Contributed by Matthias Bussonnier in :issue:`36895`.)" msgstr "" #: ../../whatsnew/3.8.rst:1773 @@ -2863,15 +2849,14 @@ msgstr "" #: ../../whatsnew/3.8.rst:1789 msgid "" -"Removed the ``doctype()`` method " -"of :class:`~xml.etree.ElementTree.XMLParser`. (Contributed by Serhiy " -"Storchaka in :issue:`29209`.)" +"Removed the ``doctype()`` method of :class:`~xml.etree.ElementTree." +"XMLParser`. (Contributed by Serhiy Storchaka in :issue:`29209`.)" msgstr "" #: ../../whatsnew/3.8.rst:1792 msgid "" -"\"unicode_internal\" codec is removed. (Contributed by Inada Naoki " -"in :issue:`36297`.)" +"\"unicode_internal\" codec is removed. (Contributed by Inada Naoki in :issue:" +"`36297`.)" msgstr "" #: ../../whatsnew/3.8.rst:1795 @@ -2882,17 +2867,16 @@ msgstr "" #: ../../whatsnew/3.8.rst:1799 msgid "" -"The ``bufsize`` keyword argument of :func:`fileinput.input` " -"and :func:`fileinput.FileInput` which was ignored and deprecated since " -"Python 3.6 has been removed. :issue:`36952` (Contributed by Matthias " -"Bussonnier.)" +"The ``bufsize`` keyword argument of :func:`fileinput.input` and :func:" +"`fileinput.FileInput` which was ignored and deprecated since Python 3.6 has " +"been removed. :issue:`36952` (Contributed by Matthias Bussonnier.)" msgstr "" #: ../../whatsnew/3.8.rst:1803 msgid "" -"The functions :func:`sys.set_coroutine_wrapper` " -"and :func:`sys.get_coroutine_wrapper` deprecated in Python 3.7 have been " -"removed; :issue:`36933` (Contributed by Matthias Bussonnier.)" +"The functions :func:`!sys.set_coroutine_wrapper` and :func:`!sys." +"get_coroutine_wrapper` deprecated in Python 3.7 have been removed; :issue:" +"`36933` (Contributed by Matthias Bussonnier.)" msgstr "" #: ../../whatsnew/3.8.rst:1809 @@ -2923,8 +2907,8 @@ msgid "" "(``is`` and ``is not``) are used with certain types of literals (e.g. " "strings, numbers). These can often work by accident in CPython, but are not " "guaranteed by the language spec. The warning advises users to use equality " -"tests (``==`` and ``!=``) instead. (Contributed by Serhiy Storchaka " -"in :issue:`34850`.)" +"tests (``==`` and ``!=``) instead. (Contributed by Serhiy Storchaka in :" +"issue:`34850`.)" msgstr "" #: ../../whatsnew/3.8.rst:1830 @@ -2937,12 +2921,12 @@ msgstr "" #: ../../whatsnew/3.8.rst:1835 msgid "" -"Removed ``__str__`` implementations from builtin " -"types :class:`bool`, :class:`int`, :class:`float`, :class:`complex` and few " -"classes from the standard library. They now inherit ``__str__()`` " -"from :class:`object`. As result, defining the ``__repr__()`` method in the " -"subclass of these classes will affect their string representation. " -"(Contributed by Serhiy Storchaka in :issue:`36793`.)" +"Removed ``__str__`` implementations from builtin types :class:`bool`, :class:" +"`int`, :class:`float`, :class:`complex` and few classes from the standard " +"library. They now inherit ``__str__()`` from :class:`object`. As result, " +"defining the ``__repr__()`` method in the subclass of these classes will " +"affect their string representation. (Contributed by Serhiy Storchaka in :" +"issue:`36793`.)" msgstr "" #: ../../whatsnew/3.8.rst:1842 @@ -2950,22 +2934,21 @@ msgid "" "On AIX, :data:`sys.platform` doesn't contain the major version anymore. It " "is always ``'aix'``, instead of ``'aix3'`` .. ``'aix7'``. Since older " "Python versions include the version number, so it is recommended to always " -"use ``sys.platform.startswith('aix')``. (Contributed by M. Felt " -"in :issue:`36588`.)" +"use ``sys.platform.startswith('aix')``. (Contributed by M. Felt in :issue:" +"`36588`.)" msgstr "" #: ../../whatsnew/3.8.rst:1848 msgid "" ":c:func:`!PyEval_AcquireLock` and :c:func:`!PyEval_AcquireThread` now " "terminate the current thread if called while the interpreter is finalizing, " -"making them consistent " -"with :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " -"and :c:func:`PyGILState_Ensure`. If this behavior is not desired, guard the " -"call by checking :c:func:`!_Py_IsFinalizing` or :func:`sys.is_finalizing`. " -"(Contributed by Joannah Nanjekye in :issue:`36475`.)" +"making them consistent with :c:func:`PyEval_RestoreThread`, :c:func:" +"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`. If this behavior is " +"not desired, guard the call by checking :c:func:`!_Py_IsFinalizing` or :func:" +"`sys.is_finalizing`. (Contributed by Joannah Nanjekye in :issue:`36475`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1858 ../../whatsnew/3.8.rst:2321 +#: ../../whatsnew/3.8.rst:1858 ../../whatsnew/3.8.rst:2324 msgid "Changes in the Python API" msgstr "Python API 的變更" @@ -2981,102 +2964,105 @@ msgstr "" msgid "" ":class:`subprocess.Popen` can now use :func:`os.posix_spawn` in some cases " "for better performance. On Windows Subsystem for Linux and QEMU User " -"Emulation, the :class:`Popen` constructor using :func:`os.posix_spawn` no " -"longer raises an exception on errors like \"missing program\". Instead the " -"child process fails with a non-zero :attr:`~Popen.returncode`. (Contributed " -"by Joannah Nanjekye and Victor Stinner in :issue:`35537`.)" +"Emulation, the :class:`~subprocess.Popen` constructor using :func:`os." +"posix_spawn` no longer raises an exception on errors like \"missing " +"program\". Instead the child process fails with a non-zero :attr:" +"`~subprocess.Popen.returncode`. (Contributed by Joannah Nanjekye and Victor " +"Stinner in :issue:`35537`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1872 +#: ../../whatsnew/3.8.rst:1873 msgid "" "The *preexec_fn* argument of * :class:`subprocess.Popen` is no longer " "compatible with subinterpreters. The use of the parameter in a " -"subinterpreter now raises :exc:`RuntimeError`. (Contributed by Eric Snow " -"in :issue:`34651`, modified by Christian Heimes in :issue:`37951`.)" +"subinterpreter now raises :exc:`RuntimeError`. (Contributed by Eric Snow in :" +"issue:`34651`, modified by Christian Heimes in :issue:`37951`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1878 +#: ../../whatsnew/3.8.rst:1879 msgid "" -"The :meth:`imap.IMAP4.logout` method no longer silently ignores arbitrary " +"The :meth:`imaplib.IMAP4.logout` method no longer silently ignores arbitrary " "exceptions. (Contributed by Victor Stinner in :issue:`36348`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1886 +#: ../../whatsnew/3.8.rst:1887 msgid "" "The :func:`statistics.mode` function no longer raises an exception when " "given multimodal data. Instead, it returns the first mode encountered in " "the input data. (Contributed by Raymond Hettinger in :issue:`35892`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1891 +#: ../../whatsnew/3.8.rst:1892 msgid "" -"The :meth:`~tkinter.ttk.Treeview.selection` method of " -"the :class:`tkinter.ttk.Treeview` class no longer takes arguments. Using it " -"with arguments for changing the selection was deprecated in Python 3.6. Use " -"specialized methods like :meth:`~tkinter.ttk.Treeview.selection_set` for " -"changing the selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)" +"The :meth:`~tkinter.ttk.Treeview.selection` method of the :class:`tkinter." +"ttk.Treeview` class no longer takes arguments. Using it with arguments for " +"changing the selection was deprecated in Python 3.6. Use specialized " +"methods like :meth:`~tkinter.ttk.Treeview.selection_set` for changing the " +"selection. (Contributed by Serhiy Storchaka in :issue:`31508`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1897 +#: ../../whatsnew/3.8.rst:1898 msgid "" -"The :meth:`writexml`, :meth:`toxml` and :meth:`toprettyxml` methods " -"of :mod:`xml.dom.minidom`, and the :meth:`write` method of :mod:`xml.etree`, " -"now preserve the attribute order specified by the user. (Contributed by " -"Diego Rojas and Raymond Hettinger in :issue:`34160`.)" +"The :meth:`~xml.dom.minidom.Node.writexml`, :meth:`~xml.dom.minidom.Node." +"toxml` and :meth:`~xml.dom.minidom.Node.toprettyxml` methods of :mod:`xml." +"dom.minidom` and the :meth:`~xml.etree.ElementTree.ElementTree.write` method " +"of :mod:`xml.etree.ElementTree` now preserve the attribute order specified " +"by the user. (Contributed by Diego Rojas and Raymond Hettinger in :issue:" +"`34160`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1902 +#: ../../whatsnew/3.8.rst:1905 msgid "" -"A :mod:`dbm.dumb` database opened with flags ``'r'`` is now read-" -"only. :func:`dbm.dumb.open` with flags ``'r'`` and ``'w'`` no longer creates " -"a database if it does not exist. (Contributed by Serhiy Storchaka " -"in :issue:`32749`.)" +"A :mod:`dbm.dumb` database opened with flags ``'r'`` is now read-only. :func:" +"`dbm.dumb.open` with flags ``'r'`` and ``'w'`` no longer creates a database " +"if it does not exist. (Contributed by Serhiy Storchaka in :issue:`32749`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1907 +#: ../../whatsnew/3.8.rst:1910 msgid "" -"The ``doctype()`` method defined in a subclass " -"of :class:`~xml.etree.ElementTree.XMLParser` will no longer be called and " -"will emit a :exc:`RuntimeWarning` instead of a :exc:`DeprecationWarning`. " -"Define the :meth:`doctype() ` " -"method on a target for handling an XML doctype declaration. (Contributed by " -"Serhiy Storchaka in :issue:`29209`.)" +"The ``doctype()`` method defined in a subclass of :class:`~xml.etree." +"ElementTree.XMLParser` will no longer be called and will emit a :exc:" +"`RuntimeWarning` instead of a :exc:`DeprecationWarning`. Define the :meth:" +"`doctype() ` method on a target " +"for handling an XML doctype declaration. (Contributed by Serhiy Storchaka " +"in :issue:`29209`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1914 +#: ../../whatsnew/3.8.rst:1917 msgid "" "A :exc:`RuntimeError` is now raised when the custom metaclass doesn't " -"provide the ``__classcell__`` entry in the namespace passed to " -"``type.__new__``. A :exc:`DeprecationWarning` was emitted in Python " -"3.6--3.7. (Contributed by Serhiy Storchaka in :issue:`23722`.)" +"provide the ``__classcell__`` entry in the namespace passed to ``type." +"__new__``. A :exc:`DeprecationWarning` was emitted in Python 3.6--3.7. " +"(Contributed by Serhiy Storchaka in :issue:`23722`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1919 +#: ../../whatsnew/3.8.rst:1922 msgid "" -"The :class:`cProfile.Profile` class can now be used as a context manager. " -"(Contributed by Scott Sanderson in :issue:`29235`.)" +"The :class:`cProfile.Profile ` class can now be used as a " +"context manager. (Contributed by Scott Sanderson in :issue:`29235`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1922 +#: ../../whatsnew/3.8.rst:1925 msgid "" -":func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`, :func:`shutil.copytree` " -"and :func:`shutil.move` use platform-specific \"fast-copy\" syscalls " -"(see :ref:`shutil-platform-dependent-efficient-copy-operations` section)." +":func:`shutil.copyfile`, :func:`shutil.copy`, :func:`shutil.copy2`, :func:" +"`shutil.copytree` and :func:`shutil.move` use platform-specific \"fast-" +"copy\" syscalls (see :ref:`shutil-platform-dependent-efficient-copy-" +"operations` section)." msgstr "" -#: ../../whatsnew/3.8.rst:1927 +#: ../../whatsnew/3.8.rst:1930 msgid "" ":func:`shutil.copyfile` default buffer size on Windows was changed from 16 " "KiB to 1 MiB." msgstr "" -#: ../../whatsnew/3.8.rst:1930 +#: ../../whatsnew/3.8.rst:1933 msgid "" "The ``PyGC_Head`` struct has changed completely. All code that touched the " "struct member should be rewritten. (See :issue:`33597`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1933 +#: ../../whatsnew/3.8.rst:1936 msgid "" "The :c:type:`PyInterpreterState` struct has been moved into the \"internal\" " "header files (specifically Include/internal/pycore_pystate.h). An opaque " @@ -3088,7 +3074,7 @@ msgid "" "functions to the public API). (See :issue:`35886`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1943 +#: ../../whatsnew/3.8.rst:1946 msgid "" "The :meth:`mmap.flush() ` method now returns ``None`` on " "success and raises an exception on error under all platforms. Previously, " @@ -3098,30 +3084,29 @@ msgid "" "(Contributed by Berker Peksag in :issue:`2122`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1950 +#: ../../whatsnew/3.8.rst:1953 msgid "" ":mod:`xml.dom.minidom` and :mod:`xml.sax` modules no longer process external " "entities by default. (Contributed by Christian Heimes in :issue:`17239`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1954 +#: ../../whatsnew/3.8.rst:1957 msgid "" -"Deleting a key from a read-only :mod:`dbm` database " -"(:mod:`dbm.dumb`, :mod:`dbm.gnu` or :mod:`dbm.ndbm`) raises :attr:`error` " -"(:exc:`dbm.dumb.error`, :exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) " -"instead of :exc:`KeyError`. (Contributed by Xiang Zhang in :issue:`33106`.)" +"Deleting a key from a read-only :mod:`dbm` database (:mod:`dbm.dumb`, :mod:" +"`dbm.gnu` or :mod:`dbm.ndbm`) raises :attr:`!error` (:exc:`dbm.dumb.error`, :" +"exc:`dbm.gnu.error` or :exc:`dbm.ndbm.error`) instead of :exc:`KeyError`. " +"(Contributed by Xiang Zhang in :issue:`33106`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1959 +#: ../../whatsnew/3.8.rst:1962 msgid "" -"Simplified AST for literals. All constants will be represented " -"as :class:`ast.Constant` instances. Instantiating old classes ``Num``, " -"``Str``, ``Bytes``, ``NameConstant`` and ``Ellipsis`` will return an " -"instance of ``Constant``. (Contributed by Serhiy Storchaka " -"in :issue:`32892`.)" +"Simplified AST for literals. All constants will be represented as :class:" +"`ast.Constant` instances. Instantiating old classes ``Num``, ``Str``, " +"``Bytes``, ``NameConstant`` and ``Ellipsis`` will return an instance of " +"``Constant``. (Contributed by Serhiy Storchaka in :issue:`32892`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1975 +#: ../../whatsnew/3.8.rst:1978 msgid "" "The function :func:`asyncio.wait_for` now correctly waits for cancellation " "when using an instance of :class:`asyncio.Task`. Previously, upon reaching " @@ -3129,41 +3114,40 @@ msgid "" "Pranskevichus in :issue:`32751`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1980 +#: ../../whatsnew/3.8.rst:1983 msgid "" "The function :func:`asyncio.BaseTransport.get_extra_info` now returns a safe " "to use socket object when 'socket' is passed to the *name* parameter. " "(Contributed by Yury Selivanov in :issue:`37027`.)" msgstr "" -#: ../../whatsnew/3.8.rst:1984 +#: ../../whatsnew/3.8.rst:1987 msgid ":class:`asyncio.BufferedProtocol` has graduated to the stable API." msgstr "" -#: ../../whatsnew/3.8.rst:1988 +#: ../../whatsnew/3.8.rst:1991 msgid "" "DLL dependencies for extension modules and DLLs loaded with :mod:`ctypes` on " "Windows are now resolved more securely. Only the system paths, the directory " -"containing the DLL or PYD file, and directories added " -"with :func:`~os.add_dll_directory` are searched for load-time dependencies. " -"Specifically, :envvar:`PATH` and the current working directory are no longer " -"used, and modifications to these will no longer have any effect on normal " -"DLL resolution. If your application relies on these mechanisms, you should " -"check for :func:`~os.add_dll_directory` and if it exists, use it to add your " -"DLLs directory while loading your library. Note that Windows 7 users will " -"need to ensure that Windows Update KB2533623 has been installed (this is " -"also verified by the installer). (Contributed by Steve Dower " -"in :issue:`36085`.)" +"containing the DLL or PYD file, and directories added with :func:`~os." +"add_dll_directory` are searched for load-time dependencies. Specifically, :" +"envvar:`PATH` and the current working directory are no longer used, and " +"modifications to these will no longer have any effect on normal DLL " +"resolution. If your application relies on these mechanisms, you should check " +"for :func:`~os.add_dll_directory` and if it exists, use it to add your DLLs " +"directory while loading your library. Note that Windows 7 users will need to " +"ensure that Windows Update KB2533623 has been installed (this is also " +"verified by the installer). (Contributed by Steve Dower in :issue:`36085`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2001 +#: ../../whatsnew/3.8.rst:2004 msgid "" "The header files and functions related to pgen have been removed after its " "replacement by a pure Python implementation. (Contributed by Pablo Galindo " "in :issue:`36623`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2005 +#: ../../whatsnew/3.8.rst:2008 msgid "" ":class:`types.CodeType` has a new parameter in the second position of the " "constructor (*posonlyargcount*) to support positional-only arguments defined " @@ -3173,17 +3157,17 @@ msgid "" "code future-proof." msgstr "" -#: ../../whatsnew/3.8.rst:2012 +#: ../../whatsnew/3.8.rst:2015 msgid "" "The parameter ``digestmod`` for :func:`hmac.new` no longer uses the MD5 " "digest by default." msgstr "" -#: ../../whatsnew/3.8.rst:2016 +#: ../../whatsnew/3.8.rst:2019 msgid "Changes in the C API" msgstr "C API 中的改動" -#: ../../whatsnew/3.8.rst:2018 +#: ../../whatsnew/3.8.rst:2021 msgid "" "The :c:struct:`PyCompilerFlags` structure got a new *cf_feature_version* " "field. It should be initialized to ``PY_MINOR_VERSION``. The field is " @@ -3191,14 +3175,14 @@ msgid "" "in *cf_flags*. (Contributed by Guido van Rossum in :issue:`35766`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2024 +#: ../../whatsnew/3.8.rst:2027 msgid "" "The :c:func:`!PyEval_ReInitThreads` function has been removed from the C " "API. It should not be called explicitly: use :c:func:`PyOS_AfterFork_Child` " "instead. (Contributed by Victor Stinner in :issue:`36728`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2029 +#: ../../whatsnew/3.8.rst:2032 msgid "" "On Unix, C extensions are no longer linked to libpython except on Android " "and Cygwin. When Python is embedded, ``libpython`` must not be loaded with " @@ -3209,31 +3193,30 @@ msgid "" "Stinner in :issue:`21536`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2037 +#: ../../whatsnew/3.8.rst:2040 msgid "" -"Use of ``#`` variants of formats in parsing or building value " -"(e.g. :c:func:`PyArg_ParseTuple`, :c:func:`Py_BuildValue`, :c:func:`PyObject_CallFunction`, " -"etc.) without ``PY_SSIZE_T_CLEAN`` defined raises ``DeprecationWarning`` " -"now. It will be removed in 3.10 or 4.0. Read :ref:`arg-parsing` for detail. " -"(Contributed by Inada Naoki in :issue:`36381`.)" +"Use of ``#`` variants of formats in parsing or building value (e.g. :c:func:" +"`PyArg_ParseTuple`, :c:func:`Py_BuildValue`, :c:func:" +"`PyObject_CallFunction`, etc.) without ``PY_SSIZE_T_CLEAN`` defined raises " +"``DeprecationWarning`` now. It will be removed in 3.10 or 4.0. Read :ref:" +"`arg-parsing` for detail. (Contributed by Inada Naoki in :issue:`36381`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2043 +#: ../../whatsnew/3.8.rst:2046 msgid "" -"Instances of heap-allocated types (such as those created " -"with :c:func:`PyType_FromSpec`) hold a reference to their type object. " -"Increasing the reference count of these type objects has been moved " -"from :c:func:`PyType_GenericAlloc` to the more low-level " -"functions, :c:func:`PyObject_Init` and :c:func:`PyObject_INIT`. This makes " -"types created through :c:func:`PyType_FromSpec` behave like other classes in " -"managed code." +"Instances of heap-allocated types (such as those created with :c:func:" +"`PyType_FromSpec`) hold a reference to their type object. Increasing the " +"reference count of these type objects has been moved from :c:func:" +"`PyType_GenericAlloc` to the more low-level functions, :c:func:" +"`PyObject_Init` and :c:macro:`!PyObject_INIT`. This makes types created " +"through :c:func:`PyType_FromSpec` behave like other classes in managed code." msgstr "" -#: ../../whatsnew/3.8.rst:2051 +#: ../../whatsnew/3.8.rst:2054 msgid ":ref:`Statically allocated types ` are not affected." msgstr "" -#: ../../whatsnew/3.8.rst:2053 +#: ../../whatsnew/3.8.rst:2056 msgid "" "For the vast majority of cases, there should be no side effect. However, " "types that manually increase the reference count after allocating an " @@ -3242,26 +3225,26 @@ msgid "" "instance deallocation." msgstr "" -#: ../../whatsnew/3.8.rst:2059 +#: ../../whatsnew/3.8.rst:2062 msgid "" "To correctly port these types into 3.8, please apply the following changes:" msgstr "" -#: ../../whatsnew/3.8.rst:2062 +#: ../../whatsnew/3.8.rst:2065 msgid "" "Remove :c:macro:`Py_INCREF` on the type object after allocating an instance " -"- if any. This may happen after " -"calling :c:macro:`PyObject_New`, :c:macro:`PyObject_NewVar`, :c:func:`PyObject_GC_New`, :c:func:`PyObject_GC_NewVar`, " -"or any other custom allocator that uses :c:func:`PyObject_Init` " -"or :c:func:`PyObject_INIT`." +"- if any. This may happen after calling :c:macro:`PyObject_New`, :c:macro:" +"`PyObject_NewVar`, :c:func:`PyObject_GC_New`, :c:func:`PyObject_GC_NewVar`, " +"or any other custom allocator that uses :c:func:`PyObject_Init` or :c:macro:" +"`!PyObject_INIT`." msgstr "" -#: ../../whatsnew/3.8.rst:2069 ../../whatsnew/3.8.rst:2088 -#: ../../whatsnew/3.8.rst:2107 +#: ../../whatsnew/3.8.rst:2072 ../../whatsnew/3.8.rst:2091 +#: ../../whatsnew/3.8.rst:2110 msgid "Example:" msgstr "範例:" -#: ../../whatsnew/3.8.rst:2071 +#: ../../whatsnew/3.8.rst:2074 msgid "" "static foo_struct *\n" "foo_new(PyObject *type) {\n" @@ -3276,13 +3259,13 @@ msgid "" "}" msgstr "" -#: ../../whatsnew/3.8.rst:2085 +#: ../../whatsnew/3.8.rst:2088 msgid "" "Ensure that all custom ``tp_dealloc`` functions of heap-allocated types " "decrease the type's reference count." msgstr "" -#: ../../whatsnew/3.8.rst:2090 +#: ../../whatsnew/3.8.rst:2093 msgid "" "static void\n" "foo_dealloc(foo_struct *instance) {\n" @@ -3295,47 +3278,46 @@ msgid "" "}" msgstr "" -#: ../../whatsnew/3.8.rst:2102 +#: ../../whatsnew/3.8.rst:2105 msgid "(Contributed by Eddie Elizondo in :issue:`35810`.)" msgstr "(由 Eddie Elizondo 在 :issue:`35810` 中貢獻。)" -#: ../../whatsnew/3.8.rst:2104 +#: ../../whatsnew/3.8.rst:2107 msgid "" "The :c:macro:`Py_DEPRECATED()` macro has been implemented for MSVC. The " "macro now must be placed before the symbol name." msgstr "" -#: ../../whatsnew/3.8.rst:2109 +#: ../../whatsnew/3.8.rst:2112 msgid "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" -msgstr "" +msgstr "Py_DEPRECATED(3.8) PyAPI_FUNC(int) Py_OldFunction(void);" -#: ../../whatsnew/3.8.rst:2113 +#: ../../whatsnew/3.8.rst:2116 msgid "(Contributed by Zackery Spytz in :issue:`33407`.)" msgstr "(由 Zackery Spytz 在 :issue:`33407` 中貢獻。)" -#: ../../whatsnew/3.8.rst:2115 +#: ../../whatsnew/3.8.rst:2118 msgid "" "The interpreter does not pretend to support binary compatibility of " "extension types across feature releases, anymore. A :c:type:`PyTypeObject` " "exported by a third-party extension module is supposed to have all the slots " -"expected in the current Python version, " -"including :c:member:`~PyTypeObject.tp_finalize` " -"(:c:macro:`Py_TPFLAGS_HAVE_FINALIZE` is not checked anymore before " -"reading :c:member:`~PyTypeObject.tp_finalize`)." +"expected in the current Python version, including :c:member:`~PyTypeObject." +"tp_finalize` (:c:macro:`Py_TPFLAGS_HAVE_FINALIZE` is not checked anymore " +"before reading :c:member:`~PyTypeObject.tp_finalize`)." msgstr "" -#: ../../whatsnew/3.8.rst:2122 +#: ../../whatsnew/3.8.rst:2125 msgid "(Contributed by Antoine Pitrou in :issue:`32388`.)" msgstr "(由 Antoine Pitrou 在 :issue:`32388` 中貢獻。)" -#: ../../whatsnew/3.8.rst:2124 +#: ../../whatsnew/3.8.rst:2127 msgid "" "The functions :c:func:`!PyNode_AddChild` and :c:func:`!PyParser_AddToken` " "now accept two additional ``int`` arguments *end_lineno* and " "*end_col_offset*." msgstr "" -#: ../../whatsnew/3.8.rst:2127 +#: ../../whatsnew/3.8.rst:2130 msgid "" "The :file:`libpython38.a` file to allow MinGW tools to link directly " "against :file:`python38.dll` is no longer included in the regular Windows " @@ -3344,7 +3326,7 @@ msgid "" "package:" msgstr "" -#: ../../whatsnew/3.8.rst:2132 +#: ../../whatsnew/3.8.rst:2135 msgid "" "gendef - python38.dll > tmp.def\n" "dlltool --dllname python38.dll --def tmp.def --output-lib libpython38.a" @@ -3352,24 +3334,24 @@ msgstr "" "gendef - python38.dll > tmp.def\n" "dlltool --dllname python38.dll --def tmp.def --output-lib libpython38.a" -#: ../../whatsnew/3.8.rst:2137 +#: ../../whatsnew/3.8.rst:2140 msgid "" "The location of an installed :file:`pythonXY.dll` will depend on the " -"installation options and the version and language of Windows. " -"See :ref:`using-on-windows` for more information. The resulting library " -"should be placed in the same directory as :file:`pythonXY.lib`, which is " -"generally the :file:`libs` directory under your Python installation." +"installation options and the version and language of Windows. See :ref:" +"`using-on-windows` for more information. The resulting library should be " +"placed in the same directory as :file:`pythonXY.lib`, which is generally " +"the :file:`libs` directory under your Python installation." msgstr "" -#: ../../whatsnew/3.8.rst:2143 +#: ../../whatsnew/3.8.rst:2146 msgid "(Contributed by Steve Dower in :issue:`37351`.)" msgstr "(由 Steve Dower 在 :issue:`37351` 中貢獻。)" -#: ../../whatsnew/3.8.rst:2147 +#: ../../whatsnew/3.8.rst:2150 msgid "CPython bytecode changes" msgstr "CPython 位元組碼變更" -#: ../../whatsnew/3.8.rst:2149 +#: ../../whatsnew/3.8.rst:2152 msgid "" "The interpreter loop has been simplified by moving the logic of unrolling " "the stack of blocks into the compiler. The compiler emits now explicit " @@ -3377,7 +3359,7 @@ msgid "" "code for :keyword:`break`, :keyword:`continue` and :keyword:`return`." msgstr "" -#: ../../whatsnew/3.8.rst:2155 +#: ../../whatsnew/3.8.rst:2158 msgid "" "Removed opcodes :opcode:`!BREAK_LOOP`, :opcode:`!CONTINUE_LOOP`, :opcode:`!" "SETUP_LOOP` and :opcode:`!SETUP_EXCEPT`. Added new opcodes :opcode:`!" @@ -3386,22 +3368,22 @@ msgid "" "WITH_CLEANUP_START`." msgstr "" -#: ../../whatsnew/3.8.rst:2161 +#: ../../whatsnew/3.8.rst:2164 msgid "" -"(Contributed by Mark Shannon, Antoine Pitrou and Serhiy Storchaka " -"in :issue:`17611`.)" +"(Contributed by Mark Shannon, Antoine Pitrou and Serhiy Storchaka in :issue:" +"`17611`.)" msgstr "" "(由 Mark Shannon、Antoine Pitrou 和 Serhiy Storchaka 在 :issue:`17611` 中貢" "獻。)" -#: ../../whatsnew/3.8.rst:2164 +#: ../../whatsnew/3.8.rst:2167 msgid "" "Added new opcode :opcode:`END_ASYNC_FOR` for handling exceptions raised when " "awaiting a next item in an :keyword:`async for` loop. (Contributed by Serhiy " "Storchaka in :issue:`33041`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2168 +#: ../../whatsnew/3.8.rst:2171 msgid "" "The :opcode:`MAP_ADD` now expects the value as the first element in the " "stack and the key as the second element. This change was made so the key is " @@ -3409,22 +3391,22 @@ msgid "" "by :pep:`572`. (Contributed by Jörn Heissler in :issue:`35224`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2175 +#: ../../whatsnew/3.8.rst:2178 msgid "Demos and Tools" msgstr "" -#: ../../whatsnew/3.8.rst:2177 +#: ../../whatsnew/3.8.rst:2180 msgid "" "Added a benchmark script for timing various ways to access variables: " "``Tools/scripts/var_access_benchmark.py``. (Contributed by Raymond Hettinger " "in :issue:`35884`.)" msgstr "" -#: ../../whatsnew/3.8.rst:2181 +#: ../../whatsnew/3.8.rst:2184 msgid "Here's a summary of performance improvements since Python 3.3:" msgstr "" -#: ../../whatsnew/3.8.rst:2183 +#: ../../whatsnew/3.8.rst:2186 msgid "" "Python version 3.3 3.4 3.5 3.6 3.7 " "3.8\n" @@ -3572,7 +3554,7 @@ msgstr "" " loop_overhead 0.3 0.5 0.6 0.4 0.3 " "0.3" -#: ../../whatsnew/3.8.rst:2228 +#: ../../whatsnew/3.8.rst:2231 msgid "" "The benchmarks were measured on an `Intel® Core™ i7-4960HQ processor " "