diff --git a/bugs.po b/bugs.po index b6fc3db0e4..7d6f6ec41e 100644 --- a/bugs.po +++ b/bugs.po @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2021-09-05 00:55+0800\n" +"POT-Creation-Date: 2022-04-17 00:15+0000\n" +"PO-Revision-Date: 2022-04-21 17:54+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -23,7 +23,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 2.4.3\n" +"X-Generator: Poedit 3.0.1\n" #: ../../bugs.rst:5 msgid "Dealing with Bugs" @@ -93,7 +93,7 @@ msgid "" "Overview of the process involved in reporting an improvement on the tracker." msgstr "在追蹤系統上回報改進建議的過程簡介。" -#: ../../bugs.rst:35 +#: ../../bugs.rst:36 msgid "" "`Helping with Documentation `_" @@ -107,11 +107,23 @@ msgid "" "Python documentation." msgstr "給有意成為 Python 說明文件貢獻者的綜合指南。" -#: ../../bugs.rst:41 +#: ../../bugs.rst:38 +msgid "" +"`Documentation Translations `_" +msgstr "`文件翻譯 `_" + +#: ../../bugs.rst:39 +msgid "" +"A list of GitHub pages for documentation translation and their primary " +"contacts." +msgstr "" + +#: ../../bugs.rst:45 msgid "Using the Python issue tracker" msgstr "使用 Python 問題追蹤系統" -#: ../../bugs.rst:43 +#: ../../bugs.rst:47 msgid "" "Bug reports for Python itself should be submitted via the Python Bug Tracker " "(https://bugs.python.org/). The bug tracker offers a web form which allows " @@ -121,7 +133,7 @@ msgstr "" "python.org/) 提交。這個錯誤追蹤系統提供了一個網頁表單,可以輸入並提交相關資訊" "給開發者。" -#: ../../bugs.rst:47 +#: ../../bugs.rst:51 msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " @@ -137,7 +149,7 @@ msgstr "" "迎您提供資訊!)。要確認是否重複回報,請使用頁面頂端的搜尋框來搜尋錯誤資料" "庫。" -#: ../../bugs.rst:54 +#: ../../bugs.rst:58 msgid "" "If the problem you're reporting is not already in the bug tracker, go back " "to the Python Bug Tracker and log in. If you don't already have a tracker " @@ -149,7 +161,7 @@ msgstr "" "統。如果您還沒有系統的帳號,請點選「註冊 (Register)」,如果您有 OpenID,也可" "以在側邊欄中點選其中一個 OpenID 的提供者圖示。您無法以匿名方式提交錯誤報告。" -#: ../../bugs.rst:59 +#: ../../bugs.rst:63 msgid "" "Being now logged in, you can submit a bug. Select the \"Create New\" link " "in the sidebar to open the bug reporting form." @@ -157,7 +169,7 @@ msgstr "" "如果已經登入,那您就可以提交一個錯誤。請點選側邊欄中的「新建 (Create New)」連" "結,開啟錯誤回報表單。" -#: ../../bugs.rst:62 +#: ../../bugs.rst:66 msgid "" "The submission form has a number of fields. For the \"Title\" field, enter " "a *very* short description of the problem; less than ten words is good. In " @@ -169,7 +181,7 @@ msgstr "" "型 (Type)」欄位,選擇您的問題類型;也要選擇與錯誤相關的「Component(組件)」" "和「Versions(版本)」。" -#: ../../bugs.rst:67 +#: ../../bugs.rst:71 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -180,7 +192,7 @@ msgstr "" "情況。請確定說明中包含了涉及到的任何擴充模組,以及您當時所使用的硬體和軟體平" "台(視情況而定,可以附上版本資訊)。" -#: ../../bugs.rst:72 +#: ../../bugs.rst:76 msgid "" "Each bug report will be assigned to a developer who will determine what " "needs to be done to correct the problem. You will receive an update each " @@ -189,7 +201,7 @@ msgstr "" "每一份錯誤報告會被分派給一位開發者,並由他決定要做出什麼變更來修正這個問題。" "每當該錯誤有修正動作時,您會收到更新回報。" -#: ../../bugs.rst:81 +#: ../../bugs.rst:85 msgid "" "`How to Report Bugs Effectively `_" @@ -197,7 +209,7 @@ msgstr "" "`如何有效地回報錯誤 `_" -#: ../../bugs.rst:80 +#: ../../bugs.rst:84 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -205,14 +217,14 @@ msgstr "" "這篇文章詳細說明如何建立一份有用的錯誤報告。它描述了什麼樣的資訊是有用的,以" "及這些資訊為什麼有用。" -#: ../../bugs.rst:84 +#: ../../bugs.rst:88 msgid "" "`Bug Writing Guidelines `_" msgstr "" "`錯誤撰寫指南 `_" -#: ../../bugs.rst:84 +#: ../../bugs.rst:88 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -220,11 +232,11 @@ msgstr "" "撰寫一份優良錯誤報告的相關資訊。部分的文章內容是針對 Mozilla 專案,但它也描述" "了通用的好習慣。" -#: ../../bugs.rst:90 +#: ../../bugs.rst:94 msgid "Getting started contributing to Python yourself" msgstr "開始讓自己貢獻 Python" -#: ../../bugs.rst:92 +#: ../../bugs.rst:96 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " diff --git a/library/codecs.po b/library/codecs.po index 30065e4b31..d1d8999e60 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-03 00:14+0000\n" +"POT-Creation-Date: 2022-04-20 00:15+0000\n" "PO-Revision-Date: 2018-05-23 14:40+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2538,7 +2538,7 @@ msgstr "" #: ../../library/codecs.rst:1425 msgid "" "If you need the IDNA 2008 standard from :rfc:`5891` and :rfc:`5895`, use the " -"third-party `idna module _`." +"third-party `idna module `_." msgstr "" #: ../../library/codecs.rst:1428 diff --git a/library/functions.po b/library/functions.po index 5714463fbf..34467cd6f7 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-11 08:29+0000\n" +"POT-Creation-Date: 2022-04-21 00:16+0000\n" "PO-Revision-Date: 2022-01-31 17:42+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2110,11 +2110,15 @@ msgid "" "*buffering* is an optional integer used to set the buffering policy. Pass 0 " "to switch buffering off (only allowed in binary mode), 1 to select line " "buffering (only usable in text mode), and an integer > 1 to indicate the " -"size in bytes of a fixed-size chunk buffer. When no *buffering* argument is " +"size in bytes of a fixed-size chunk buffer. Note that specifying a buffer " +"size this way applies for binary buffered I/O, but ``TextIOWrapper`` (i.e., " +"files opened with ``mode='r+'``) would have another buffering. To disable " +"buffering in ``TextIOWrapper``, consider using the ``write_through`` flag " +"for :func:`io.TextIOWrapper.reconfigure`. When no *buffering* argument is " "given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1174 +#: ../../library/functions.rst:1178 msgid "" "Binary files are buffered in fixed-size chunks; the size of the buffer is " "chosen using a heuristic trying to determine the underlying device's \"block " @@ -2122,14 +2126,14 @@ msgid "" "the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1179 +#: ../../library/functions.rst:1183 msgid "" "\"Interactive\" text files (files for which :meth:`~io.IOBase.isatty` " "returns ``True``) use line buffering. Other text files use the policy " "described above for binary files." msgstr "" -#: ../../library/functions.rst:1183 +#: ../../library/functions.rst:1187 msgid "" "*encoding* is the name of the encoding used to decode or encode the file. " "This should only be used in text mode. The default encoding is platform " @@ -2138,7 +2142,7 @@ msgid "" "module for the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1190 +#: ../../library/functions.rst:1194 msgid "" "*errors* is an optional string that specifies how encoding and decoding " "errors are to be handled—this cannot be used in binary mode. A variety of " @@ -2147,25 +2151,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1198 +#: ../../library/functions.rst:1202 msgid "" "``'strict'`` to raise a :exc:`ValueError` exception if there is an encoding " "error. The default value of ``None`` has the same effect." msgstr "" -#: ../../library/functions.rst:1202 +#: ../../library/functions.rst:1206 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1205 +#: ../../library/functions.rst:1209 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1208 +#: ../../library/functions.rst:1212 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2174,33 +2178,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1219 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " "character reference ``&#nnn;``." msgstr "" -#: ../../library/functions.rst:1219 +#: ../../library/functions.rst:1223 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1222 +#: ../../library/functions.rst:1226 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1230 +#: ../../library/functions.rst:1234 msgid "" "*newline* controls how :term:`universal newlines` mode works (it only " "applies to text mode). It can be ``None``, ``''``, ``'\\n'``, ``'\\r'``, " "and ``'\\r\\n'``. It works as follows:" msgstr "" -#: ../../library/functions.rst:1234 +#: ../../library/functions.rst:1238 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2211,7 +2215,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1242 +#: ../../library/functions.rst:1246 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2220,7 +2224,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1248 +#: ../../library/functions.rst:1252 msgid "" "If *closefd* is ``False`` and a file descriptor rather than a filename was " "given, the underlying file descriptor will be kept open when the file is " @@ -2228,7 +2232,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1253 +#: ../../library/functions.rst:1257 msgid "" "A custom opener can be used by passing a callable as *opener*. The " "underlying file descriptor for the file object is then obtained by calling " @@ -2237,12 +2241,12 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1259 +#: ../../library/functions.rst:1263 #, fuzzy msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是 :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1261 +#: ../../library/functions.rst:1265 #, fuzzy msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" @@ -2251,7 +2255,7 @@ msgstr "" "下面的示例使用 :func:`os.open` 函式返回值傳給 :ref:`dir_fd ` 的形參," "從給定的目錄中用相對路徑開啟檔案::" -#: ../../library/functions.rst:1274 +#: ../../library/functions.rst:1278 msgid "" "The type of :term:`file object` returned by the :func:`open` function " "depends on the mode. When :func:`open` is used to open a file in a text " @@ -2266,7 +2270,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1295 +#: ../../library/functions.rst:1299 #, fuzzy msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " @@ -2276,34 +2280,34 @@ msgstr "" "另請參閱檔案操作模組,例如 :mod:`fileinput`、:mod:`io` (聲明瞭 :func:" "`open`)、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 和 :mod:`shutil`。" -#: ../../library/functions.rst:1299 +#: ../../library/functions.rst:1303 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." msgstr "" -#: ../../library/functions.rst:1301 +#: ../../library/functions.rst:1305 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1307 +#: ../../library/functions.rst:1311 #, fuzzy msgid "The *opener* parameter was added." msgstr "增加了 *opener* 形參。" -#: ../../library/functions.rst:1308 +#: ../../library/functions.rst:1312 #, fuzzy msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1309 +#: ../../library/functions.rst:1313 #, fuzzy msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1310 +#: ../../library/functions.rst:1314 #, fuzzy msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " @@ -2312,17 +2316,17 @@ msgstr "" "如果檔案已存在但使用了排它性建立模式( ``'x'`` ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1316 +#: ../../library/functions.rst:1320 #, fuzzy msgid "The file is now non-inheritable." msgstr "檔案現在禁止繼承。" -#: ../../library/functions.rst:1320 +#: ../../library/functions.rst:1324 #, fuzzy msgid "The ``'U'`` mode." msgstr "``'U'`` 模式。" -#: ../../library/functions.rst:1325 +#: ../../library/functions.rst:1329 #, fuzzy msgid "" "If the system call is interrupted and the signal handler does not raise an " @@ -2332,17 +2336,17 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程式沒有觸發異常,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError` 異常(原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1328 +#: ../../library/functions.rst:1332 #, fuzzy msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理介面。" -#: ../../library/functions.rst:1333 +#: ../../library/functions.rst:1337 #, fuzzy msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1334 +#: ../../library/functions.rst:1338 #, fuzzy msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." @@ -2351,7 +2355,7 @@ msgstr "" "在 Windows 上,開啟一個控制檯緩衝區將返回 :class:`io.RawIOBase` 的子類,而不" "是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1339 +#: ../../library/functions.rst:1343 #, fuzzy msgid "" "Given a string representing one Unicode character, return an integer " @@ -2363,7 +2367,7 @@ msgstr "" "``ord('a')`` 返回整數 ``97``, ``ord('€')`` (歐元符合)返回 ``8364`` 。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1347 +#: ../../library/functions.rst:1351 #, fuzzy msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " @@ -2374,7 +2378,7 @@ msgstr "" "返回 *x* 的 *y* 次冪;如果 *z* 存在,則對 *z* 取餘(比直接 ``pow(x, y) % z`` " "計算更高效)。兩個引數形式的 ``pow(x, y)`` 等價於冪運算子: ``x**y``。" -#: ../../library/functions.rst:1352 +#: ../../library/functions.rst:1356 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2387,7 +2391,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1362 +#: ../../library/functions.rst:1366 msgid "" "For :class:`int` operands *base* and *exp*, if *mod* is present, *mod* must " "also be of integer type and *mod* must be nonzero. If *mod* is present and " @@ -2396,29 +2400,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1368 +#: ../../library/functions.rst:1372 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1375 +#: ../../library/functions.rst:1379 msgid "" "For :class:`int` operands, the three-argument form of ``pow`` now allows the " "second argument to be negative, permitting computation of modular inverses." msgstr "" -#: ../../library/functions.rst:1380 +#: ../../library/functions.rst:1384 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1387 +#: ../../library/functions.rst:1391 msgid "" "Print *objects* to the text stream *file*, separated by *sep* and followed " "by *end*. *sep*, *end*, *file*, and *flush*, if present, must be given as " "keyword arguments." msgstr "" -#: ../../library/functions.rst:1391 +#: ../../library/functions.rst:1395 msgid "" "All non-keyword arguments are converted to strings like :func:`str` does and " "written to the stream, separated by *sep* and followed by *end*. Both *sep* " @@ -2427,7 +2431,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1397 +#: ../../library/functions.rst:1401 msgid "" "The *file* argument must be an object with a ``write(string)`` method; if it " "is not present or ``None``, :data:`sys.stdout` will be used. Since printed " @@ -2435,40 +2439,40 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1402 +#: ../../library/functions.rst:1406 msgid "" "Whether the output is buffered is usually determined by *file*, but if the " "*flush* keyword argument is true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1405 +#: ../../library/functions.rst:1409 #, fuzzy msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* keyword 實參。" -#: ../../library/functions.rst:1411 +#: ../../library/functions.rst:1415 #, fuzzy msgid "Return a property attribute." msgstr "返回 property 屬性。" -#: ../../library/functions.rst:1413 +#: ../../library/functions.rst:1417 msgid "" "*fget* is a function for getting an attribute value. *fset* is a function " "for setting an attribute value. *fdel* is a function for deleting an " "attribute value. And *doc* creates a docstring for the attribute." msgstr "" -#: ../../library/functions.rst:1417 +#: ../../library/functions.rst:1421 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1434 +#: ../../library/functions.rst:1438 msgid "" "If *c* is an instance of *C*, ``c.x`` will invoke the getter, ``c.x = " "value`` will invoke the setter, and ``del c.x`` the deleter." msgstr "" -#: ../../library/functions.rst:1437 +#: ../../library/functions.rst:1441 msgid "" "If given, *doc* will be the docstring of the property attribute. Otherwise, " "the property will copy *fget*'s docstring (if it exists). This makes it " @@ -2476,14 +2480,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1450 +#: ../../library/functions.rst:1454 msgid "" "The ``@property`` decorator turns the :meth:`voltage` method into a \"getter" "\" for a read-only attribute with the same name, and it sets the docstring " "for *voltage* to \"Get the current voltage.\"" msgstr "" -#: ../../library/functions.rst:1454 +#: ../../library/functions.rst:1458 msgid "" "A property object has :attr:`~property.getter`, :attr:`~property.setter`, " "and :attr:`~property.deleter` methods usable as decorators that create a " @@ -2491,30 +2495,30 @@ msgid "" "decorated function. This is best explained with an example::" msgstr "" -#: ../../library/functions.rst:1476 +#: ../../library/functions.rst:1480 msgid "" "This code is exactly equivalent to the first example. Be sure to give the " "additional functions the same name as the original property (``x`` in this " "case.)" msgstr "" -#: ../../library/functions.rst:1480 +#: ../../library/functions.rst:1484 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1483 +#: ../../library/functions.rst:1487 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1492 +#: ../../library/functions.rst:1496 msgid "" "Rather than being a function, :class:`range` is actually an immutable " "sequence type, as documented in :ref:`typesseq-range` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1498 +#: ../../library/functions.rst:1502 msgid "" "Return a string containing a printable representation of an object. For " "many types, this function makes an attempt to return a string that would " @@ -2525,7 +2529,7 @@ msgid "" "function returns for its instances by defining a :meth:`__repr__` method." msgstr "" -#: ../../library/functions.rst:1509 +#: ../../library/functions.rst:1513 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`__reversed__` method or supports the sequence protocol (the :meth:" @@ -2533,14 +2537,14 @@ msgid "" "starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1517 +#: ../../library/functions.rst:1521 msgid "" "Return *number* rounded to *ndigits* precision after the decimal point. If " "*ndigits* is omitted or is ``None``, it returns the nearest integer to its " "input." msgstr "" -#: ../../library/functions.rst:1521 +#: ../../library/functions.rst:1525 msgid "" "For the built-in types supporting :func:`round`, values are rounded to the " "closest multiple of 10 to the power minus *ndigits*; if two multiples are " @@ -2551,13 +2555,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1530 +#: ../../library/functions.rst:1534 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1535 +#: ../../library/functions.rst:1539 msgid "" "The behavior of :func:`round` for floats can be surprising: for example, " "``round(2.675, 2)`` gives ``2.67`` instead of the expected ``2.68``. This is " @@ -2566,21 +2570,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1546 +#: ../../library/functions.rst:1550 msgid "" "Return a new :class:`set` object, optionally with elements taken from " "*iterable*. ``set`` is a built-in class. See :class:`set` and :ref:`types-" "set` for documentation about this class." msgstr "" -#: ../../library/functions.rst:1550 +#: ../../library/functions.rst:1554 msgid "" "For other containers see the built-in :class:`frozenset`, :class:`list`, :" "class:`tuple`, and :class:`dict` classes, as well as the :mod:`collections` " "module." msgstr "" -#: ../../library/functions.rst:1557 +#: ../../library/functions.rst:1561 #, fuzzy msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " @@ -2593,14 +2597,14 @@ msgstr "" "屬性。如果物件允許,該函式將刪除指定的屬性。例如 ``delattr(x, 'foobar')`` 等" "價於 ``del x.foobar`` 。" -#: ../../library/functions.rst:1565 +#: ../../library/functions.rst:1569 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " "with two leading underscores) name in order to set it with :func:`setattr`." msgstr "" -#: ../../library/functions.rst:1574 +#: ../../library/functions.rst:1578 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " @@ -2613,35 +2617,35 @@ msgid "" "func:`itertools.islice` for an alternate version that returns an iterator." msgstr "" -#: ../../library/functions.rst:1587 +#: ../../library/functions.rst:1591 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1589 +#: ../../library/functions.rst:1593 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性參數,只能使用關鍵字參數指定。" -#: ../../library/functions.rst:1591 +#: ../../library/functions.rst:1595 msgid "" "*key* specifies a function of one argument that is used to extract a " "comparison key from each element in *iterable* (for example, ``key=str." "lower``). The default value is ``None`` (compare the elements directly)." msgstr "" -#: ../../library/functions.rst:1595 +#: ../../library/functions.rst:1599 msgid "" "*reverse* is a boolean value. If set to ``True``, then the list elements " "are sorted as if each comparison were reversed." msgstr "" -#: ../../library/functions.rst:1598 +#: ../../library/functions.rst:1602 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1601 +#: ../../library/functions.rst:1605 msgid "" "The built-in :func:`sorted` function is guaranteed to be stable. A sort is " "stable if it guarantees not to change the relative order of elements that " @@ -2649,7 +2653,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1606 +#: ../../library/functions.rst:1610 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2661,22 +2665,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1615 +#: ../../library/functions.rst:1619 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1619 +#: ../../library/functions.rst:1623 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1621 +#: ../../library/functions.rst:1625 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1628 +#: ../../library/functions.rst:1632 #, fuzzy msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" @@ -2685,7 +2689,7 @@ msgstr "" "``@classmethod`` 形式是一個函式 :term:`decorator` - 參見 :ref:`function` 中關" "於函式定義的詳細介紹。" -#: ../../library/functions.rst:1631 +#: ../../library/functions.rst:1635 #, fuzzy msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " @@ -2695,14 +2699,14 @@ msgstr "" "它可以同時在類(如 ``C.f()``)和例項(如 ``C().f()``)上呼叫。例項除了它的類" "資訊,其他都會被忽略。如果一個類方法在子類上呼叫,子類會作為第一個實參傳入。" -#: ../../library/functions.rst:1635 +#: ../../library/functions.rst:1639 msgid "" "Static methods in Python are similar to those found in Java or C++. Also, " "see :func:`classmethod` for a variant that is useful for creating alternate " "class constructors." msgstr "" -#: ../../library/functions.rst:1639 +#: ../../library/functions.rst:1643 msgid "" "Like all decorators, it is also possible to call ``staticmethod`` as a " "regular function and do something with its result. This is needed in some " @@ -2711,37 +2715,37 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1651 +#: ../../library/functions.rst:1655 #, fuzzy msgid "For more information on static methods, see :ref:`types`." msgstr "關於類方法的更多資訊,請參考文件 :ref:`types` 中的標準型別的層次。" -#: ../../library/functions.rst:1653 +#: ../../library/functions.rst:1657 msgid "" "Static methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``), have a " "new ``__wrapped__`` attribute, and are now callable as regular functions." msgstr "" -#: ../../library/functions.rst:1668 +#: ../../library/functions.rst:1672 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1670 +#: ../../library/functions.rst:1674 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1676 +#: ../../library/functions.rst:1680 msgid "" "Sums *start* and the items of an *iterable* from left to right and returns " "the total. The *iterable*'s items are normally numbers, and the start value " "is not allowed to be a string." msgstr "" -#: ../../library/functions.rst:1680 +#: ../../library/functions.rst:1684 msgid "" "For some use cases, there are good alternatives to :func:`sum`. The " "preferred, fast way to concatenate a sequence of strings is by calling ``''." @@ -2750,32 +2754,32 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1686 +#: ../../library/functions.rst:1690 #, fuzzy msgid "The *start* parameter can be specified as a keyword argument." msgstr "有兩個選擇性參數,只能使用關鍵字參數指定。" -#: ../../library/functions.rst:1691 +#: ../../library/functions.rst:1695 msgid "" "Return a proxy object that delegates method calls to a parent or sibling " "class of *type*. This is useful for accessing inherited methods that have " "been overridden in a class." msgstr "" -#: ../../library/functions.rst:1695 +#: ../../library/functions.rst:1699 msgid "" "The *object-or-type* determines the :term:`method resolution order` to be " "searched. The search starts from the class right after the *type*." msgstr "" -#: ../../library/functions.rst:1699 +#: ../../library/functions.rst:1703 msgid "" "For example, if :attr:`~class.__mro__` of *object-or-type* is ``D -> B -> C -" "> A -> object`` and the value of *type* is ``B``, then :func:`super` " "searches ``C -> A -> object``." msgstr "" -#: ../../library/functions.rst:1703 +#: ../../library/functions.rst:1707 msgid "" "The :attr:`~class.__mro__` attribute of the *object-or-type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2783,7 +2787,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1708 +#: ../../library/functions.rst:1712 msgid "" "If the second argument is omitted, the super object returned is unbound. If " "the second argument is an object, ``isinstance(obj, type)`` must be true. " @@ -2791,7 +2795,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1713 +#: ../../library/functions.rst:1717 msgid "" "There are two typical use cases for *super*. In a class hierarchy with " "single inheritance, *super* can be used to refer to parent classes without " @@ -2799,7 +2803,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1718 +#: ../../library/functions.rst:1722 msgid "" "The second use case is to support cooperative multiple inheritance in a " "dynamic execution environment. This use case is unique to Python and is not " @@ -2812,18 +2816,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1728 +#: ../../library/functions.rst:1732 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1735 +#: ../../library/functions.rst:1739 msgid "" "In addition to method lookups, :func:`super` also works for attribute " "lookups. One possible use case for this is calling :term:`descriptors " "` in a parent or sibling class." msgstr "" -#: ../../library/functions.rst:1739 +#: ../../library/functions.rst:1743 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2833,7 +2837,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1746 +#: ../../library/functions.rst:1750 msgid "" "Also note that, aside from the zero argument form, :func:`super` is not " "limited to use inside methods. The two argument form specifies the " @@ -2843,33 +2847,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1753 +#: ../../library/functions.rst:1757 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1762 +#: ../../library/functions.rst:1766 msgid "" "Rather than being a function, :class:`tuple` is actually an immutable " "sequence type, as documented in :ref:`typesseq-tuple` and :ref:`typesseq`." msgstr "" -#: ../../library/functions.rst:1771 +#: ../../library/functions.rst:1775 msgid "" "With one argument, return the type of an *object*. The return value is a " "type object and generally the same object as returned by :attr:`object." "__class__ `." msgstr "" -#: ../../library/functions.rst:1775 +#: ../../library/functions.rst:1779 msgid "" "The :func:`isinstance` built-in function is recommended for testing the type " "of an object, because it takes subclasses into account." msgstr "" -#: ../../library/functions.rst:1779 +#: ../../library/functions.rst:1783 msgid "" "With three arguments, return a new type object. This is essentially a " "dynamic form of the :keyword:`class` statement. The *name* string is the " @@ -2882,11 +2886,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1794 +#: ../../library/functions.rst:1798 msgid "See also :ref:`bltin-type-objects`." msgstr "" -#: ../../library/functions.rst:1796 +#: ../../library/functions.rst:1800 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2894,23 +2898,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1801 +#: ../../library/functions.rst:1805 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1803 +#: ../../library/functions.rst:1807 msgid "" "Subclasses of :class:`type` which don't override ``type.__new__`` may no " "longer use the one-argument form to get the type of an object." msgstr "" -#: ../../library/functions.rst:1809 +#: ../../library/functions.rst:1813 msgid "" "Return the :attr:`~object.__dict__` attribute for a module, class, instance, " "or any other object with a :attr:`~object.__dict__` attribute." msgstr "" -#: ../../library/functions.rst:1812 +#: ../../library/functions.rst:1816 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2918,54 +2922,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1817 +#: ../../library/functions.rst:1821 msgid "" "Without an argument, :func:`vars` acts like :func:`locals`. Note, the " "locals dictionary is only useful for reads since updates to the locals " "dictionary are ignored." msgstr "" -#: ../../library/functions.rst:1821 +#: ../../library/functions.rst:1825 msgid "" "A :exc:`TypeError` exception is raised if an object is specified but it " "doesn't have a :attr:`~object.__dict__` attribute (for example, if its class " "defines the :attr:`~object.__slots__` attribute)." msgstr "" -#: ../../library/functions.rst:1827 +#: ../../library/functions.rst:1831 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1830 +#: ../../library/functions.rst:1834 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1839 +#: ../../library/functions.rst:1843 msgid "" "More formally: :func:`zip` returns an iterator of tuples, where the *i*-th " "tuple contains the *i*-th element from each of the argument iterables." msgstr "" -#: ../../library/functions.rst:1842 +#: ../../library/functions.rst:1846 msgid "" "Another way to think of :func:`zip` is that it turns rows into columns, and " "columns into rows. This is similar to `transposing a matrix `_." msgstr "" -#: ../../library/functions.rst:1846 +#: ../../library/functions.rst:1850 msgid "" ":func:`zip` is lazy: The elements won't be processed until the iterable is " "iterated on, e.g. by a :keyword:`!for` loop or by wrapping in a :class:" "`list`." msgstr "" -#: ../../library/functions.rst:1850 +#: ../../library/functions.rst:1854 msgid "" "One thing to consider is that the iterables passed to :func:`zip` could have " "different lengths; sometimes by design, and sometimes because of a bug in " @@ -2973,51 +2977,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1855 +#: ../../library/functions.rst:1859 msgid "" "By default, :func:`zip` stops when the shortest iterable is exhausted. It " "will ignore the remaining items in the longer iterables, cutting off the " "result to the length of the shortest iterable::" msgstr "" -#: ../../library/functions.rst:1862 +#: ../../library/functions.rst:1866 msgid "" ":func:`zip` is often used in cases where the iterables are assumed to be of " "equal length. In such cases, it's recommended to use the ``strict=True`` " "option. Its output is the same as regular :func:`zip`::" msgstr "" -#: ../../library/functions.rst:1869 +#: ../../library/functions.rst:1873 msgid "" "Unlike the default behavior, it checks that the lengths of iterables are " "identical, raising a :exc:`ValueError` if they aren't:" msgstr "" -#: ../../library/functions.rst:1877 +#: ../../library/functions.rst:1881 msgid "" "Without the ``strict=True`` argument, any bug that results in iterables of " "different lengths will be silenced, possibly manifesting as a hard-to-find " "bug in another part of the program." msgstr "" -#: ../../library/functions.rst:1881 +#: ../../library/functions.rst:1885 msgid "" "Shorter iterables can be padded with a constant value to make all the " "iterables have the same length. This is done by :func:`itertools." "zip_longest`." msgstr "" -#: ../../library/functions.rst:1885 +#: ../../library/functions.rst:1889 msgid "" "Edge cases: With a single iterable argument, :func:`zip` returns an iterator " "of 1-tuples. With no arguments, it returns an empty iterator." msgstr "" -#: ../../library/functions.rst:1888 +#: ../../library/functions.rst:1892 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:1890 +#: ../../library/functions.rst:1894 msgid "" "The left-to-right evaluation order of the iterables is guaranteed. This " "makes possible an idiom for clustering a data series into n-length groups " @@ -3026,23 +3030,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:1896 +#: ../../library/functions.rst:1900 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:1907 +#: ../../library/functions.rst:1911 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 參數。" -#: ../../library/functions.rst:1919 +#: ../../library/functions.rst:1923 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1922 +#: ../../library/functions.rst:1926 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3054,7 +3058,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1931 +#: ../../library/functions.rst:1935 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3064,7 +3068,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:1938 +#: ../../library/functions.rst:1942 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3073,7 +3077,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:1944 +#: ../../library/functions.rst:1948 msgid "" "When the *name* variable is of the form ``package.module``, normally, the " "top-level package (the name up till the first dot) is returned, *not* the " @@ -3081,58 +3085,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:1949 +#: ../../library/functions.rst:1953 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:1954 +#: ../../library/functions.rst:1958 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:1958 +#: ../../library/functions.rst:1962 msgid "" "Note how :func:`__import__` returns the toplevel module here because this is " "the object that is bound to a name by the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:1961 +#: ../../library/functions.rst:1965 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:1968 +#: ../../library/functions.rst:1972 msgid "" "Here, the ``spam.ham`` module is returned from :func:`__import__`. From " "this object, the names to import are retrieved and assigned to their " "respective names." msgstr "" -#: ../../library/functions.rst:1972 +#: ../../library/functions.rst:1976 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:1975 +#: ../../library/functions.rst:1979 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:1979 +#: ../../library/functions.rst:1983 msgid "" "When the command line options :option:`-E` or :option:`-I` are being used, " "the environment variable :envvar:`PYTHONCASEOK` is now ignored." msgstr "" -#: ../../library/functions.rst:1984 +#: ../../library/functions.rst:1988 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:1985 +#: ../../library/functions.rst:1989 #, fuzzy msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " diff --git a/library/os.path.po b/library/os.path.po index 13bb23b33a..971ea43eff 100644 --- a/library/os.path.po +++ b/library/os.path.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-01-04 00:10+0000\n" +"POT-Creation-Date: 2022-04-17 00:15+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -34,17 +34,11 @@ msgstr "" msgid "" "This module implements some useful functions on pathnames. To read or write " "files see :func:`open`, and for accessing the filesystem see the :mod:`os` " -"module. The path parameters can be passed as either strings, or bytes. " -"Applications are encouraged to represent file names as (Unicode) character " -"strings. Unfortunately, some file names may not be representable as strings " -"on Unix, so applications that need to support arbitrary file names on Unix " -"should use bytes objects to represent path names. Vice versa, using bytes " -"objects cannot represent all file names on Windows (in the standard ``mbcs`` " -"encoding), hence Windows applications should use string objects to access " -"all files." +"module. The path parameters can be passed as strings, or bytes, or any " +"object implementing the :class:`os.PathLike` protocol." msgstr "" -#: ../../library/os.path.rst:25 +#: ../../library/os.path.rst:19 msgid "" "Unlike a unix shell, Python does not do any *automatic* path expansions. " "Functions such as :func:`expanduser` and :func:`expandvars` can be invoked " @@ -52,18 +46,18 @@ msgid "" "the :mod:`glob` module.)" msgstr "" -#: ../../library/os.path.rst:32 +#: ../../library/os.path.rst:26 msgid "The :mod:`pathlib` module offers high-level path objects." msgstr "" -#: ../../library/os.path.rst:37 +#: ../../library/os.path.rst:31 msgid "" "All of these functions accept either only bytes or only string objects as " "their parameters. The result is an object of the same type, if a path or " "file name is returned." msgstr "" -#: ../../library/os.path.rst:44 +#: ../../library/os.path.rst:37 msgid "" "Since different operating systems have different path name conventions, " "there are several versions of this module in the standard library. The :mod:" @@ -74,15 +68,15 @@ msgid "" "same interface:" msgstr "" -#: ../../library/os.path.rst:52 +#: ../../library/os.path.rst:45 msgid ":mod:`posixpath` for UNIX-style paths" msgstr "" -#: ../../library/os.path.rst:53 +#: ../../library/os.path.rst:46 msgid ":mod:`ntpath` for Windows paths" msgstr "" -#: ../../library/os.path.rst:58 +#: ../../library/os.path.rst:51 msgid "" ":func:`exists`, :func:`lexists`, :func:`isdir`, :func:`isfile`, :func:" "`islink`, and :func:`ismount` now return ``False`` instead of raising an " @@ -90,30 +84,30 @@ msgid "" "OS level." msgstr "" -#: ../../library/os.path.rst:66 +#: ../../library/os.path.rst:59 msgid "" "Return a normalized absolutized version of the pathname *path*. On most " "platforms, this is equivalent to calling the function :func:`normpath` as " "follows: ``normpath(join(os.getcwd(), path))``." msgstr "" -#: ../../library/os.path.rst:70 ../../library/os.path.rst:83 -#: ../../library/os.path.rst:123 ../../library/os.path.rst:132 -#: ../../library/os.path.rst:148 ../../library/os.path.rst:158 -#: ../../library/os.path.rst:184 ../../library/os.path.rst:204 -#: ../../library/os.path.rst:221 ../../library/os.path.rst:233 -#: ../../library/os.path.rst:242 ../../library/os.path.rst:252 -#: ../../library/os.path.rst:262 ../../library/os.path.rst:272 -#: ../../library/os.path.rst:282 ../../library/os.path.rst:301 -#: ../../library/os.path.rst:331 ../../library/os.path.rst:351 -#: ../../library/os.path.rst:374 ../../library/os.path.rst:396 -#: ../../library/os.path.rst:414 ../../library/os.path.rst:427 -#: ../../library/os.path.rst:443 ../../library/os.path.rst:459 -#: ../../library/os.path.rst:484 ../../library/os.path.rst:515 +#: ../../library/os.path.rst:63 ../../library/os.path.rst:76 +#: ../../library/os.path.rst:116 ../../library/os.path.rst:125 +#: ../../library/os.path.rst:141 ../../library/os.path.rst:151 +#: ../../library/os.path.rst:177 ../../library/os.path.rst:197 +#: ../../library/os.path.rst:214 ../../library/os.path.rst:226 +#: ../../library/os.path.rst:235 ../../library/os.path.rst:245 +#: ../../library/os.path.rst:255 ../../library/os.path.rst:265 +#: ../../library/os.path.rst:275 ../../library/os.path.rst:294 +#: ../../library/os.path.rst:324 ../../library/os.path.rst:344 +#: ../../library/os.path.rst:367 ../../library/os.path.rst:389 +#: ../../library/os.path.rst:407 ../../library/os.path.rst:420 +#: ../../library/os.path.rst:436 ../../library/os.path.rst:452 +#: ../../library/os.path.rst:477 ../../library/os.path.rst:508 msgid "Accepts a :term:`path-like object`." msgstr "" -#: ../../library/os.path.rst:76 +#: ../../library/os.path.rst:69 msgid "" "Return the base name of pathname *path*. This is the second element of the " "pair returned by passing *path* to the function :func:`split`. Note that " @@ -122,7 +116,7 @@ msgid "" "the :func:`basename` function returns an empty string (``''``)." msgstr "" -#: ../../library/os.path.rst:89 +#: ../../library/os.path.rst:82 msgid "" "Return the longest common sub-path of each pathname in the sequence " "*paths*. Raise :exc:`ValueError` if *paths* contain both absolute and " @@ -130,36 +124,36 @@ msgid "" "empty. Unlike :func:`commonprefix`, this returns a valid path." msgstr "" -#: ../../library/os.path.rst:96 ../../library/os.path.rst:395 -#: ../../library/os.path.rst:407 ../../library/os.path.rst:423 -#: ../../library/os.path.rst:439 +#: ../../library/os.path.rst:89 ../../library/os.path.rst:388 +#: ../../library/os.path.rst:400 ../../library/os.path.rst:416 +#: ../../library/os.path.rst:432 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/os.path.rst:99 +#: ../../library/os.path.rst:92 msgid "Accepts a sequence of :term:`path-like objects `." msgstr "" -#: ../../library/os.path.rst:105 +#: ../../library/os.path.rst:98 msgid "" "Return the longest path prefix (taken character-by-character) that is a " "prefix of all paths in *list*. If *list* is empty, return the empty string " "(``''``)." msgstr "" -#: ../../library/os.path.rst:111 +#: ../../library/os.path.rst:104 msgid "" "This function may return invalid paths because it works a character at a " "time. To obtain a valid path, see :func:`commonpath`." msgstr "" -#: ../../library/os.path.rst:129 +#: ../../library/os.path.rst:122 msgid "" "Return the directory name of pathname *path*. This is the first element of " "the pair returned by passing *path* to the function :func:`split`." msgstr "" -#: ../../library/os.path.rst:138 +#: ../../library/os.path.rst:131 msgid "" "Return ``True`` if *path* refers to an existing path or an open file " "descriptor. Returns ``False`` for broken symbolic links. On some " @@ -168,26 +162,26 @@ msgid "" "physically exists." msgstr "" -#: ../../library/os.path.rst:144 +#: ../../library/os.path.rst:137 msgid "" "*path* can now be an integer: ``True`` is returned if it is an open file " "descriptor, ``False`` otherwise." msgstr "" -#: ../../library/os.path.rst:154 +#: ../../library/os.path.rst:147 msgid "" "Return ``True`` if *path* refers to an existing path. Returns ``True`` for " "broken symbolic links. Equivalent to :func:`exists` on platforms lacking :" "func:`os.lstat`." msgstr "" -#: ../../library/os.path.rst:166 +#: ../../library/os.path.rst:159 msgid "" "On Unix and Windows, return the argument with an initial component of ``~`` " "or ``~user`` replaced by that *user*'s home directory." msgstr "" -#: ../../library/os.path.rst:171 +#: ../../library/os.path.rst:164 msgid "" "On Unix, an initial ``~`` is replaced by the environment variable :envvar:" "`HOME` if it is set; otherwise the current user's home directory is looked " @@ -195,7 +189,7 @@ msgid "" "initial ``~user`` is looked up directly in the password directory." msgstr "" -#: ../../library/os.path.rst:176 +#: ../../library/os.path.rst:169 msgid "" "On Windows, :envvar:`USERPROFILE` will be used if set, otherwise a " "combination of :envvar:`HOMEPATH` and :envvar:`HOMEDRIVE` will be used. An " @@ -204,17 +198,17 @@ msgid "" "replacing it if so." msgstr "" -#: ../../library/os.path.rst:181 +#: ../../library/os.path.rst:174 msgid "" "If the expansion fails or if the path does not begin with a tilde, the path " "is returned unchanged." msgstr "" -#: ../../library/os.path.rst:187 +#: ../../library/os.path.rst:180 msgid "No longer uses :envvar:`HOME` on Windows." msgstr "" -#: ../../library/os.path.rst:196 +#: ../../library/os.path.rst:189 msgid "" "Return the argument with environment variables expanded. Substrings of the " "form ``$name`` or ``${name}`` are replaced by the value of environment " @@ -222,13 +216,13 @@ msgid "" "variables are left unchanged." msgstr "" -#: ../../library/os.path.rst:201 +#: ../../library/os.path.rst:194 msgid "" "On Windows, ``%name%`` expansions are supported in addition to ``$name`` and " "``${name}``." msgstr "" -#: ../../library/os.path.rst:210 +#: ../../library/os.path.rst:203 msgid "" "Return the time of last access of *path*. The return value is a floating " "point number giving the number of seconds since the epoch (see the :mod:" @@ -236,7 +230,7 @@ msgid "" "inaccessible." msgstr "" -#: ../../library/os.path.rst:217 +#: ../../library/os.path.rst:210 msgid "" "Return the time of last modification of *path*. The return value is a " "floating point number giving the number of seconds since the epoch (see " @@ -244,7 +238,7 @@ msgid "" "is inaccessible." msgstr "" -#: ../../library/os.path.rst:227 +#: ../../library/os.path.rst:220 msgid "" "Return the system's ctime which, on some systems (like Unix) is the time of " "the last metadata change, and, on others (like Windows), is the creation " @@ -253,41 +247,41 @@ msgid "" "file does not exist or is inaccessible." msgstr "" -#: ../../library/os.path.rst:239 +#: ../../library/os.path.rst:232 msgid "" "Return the size, in bytes, of *path*. Raise :exc:`OSError` if the file does " "not exist or is inaccessible." msgstr "" -#: ../../library/os.path.rst:248 +#: ../../library/os.path.rst:241 msgid "" "Return ``True`` if *path* is an absolute pathname. On Unix, that means it " "begins with a slash, on Windows that it begins with a (back)slash after " "chopping off a potential drive letter." msgstr "" -#: ../../library/os.path.rst:258 +#: ../../library/os.path.rst:251 msgid "" "Return ``True`` if *path* is an :func:`existing ` regular file. This " "follows symbolic links, so both :func:`islink` and :func:`isfile` can be " "true for the same path." msgstr "" -#: ../../library/os.path.rst:268 +#: ../../library/os.path.rst:261 msgid "" "Return ``True`` if *path* is an :func:`existing ` directory. This " "follows symbolic links, so both :func:`islink` and :func:`isdir` can be true " "for the same path." msgstr "" -#: ../../library/os.path.rst:278 +#: ../../library/os.path.rst:271 msgid "" "Return ``True`` if *path* refers to an :func:`existing ` directory " "entry that is a symbolic link. Always ``False`` if symbolic links are not " "supported by the Python runtime." msgstr "" -#: ../../library/os.path.rst:288 +#: ../../library/os.path.rst:281 msgid "" "Return ``True`` if pathname *path* is a :dfn:`mount point`: a point in a " "file system where a different file system has been mounted. On POSIX, the " @@ -300,11 +294,11 @@ msgid "" "called to see if it is different from the input path." msgstr "" -#: ../../library/os.path.rst:298 +#: ../../library/os.path.rst:291 msgid "Support for detecting non-root mount points on Windows." msgstr "" -#: ../../library/os.path.rst:307 +#: ../../library/os.path.rst:300 msgid "" "Join one or more path components intelligently. The return value is the " "concatenation of *path* and any members of *\\*paths* with exactly one " @@ -314,7 +308,7 @@ msgid "" "joining continues from the absolute path component." msgstr "" -#: ../../library/os.path.rst:314 +#: ../../library/os.path.rst:307 msgid "" "On Windows, the drive letter is not reset when an absolute path component (e." "g., ``r'\\foo'``) is encountered. If a component contains a drive letter, " @@ -324,18 +318,18 @@ msgid "" "file:`C:` (:file:`c:foo`), not :file:`c:\\\\foo`." msgstr "" -#: ../../library/os.path.rst:321 +#: ../../library/os.path.rst:314 msgid "Accepts a :term:`path-like object` for *path* and *paths*." msgstr "" -#: ../../library/os.path.rst:327 +#: ../../library/os.path.rst:320 msgid "" "Normalize the case of a pathname. On Windows, convert all characters in the " "pathname to lowercase, and also convert forward slashes to backward slashes. " "On other operating systems, return the path unchanged." msgstr "" -#: ../../library/os.path.rst:337 +#: ../../library/os.path.rst:330 msgid "" "Normalize a pathname by collapsing redundant separators and up-level " "references so that ``A//B``, ``A/B/``, ``A/./B`` and ``A/foo/../B`` all " @@ -344,7 +338,7 @@ msgid "" "backward slashes. To normalize case, use :func:`normcase`." msgstr "" -#: ../../library/os.path.rst:344 +#: ../../library/os.path.rst:337 msgid "" "On POSIX systems, in accordance with `IEEE Std 1003.1 2013 Edition; 4.13 " "Pathname Resolution \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3819,8 +3819,8 @@ msgstr "" #: ../../library/os.rst:3548 msgid "" "This search path is used when resolving dependencies for imported extension " -"modules (the module itself is resolved through sys.path), and also by :mod:" -"`ctypes`." +"modules (the module itself is resolved through :data:`sys.path`), and also " +"by :mod:`ctypes`." msgstr "" #: ../../library/os.rst:3552 diff --git a/library/pickle.po b/library/pickle.po index c8ed790efb..74b20c82fe 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2022-04-08 18:32+0000\n" "PO-Revision-Date: 2018-05-23 16:07+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -221,8 +221,8 @@ msgstr "" #: ../../library/pickle.rst:149 msgid "" "Protocol version 2 was introduced in Python 2.3. It provides much more " -"efficient pickling of :term:`new-style class`\\es. Refer to :pep:`307` for " -"information about improvements brought by protocol 2." +"efficient pickling of :term:`new-style classes `. Refer " +"to :pep:`307` for information about improvements brought by protocol 2." msgstr "" #: ../../library/pickle.rst:153 @@ -350,7 +350,7 @@ msgid "" "ignored." msgstr "" -#: ../../library/pickle.rst:249 ../../library/pickle.rst:264 +#: ../../library/pickle.rst:249 msgid "" "Arguments *file*, *fix_imports*, *encoding*, *errors*, *strict* and " "*buffers* have the same meaning as in the :class:`Unpickler` constructor." @@ -367,6 +367,12 @@ msgid "" "*data* of an object. *data* must be a :term:`bytes-like object`." msgstr "" +#: ../../library/pickle.rst:264 +msgid "" +"Arguments *fix_imports*, *encoding*, *errors*, *strict* and *buffers* have " +"the same meaning as in the :class:`Unpickler` constructor." +msgstr "" + #: ../../library/pickle.rst:271 msgid "The :mod:`pickle` module defines three exceptions:" msgstr "" @@ -658,43 +664,40 @@ msgid "The following types can be pickled:" msgstr "" #: ../../library/pickle.rst:497 -msgid "``None``, ``True``, and ``False``" -msgstr "``None``\\ 、\\ ``True`` 和 ``False``" +msgid "``None``, ``True``, and ``False``;" +msgstr "``None``\\ 、\\ ``True`` 和 ``False``\\ ;" #: ../../library/pickle.rst:499 -msgid "integers, floating point numbers, complex numbers" +msgid "integers, floating-point numbers, complex numbers;" msgstr "" #: ../../library/pickle.rst:501 -msgid "strings, bytes, bytearrays" +msgid "strings, bytes, bytearrays;" msgstr "" #: ../../library/pickle.rst:503 -msgid "tuples, lists, sets, and dictionaries containing only picklable objects" +msgid "" +"tuples, lists, sets, and dictionaries containing only picklable objects;" msgstr "" #: ../../library/pickle.rst:505 msgid "" -"functions defined at the top level of a module (using :keyword:`def`, not :" -"keyword:`lambda`)" +"functions (built-in and user-defined) defined at the top level of a module " +"(using :keyword:`def`, not :keyword:`lambda`);" msgstr "" #: ../../library/pickle.rst:508 -msgid "built-in functions defined at the top level of a module" +msgid "classes defined at the top level of a module;" msgstr "" #: ../../library/pickle.rst:510 -msgid "classes that are defined at the top level of a module" -msgstr "" - -#: ../../library/pickle.rst:512 msgid "" "instances of such classes whose :attr:`~object.__dict__` or the result of " "calling :meth:`__getstate__` is picklable (see section :ref:`pickle-inst` " "for details)." msgstr "" -#: ../../library/pickle.rst:516 +#: ../../library/pickle.rst:514 msgid "" "Attempts to pickle unpicklable objects will raise the :exc:`PicklingError` " "exception; when this happens, an unspecified number of bytes may have " @@ -704,32 +707,32 @@ msgid "" "limit with :func:`sys.setrecursionlimit`." msgstr "" -#: ../../library/pickle.rst:523 +#: ../../library/pickle.rst:521 msgid "" -"Note that functions (built-in and user-defined) are pickled by \"fully " -"qualified\" name reference, not by value. [#]_ This means that only the " -"function name is pickled, along with the name of the module the function is " -"defined in. Neither the function's code, nor any of its function attributes " -"are pickled. Thus the defining module must be importable in the unpickling " +"Note that functions (built-in and user-defined) are pickled by fully " +"qualified name, not by value. [#]_ This means that only the function name " +"is pickled, along with the name of the module the function is defined in. " +"Neither the function's code, nor any of its function attributes are " +"pickled. Thus the defining module must be importable in the unpickling " "environment, and the module must contain the named object, otherwise an " "exception will be raised. [#]_" msgstr "" -#: ../../library/pickle.rst:530 +#: ../../library/pickle.rst:528 msgid "" -"Similarly, classes are pickled by named reference, so the same restrictions " -"in the unpickling environment apply. Note that none of the class's code or " -"data is pickled, so in the following example the class attribute ``attr`` is " -"not restored in the unpickling environment::" +"Similarly, classes are pickled by fully qualified name, so the same " +"restrictions in the unpickling environment apply. Note that none of the " +"class's code or data is pickled, so in the following example the class " +"attribute ``attr`` is not restored in the unpickling environment::" msgstr "" -#: ../../library/pickle.rst:540 +#: ../../library/pickle.rst:538 msgid "" "These restrictions are why picklable functions and classes must be defined " -"in the top level of a module." +"at the top level of a module." msgstr "" -#: ../../library/pickle.rst:543 +#: ../../library/pickle.rst:541 msgid "" "Similarly, when class instances are pickled, their class's code and data are " "not pickled along with them. Only the instance data are pickled. This is " @@ -741,17 +744,17 @@ msgid "" "method." msgstr "" -#: ../../library/pickle.rst:555 +#: ../../library/pickle.rst:553 msgid "Pickling Class Instances" msgstr "" -#: ../../library/pickle.rst:559 +#: ../../library/pickle.rst:557 msgid "" "In this section, we describe the general mechanisms available to you to " "define, customize, and control how class instances are pickled and unpickled." msgstr "" -#: ../../library/pickle.rst:562 +#: ../../library/pickle.rst:560 msgid "" "In most cases, no additional code is needed to make instances picklable. By " "default, pickle will retrieve the class and the attributes of an instance " @@ -761,13 +764,13 @@ msgid "" "following code shows an implementation of this behaviour::" msgstr "" -#: ../../library/pickle.rst:577 +#: ../../library/pickle.rst:575 msgid "" "Classes can alter the default behaviour by providing one or several special " "methods:" msgstr "" -#: ../../library/pickle.rst:582 +#: ../../library/pickle.rst:580 msgid "" "In protocols 2 and newer, classes that implements the :meth:" "`__getnewargs_ex__` method can dictate the values passed to the :meth:" @@ -777,37 +780,37 @@ msgid "" "passed to the :meth:`__new__` method upon unpickling." msgstr "" -#: ../../library/pickle.rst:590 +#: ../../library/pickle.rst:588 msgid "" "You should implement this method if the :meth:`__new__` method of your class " "requires keyword-only arguments. Otherwise, it is recommended for " "compatibility to implement :meth:`__getnewargs__`." msgstr "" -#: ../../library/pickle.rst:594 +#: ../../library/pickle.rst:592 msgid ":meth:`__getnewargs_ex__` is now used in protocols 2 and 3." msgstr "" -#: ../../library/pickle.rst:600 +#: ../../library/pickle.rst:598 msgid "" "This method serves a similar purpose as :meth:`__getnewargs_ex__`, but " "supports only positional arguments. It must return a tuple of arguments " "``args`` which will be passed to the :meth:`__new__` method upon unpickling." msgstr "" -#: ../../library/pickle.rst:604 +#: ../../library/pickle.rst:602 msgid "" ":meth:`__getnewargs__` will not be called if :meth:`__getnewargs_ex__` is " "defined." msgstr "" -#: ../../library/pickle.rst:607 +#: ../../library/pickle.rst:605 msgid "" "Before Python 3.6, :meth:`__getnewargs__` was called instead of :meth:" "`__getnewargs_ex__` in protocols 2 and 3." msgstr "" -#: ../../library/pickle.rst:614 +#: ../../library/pickle.rst:612 msgid "" "Classes can further influence how their instances are pickled; if the class " "defines the method :meth:`__getstate__`, it is called and the returned " @@ -816,7 +819,7 @@ msgid "" "the instance's :attr:`~object.__dict__` is pickled as usual." msgstr "" -#: ../../library/pickle.rst:623 +#: ../../library/pickle.rst:621 msgid "" "Upon unpickling, if the class defines :meth:`__setstate__`, it is called " "with the unpickled state. In that case, there is no requirement for the " @@ -824,19 +827,19 @@ msgid "" "dictionary and its items are assigned to the new instance's dictionary." msgstr "" -#: ../../library/pickle.rst:630 +#: ../../library/pickle.rst:628 msgid "" "If :meth:`__getstate__` returns a false value, the :meth:`__setstate__` " "method will not be called upon unpickling." msgstr "" -#: ../../library/pickle.rst:634 +#: ../../library/pickle.rst:632 msgid "" "Refer to the section :ref:`pickle-state` for more information about how to " "use the methods :meth:`__getstate__` and :meth:`__setstate__`." msgstr "" -#: ../../library/pickle.rst:639 +#: ../../library/pickle.rst:637 msgid "" "At unpickling time, some methods like :meth:`__getattr__`, :meth:" "`__getattribute__`, or :meth:`__setattr__` may be called upon the instance. " @@ -845,7 +848,7 @@ msgid "" "`__init__` is not called when unpickling an instance." msgstr "" -#: ../../library/pickle.rst:648 +#: ../../library/pickle.rst:646 msgid "" "As we shall see, pickle does not use directly the methods described above. " "In fact, these methods are part of the copy protocol which implements the :" @@ -854,7 +857,7 @@ msgid "" "objects. [#]_" msgstr "" -#: ../../library/pickle.rst:654 +#: ../../library/pickle.rst:652 msgid "" "Although powerful, implementing :meth:`__reduce__` directly in your classes " "is error prone. For this reason, class designers should use the high-level " @@ -864,14 +867,14 @@ msgid "" "pickling or both." msgstr "" -#: ../../library/pickle.rst:663 +#: ../../library/pickle.rst:661 msgid "" "The interface is currently defined as follows. The :meth:`__reduce__` " "method takes no argument and shall return either a string or preferably a " "tuple (the returned object is often referred to as the \"reduce value\")." msgstr "" -#: ../../library/pickle.rst:667 +#: ../../library/pickle.rst:665 msgid "" "If a string is returned, the string should be interpreted as the name of a " "global variable. It should be the object's local name relative to its " @@ -879,26 +882,26 @@ msgid "" "object's module. This behaviour is typically useful for singletons." msgstr "" -#: ../../library/pickle.rst:672 +#: ../../library/pickle.rst:670 msgid "" "When a tuple is returned, it must be between two and six items long. " "Optional items can either be omitted, or ``None`` can be provided as their " "value. The semantics of each item are in order:" msgstr "" -#: ../../library/pickle.rst:678 +#: ../../library/pickle.rst:676 msgid "" "A callable object that will be called to create the initial version of the " "object." msgstr "" -#: ../../library/pickle.rst:681 +#: ../../library/pickle.rst:679 msgid "" "A tuple of arguments for the callable object. An empty tuple must be given " "if the callable does not accept any argument." msgstr "" -#: ../../library/pickle.rst:684 +#: ../../library/pickle.rst:682 msgid "" "Optionally, the object's state, which will be passed to the object's :meth:" "`__setstate__` method as previously described. If the object has no such " @@ -906,7 +909,7 @@ msgid "" "object's :attr:`~object.__dict__` attribute." msgstr "" -#: ../../library/pickle.rst:689 +#: ../../library/pickle.rst:687 msgid "" "Optionally, an iterator (and not a sequence) yielding successive items. " "These items will be appended to the object either using ``obj.append(item)`` " @@ -918,7 +921,7 @@ msgid "" "must be supported.)" msgstr "" -#: ../../library/pickle.rst:698 +#: ../../library/pickle.rst:696 msgid "" "Optionally, an iterator (not a sequence) yielding successive key-value " "pairs. These items will be stored to the object using ``obj[key] = " @@ -926,7 +929,7 @@ msgid "" "by other classes as long as they implement :meth:`__setitem__`." msgstr "" -#: ../../library/pickle.rst:703 +#: ../../library/pickle.rst:701 msgid "" "Optionally, a callable with a ``(obj, state)`` signature. This callable " "allows the user to programmatically control the state-updating behavior of a " @@ -935,11 +938,11 @@ msgid "" "meth:`__setstate__`." msgstr "" -#: ../../library/pickle.rst:709 +#: ../../library/pickle.rst:707 msgid "The optional sixth tuple item, ``(obj, state)``, was added." msgstr "" -#: ../../library/pickle.rst:715 +#: ../../library/pickle.rst:713 msgid "" "Alternatively, a :meth:`__reduce_ex__` method may be defined. The only " "difference is this method should take a single integer argument, the " @@ -949,11 +952,11 @@ msgid "" "provide backwards-compatible reduce values for older Python releases." msgstr "" -#: ../../library/pickle.rst:727 +#: ../../library/pickle.rst:725 msgid "Persistence of External Objects" msgstr "" -#: ../../library/pickle.rst:733 +#: ../../library/pickle.rst:731 msgid "" "For the benefit of object persistence, the :mod:`pickle` module supports the " "notion of a reference to an object outside the pickled data stream. Such " @@ -962,7 +965,7 @@ msgid "" "(for any newer protocol)." msgstr "" -#: ../../library/pickle.rst:739 +#: ../../library/pickle.rst:737 msgid "" "The resolution of such persistent IDs is not defined by the :mod:`pickle` " "module; it will delegate this resolution to the user-defined methods on the " @@ -970,7 +973,7 @@ msgid "" "persistent_load` respectively." msgstr "" -#: ../../library/pickle.rst:744 +#: ../../library/pickle.rst:742 msgid "" "To pickle objects that have an external persistent ID, the pickler must have " "a custom :meth:`~Pickler.persistent_id` method that takes an object as an " @@ -981,62 +984,67 @@ msgid "" "persistent ID." msgstr "" -#: ../../library/pickle.rst:751 +#: ../../library/pickle.rst:749 msgid "" "To unpickle external objects, the unpickler must have a custom :meth:" "`~Unpickler.persistent_load` method that takes a persistent ID object and " "returns the referenced object." msgstr "" -#: ../../library/pickle.rst:755 +#: ../../library/pickle.rst:753 msgid "" "Here is a comprehensive example presenting how persistent ID can be used to " "pickle external objects by reference." msgstr "" -#: ../../library/pickle.rst:763 +#: ../../library/pickle.rst:761 msgid "Dispatch Tables" msgstr "" -#: ../../library/pickle.rst:765 +#: ../../library/pickle.rst:763 msgid "" "If one wants to customize pickling of some classes without disturbing any " "other code which depends on pickling, then one can create a pickler with a " "private dispatch table." msgstr "" -#: ../../library/pickle.rst:769 +#: ../../library/pickle.rst:767 msgid "" "The global dispatch table managed by the :mod:`copyreg` module is available " "as :data:`copyreg.dispatch_table`. Therefore, one may choose to use a " "modified copy of :data:`copyreg.dispatch_table` as a private dispatch table." msgstr "" -#: ../../library/pickle.rst:774 +#: ../../library/pickle.rst:772 msgid "For example ::" msgstr "" "舉例來說:\n" "\n" "::" -#: ../../library/pickle.rst:781 +#: ../../library/pickle.rst:779 msgid "" "creates an instance of :class:`pickle.Pickler` with a private dispatch table " "which handles the ``SomeClass`` class specially. Alternatively, the code ::" msgstr "" -#: ../../library/pickle.rst:791 +#: ../../library/pickle.rst:789 msgid "" -"does the same, but all instances of ``MyPickler`` will by default share the " -"same dispatch table. The equivalent code using the :mod:`copyreg` module " -"is ::" +"does the same but all instances of ``MyPickler`` will by default share the " +"private dispatch table. On the other hand, the code ::" msgstr "" -#: ../../library/pickle.rst:802 +#: ../../library/pickle.rst:796 +msgid "" +"modifies the global dispatch table shared by all users of the :mod:`copyreg` " +"module." +msgstr "" + +#: ../../library/pickle.rst:801 msgid "Handling Stateful Objects" msgstr "" -#: ../../library/pickle.rst:808 +#: ../../library/pickle.rst:807 msgid "" "Here's an example that shows how to modify pickling behavior for a class. " "The :class:`TextReader` class opens a text file, and returns the line number " @@ -1048,15 +1056,15 @@ msgid "" "behavior. ::" msgstr "" -#: ../../library/pickle.rst:854 +#: ../../library/pickle.rst:853 msgid "A sample usage might be something like this::" msgstr "" -#: ../../library/pickle.rst:868 +#: ../../library/pickle.rst:867 msgid "Custom Reduction for Types, Functions, and Other Objects" msgstr "" -#: ../../library/pickle.rst:872 +#: ../../library/pickle.rst:871 msgid "" "Sometimes, :attr:`~Pickler.dispatch_table` may not be flexible enough. In " "particular we may want to customize pickling based on another criterion than " @@ -1064,7 +1072,7 @@ msgid "" "classes." msgstr "" -#: ../../library/pickle.rst:877 +#: ../../library/pickle.rst:876 msgid "" "For those cases, it is possible to subclass from the :class:`Pickler` class " "and implement a :meth:`~Pickler.reducer_override` method. This method can " @@ -1073,14 +1081,14 @@ msgid "" "behavior." msgstr "" -#: ../../library/pickle.rst:882 +#: ../../library/pickle.rst:881 msgid "" "If both the :attr:`~Pickler.dispatch_table` and :meth:`~Pickler." "reducer_override` are defined, then :meth:`~Pickler.reducer_override` method " "takes priority." msgstr "" -#: ../../library/pickle.rst:887 +#: ../../library/pickle.rst:886 msgid "" "For performance reasons, :meth:`~Pickler.reducer_override` may not be called " "for the following objects: ``None``, ``True``, ``False``, and exact " @@ -1089,17 +1097,17 @@ msgid "" "`tuple`." msgstr "" -#: ../../library/pickle.rst:893 +#: ../../library/pickle.rst:892 msgid "" "Here is a simple example where we allow pickling and reconstructing a given " "class::" msgstr "" -#: ../../library/pickle.rst:928 +#: ../../library/pickle.rst:927 msgid "Out-of-band Buffers" msgstr "" -#: ../../library/pickle.rst:932 +#: ../../library/pickle.rst:931 msgid "" "In some contexts, the :mod:`pickle` module is used to transfer massive " "amounts of data. Therefore, it can be important to minimize the number of " @@ -1109,7 +1117,7 @@ msgid "" "involves copying data to and from the pickle stream." msgstr "" -#: ../../library/pickle.rst:939 +#: ../../library/pickle.rst:938 msgid "" "This constraint can be eschewed if both the *provider* (the implementation " "of the object types to be transferred) and the *consumer* (the " @@ -1117,11 +1125,11 @@ msgid "" "transfer facilities provided by pickle protocol 5 and higher." msgstr "" -#: ../../library/pickle.rst:945 +#: ../../library/pickle.rst:944 msgid "Provider API" msgstr "" -#: ../../library/pickle.rst:947 +#: ../../library/pickle.rst:946 msgid "" "The large data objects to be pickled must implement a :meth:`__reduce_ex__` " "method specialized for protocol 5 and higher, which returns a :class:" @@ -1129,7 +1137,7 @@ msgid "" "large data." msgstr "" -#: ../../library/pickle.rst:952 +#: ../../library/pickle.rst:951 msgid "" "A :class:`PickleBuffer` object *signals* that the underlying buffer is " "eligible for out-of-band data transfer. Those objects remain compatible " @@ -1138,17 +1146,17 @@ msgid "" "themselves." msgstr "" -#: ../../library/pickle.rst:959 +#: ../../library/pickle.rst:958 msgid "Consumer API" msgstr "" -#: ../../library/pickle.rst:961 +#: ../../library/pickle.rst:960 msgid "" "A communications system can enable custom handling of the :class:" "`PickleBuffer` objects generated when serializing an object graph." msgstr "" -#: ../../library/pickle.rst:964 +#: ../../library/pickle.rst:963 msgid "" "On the sending side, it needs to pass a *buffer_callback* argument to :class:" "`Pickler` (or to the :func:`dump` or :func:`dumps` function), which will be " @@ -1157,7 +1165,7 @@ msgid "" "copied into the pickle stream, only a cheap marker will be inserted." msgstr "" -#: ../../library/pickle.rst:971 +#: ../../library/pickle.rst:970 msgid "" "On the receiving side, it needs to pass a *buffers* argument to :class:" "`Unpickler` (or to the :func:`load` or :func:`loads` function), which is an " @@ -1168,7 +1176,7 @@ msgid "" "`PickleBuffer` objects." msgstr "" -#: ../../library/pickle.rst:979 +#: ../../library/pickle.rst:978 msgid "" "Between the sending side and the receiving side, the communications system " "is free to implement its own transfer mechanism for out-of-band buffers. " @@ -1176,36 +1184,36 @@ msgid "" "dependent compression." msgstr "" -#: ../../library/pickle.rst:985 +#: ../../library/pickle.rst:984 msgid "Example" msgstr "範例" -#: ../../library/pickle.rst:987 +#: ../../library/pickle.rst:986 msgid "" "Here is a trivial example where we implement a :class:`bytearray` subclass " "able to participate in out-of-band buffer pickling::" msgstr "" -#: ../../library/pickle.rst:1011 +#: ../../library/pickle.rst:1010 msgid "" "The reconstructor (the ``_reconstruct`` class method) returns the buffer's " "providing object if it has the right type. This is an easy way to simulate " "zero-copy behaviour on this toy example." msgstr "" -#: ../../library/pickle.rst:1015 +#: ../../library/pickle.rst:1014 msgid "" "On the consumer side, we can pickle those objects the usual way, which when " "unserialized will give us a copy of the original object::" msgstr "" -#: ../../library/pickle.rst:1024 +#: ../../library/pickle.rst:1023 msgid "" "But if we pass a *buffer_callback* and then give back the accumulated " "buffers when unserializing, we are able to get back the original object::" msgstr "" -#: ../../library/pickle.rst:1034 +#: ../../library/pickle.rst:1033 msgid "" "This example is limited by the fact that :class:`bytearray` allocates its " "own memory: you cannot create a :class:`bytearray` instance that is backed " @@ -1215,15 +1223,15 @@ msgid "" "processes or systems." msgstr "" -#: ../../library/pickle.rst:1041 +#: ../../library/pickle.rst:1040 msgid ":pep:`574` -- Pickle protocol 5 with out-of-band data" msgstr "" -#: ../../library/pickle.rst:1047 +#: ../../library/pickle.rst:1046 msgid "Restricting Globals" msgstr "" -#: ../../library/pickle.rst:1052 +#: ../../library/pickle.rst:1051 msgid "" "By default, unpickling will import any class or function that it finds in " "the pickle data. For many applications, this behaviour is unacceptable as " @@ -1231,7 +1239,7 @@ msgid "" "what this hand-crafted pickle data stream does when loaded::" msgstr "" -#: ../../library/pickle.rst:1062 +#: ../../library/pickle.rst:1061 msgid "" "In this example, the unpickler imports the :func:`os.system` function and " "then apply the string argument \"echo hello world\". Although this example " @@ -1239,7 +1247,7 @@ msgid "" "system." msgstr "" -#: ../../library/pickle.rst:1066 +#: ../../library/pickle.rst:1065 msgid "" "For this reason, you may want to control what gets unpickled by customizing :" "meth:`Unpickler.find_class`. Unlike its name suggests, :meth:`Unpickler." @@ -1248,17 +1256,17 @@ msgid "" "restrict them to a safe subset." msgstr "" -#: ../../library/pickle.rst:1072 +#: ../../library/pickle.rst:1071 msgid "" "Here is an example of an unpickler allowing only few safe classes from the :" "mod:`builtins` module to be loaded::" msgstr "" -#: ../../library/pickle.rst:1101 -msgid "A sample usage of our unpickler working has intended::" +#: ../../library/pickle.rst:1100 +msgid "A sample usage of our unpickler working as intended::" msgstr "" -#: ../../library/pickle.rst:1120 +#: ../../library/pickle.rst:1119 msgid "" "As our examples shows, you have to be careful with what you allow to be " "unpickled. Therefore if security is a concern, you may want to consider " @@ -1266,100 +1274,100 @@ msgid "" "party solutions." msgstr "" -#: ../../library/pickle.rst:1127 +#: ../../library/pickle.rst:1126 msgid "Performance" msgstr "" -#: ../../library/pickle.rst:1129 +#: ../../library/pickle.rst:1128 msgid "" "Recent versions of the pickle protocol (from protocol 2 and upwards) feature " "efficient binary encodings for several common features and built-in types. " "Also, the :mod:`pickle` module has a transparent optimizer written in C." msgstr "" -#: ../../library/pickle.rst:1137 +#: ../../library/pickle.rst:1136 msgid "Examples" msgstr "範例" -#: ../../library/pickle.rst:1139 +#: ../../library/pickle.rst:1138 msgid "" "For the simplest code, use the :func:`dump` and :func:`load` functions. ::" msgstr "" -#: ../../library/pickle.rst:1155 +#: ../../library/pickle.rst:1154 msgid "The following example reads the resulting pickled data. ::" msgstr "" -#: ../../library/pickle.rst:1172 +#: ../../library/pickle.rst:1171 msgid "Module :mod:`copyreg`" msgstr ":mod:`copyreg` 模組" -#: ../../library/pickle.rst:1172 +#: ../../library/pickle.rst:1171 msgid "Pickle interface constructor registration for extension types." msgstr "" -#: ../../library/pickle.rst:1175 +#: ../../library/pickle.rst:1174 msgid "Module :mod:`pickletools`" msgstr ":mod:`pickletools` 模組" -#: ../../library/pickle.rst:1175 +#: ../../library/pickle.rst:1174 msgid "Tools for working with and analyzing pickled data." msgstr "" -#: ../../library/pickle.rst:1178 +#: ../../library/pickle.rst:1177 msgid "Module :mod:`shelve`" msgstr ":mod:`shelve` 模組" -#: ../../library/pickle.rst:1178 +#: ../../library/pickle.rst:1177 msgid "Indexed databases of objects; uses :mod:`pickle`." msgstr "" -#: ../../library/pickle.rst:1181 +#: ../../library/pickle.rst:1180 msgid "Module :mod:`copy`" msgstr ":mod:`copy` 模組" -#: ../../library/pickle.rst:1181 +#: ../../library/pickle.rst:1180 msgid "Shallow and deep object copying." msgstr "" -#: ../../library/pickle.rst:1183 +#: ../../library/pickle.rst:1182 msgid "Module :mod:`marshal`" msgstr ":mod:`marshal` 模組" -#: ../../library/pickle.rst:1184 +#: ../../library/pickle.rst:1183 msgid "High-performance serialization of built-in types." msgstr "" -#: ../../library/pickle.rst:1188 +#: ../../library/pickle.rst:1187 msgid "Footnotes" msgstr "註解" -#: ../../library/pickle.rst:1189 +#: ../../library/pickle.rst:1188 msgid "Don't confuse this with the :mod:`marshal` module" msgstr "" -#: ../../library/pickle.rst:1191 +#: ../../library/pickle.rst:1190 msgid "" "This is why :keyword:`lambda` functions cannot be pickled: all :keyword:`!" "lambda` functions share the same name: ````." msgstr "" -#: ../../library/pickle.rst:1194 +#: ../../library/pickle.rst:1193 msgid "" "The exception raised will likely be an :exc:`ImportError` or an :exc:" "`AttributeError` but it could be something else." msgstr "" -#: ../../library/pickle.rst:1197 +#: ../../library/pickle.rst:1196 msgid "" "The :mod:`copy` module uses this protocol for shallow and deep copying " "operations." msgstr "" -#: ../../library/pickle.rst:1200 +#: ../../library/pickle.rst:1199 msgid "" -"The limitation on alphanumeric characters is due to the fact the persistent " -"IDs, in protocol 0, are delimited by the newline character. Therefore if " -"any kind of newline characters occurs in persistent IDs, the resulting " -"pickle will become unreadable." +"The limitation on alphanumeric characters is due to the fact that persistent " +"IDs in protocol 0 are delimited by the newline character. Therefore if any " +"kind of newline characters occurs in persistent IDs, the resulting pickled " +"data will become unreadable." msgstr "" diff --git a/library/platform.po b/library/platform.po index 4dcd33a01b..c815be0897 100644 --- a/library/platform.po +++ b/library/platform.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" +"POT-Creation-Date: 2022-04-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:08+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -180,7 +180,7 @@ msgstr "" #: ../../library/platform.rst:142 msgid "" -"Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'`` An empty string " +"Returns the system's release, e.g. ``'2.2.0'`` or ``'NT'``. An empty string " "is returned if the value cannot be determined." msgstr "" @@ -223,7 +223,7 @@ msgid "Entries which cannot be determined are set to ``''``." msgstr "" #: ../../library/platform.rst:178 -msgid "Result changed from a tuple to a namedtuple." +msgid "Result changed from a tuple to a :func:`~collections.namedtuple`." msgstr "" #: ../../library/platform.rst:183 @@ -250,10 +250,12 @@ msgstr "Windows 平台" msgid "" "Get additional version information from the Windows Registry and return a " "tuple ``(release, version, csd, ptype)`` referring to OS release, version " -"number, CSD level (service pack) and OS type (multi/single processor)." +"number, CSD level (service pack) and OS type (multi/single processor). " +"Values which cannot be determined are set to the defaults given as " +"parameters (which all default to an empty string)." msgstr "" -#: ../../library/platform.rst:206 +#: ../../library/platform.rst:208 msgid "" "As a hint: *ptype* is ``'Uniprocessor Free'`` on single processor NT " "machines and ``'Multiprocessor Free'`` on multi processor machines. The " @@ -262,41 +264,42 @@ msgid "" "code that checks arguments, ranges, etc." msgstr "" -#: ../../library/platform.rst:214 +#: ../../library/platform.rst:216 msgid "" -"Returns a string representing the current Windows edition. Possible values " -"include but are not limited to ``'Enterprise'``, ``'IoTUAP'``, " -"``'ServerStandard'``, and ``'nanoserver'``." +"Returns a string representing the current Windows edition, or ``None`` if " +"the value cannot be determined. Possible values include but are not limited " +"to ``'Enterprise'``, ``'IoTUAP'``, ``'ServerStandard'``, and " +"``'nanoserver'``." msgstr "" -#: ../../library/platform.rst:222 +#: ../../library/platform.rst:224 msgid "" "Return ``True`` if the Windows edition returned by :func:`win32_edition` is " "recognized as an IoT edition." msgstr "" -#: ../../library/platform.rst:229 +#: ../../library/platform.rst:231 msgid "macOS Platform" msgstr "macOS 平台" -#: ../../library/platform.rst:234 +#: ../../library/platform.rst:236 msgid "" "Get macOS version information and return it as tuple ``(release, " "versioninfo, machine)`` with *versioninfo* being a tuple ``(version, " "dev_stage, non_release_version)``." msgstr "" -#: ../../library/platform.rst:238 +#: ../../library/platform.rst:240 msgid "" "Entries which cannot be determined are set to ``''``. All tuple entries are " "strings." msgstr "" -#: ../../library/platform.rst:243 +#: ../../library/platform.rst:245 msgid "Unix Platforms" msgstr "Unix 平台" -#: ../../library/platform.rst:247 +#: ../../library/platform.rst:249 msgid "" "Tries to determine the libc version against which the file executable " "(defaults to the Python interpreter) is linked. Returns a tuple of strings " @@ -304,22 +307,22 @@ msgid "" "fails." msgstr "" -#: ../../library/platform.rst:251 +#: ../../library/platform.rst:253 msgid "" "Note that this function has intimate knowledge of how different libc " "versions add symbols to the executable is probably only usable for " "executables compiled using :program:`gcc`." msgstr "" -#: ../../library/platform.rst:255 +#: ../../library/platform.rst:257 msgid "The file is read and scanned in chunks of *chunksize* bytes." msgstr "" -#: ../../library/platform.rst:259 +#: ../../library/platform.rst:261 msgid "Linux Platforms" msgstr "Linux 平台" -#: ../../library/platform.rst:263 +#: ../../library/platform.rst:265 msgid "" "Get operating system identification from ``os-release`` file and return it " "as a dict. The ``os-release`` file is a `freedesktop.org standard \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -166,7 +166,7 @@ msgid "" msgstr "" #: ../../library/queue.rst:141 -msgid "Equivalent to ``put(item, False)``." +msgid "Equivalent to ``put(item, block=False)``." msgstr "" #: ../../library/queue.rst:146 @@ -268,8 +268,8 @@ msgstr "" #: ../../library/queue.rst:251 msgid "" -"Equivalent to ``put(item)``, provided for compatibility with :meth:`Queue." -"put_nowait`." +"Equivalent to ``put(item, block=False)``, provided for compatibility with :" +"meth:`Queue.put_nowait`." msgstr "" #: ../../library/queue.rst:257 diff --git a/library/runpy.po b/library/runpy.po index 0037fa9954..a4eab78ef4 100644 --- a/library/runpy.po +++ b/library/runpy.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-06-26 18:54+0800\n" +"POT-Creation-Date: 2022-04-16 00:14+0000\n" "PO-Revision-Date: 2016-11-19 00:33+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -203,7 +203,7 @@ msgstr "" msgid "" "A number of alterations are also made to the :mod:`sys` module. Firstly, " "``sys.path`` may be altered as described above. ``sys.argv[0]`` is updated " -"with the value of ``file_path`` and ``sys.modules[__name__]`` is updated " +"with the value of ``path_name`` and ``sys.modules[__name__]`` is updated " "with a temporary module object for the module being executed. All " "modifications to items in :mod:`sys` are reverted before the function " "returns." diff --git a/library/shutil.po b/library/shutil.po index 7deea47059..828d5380f3 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-06 00:13+0000\n" +"POT-Creation-Date: 2022-04-16 00:14+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-" @@ -112,8 +112,8 @@ msgid "" msgstr "" #: ../../library/shutil.rst:81 ../../library/shutil.rst:184 -#: ../../library/shutil.rst:216 ../../library/shutil.rst:281 -#: ../../library/shutil.rst:369 +#: ../../library/shutil.rst:216 ../../library/shutil.rst:286 +#: ../../library/shutil.rst:374 msgid "" "Platform-specific fast-copy syscalls may be used internally in order to copy " "the file more efficiently. See :ref:`shutil-platform-dependent-efficient-" @@ -280,18 +280,17 @@ msgstr "" #: ../../library/shutil.rst:232 msgid "" "Recursively copy an entire directory tree rooted at *src* to a directory " -"named *dst* and return the destination directory. *dirs_exist_ok* dictates " -"whether to raise an exception in case *dst* or any missing parent directory " -"already exists." +"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:236 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:239 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 " @@ -299,7 +298,7 @@ msgid "" "and metadata of the linked files are copied to the new tree." msgstr "" -#: ../../library/shutil.rst:245 +#: ../../library/shutil.rst:244 msgid "" "When *symlinks* is false, if the file pointed by the symlink doesn't exist, " "an exception will be added in the list of errors raised in an :exc:`Error` " @@ -309,7 +308,7 @@ msgid "" "support :func:`os.symlink`." msgstr "" -#: ../../library/shutil.rst:252 +#: ../../library/shutil.rst:251 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 " @@ -322,12 +321,12 @@ msgid "" "ignores names based on glob-style patterns." msgstr "" -#: ../../library/shutil.rst:262 +#: ../../library/shutil.rst:261 msgid "" "If exception(s) occur, an :exc:`Error` is raised with a list of reasons." msgstr "" -#: ../../library/shutil.rst:264 +#: ../../library/shutil.rst:263 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 " @@ -335,28 +334,37 @@ msgid "" "that supports the same signature (like :func:`~shutil.copy`) can be used." msgstr "" -#: ../../library/shutil.rst:269 +#: ../../library/shutil.rst:268 +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 " +"operation will continue if it encounters existing directories, and files " +"within the *dst* tree will be overwritten by corresponding files from the " +"*src* tree." +msgstr "" + +#: ../../library/shutil.rst:274 msgid "" "Raises an :ref:`auditing event ` ``shutil.copytree`` with " "arguments ``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:271 +#: ../../library/shutil.rst:276 msgid "Copy metadata when *symlinks* is false. Now returns *dst*." msgstr "" -#: ../../library/shutil.rst:275 +#: ../../library/shutil.rst:280 msgid "" "Added the *copy_function* argument to be able to provide a custom copy " -"function. Added the *ignore_dangling_symlinks* argument to silent dangling " +"function. Added the *ignore_dangling_symlinks* argument to silence dangling " "symlinks errors when *symlinks* is false." msgstr "" -#: ../../library/shutil.rst:286 +#: ../../library/shutil.rst:291 msgid "The *dirs_exist_ok* parameter." msgstr "*dirs_exist_ok* 參數。" -#: ../../library/shutil.rst:293 +#: ../../library/shutil.rst:298 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 " @@ -365,7 +373,7 @@ msgid "" "they raise an exception." msgstr "" -#: ../../library/shutil.rst:301 +#: ../../library/shutil.rst:306 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, " @@ -376,13 +384,13 @@ msgid "" "attribute to determine which case applies." msgstr "" -#: ../../library/shutil.rst:309 +#: ../../library/shutil.rst:314 msgid "" "If *onerror* is provided, it must be a callable that accepts three " "parameters: *function*, *path*, and *excinfo*." msgstr "" -#: ../../library/shutil.rst:312 +#: ../../library/shutil.rst:317 msgid "" "The first parameter, *function*, is the function which raised the exception; " "it depends on the platform and implementation. The second parameter, " @@ -391,45 +399,45 @@ msgid "" "exc_info`. Exceptions raised by *onerror* will not be caught." msgstr "" -#: ../../library/shutil.rst:318 +#: ../../library/shutil.rst:323 msgid "" "Raises an :ref:`auditing event ` ``shutil.rmtree`` with argument " "``path``." msgstr "" -#: ../../library/shutil.rst:320 +#: ../../library/shutil.rst:325 msgid "" "Added a symlink attack resistant version that is used automatically if " "platform supports fd-based functions." msgstr "" -#: ../../library/shutil.rst:324 +#: ../../library/shutil.rst:329 msgid "" "On Windows, will no longer delete the contents of a directory junction " "before removing the junction." msgstr "" -#: ../../library/shutil.rst:330 +#: ../../library/shutil.rst:335 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:339 +#: ../../library/shutil.rst:344 msgid "" "Recursively move a file or directory (*src*) to another location (*dst*) and " "return the destination." msgstr "" -#: ../../library/shutil.rst:342 +#: ../../library/shutil.rst:347 msgid "" "If the destination is an existing directory, then *src* is moved inside that " "directory. If the destination already exists but is not a directory, it may " "be overwritten depending on :func:`os.rename` semantics." msgstr "" -#: ../../library/shutil.rst:346 +#: ../../library/shutil.rst:351 msgid "" "If the destination is on the current filesystem, then :func:`os.rename` is " "used. Otherwise, *src* is copied to *dst* using *copy_function* and then " @@ -437,7 +445,7 @@ msgid "" "will be created in or as *dst* and *src* will be removed." msgstr "" -#: ../../library/shutil.rst:351 +#: ../../library/shutil.rst:356 msgid "" "If *copy_function* is given, it must be a callable that takes two arguments " "*src* and *dst*, and will be used to copy *src* to *dst* if :func:`os." @@ -448,84 +456,84 @@ msgid "" "the expense of not copying any of the metadata." msgstr "" -#: ../../library/shutil.rst:359 +#: ../../library/shutil.rst:364 msgid "" "Raises an :ref:`auditing event ` ``shutil.move`` with arguments " "``src``, ``dst``." msgstr "" -#: ../../library/shutil.rst:361 +#: ../../library/shutil.rst:366 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:366 +#: ../../library/shutil.rst:371 msgid "Added the *copy_function* keyword argument." msgstr "新增 *copy_function* 關鍵字引數。" -#: ../../library/shutil.rst:374 +#: ../../library/shutil.rst:379 msgid "Accepts a :term:`path-like object` for both *src* and *dst*." msgstr "" -#: ../../library/shutil.rst:379 +#: ../../library/shutil.rst:384 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:386 +#: ../../library/shutil.rst:391 msgid "On Windows, *path* can now be a file or directory." msgstr "" -#: ../../library/shutil.rst:389 +#: ../../library/shutil.rst:394 msgid ":ref:`Availability `: Unix, Windows." msgstr ":ref:`適用 `:Unix、Windows。" -#: ../../library/shutil.rst:393 +#: ../../library/shutil.rst:398 msgid "Change owner *user* and/or *group* of the given *path*." msgstr "" -#: ../../library/shutil.rst:395 +#: ../../library/shutil.rst:400 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:398 +#: ../../library/shutil.rst:403 msgid "See also :func:`os.chown`, the underlying function." msgstr "" -#: ../../library/shutil.rst:400 +#: ../../library/shutil.rst:405 msgid "" "Raises an :ref:`auditing event ` ``shutil.chown`` with arguments " "``path``, ``user``, ``group``." msgstr "" -#: ../../library/shutil.rst:403 +#: ../../library/shutil.rst:408 msgid ":ref:`Availability `: Unix." msgstr ":ref:`適用 `:Unix。" -#: ../../library/shutil.rst:409 +#: ../../library/shutil.rst:414 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:412 +#: ../../library/shutil.rst:417 msgid "" "*mode* is a permission mask passed to :func:`os.access`, by default " "determining if the file exists and executable." msgstr "" -#: ../../library/shutil.rst:415 +#: ../../library/shutil.rst:420 msgid "" "When no *path* is specified, the results of :func:`os.environ` are used, " "returning either the \"PATH\" value or a fallback of :attr:`os.defpath`." msgstr "" -#: ../../library/shutil.rst:418 +#: ../../library/shutil.rst:423 msgid "" "On Windows, the current directory is always prepended to the *path* whether " "or not you use the default or provide your own, which is the behavior the " @@ -536,24 +544,24 @@ msgid "" "directories. For example, on Windows::" msgstr "" -#: ../../library/shutil.rst:431 +#: ../../library/shutil.rst:436 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:437 +#: ../../library/shutil.rst:442 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:444 +#: ../../library/shutil.rst:449 msgid "Platform-dependent efficient copy operations" msgstr "" -#: ../../library/shutil.rst:446 +#: ../../library/shutil.rst:451 msgid "" "Starting from Python 3.8, all functions involving a file copy (:func:" "`copyfile`, :func:`~shutil.copy`, :func:`copy2`, :func:`copytree`, and :func:" @@ -563,51 +571,51 @@ msgid "" "buffers in Python as in \"``outfd.write(infd.read())``\"." msgstr "" -#: ../../library/shutil.rst:454 +#: ../../library/shutil.rst:459 msgid "On macOS `fcopyfile`_ is used to copy the file content (not metadata)." msgstr "" -#: ../../library/shutil.rst:456 +#: ../../library/shutil.rst:461 msgid "On Linux :func:`os.sendfile` is used." msgstr "" -#: ../../library/shutil.rst:458 +#: ../../library/shutil.rst:463 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:462 +#: ../../library/shutil.rst:467 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:471 +#: ../../library/shutil.rst:476 msgid "copytree example" msgstr "" -#: ../../library/shutil.rst:473 +#: ../../library/shutil.rst:478 msgid "An example that uses the :func:`ignore_patterns` helper::" msgstr "" -#: ../../library/shutil.rst:479 +#: ../../library/shutil.rst:484 msgid "" "This will copy everything except ``.pyc`` files and files or directories " "whose name starts with ``tmp``." msgstr "" -#: ../../library/shutil.rst:482 +#: ../../library/shutil.rst:487 msgid "Another example that uses the *ignore* argument to add a logging call::" msgstr "" -#: ../../library/shutil.rst:497 +#: ../../library/shutil.rst:502 msgid "rmtree example" msgstr "rmtree 範例" -#: ../../library/shutil.rst:499 +#: ../../library/shutil.rst:504 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 onerror callback to " @@ -615,25 +623,25 @@ msgid "" "propagate. ::" msgstr "" -#: ../../library/shutil.rst:517 +#: ../../library/shutil.rst:522 msgid "Archiving operations" msgstr "" -#: ../../library/shutil.rst:521 +#: ../../library/shutil.rst:526 msgid "Added support for the *xztar* format." msgstr "新增 *xztar* 格式的支援。" -#: ../../library/shutil.rst:525 +#: ../../library/shutil.rst:530 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:530 +#: ../../library/shutil.rst:535 msgid "Create an archive file (such as zip or tar) and return its name." msgstr "" -#: ../../library/shutil.rst:532 +#: ../../library/shutil.rst:537 msgid "" "*base_name* is the name of the file to create, including the path, minus any " "format-specific extension. *format* is the archive format: one of \"zip" @@ -642,14 +650,14 @@ msgid "" "available), or \"xztar\" (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:538 +#: ../../library/shutil.rst:543 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:542 +#: ../../library/shutil.rst:547 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. " @@ -657,90 +665,90 @@ msgid "" "example-with-basedir` for how to use *base_dir* and *root_dir* together." msgstr "" -#: ../../library/shutil.rst:548 +#: ../../library/shutil.rst:553 msgid "*root_dir* and *base_dir* both default to the current directory." msgstr "" -#: ../../library/shutil.rst:550 +#: ../../library/shutil.rst:555 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:553 +#: ../../library/shutil.rst:558 msgid "" "*owner* and *group* are used when creating a tar archive. By default, uses " "the current owner and group." msgstr "" -#: ../../library/shutil.rst:556 +#: ../../library/shutil.rst:561 msgid "" "*logger* must be an object compatible with :pep:`282`, usually an instance " "of :class:`logging.Logger`." msgstr "" -#: ../../library/shutil.rst:559 +#: ../../library/shutil.rst:564 msgid "The *verbose* argument is unused and deprecated." msgstr "" -#: ../../library/shutil.rst:561 +#: ../../library/shutil.rst:566 msgid "" "Raises an :ref:`auditing event ` ``shutil.make_archive`` with " "arguments ``base_name``, ``format``, ``root_dir``, ``base_dir``." msgstr "" -#: ../../library/shutil.rst:565 +#: ../../library/shutil.rst:570 msgid "This function is not thread-safe." msgstr "" -#: ../../library/shutil.rst:567 +#: ../../library/shutil.rst:572 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:574 +#: ../../library/shutil.rst:579 msgid "" "Return a list of supported formats for archiving. Each element of the " "returned sequence is a tuple ``(name, description)``." msgstr "" -#: ../../library/shutil.rst:577 ../../library/shutil.rst:659 +#: ../../library/shutil.rst:582 ../../library/shutil.rst:664 msgid "By default :mod:`shutil` provides these formats:" msgstr "" -#: ../../library/shutil.rst:579 +#: ../../library/shutil.rst:584 msgid "*zip*: ZIP file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:580 +#: ../../library/shutil.rst:585 msgid "" "*tar*: Uncompressed tar file. Uses POSIX.1-2001 pax format for new archives." msgstr "" -#: ../../library/shutil.rst:581 ../../library/shutil.rst:664 +#: ../../library/shutil.rst:586 ../../library/shutil.rst:669 msgid "*gztar*: gzip'ed tar-file (if the :mod:`zlib` module is available)." msgstr "" -#: ../../library/shutil.rst:582 ../../library/shutil.rst:665 +#: ../../library/shutil.rst:587 ../../library/shutil.rst:670 msgid "*bztar*: bzip2'ed tar-file (if the :mod:`bz2` module is available)." msgstr "" -#: ../../library/shutil.rst:583 ../../library/shutil.rst:666 +#: ../../library/shutil.rst:588 ../../library/shutil.rst:671 msgid "*xztar*: xz'ed tar-file (if the :mod:`lzma` module is available)." msgstr "" -#: ../../library/shutil.rst:585 +#: ../../library/shutil.rst:590 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:591 +#: ../../library/shutil.rst:596 msgid "Register an archiver for the format *name*." msgstr "" -#: ../../library/shutil.rst:593 +#: ../../library/shutil.rst:598 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 " @@ -749,33 +757,33 @@ msgid "" "*dry_run* and *logger* (as passed in :func:`make_archive`)." msgstr "" -#: ../../library/shutil.rst:599 +#: ../../library/shutil.rst:604 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:602 +#: ../../library/shutil.rst:607 msgid "" "*description* is used by :func:`get_archive_formats` which returns the list " "of archivers. Defaults to an empty string." msgstr "" -#: ../../library/shutil.rst:608 +#: ../../library/shutil.rst:613 msgid "Remove the archive format *name* from the list of supported formats." msgstr "" -#: ../../library/shutil.rst:613 +#: ../../library/shutil.rst:618 msgid "Unpack an archive. *filename* is the full path of the archive." msgstr "" -#: ../../library/shutil.rst:615 +#: ../../library/shutil.rst:620 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:618 +#: ../../library/shutil.rst:623 msgid "" "*format* is the archive format: one of \"zip\", \"tar\", \"gztar\", \"bztar" "\", or \"xztar\". Or any other format registered with :func:" @@ -784,126 +792,126 @@ msgid "" "that extension. In case none is found, a :exc:`ValueError` is raised." msgstr "" -#: ../../library/shutil.rst:625 +#: ../../library/shutil.rst:630 msgid "" "Raises an :ref:`auditing event ` ``shutil.unpack_archive`` with " "arguments ``filename``, ``extract_dir``, ``format``." msgstr "" -#: ../../library/shutil.rst:627 +#: ../../library/shutil.rst:632 msgid "Accepts a :term:`path-like object` for *filename* and *extract_dir*." msgstr "" -#: ../../library/shutil.rst:633 +#: ../../library/shutil.rst:638 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:637 +#: ../../library/shutil.rst:642 msgid "" "*function* is the callable that will be used to unpack archives. The " "callable will receive the path of the archive, followed by the directory the " "archive must be extracted to." msgstr "" -#: ../../library/shutil.rst:641 +#: ../../library/shutil.rst:646 msgid "" "When provided, *extra_args* is a sequence of ``(name, value)`` tuples that " "will be passed as keywords arguments to the callable." msgstr "" -#: ../../library/shutil.rst:644 +#: ../../library/shutil.rst:649 msgid "" "*description* can be provided to describe the format, and will be returned " "by the :func:`get_unpack_formats` function." msgstr "" -#: ../../library/shutil.rst:650 +#: ../../library/shutil.rst:655 msgid "Unregister an unpack format. *name* is the name of the format." msgstr "" -#: ../../library/shutil.rst:655 +#: ../../library/shutil.rst:660 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:661 +#: ../../library/shutil.rst:666 msgid "" "*zip*: ZIP file (unpacking compressed files works only if the corresponding " "module is available)." msgstr "" -#: ../../library/shutil.rst:663 +#: ../../library/shutil.rst:668 msgid "*tar*: uncompressed tar file." msgstr "" -#: ../../library/shutil.rst:668 +#: ../../library/shutil.rst:673 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:675 +#: ../../library/shutil.rst:680 msgid "Archiving example" msgstr "" -#: ../../library/shutil.rst:677 +#: ../../library/shutil.rst:682 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:687 +#: ../../library/shutil.rst:692 msgid "The resulting archive contains:" msgstr "" -#: ../../library/shutil.rst:705 +#: ../../library/shutil.rst:710 msgid "Archiving example with *base_dir*" msgstr "" -#: ../../library/shutil.rst:707 +#: ../../library/shutil.rst:712 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:721 +#: ../../library/shutil.rst:726 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:735 +#: ../../library/shutil.rst:740 msgid "Listing the files in the resulting archive gives us:" msgstr "" -#: ../../library/shutil.rst:745 +#: ../../library/shutil.rst:750 msgid "Querying the size of the output terminal" msgstr "" -#: ../../library/shutil.rst:749 +#: ../../library/shutil.rst:754 msgid "Get the size of the terminal window." msgstr "" -#: ../../library/shutil.rst:751 +#: ../../library/shutil.rst:756 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:755 +#: ../../library/shutil.rst:760 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:759 +#: ../../library/shutil.rst:764 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 " @@ -912,11 +920,11 @@ msgid "" "emulators." msgstr "" -#: ../../library/shutil.rst:765 +#: ../../library/shutil.rst:770 msgid "The value returned is a named tuple of type :class:`os.terminal_size`." msgstr "" -#: ../../library/shutil.rst:767 +#: ../../library/shutil.rst:772 msgid "" "See also: The Single UNIX Specification, Version 2, `Other Environment " "Variables`_." diff --git a/library/signal.po b/library/signal.po index 7d67d7acc3..ab9a66d194 100644 --- a/library/signal.po +++ b/library/signal.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-30 00:13+0000\n" +"POT-Creation-Date: 2022-04-21 00:16+0000\n" "PO-Revision-Date: 2018-05-23 16:10+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -776,15 +776,15 @@ msgstr "" msgid "" "Do not set :const:`SIGPIPE`'s disposition to :const:`SIG_DFL` in order to " "avoid :exc:`BrokenPipeError`. Doing that would cause your program to exit " -"unexpectedly also whenever any socket connection is interrupted while your " +"unexpectedly whenever any socket connection is interrupted while your " "program is still writing to it." msgstr "" -#: ../../library/signal.rst:687 +#: ../../library/signal.rst:688 msgid "Note on Signal Handlers and Exceptions" msgstr "" -#: ../../library/signal.rst:689 +#: ../../library/signal.rst:690 msgid "" "If a signal handler raises an exception, the exception will be propagated to " "the main thread and may be raised after any :term:`bytecode` instruction. " @@ -795,11 +795,11 @@ msgid "" "program in an unexpected state." msgstr "" -#: ../../library/signal.rst:696 +#: ../../library/signal.rst:697 msgid "To illustrate this issue, consider the following code::" msgstr "" -#: ../../library/signal.rst:713 +#: ../../library/signal.rst:714 msgid "" "For many programs, especially those that merely want to exit on :exc:" "`KeyboardInterrupt`, this is not a problem, but applications that are " diff --git a/library/sqlite3.po b/library/sqlite3.po index 2879b1babf..49c297f051 100644 --- a/library/sqlite3.po +++ b/library/sqlite3.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-13 00:13+0000\n" +"POT-Creation-Date: 2022-04-18 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-" @@ -428,26 +428,23 @@ msgstr "" #: ../../library/sqlite3.rst:381 msgid "" -"This is a nonstandard shortcut that creates a cursor object by calling the :" -"meth:`~Connection.cursor` method, calls the cursor's :meth:`~Cursor.execute` " -"method with the *parameters* given, and returns the cursor." +"Create a new :class:`Cursor` object and call :meth:`~Cursor.execute` on it " +"with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:388 +#: ../../library/sqlite3.rst:387 msgid "" -"This is a nonstandard shortcut that creates a cursor object by calling the :" -"meth:`~Connection.cursor` method, calls the cursor's :meth:`~Cursor." -"executemany` method with the *parameters* given, and returns the cursor." +"Create a new :class:`Cursor` object and call :meth:`~Cursor.executemany` on " +"it with the given *sql* and *parameters*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:395 +#: ../../library/sqlite3.rst:393 msgid "" -"This is a nonstandard shortcut that creates a cursor object by calling the :" -"meth:`~Connection.cursor` method, calls the cursor's :meth:`~Cursor." -"executescript` method with the given *sql_script*, and returns the cursor." +"Create a new :class:`Cursor` object and call :meth:`~Cursor.executescript` " +"on it with the given *sql_script*. Return the new cursor object." msgstr "" -#: ../../library/sqlite3.rst:402 +#: ../../library/sqlite3.rst:399 msgid "" "Creates a user-defined function that you can later use from within SQL " "statements under the function name *name*. *num_params* is the number of " @@ -460,26 +457,26 @@ msgid "" "older versions." msgstr "" -#: ../../library/sqlite3.rst:412 +#: ../../library/sqlite3.rst:409 msgid "" "The function can return any of the types supported by SQLite: bytes, str, " "int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:415 +#: ../../library/sqlite3.rst:412 msgid "The *deterministic* parameter was added." msgstr "新增 *deterministic* 參數。" -#: ../../library/sqlite3.rst:418 ../../library/sqlite3.rst:435 -#: ../../library/sqlite3.rst:567 ../../library/sqlite3.rst:718 +#: ../../library/sqlite3.rst:415 ../../library/sqlite3.rst:432 +#: ../../library/sqlite3.rst:564 ../../library/sqlite3.rst:715 msgid "Example:" msgstr "範例:" -#: ../../library/sqlite3.rst:425 +#: ../../library/sqlite3.rst:422 msgid "Creates a user-defined aggregate function." msgstr "" -#: ../../library/sqlite3.rst:427 +#: ../../library/sqlite3.rst:424 msgid "" "The aggregate class must implement a ``step`` method, which accepts the " "number of parameters *num_params* (if *num_params* is -1, the function may " @@ -487,13 +484,13 @@ msgid "" "the final result of the aggregate." msgstr "" -#: ../../library/sqlite3.rst:432 +#: ../../library/sqlite3.rst:429 msgid "" "The ``finalize`` method can return any of the types supported by SQLite: " "bytes, str, int, float and ``None``." msgstr "" -#: ../../library/sqlite3.rst:442 +#: ../../library/sqlite3.rst:439 msgid "" "Creates a collation with the specified *name* and *callable*. The callable " "will be passed two string arguments. It should return -1 if the first is " @@ -502,30 +499,30 @@ msgid "" "(ORDER BY in SQL) so your comparisons don't affect other SQL operations." msgstr "" -#: ../../library/sqlite3.rst:448 +#: ../../library/sqlite3.rst:445 msgid "" "Note that the callable will get its parameters as Python bytestrings, which " "will normally be encoded in UTF-8." msgstr "" -#: ../../library/sqlite3.rst:451 +#: ../../library/sqlite3.rst:448 msgid "" "The following example shows a custom collation that sorts \"the wrong way\":" msgstr "" -#: ../../library/sqlite3.rst:455 +#: ../../library/sqlite3.rst:452 msgid "" "To remove a collation, call ``create_collation`` with ``None`` as callable::" msgstr "" -#: ../../library/sqlite3.rst:462 +#: ../../library/sqlite3.rst:459 msgid "" "You can call this method from a different thread to abort any queries that " "might be executing on the connection. The query will then abort and the " "caller will get an exception." msgstr "" -#: ../../library/sqlite3.rst:469 +#: ../../library/sqlite3.rst:466 msgid "" "This routine registers a callback. The callback is invoked for each attempt " "to access a column of a table in the database. The callback should return :" @@ -535,7 +532,7 @@ msgid "" "in the :mod:`sqlite3` module." msgstr "" -#: ../../library/sqlite3.rst:476 +#: ../../library/sqlite3.rst:473 msgid "" "The first argument to the callback signifies what kind of operation is to be " "authorized. The second and third argument will be arguments or :const:`None` " @@ -546,7 +543,7 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:483 +#: ../../library/sqlite3.rst:480 msgid "" "Please consult the SQLite documentation about the possible values for the " "first argument and the meaning of the second and third argument depending on " @@ -554,7 +551,7 @@ msgid "" "module." msgstr "" -#: ../../library/sqlite3.rst:490 +#: ../../library/sqlite3.rst:487 msgid "" "This routine registers a callback. The callback is invoked for every *n* " "instructions of the SQLite virtual machine. This is useful if you want to " @@ -562,26 +559,26 @@ msgid "" "a GUI." msgstr "" -#: ../../library/sqlite3.rst:495 +#: ../../library/sqlite3.rst:492 msgid "" "If you want to clear any previously installed progress handler, call the " "method with :const:`None` for *handler*." msgstr "" -#: ../../library/sqlite3.rst:498 +#: ../../library/sqlite3.rst:495 msgid "" "Returning a non-zero value from the handler function will terminate the " "currently executing query and cause it to raise an :exc:`OperationalError` " "exception." msgstr "" -#: ../../library/sqlite3.rst:505 +#: ../../library/sqlite3.rst:502 msgid "" "Registers *trace_callback* to be called for each SQL statement that is " "actually executed by the SQLite backend." msgstr "" -#: ../../library/sqlite3.rst:508 +#: ../../library/sqlite3.rst:505 msgid "" "The only argument passed to the callback is the statement (as :class:`str`) " "that is being executed. The return value of the callback is ignored. Note " @@ -591,19 +588,19 @@ msgid "" "of triggers defined in the current database." msgstr "" -#: ../../library/sqlite3.rst:516 +#: ../../library/sqlite3.rst:513 msgid "" "Passing :const:`None` as *trace_callback* will disable the trace callback." msgstr "" -#: ../../library/sqlite3.rst:519 +#: ../../library/sqlite3.rst:516 msgid "" "Exceptions raised in the trace callback are not propagated. As a development " "and debugging aid, use :meth:`~sqlite3.enable_callback_tracebacks` to enable " "printing tracebacks from exceptions raised in the trace callback." msgstr "" -#: ../../library/sqlite3.rst:529 +#: ../../library/sqlite3.rst:526 msgid "" "This routine allows/disallows the SQLite engine to load SQLite extensions " "from shared libraries. SQLite extensions can define new functions, " @@ -611,38 +608,38 @@ msgid "" "extension is the fulltext-search extension distributed with SQLite." msgstr "" -#: ../../library/sqlite3.rst:534 ../../library/sqlite3.rst:551 +#: ../../library/sqlite3.rst:531 ../../library/sqlite3.rst:548 msgid "Loadable extensions are disabled by default. See [#f1]_." msgstr "" -#: ../../library/sqlite3.rst:536 +#: ../../library/sqlite3.rst:533 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.enable_load_extension`` " "with arguments ``connection``, ``enabled``." msgstr "" -#: ../../library/sqlite3.rst:540 +#: ../../library/sqlite3.rst:537 msgid "Added the ``sqlite3.enable_load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:547 +#: ../../library/sqlite3.rst:544 msgid "" "This routine loads an SQLite extension from a shared library. You have to " "enable extension loading with :meth:`enable_load_extension` before you can " "use this routine." msgstr "" -#: ../../library/sqlite3.rst:553 +#: ../../library/sqlite3.rst:550 msgid "" "Raises an :ref:`auditing event ` ``sqlite3.load_extension`` with " "arguments ``connection``, ``path``." msgstr "" -#: ../../library/sqlite3.rst:557 +#: ../../library/sqlite3.rst:554 msgid "Added the ``sqlite3.load_extension`` auditing event." msgstr "" -#: ../../library/sqlite3.rst:562 +#: ../../library/sqlite3.rst:559 msgid "" "You can change this attribute to a callable that accepts the cursor and the " "original row as a tuple and will return the real result row. This way, you " @@ -650,7 +647,7 @@ msgid "" "object that can also access columns by name." msgstr "" -#: ../../library/sqlite3.rst:571 +#: ../../library/sqlite3.rst:568 msgid "" "If returning a tuple doesn't suffice and you want name-based access to " "columns, you should consider setting :attr:`row_factory` to the highly-" @@ -660,7 +657,7 @@ msgid "" "approach or even a db_row based solution." msgstr "" -#: ../../library/sqlite3.rst:583 +#: ../../library/sqlite3.rst:580 msgid "" "Using this attribute you can control what objects are returned for the " "``TEXT`` data type. By default, this attribute is set to :class:`str` and " @@ -668,23 +665,23 @@ msgid "" "you want to return :class:`bytes` instead, you can set it to :class:`bytes`." msgstr "" -#: ../../library/sqlite3.rst:588 +#: ../../library/sqlite3.rst:585 msgid "" "You can also set it to any other callable that accepts a single bytestring " "parameter and returns the resulting object." msgstr "" -#: ../../library/sqlite3.rst:591 +#: ../../library/sqlite3.rst:588 msgid "See the following example code for illustration:" msgstr "" -#: ../../library/sqlite3.rst:598 +#: ../../library/sqlite3.rst:595 msgid "" "Returns the total number of database rows that have been modified, inserted, " "or deleted since the database connection was opened." msgstr "" -#: ../../library/sqlite3.rst:604 +#: ../../library/sqlite3.rst:601 msgid "" "Returns an iterator to dump the database in an SQL text format. Useful when " "saving an in-memory database for later restoration. This function provides " @@ -692,14 +689,14 @@ msgid "" "shell." msgstr "" -#: ../../library/sqlite3.rst:609 +#: ../../library/sqlite3.rst:606 msgid "Example::" msgstr "" "範例:\n" "\n" "::" -#: ../../library/sqlite3.rst:623 +#: ../../library/sqlite3.rst:620 msgid "" "This method makes a backup of an SQLite database even while it's being " "accessed by other clients, or concurrently by the same connection. The copy " @@ -707,14 +704,14 @@ msgid "" "class:`Connection` instance." msgstr "" -#: ../../library/sqlite3.rst:628 +#: ../../library/sqlite3.rst:625 msgid "" "By default, or when *pages* is either ``0`` or a negative integer, the " "entire database is copied in a single step; otherwise the method performs a " "loop copying up to *pages* pages at a time." msgstr "" -#: ../../library/sqlite3.rst:632 +#: ../../library/sqlite3.rst:629 msgid "" "If *progress* is specified, it must either be ``None`` or a callable object " "that will be executed at each iteration with three integer arguments, " @@ -722,7 +719,7 @@ msgid "" "pages still to be copied and the *total* number of pages." msgstr "" -#: ../../library/sqlite3.rst:637 +#: ../../library/sqlite3.rst:634 msgid "" "The *name* argument specifies the database name that will be copied: it must " "be a string containing either ``\"main\"``, the default, to indicate the " @@ -731,36 +728,36 @@ msgid "" "an attached database." msgstr "" -#: ../../library/sqlite3.rst:643 +#: ../../library/sqlite3.rst:640 msgid "" "The *sleep* argument specifies the number of seconds to sleep by between " "successive attempts to backup remaining pages, can be specified either as an " "integer or a floating point value." msgstr "" -#: ../../library/sqlite3.rst:647 +#: ../../library/sqlite3.rst:644 msgid "Example 1, copy an existing database into another::" msgstr "" -#: ../../library/sqlite3.rst:661 +#: ../../library/sqlite3.rst:658 msgid "Example 2, copy an existing database into a transient copy::" msgstr "" -#: ../../library/sqlite3.rst:675 +#: ../../library/sqlite3.rst:672 msgid "Cursor Objects" msgstr "" -#: ../../library/sqlite3.rst:679 +#: ../../library/sqlite3.rst:676 msgid "A :class:`Cursor` instance has the following attributes and methods." msgstr "" -#: ../../library/sqlite3.rst:686 +#: ../../library/sqlite3.rst:683 msgid "" "Executes an SQL statement. Values may be bound to the statement using :ref:" "`placeholders `." msgstr "" -#: ../../library/sqlite3.rst:689 +#: ../../library/sqlite3.rst:686 msgid "" ":meth:`execute` will only execute a single SQL statement. If you try to " "execute more than one statement with it, it will raise a :exc:`.Warning`. " @@ -768,7 +765,7 @@ msgid "" "with one call." msgstr "" -#: ../../library/sqlite3.rst:697 +#: ../../library/sqlite3.rst:694 msgid "" "Executes a :ref:`parameterized ` SQL command against " "all parameter sequences or mappings found in the sequence " @@ -776,11 +773,11 @@ msgid "" "`iterator` yielding parameters instead of a sequence." msgstr "" -#: ../../library/sqlite3.rst:704 +#: ../../library/sqlite3.rst:701 msgid "Here's a shorter example using a :term:`generator`:" msgstr "" -#: ../../library/sqlite3.rst:711 +#: ../../library/sqlite3.rst:708 msgid "" "This is a nonstandard convenience method for executing multiple SQL " "statements at once. It issues a ``COMMIT`` statement first, then executes " @@ -788,23 +785,23 @@ msgid "" "`isolation_level`; any transaction control must be added to *sql_script*." msgstr "" -#: ../../library/sqlite3.rst:716 +#: ../../library/sqlite3.rst:713 msgid "*sql_script* can be an instance of :class:`str`." msgstr "" -#: ../../library/sqlite3.rst:725 +#: ../../library/sqlite3.rst:722 msgid "" "Fetches the next row of a query result set, returning a single sequence, or :" "const:`None` when no more data is available." msgstr "" -#: ../../library/sqlite3.rst:731 +#: ../../library/sqlite3.rst:728 msgid "" "Fetches the next set of rows of a query result, returning a list. An empty " "list is returned when no more rows are available." msgstr "" -#: ../../library/sqlite3.rst:734 +#: ../../library/sqlite3.rst:731 msgid "" "The number of rows to fetch per call is specified by the *size* parameter. " "If it is not given, the cursor's arraysize determines the number of rows to " @@ -813,7 +810,7 @@ msgid "" "not being available, fewer rows may be returned." msgstr "" -#: ../../library/sqlite3.rst:740 +#: ../../library/sqlite3.rst:737 msgid "" "Note there are performance considerations involved with the *size* " "parameter. For optimal performance, it is usually best to use the arraysize " @@ -821,42 +818,42 @@ msgid "" "the same value from one :meth:`fetchmany` call to the next." msgstr "" -#: ../../library/sqlite3.rst:747 +#: ../../library/sqlite3.rst:744 msgid "" "Fetches all (remaining) rows of a query result, returning a list. Note that " "the cursor's arraysize attribute can affect the performance of this " "operation. An empty list is returned when no rows are available." msgstr "" -#: ../../library/sqlite3.rst:753 +#: ../../library/sqlite3.rst:750 msgid "Close the cursor now (rather than whenever ``__del__`` is called)." msgstr "" -#: ../../library/sqlite3.rst:755 +#: ../../library/sqlite3.rst:752 msgid "" "The cursor will be unusable from this point forward; a :exc:" "`ProgrammingError` exception will be raised if any operation is attempted " "with the cursor." msgstr "" -#: ../../library/sqlite3.rst:760 ../../library/sqlite3.rst:764 +#: ../../library/sqlite3.rst:757 ../../library/sqlite3.rst:761 msgid "Required by the DB-API. Does nothing in :mod:`sqlite3`." msgstr "" -#: ../../library/sqlite3.rst:768 +#: ../../library/sqlite3.rst:765 msgid "" "Although the :class:`Cursor` class of the :mod:`sqlite3` module implements " "this attribute, the database engine's own support for the determination of " "\"rows affected\"/\"rows selected\" is quirky." msgstr "" -#: ../../library/sqlite3.rst:772 +#: ../../library/sqlite3.rst:769 msgid "" "For :meth:`executemany` statements, the number of modifications are summed " "up into :attr:`rowcount`." msgstr "" -#: ../../library/sqlite3.rst:775 +#: ../../library/sqlite3.rst:772 msgid "" "As required by the Python DB API Spec, the :attr:`rowcount` attribute \"is " "-1 in case no ``executeXX()`` has been performed on the cursor or the " @@ -865,7 +862,7 @@ msgid "" "rows a query produced until all rows were fetched." msgstr "" -#: ../../library/sqlite3.rst:783 +#: ../../library/sqlite3.rst:780 msgid "" "This read-only attribute provides the row id of the last inserted row. It is " "only updated after successful ``INSERT`` or ``REPLACE`` statements using " @@ -875,33 +872,33 @@ msgid "" "const:`None`." msgstr "" -#: ../../library/sqlite3.rst:791 +#: ../../library/sqlite3.rst:788 msgid "Inserts into ``WITHOUT ROWID`` tables are not recorded." msgstr "" -#: ../../library/sqlite3.rst:793 +#: ../../library/sqlite3.rst:790 msgid "Added support for the ``REPLACE`` statement." msgstr "新增 ``REPLACE`` 陳述式的支援。" -#: ../../library/sqlite3.rst:798 +#: ../../library/sqlite3.rst:795 msgid "" "Read/write attribute that controls the number of rows returned by :meth:" "`fetchmany`. The default value is 1 which means a single row would be " "fetched per call." msgstr "" -#: ../../library/sqlite3.rst:803 +#: ../../library/sqlite3.rst:800 msgid "" "This read-only attribute provides the column names of the last query. To " "remain compatible with the Python DB API, it returns a 7-tuple for each " "column where the last six items of each tuple are :const:`None`." msgstr "" -#: ../../library/sqlite3.rst:807 +#: ../../library/sqlite3.rst:804 msgid "It is set for ``SELECT`` statements without any matching rows as well." msgstr "" -#: ../../library/sqlite3.rst:811 +#: ../../library/sqlite3.rst:808 msgid "" "This read-only attribute provides the SQLite database :class:`Connection` " "used by the :class:`Cursor` object. A :class:`Cursor` object created by " @@ -909,79 +906,79 @@ msgid "" "`connection` attribute that refers to *con*::" msgstr "" -#: ../../library/sqlite3.rst:824 +#: ../../library/sqlite3.rst:821 msgid "Row Objects" msgstr "" -#: ../../library/sqlite3.rst:828 +#: ../../library/sqlite3.rst:825 msgid "" "A :class:`Row` instance serves as a highly optimized :attr:`~Connection." "row_factory` for :class:`Connection` objects. It tries to mimic a tuple in " "most of its features." msgstr "" -#: ../../library/sqlite3.rst:832 +#: ../../library/sqlite3.rst:829 msgid "" "It supports mapping access by column name and index, iteration, " "representation, equality testing and :func:`len`." msgstr "" -#: ../../library/sqlite3.rst:835 +#: ../../library/sqlite3.rst:832 msgid "" "If two :class:`Row` objects have exactly the same columns and their members " "are equal, they compare equal." msgstr "" -#: ../../library/sqlite3.rst:840 +#: ../../library/sqlite3.rst:837 msgid "" "This method returns a list of column names. Immediately after a query, it is " "the first member of each tuple in :attr:`Cursor.description`." msgstr "" -#: ../../library/sqlite3.rst:843 +#: ../../library/sqlite3.rst:840 msgid "Added support of slicing." msgstr "" -#: ../../library/sqlite3.rst:846 +#: ../../library/sqlite3.rst:843 msgid "Let's assume we initialize a table as in the example given above::" msgstr "" -#: ../../library/sqlite3.rst:858 +#: ../../library/sqlite3.rst:855 msgid "Now we plug :class:`Row` in::" msgstr "" -#: ../../library/sqlite3.rst:890 +#: ../../library/sqlite3.rst:887 msgid "Exceptions" msgstr "例外" -#: ../../library/sqlite3.rst:894 +#: ../../library/sqlite3.rst:891 msgid "A subclass of :exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:898 +#: ../../library/sqlite3.rst:895 msgid "" "The base class of the other exceptions in this module. It is a subclass of :" "exc:`Exception`." msgstr "" -#: ../../library/sqlite3.rst:903 +#: ../../library/sqlite3.rst:900 msgid "Exception raised for errors that are related to the database." msgstr "" -#: ../../library/sqlite3.rst:907 +#: ../../library/sqlite3.rst:904 msgid "" "Exception raised when the relational integrity of the database is affected, " "e.g. a foreign key check fails. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:912 +#: ../../library/sqlite3.rst:909 msgid "" "Exception raised for programming errors, e.g. table not found or already " "exists, syntax error in the SQL statement, wrong number of parameters " "specified, etc. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:918 +#: ../../library/sqlite3.rst:915 msgid "" "Exception raised for errors that are related to the database's operation and " "not necessarily under the control of the programmer, e.g. an unexpected " @@ -989,7 +986,7 @@ msgid "" "not be processed, etc. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:925 +#: ../../library/sqlite3.rst:922 msgid "" "Exception raised in case a method or database API was used which is not " "supported by the database, e.g. calling the :meth:`~Connection.rollback` " @@ -997,82 +994,82 @@ msgid "" "turned off. It is a subclass of :exc:`DatabaseError`." msgstr "" -#: ../../library/sqlite3.rst:934 +#: ../../library/sqlite3.rst:931 msgid "SQLite and Python types" msgstr "" -#: ../../library/sqlite3.rst:938 +#: ../../library/sqlite3.rst:935 msgid "Introduction" msgstr "簡介" -#: ../../library/sqlite3.rst:940 +#: ../../library/sqlite3.rst:937 msgid "" "SQLite natively supports the following types: ``NULL``, ``INTEGER``, " "``REAL``, ``TEXT``, ``BLOB``." msgstr "" -#: ../../library/sqlite3.rst:943 +#: ../../library/sqlite3.rst:940 msgid "" "The following Python types can thus be sent to SQLite without any problem:" msgstr "" -#: ../../library/sqlite3.rst:946 ../../library/sqlite3.rst:963 +#: ../../library/sqlite3.rst:943 ../../library/sqlite3.rst:960 msgid "Python type" msgstr "" -#: ../../library/sqlite3.rst:946 ../../library/sqlite3.rst:963 +#: ../../library/sqlite3.rst:943 ../../library/sqlite3.rst:960 msgid "SQLite type" msgstr "" -#: ../../library/sqlite3.rst:948 ../../library/sqlite3.rst:965 +#: ../../library/sqlite3.rst:945 ../../library/sqlite3.rst:962 msgid ":const:`None`" msgstr ":const:`None`" -#: ../../library/sqlite3.rst:948 ../../library/sqlite3.rst:965 +#: ../../library/sqlite3.rst:945 ../../library/sqlite3.rst:962 msgid "``NULL``" msgstr "``NULL``" -#: ../../library/sqlite3.rst:950 ../../library/sqlite3.rst:967 +#: ../../library/sqlite3.rst:947 ../../library/sqlite3.rst:964 msgid ":class:`int`" msgstr ":class:`int`" -#: ../../library/sqlite3.rst:950 ../../library/sqlite3.rst:967 +#: ../../library/sqlite3.rst:947 ../../library/sqlite3.rst:964 msgid "``INTEGER``" msgstr "``INTEGER``" -#: ../../library/sqlite3.rst:952 ../../library/sqlite3.rst:969 +#: ../../library/sqlite3.rst:949 ../../library/sqlite3.rst:966 msgid ":class:`float`" msgstr ":class:`float`" -#: ../../library/sqlite3.rst:952 ../../library/sqlite3.rst:969 +#: ../../library/sqlite3.rst:949 ../../library/sqlite3.rst:966 msgid "``REAL``" msgstr "``REAL``" -#: ../../library/sqlite3.rst:954 +#: ../../library/sqlite3.rst:951 msgid ":class:`str`" msgstr ":class:`str`" -#: ../../library/sqlite3.rst:954 ../../library/sqlite3.rst:971 +#: ../../library/sqlite3.rst:951 ../../library/sqlite3.rst:968 msgid "``TEXT``" msgstr "``TEXT``" -#: ../../library/sqlite3.rst:956 ../../library/sqlite3.rst:974 +#: ../../library/sqlite3.rst:953 ../../library/sqlite3.rst:971 msgid ":class:`bytes`" msgstr ":class:`bytes`" -#: ../../library/sqlite3.rst:956 ../../library/sqlite3.rst:974 +#: ../../library/sqlite3.rst:953 ../../library/sqlite3.rst:971 msgid "``BLOB``" msgstr "``BLOB``" -#: ../../library/sqlite3.rst:960 +#: ../../library/sqlite3.rst:957 msgid "This is how SQLite types are converted to Python types by default:" msgstr "" -#: ../../library/sqlite3.rst:971 +#: ../../library/sqlite3.rst:968 msgid "depends on :attr:`~Connection.text_factory`, :class:`str` by default" msgstr "" -#: ../../library/sqlite3.rst:977 +#: ../../library/sqlite3.rst:974 msgid "" "The type system of the :mod:`sqlite3` module is extensible in two ways: you " "can store additional Python types in an SQLite database via object " @@ -1080,11 +1077,11 @@ msgid "" "to different Python types via converters." msgstr "" -#: ../../library/sqlite3.rst:984 +#: ../../library/sqlite3.rst:981 msgid "Using adapters to store additional Python types in SQLite databases" msgstr "" -#: ../../library/sqlite3.rst:986 +#: ../../library/sqlite3.rst:983 msgid "" "As described before, SQLite supports only a limited set of types natively. " "To use other Python types with SQLite, you must **adapt** them to one of the " @@ -1092,23 +1089,23 @@ msgid "" "str, bytes." msgstr "" -#: ../../library/sqlite3.rst:991 +#: ../../library/sqlite3.rst:988 msgid "" "There are two ways to enable the :mod:`sqlite3` module to adapt a custom " "Python type to one of the supported ones." msgstr "" -#: ../../library/sqlite3.rst:996 +#: ../../library/sqlite3.rst:993 msgid "Letting your object adapt itself" msgstr "" -#: ../../library/sqlite3.rst:998 +#: ../../library/sqlite3.rst:995 msgid "" "This is a good approach if you write the class yourself. Let's suppose you " "have a class like this::" msgstr "" -#: ../../library/sqlite3.rst:1005 +#: ../../library/sqlite3.rst:1002 msgid "" "Now you want to store the point in a single SQLite column. First you'll " "have to choose one of the supported types to be used for representing the " @@ -1118,18 +1115,18 @@ msgid "" "class:`PrepareProtocol`." msgstr "" -#: ../../library/sqlite3.rst:1015 +#: ../../library/sqlite3.rst:1012 msgid "Registering an adapter callable" msgstr "" -#: ../../library/sqlite3.rst:1017 +#: ../../library/sqlite3.rst:1014 msgid "" "The other possibility is to create a function that converts the type to the " "string representation and register the function with :meth:" "`register_adapter`." msgstr "" -#: ../../library/sqlite3.rst:1022 +#: ../../library/sqlite3.rst:1019 msgid "" "The :mod:`sqlite3` module has two default adapters for Python's built-in :" "class:`datetime.date` and :class:`datetime.datetime` types. Now let's " @@ -1137,100 +1134,100 @@ msgid "" "representation, but as a Unix timestamp." msgstr "" -#: ../../library/sqlite3.rst:1031 +#: ../../library/sqlite3.rst:1028 msgid "Converting SQLite values to custom Python types" msgstr "" -#: ../../library/sqlite3.rst:1033 +#: ../../library/sqlite3.rst:1030 msgid "" "Writing an adapter lets you send custom Python types to SQLite. But to make " "it really useful we need to make the Python to SQLite to Python roundtrip " "work." msgstr "" -#: ../../library/sqlite3.rst:1036 +#: ../../library/sqlite3.rst:1033 msgid "Enter converters." msgstr "" -#: ../../library/sqlite3.rst:1038 +#: ../../library/sqlite3.rst:1035 msgid "" "Let's go back to the :class:`Point` class. We stored the x and y coordinates " "separated via semicolons as strings in SQLite." msgstr "" -#: ../../library/sqlite3.rst:1041 +#: ../../library/sqlite3.rst:1038 msgid "" "First, we'll define a converter function that accepts the string as a " "parameter and constructs a :class:`Point` object from it." msgstr "" -#: ../../library/sqlite3.rst:1046 +#: ../../library/sqlite3.rst:1043 msgid "" "Converter functions **always** get called with a :class:`bytes` object, no " "matter under which data type you sent the value to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1055 +#: ../../library/sqlite3.rst:1052 msgid "" "Now you need to make the :mod:`sqlite3` module know that what you select " "from the database is actually a point. There are two ways of doing this:" msgstr "" -#: ../../library/sqlite3.rst:1058 +#: ../../library/sqlite3.rst:1055 msgid "Implicitly via the declared type" msgstr "" -#: ../../library/sqlite3.rst:1060 +#: ../../library/sqlite3.rst:1057 msgid "Explicitly via the column name" msgstr "" -#: ../../library/sqlite3.rst:1062 +#: ../../library/sqlite3.rst:1059 msgid "" "Both ways are described in section :ref:`sqlite3-module-contents`, in the " "entries for the constants :const:`PARSE_DECLTYPES` and :const:" "`PARSE_COLNAMES`." msgstr "" -#: ../../library/sqlite3.rst:1065 +#: ../../library/sqlite3.rst:1062 msgid "The following example illustrates both approaches." msgstr "" -#: ../../library/sqlite3.rst:1071 +#: ../../library/sqlite3.rst:1068 msgid "Default adapters and converters" msgstr "" -#: ../../library/sqlite3.rst:1073 +#: ../../library/sqlite3.rst:1070 msgid "" "There are default adapters for the date and datetime types in the datetime " "module. They will be sent as ISO dates/ISO timestamps to SQLite." msgstr "" -#: ../../library/sqlite3.rst:1076 +#: ../../library/sqlite3.rst:1073 msgid "" "The default converters are registered under the name \"date\" for :class:" "`datetime.date` and under the name \"timestamp\" for :class:`datetime." "datetime`." msgstr "" -#: ../../library/sqlite3.rst:1080 +#: ../../library/sqlite3.rst:1077 msgid "" "This way, you can use date/timestamps from Python without any additional " "fiddling in most cases. The format of the adapters is also compatible with " "the experimental SQLite date/time functions." msgstr "" -#: ../../library/sqlite3.rst:1084 +#: ../../library/sqlite3.rst:1081 msgid "The following example demonstrates this." msgstr "" -#: ../../library/sqlite3.rst:1088 +#: ../../library/sqlite3.rst:1085 msgid "" "If a timestamp stored in SQLite has a fractional part longer than 6 numbers, " "its value will be truncated to microsecond precision by the timestamp " "converter." msgstr "" -#: ../../library/sqlite3.rst:1094 +#: ../../library/sqlite3.rst:1091 msgid "" "The default \"timestamp\" converter ignores UTC offsets in the database and " "always returns a naive :class:`datetime.datetime` object. To preserve UTC " @@ -1238,17 +1235,17 @@ msgid "" "offset-aware converter with :func:`register_converter`." msgstr "" -#: ../../library/sqlite3.rst:1102 +#: ../../library/sqlite3.rst:1099 msgid "Controlling Transactions" msgstr "" -#: ../../library/sqlite3.rst:1104 +#: ../../library/sqlite3.rst:1101 msgid "" "The underlying ``sqlite3`` library operates in ``autocommit`` mode by " "default, but the Python :mod:`sqlite3` module by default does not." msgstr "" -#: ../../library/sqlite3.rst:1107 +#: ../../library/sqlite3.rst:1104 msgid "" "``autocommit`` mode means that statements that modify the database take " "effect immediately. A ``BEGIN`` or ``SAVEPOINT`` statement disables " @@ -1256,14 +1253,14 @@ msgid "" "ends the outermost transaction, turns ``autocommit`` mode back on." msgstr "" -#: ../../library/sqlite3.rst:1112 +#: ../../library/sqlite3.rst:1109 msgid "" "The Python :mod:`sqlite3` module by default issues a ``BEGIN`` statement " "implicitly before a Data Modification Language (DML) statement (i.e. " "``INSERT``/``UPDATE``/``DELETE``/``REPLACE``)." msgstr "" -#: ../../library/sqlite3.rst:1116 +#: ../../library/sqlite3.rst:1113 msgid "" "You can control which kind of ``BEGIN`` statements :mod:`sqlite3` implicitly " "executes via the *isolation_level* parameter to the :func:`connect` call, or " @@ -1273,7 +1270,7 @@ msgid "" "``EXCLUSIVE``." msgstr "" -#: ../../library/sqlite3.rst:1123 +#: ../../library/sqlite3.rst:1120 msgid "" "You can disable the :mod:`sqlite3` module's implicit transaction management " "by setting :attr:`isolation_level` to ``None``. This will leave the " @@ -1283,27 +1280,27 @@ msgid "" "code." msgstr "" -#: ../../library/sqlite3.rst:1129 +#: ../../library/sqlite3.rst:1126 msgid "" "Note that :meth:`~Cursor.executescript` disregards :attr:`isolation_level`; " "any transaction control must be added explicitly." msgstr "" -#: ../../library/sqlite3.rst:1132 +#: ../../library/sqlite3.rst:1129 msgid "" ":mod:`sqlite3` used to implicitly commit an open transaction before DDL " "statements. This is no longer the case." msgstr "" -#: ../../library/sqlite3.rst:1138 +#: ../../library/sqlite3.rst:1135 msgid "Using :mod:`sqlite3` efficiently" msgstr "" -#: ../../library/sqlite3.rst:1142 +#: ../../library/sqlite3.rst:1139 msgid "Using shortcut methods" msgstr "" -#: ../../library/sqlite3.rst:1144 +#: ../../library/sqlite3.rst:1141 msgid "" "Using the nonstandard :meth:`execute`, :meth:`executemany` and :meth:" "`executescript` methods of the :class:`Connection` object, your code can be " @@ -1315,38 +1312,38 @@ msgid "" "object." msgstr "" -#: ../../library/sqlite3.rst:1156 +#: ../../library/sqlite3.rst:1153 msgid "Accessing columns by name instead of by index" msgstr "" -#: ../../library/sqlite3.rst:1158 +#: ../../library/sqlite3.rst:1155 msgid "" "One useful feature of the :mod:`sqlite3` module is the built-in :class:" "`sqlite3.Row` class designed to be used as a row factory." msgstr "" -#: ../../library/sqlite3.rst:1161 +#: ../../library/sqlite3.rst:1158 msgid "" "Rows wrapped with this class can be accessed both by index (like tuples) and " "case-insensitively by name:" msgstr "" -#: ../../library/sqlite3.rst:1168 +#: ../../library/sqlite3.rst:1165 msgid "Using the connection as a context manager" msgstr "" -#: ../../library/sqlite3.rst:1170 +#: ../../library/sqlite3.rst:1167 msgid "" "Connection objects can be used as context managers that automatically commit " "or rollback transactions. In the event of an exception, the transaction is " "rolled back; otherwise, the transaction is committed:" msgstr "" -#: ../../library/sqlite3.rst:1179 +#: ../../library/sqlite3.rst:1176 msgid "Footnotes" msgstr "註解" -#: ../../library/sqlite3.rst:1180 +#: ../../library/sqlite3.rst:1177 msgid "" "The sqlite3 module is not built with loadable extension support by default, " "because some platforms (notably macOS) have SQLite libraries which are " diff --git a/library/stdtypes.po b/library/stdtypes.po index 46c20791b6..cc8b1f145c 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-04-08 00:15+0000\n" +"POT-Creation-Date: 2022-04-19 00:13+0000\n" "PO-Revision-Date: 2018-05-23 16:11+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -4564,40 +4564,33 @@ msgid "" "approximations it is usually unwise to use them as dictionary keys.)" msgstr "" -#: ../../library/stdtypes.rst:4348 -msgid "" -"Dictionaries can be created by placing a comma-separated list of ``key: " -"value`` pairs within braces, for example: ``{'jack': 4098, 'sjoerd': 4127}`` " -"or ``{4098: 'jack', 4127: 'sjoerd'}``, or by the :class:`dict` constructor." -msgstr "" - -#: ../../library/stdtypes.rst:4356 +#: ../../library/stdtypes.rst:4352 msgid "" "Return a new dictionary initialized from an optional positional argument and " "a possibly empty set of keyword arguments." msgstr "" -#: ../../library/stdtypes.rst:4359 +#: ../../library/stdtypes.rst:4355 msgid "Dictionaries can be created by several means:" msgstr "" -#: ../../library/stdtypes.rst:4361 +#: ../../library/stdtypes.rst:4357 msgid "" "Use a comma-separated list of ``key: value`` pairs within braces: ``{'jack': " "4098, 'sjoerd': 4127}`` or ``{4098: 'jack', 4127: 'sjoerd'}``" msgstr "" -#: ../../library/stdtypes.rst:4363 +#: ../../library/stdtypes.rst:4359 msgid "Use a dict comprehension: ``{}``, ``{x: x ** 2 for x in range(10)}``" msgstr "" -#: ../../library/stdtypes.rst:4364 +#: ../../library/stdtypes.rst:4360 msgid "" "Use the type constructor: ``dict()``, ``dict([('foo', 100), ('bar', " "200)])``, ``dict(foo=100, bar=200)``" msgstr "" -#: ../../library/stdtypes.rst:4367 +#: ../../library/stdtypes.rst:4363 msgid "" "If no positional argument is given, an empty dictionary is created. If a " "positional argument is given and it is a mapping object, a dictionary is " @@ -4609,7 +4602,7 @@ msgid "" "value for that key becomes the corresponding value in the new dictionary." msgstr "" -#: ../../library/stdtypes.rst:4377 +#: ../../library/stdtypes.rst:4373 msgid "" "If keyword arguments are given, the keyword arguments and their values are " "added to the dictionary created from the positional argument. If a key " @@ -4617,39 +4610,39 @@ msgid "" "the value from the positional argument." msgstr "" -#: ../../library/stdtypes.rst:4382 +#: ../../library/stdtypes.rst:4378 msgid "" "To illustrate, the following examples all return a dictionary equal to " "``{\"one\": 1, \"two\": 2, \"three\": 3}``::" msgstr "" -#: ../../library/stdtypes.rst:4394 +#: ../../library/stdtypes.rst:4390 msgid "" "Providing keyword arguments as in the first example only works for keys that " "are valid Python identifiers. Otherwise, any valid keys can be used." msgstr "" -#: ../../library/stdtypes.rst:4398 +#: ../../library/stdtypes.rst:4394 msgid "" "These are the operations that dictionaries support (and therefore, custom " "mapping types should support too):" msgstr "" -#: ../../library/stdtypes.rst:4403 +#: ../../library/stdtypes.rst:4399 msgid "Return a list of all the keys used in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4407 +#: ../../library/stdtypes.rst:4403 msgid "Return the number of items in the dictionary *d*." msgstr "" -#: ../../library/stdtypes.rst:4411 +#: ../../library/stdtypes.rst:4407 msgid "" "Return the item of *d* with key *key*. Raises a :exc:`KeyError` if *key* is " "not in the map." msgstr "" -#: ../../library/stdtypes.rst:4416 +#: ../../library/stdtypes.rst:4412 msgid "" "If a subclass of dict defines a method :meth:`__missing__` and *key* is not " "present, the ``d[key]`` operation calls that method with the key *key* as " @@ -4660,51 +4653,51 @@ msgid "" "an instance variable::" msgstr "" -#: ../../library/stdtypes.rst:4434 +#: ../../library/stdtypes.rst:4430 msgid "" "The example above shows part of the implementation of :class:`collections." "Counter`. A different ``__missing__`` method is used by :class:`collections." "defaultdict`." msgstr "" -#: ../../library/stdtypes.rst:4440 +#: ../../library/stdtypes.rst:4436 msgid "Set ``d[key]`` to *value*." msgstr "" -#: ../../library/stdtypes.rst:4444 +#: ../../library/stdtypes.rst:4440 msgid "" "Remove ``d[key]`` from *d*. Raises a :exc:`KeyError` if *key* is not in the " "map." msgstr "" -#: ../../library/stdtypes.rst:4449 +#: ../../library/stdtypes.rst:4445 msgid "Return ``True`` if *d* has a key *key*, else ``False``." msgstr "" -#: ../../library/stdtypes.rst:4453 +#: ../../library/stdtypes.rst:4449 msgid "Equivalent to ``not key in d``." msgstr "" -#: ../../library/stdtypes.rst:4457 +#: ../../library/stdtypes.rst:4453 msgid "" "Return an iterator over the keys of the dictionary. This is a shortcut for " "``iter(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4462 +#: ../../library/stdtypes.rst:4458 msgid "Remove all items from the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4466 +#: ../../library/stdtypes.rst:4462 msgid "Return a shallow copy of the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4470 +#: ../../library/stdtypes.rst:4466 msgid "" "Create a new dictionary with keys from *iterable* and values set to *value*." msgstr "" -#: ../../library/stdtypes.rst:4472 +#: ../../library/stdtypes.rst:4468 msgid "" ":meth:`fromkeys` is a class method that returns a new dictionary. *value* " "defaults to ``None``. All of the values refer to just a single instance, so " @@ -4713,70 +4706,70 @@ msgid "" "` instead." msgstr "" -#: ../../library/stdtypes.rst:4480 +#: ../../library/stdtypes.rst:4476 msgid "" "Return the value for *key* if *key* is in the dictionary, else *default*. If " "*default* is not given, it defaults to ``None``, so that this method never " "raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4486 +#: ../../library/stdtypes.rst:4482 msgid "" "Return a new view of the dictionary's items (``(key, value)`` pairs). See " "the :ref:`documentation of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4491 +#: ../../library/stdtypes.rst:4487 msgid "" "Return a new view of the dictionary's keys. See the :ref:`documentation of " "view objects `." msgstr "" -#: ../../library/stdtypes.rst:4496 +#: ../../library/stdtypes.rst:4492 msgid "" "If *key* is in the dictionary, remove it and return its value, else return " "*default*. If *default* is not given and *key* is not in the dictionary, a :" "exc:`KeyError` is raised." msgstr "" -#: ../../library/stdtypes.rst:4502 +#: ../../library/stdtypes.rst:4498 msgid "" "Remove and return a ``(key, value)`` pair from the dictionary. Pairs are " "returned in :abbr:`LIFO (last-in, first-out)` order." msgstr "" -#: ../../library/stdtypes.rst:4505 +#: ../../library/stdtypes.rst:4501 msgid "" ":meth:`popitem` is useful to destructively iterate over a dictionary, as " "often used in set algorithms. If the dictionary is empty, calling :meth:" "`popitem` raises a :exc:`KeyError`." msgstr "" -#: ../../library/stdtypes.rst:4509 +#: ../../library/stdtypes.rst:4505 msgid "" "LIFO order is now guaranteed. In prior versions, :meth:`popitem` would " "return an arbitrary key/value pair." msgstr "" -#: ../../library/stdtypes.rst:4515 +#: ../../library/stdtypes.rst:4511 msgid "" "Return a reverse iterator over the keys of the dictionary. This is a " "shortcut for ``reversed(d.keys())``." msgstr "" -#: ../../library/stdtypes.rst:4522 +#: ../../library/stdtypes.rst:4518 msgid "" "If *key* is in the dictionary, return its value. If not, insert *key* with " "a value of *default* and return *default*. *default* defaults to ``None``." msgstr "" -#: ../../library/stdtypes.rst:4528 +#: ../../library/stdtypes.rst:4524 msgid "" "Update the dictionary with the key/value pairs from *other*, overwriting " "existing keys. Return ``None``." msgstr "" -#: ../../library/stdtypes.rst:4531 +#: ../../library/stdtypes.rst:4527 msgid "" ":meth:`update` accepts either another dictionary object or an iterable of " "key/value pairs (as tuples or other iterables of length two). If keyword " @@ -4784,71 +4777,71 @@ msgid "" "pairs: ``d.update(red=1, blue=2)``." msgstr "" -#: ../../library/stdtypes.rst:4538 +#: ../../library/stdtypes.rst:4534 msgid "" "Return a new view of the dictionary's values. See the :ref:`documentation " "of view objects `." msgstr "" -#: ../../library/stdtypes.rst:4541 +#: ../../library/stdtypes.rst:4537 msgid "" "An equality comparison between one ``dict.values()`` view and another will " "always return ``False``. This also applies when comparing ``dict.values()`` " "to itself::" msgstr "" -#: ../../library/stdtypes.rst:4551 +#: ../../library/stdtypes.rst:4547 msgid "" "Create a new dictionary with the merged keys and values of *d* and *other*, " "which must both be dictionaries. The values of *other* take priority when " "*d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4559 +#: ../../library/stdtypes.rst:4555 msgid "" "Update the dictionary *d* with keys and values from *other*, which may be " "either a :term:`mapping` or an :term:`iterable` of key/value pairs. The " "values of *other* take priority when *d* and *other* share keys." msgstr "" -#: ../../library/stdtypes.rst:4565 +#: ../../library/stdtypes.rst:4561 msgid "" "Dictionaries compare equal if and only if they have the same ``(key, " "value)`` pairs (regardless of ordering). Order comparisons ('<', '<=', '>=', " "'>') raise :exc:`TypeError`." msgstr "" -#: ../../library/stdtypes.rst:4569 +#: ../../library/stdtypes.rst:4565 msgid "" "Dictionaries preserve insertion order. Note that updating a key does not " "affect the order. Keys added after deletion are inserted at the end. ::" msgstr "" -#: ../../library/stdtypes.rst:4587 +#: ../../library/stdtypes.rst:4583 msgid "" "Dictionary order is guaranteed to be insertion order. This behavior was an " "implementation detail of CPython from 3.6." msgstr "" -#: ../../library/stdtypes.rst:4591 +#: ../../library/stdtypes.rst:4587 msgid "Dictionaries and dictionary views are reversible. ::" msgstr "" -#: ../../library/stdtypes.rst:4603 +#: ../../library/stdtypes.rst:4599 msgid "Dictionaries are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4608 +#: ../../library/stdtypes.rst:4604 msgid "" ":class:`types.MappingProxyType` can be used to create a read-only view of a :" "class:`dict`." msgstr "" -#: ../../library/stdtypes.rst:4615 +#: ../../library/stdtypes.rst:4611 msgid "Dictionary view objects" msgstr "字典視圖物件" -#: ../../library/stdtypes.rst:4617 +#: ../../library/stdtypes.rst:4613 msgid "" "The objects returned by :meth:`dict.keys`, :meth:`dict.values` and :meth:" "`dict.items` are *view objects*. They provide a dynamic view on the " @@ -4856,23 +4849,23 @@ msgid "" "reflects these changes." msgstr "" -#: ../../library/stdtypes.rst:4622 +#: ../../library/stdtypes.rst:4618 msgid "" "Dictionary views can be iterated over to yield their respective data, and " "support membership tests:" msgstr "" -#: ../../library/stdtypes.rst:4627 +#: ../../library/stdtypes.rst:4623 msgid "Return the number of entries in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4631 +#: ../../library/stdtypes.rst:4627 msgid "" "Return an iterator over the keys, values or items (represented as tuples of " "``(key, value)``) in the dictionary." msgstr "" -#: ../../library/stdtypes.rst:4634 +#: ../../library/stdtypes.rst:4630 msgid "" "Keys and values are iterated over in insertion order. This allows the " "creation of ``(value, key)`` pairs using :func:`zip`: ``pairs = zip(d." @@ -4880,39 +4873,39 @@ msgid "" "[(v, k) for (k, v) in d.items()]``." msgstr "" -#: ../../library/stdtypes.rst:4639 +#: ../../library/stdtypes.rst:4635 msgid "" "Iterating views while adding or deleting entries in the dictionary may raise " "a :exc:`RuntimeError` or fail to iterate over all entries." msgstr "" -#: ../../library/stdtypes.rst:4642 +#: ../../library/stdtypes.rst:4638 msgid "Dictionary order is guaranteed to be insertion order." msgstr "" -#: ../../library/stdtypes.rst:4647 +#: ../../library/stdtypes.rst:4643 msgid "" "Return ``True`` if *x* is in the underlying dictionary's keys, values or " "items (in the latter case, *x* should be a ``(key, value)`` tuple)." msgstr "" -#: ../../library/stdtypes.rst:4652 +#: ../../library/stdtypes.rst:4648 msgid "" "Return a reverse iterator over the keys, values or items of the dictionary. " "The view will be iterated in reverse order of the insertion." msgstr "" -#: ../../library/stdtypes.rst:4655 +#: ../../library/stdtypes.rst:4651 msgid "Dictionary views are now reversible." msgstr "" -#: ../../library/stdtypes.rst:4660 +#: ../../library/stdtypes.rst:4656 msgid "" "Return a :class:`types.MappingProxyType` that wraps the original dictionary " "to which the view refers." msgstr "" -#: ../../library/stdtypes.rst:4665 +#: ../../library/stdtypes.rst:4661 msgid "" "Keys views are set-like since their entries are unique and hashable. If all " "values are hashable, so that ``(key, value)`` pairs are unique and hashable, " @@ -4922,15 +4915,15 @@ msgid "" "abc.Set` are available (for example, ``==``, ``<``, or ``^``)." msgstr "" -#: ../../library/stdtypes.rst:4672 +#: ../../library/stdtypes.rst:4668 msgid "An example of dictionary view usage::" msgstr "" -#: ../../library/stdtypes.rst:4713 +#: ../../library/stdtypes.rst:4709 msgid "Context Manager Types" msgstr "" -#: ../../library/stdtypes.rst:4720 +#: ../../library/stdtypes.rst:4716 msgid "" "Python's :keyword:`with` statement supports the concept of a runtime context " "defined by a context manager. This is implemented using a pair of methods " @@ -4938,7 +4931,7 @@ msgid "" "before the statement body is executed and exited when the statement ends:" msgstr "" -#: ../../library/stdtypes.rst:4728 +#: ../../library/stdtypes.rst:4724 msgid "" "Enter the runtime context and return either this object or another object " "related to the runtime context. The value returned by this method is bound " @@ -4946,14 +4939,14 @@ msgid "" "using this context manager." msgstr "" -#: ../../library/stdtypes.rst:4733 +#: ../../library/stdtypes.rst:4729 msgid "" "An example of a context manager that returns itself is a :term:`file " "object`. File objects return themselves from __enter__() to allow :func:" "`open` to be used as the context expression in a :keyword:`with` statement." msgstr "" -#: ../../library/stdtypes.rst:4737 +#: ../../library/stdtypes.rst:4733 msgid "" "An example of a context manager that returns a related object is the one " "returned by :func:`decimal.localcontext`. These managers set the active " @@ -4963,7 +4956,7 @@ msgid "" "the :keyword:`!with` statement." msgstr "" -#: ../../library/stdtypes.rst:4747 +#: ../../library/stdtypes.rst:4743 msgid "" "Exit the runtime context and return a Boolean flag indicating if any " "exception that occurred should be suppressed. If an exception occurred while " @@ -4972,7 +4965,7 @@ msgid "" "arguments are ``None``." msgstr "" -#: ../../library/stdtypes.rst:4752 +#: ../../library/stdtypes.rst:4748 msgid "" "Returning a true value from this method will cause the :keyword:`with` " "statement to suppress the exception and continue execution with the " @@ -4983,7 +4976,7 @@ msgid "" "statement." msgstr "" -#: ../../library/stdtypes.rst:4759 +#: ../../library/stdtypes.rst:4755 msgid "" "The exception passed in should never be reraised explicitly - instead, this " "method should return a false value to indicate that the method completed " @@ -4992,7 +4985,7 @@ msgid "" "method has actually failed." msgstr "" -#: ../../library/stdtypes.rst:4765 +#: ../../library/stdtypes.rst:4761 msgid "" "Python defines several context managers to support easy thread " "synchronisation, prompt closure of files or other objects, and simpler " @@ -5001,7 +4994,7 @@ msgid "" "management protocol. See the :mod:`contextlib` module for some examples." msgstr "" -#: ../../library/stdtypes.rst:4771 +#: ../../library/stdtypes.rst:4767 msgid "" "Python's :term:`generator`\\s and the :class:`contextlib.contextmanager` " "decorator provide a convenient way to implement these protocols. If a " @@ -5011,7 +5004,7 @@ msgid "" "rather than the iterator produced by an undecorated generator function." msgstr "" -#: ../../library/stdtypes.rst:4778 +#: ../../library/stdtypes.rst:4774 msgid "" "Note that there is no specific slot for any of these methods in the type " "structure for Python objects in the Python/C API. Extension types wanting to " @@ -5020,23 +5013,23 @@ msgid "" "a single class dictionary lookup is negligible." msgstr "" -#: ../../library/stdtypes.rst:4786 +#: ../../library/stdtypes.rst:4782 msgid "" "Type Annotation Types --- :ref:`Generic Alias `, :ref:" "`Union `" msgstr "" -#: ../../library/stdtypes.rst:4791 +#: ../../library/stdtypes.rst:4787 msgid "" "The core built-in types for :term:`type annotations ` are :ref:" "`Generic Alias ` and :ref:`Union `." msgstr "" -#: ../../library/stdtypes.rst:4798 +#: ../../library/stdtypes.rst:4794 msgid "Generic Alias Type" msgstr "" -#: ../../library/stdtypes.rst:4804 +#: ../../library/stdtypes.rst:4800 msgid "" "``GenericAlias`` objects are generally created by :ref:`subscripting " "` a class. They are most often used with :ref:`container " @@ -5046,19 +5039,19 @@ msgid "" "are intended primarily for use with :term:`type annotations `." msgstr "" -#: ../../library/stdtypes.rst:4814 +#: ../../library/stdtypes.rst:4810 msgid "" "It is generally only possible to subscript a class if the class implements " "the special method :meth:`~object.__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:4817 +#: ../../library/stdtypes.rst:4813 msgid "" "A ``GenericAlias`` object acts as a proxy for a :term:`generic type`, " "implementing *parameterized generics*." msgstr "" -#: ../../library/stdtypes.rst:4820 +#: ../../library/stdtypes.rst:4816 msgid "" "For a container class, the argument(s) supplied to a :ref:`subscription " "` of the class may indicate the type(s) of the elements an " @@ -5067,7 +5060,7 @@ msgid "" "`bytes`." msgstr "" -#: ../../library/stdtypes.rst:4826 +#: ../../library/stdtypes.rst:4822 msgid "" "For a class which defines :meth:`~object.__class_getitem__` but is not a " "container, the argument(s) supplied to a subscription of the class will " @@ -5076,7 +5069,7 @@ msgid "" "the :class:`str` data type and the :class:`bytes` data type:" msgstr "" -#: ../../library/stdtypes.rst:4832 +#: ../../library/stdtypes.rst:4828 msgid "" "If ``x = re.search('foo', 'foo')``, ``x`` will be a :ref:`re.Match ` object where the return values of ``x.group(0)`` and ``x[0]`` will " @@ -5084,7 +5077,7 @@ msgid "" "annotations with the ``GenericAlias`` ``re.Match[str]``." msgstr "" -#: ../../library/stdtypes.rst:4838 +#: ../../library/stdtypes.rst:4834 msgid "" "If ``y = re.search(b'bar', b'bar')``, (note the ``b`` for :class:`bytes`), " "``y`` will also be an instance of ``re.Match``, but the return values of ``y." @@ -5093,21 +5086,21 @@ msgid "" "objects>` objects with ``re.Match[bytes]``." msgstr "" -#: ../../library/stdtypes.rst:4844 +#: ../../library/stdtypes.rst:4840 msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " "directly." msgstr "" -#: ../../library/stdtypes.rst:4850 +#: ../../library/stdtypes.rst:4846 msgid "" "Creates a ``GenericAlias`` representing a type ``T`` parameterized by types " "*X*, *Y*, and more depending on the ``T`` used. For example, a function " "expecting a :class:`list` containing :class:`float` elements::" msgstr "" -#: ../../library/stdtypes.rst:4858 +#: ../../library/stdtypes.rst:4854 msgid "" "Another example for :term:`mapping` objects, using a :class:`dict`, which is " "a generic type expecting two type parameters representing the key type and " @@ -5115,13 +5108,13 @@ msgid "" "of type :class:`str` and values of type :class:`int`::" msgstr "" -#: ../../library/stdtypes.rst:4866 +#: ../../library/stdtypes.rst:4862 msgid "" "The builtin functions :func:`isinstance` and :func:`issubclass` do not " "accept ``GenericAlias`` types for their second argument::" msgstr "" -#: ../../library/stdtypes.rst:4874 +#: ../../library/stdtypes.rst:4870 msgid "" "The Python runtime does not enforce :term:`type annotations `. " "This extends to generic types and their type parameters. When creating a " @@ -5130,325 +5123,325 @@ msgid "" "discouraged, but will run without errors::" msgstr "" -#: ../../library/stdtypes.rst:4884 +#: ../../library/stdtypes.rst:4880 msgid "" "Furthermore, parameterized generics erase type parameters during object " "creation::" msgstr "" -#: ../../library/stdtypes.rst:4895 +#: ../../library/stdtypes.rst:4891 msgid "" "Calling :func:`repr` or :func:`str` on a generic shows the parameterized " "type::" msgstr "" -#: ../../library/stdtypes.rst:4903 +#: ../../library/stdtypes.rst:4899 msgid "" "The :meth:`~object.__getitem__` method of generic containers will raise an " "exception to disallow mistakes like ``dict[str][str]``::" msgstr "" -#: ../../library/stdtypes.rst:4911 +#: ../../library/stdtypes.rst:4907 msgid "" "However, such expressions are valid when :ref:`type variables ` " "are used. The index must have as many elements as there are type variable " "items in the ``GenericAlias`` object's :attr:`~genericalias.__args__`. ::" msgstr "" -#: ../../library/stdtypes.rst:4922 +#: ../../library/stdtypes.rst:4918 msgid "Standard Generic Classes" msgstr "" -#: ../../library/stdtypes.rst:4924 +#: ../../library/stdtypes.rst:4920 msgid "" "The following standard library classes support parameterized generics. This " "list is non-exhaustive." msgstr "" -#: ../../library/stdtypes.rst:4927 +#: ../../library/stdtypes.rst:4923 msgid ":class:`tuple`" msgstr ":class:`tuple`" -#: ../../library/stdtypes.rst:4928 +#: ../../library/stdtypes.rst:4924 msgid ":class:`list`" msgstr ":class:`list`" -#: ../../library/stdtypes.rst:4929 +#: ../../library/stdtypes.rst:4925 msgid ":class:`dict`" msgstr ":class:`dict`" -#: ../../library/stdtypes.rst:4930 +#: ../../library/stdtypes.rst:4926 msgid ":class:`set`" msgstr ":class:`set`" -#: ../../library/stdtypes.rst:4931 +#: ../../library/stdtypes.rst:4927 msgid ":class:`frozenset`" msgstr ":class:`frozenset`" -#: ../../library/stdtypes.rst:4932 +#: ../../library/stdtypes.rst:4928 msgid ":class:`type`" msgstr ":class:`type`" -#: ../../library/stdtypes.rst:4933 +#: ../../library/stdtypes.rst:4929 msgid ":class:`collections.deque`" msgstr ":class:`collections.deque`" -#: ../../library/stdtypes.rst:4934 +#: ../../library/stdtypes.rst:4930 msgid ":class:`collections.defaultdict`" msgstr ":class:`collections.defaultdict`" -#: ../../library/stdtypes.rst:4935 +#: ../../library/stdtypes.rst:4931 msgid ":class:`collections.OrderedDict`" msgstr ":class:`collections.OrderedDict`" -#: ../../library/stdtypes.rst:4936 +#: ../../library/stdtypes.rst:4932 msgid ":class:`collections.Counter`" msgstr ":class:`collections.Counter`" -#: ../../library/stdtypes.rst:4937 +#: ../../library/stdtypes.rst:4933 msgid ":class:`collections.ChainMap`" msgstr ":class:`collections.ChainMap`" -#: ../../library/stdtypes.rst:4938 +#: ../../library/stdtypes.rst:4934 msgid ":class:`collections.abc.Awaitable`" msgstr ":class:`collections.abc.Awaitable`" -#: ../../library/stdtypes.rst:4939 +#: ../../library/stdtypes.rst:4935 msgid ":class:`collections.abc.Coroutine`" msgstr ":class:`collections.abc.Coroutine`" -#: ../../library/stdtypes.rst:4940 +#: ../../library/stdtypes.rst:4936 msgid ":class:`collections.abc.AsyncIterable`" msgstr ":class:`collections.abc.AsyncIterable`" -#: ../../library/stdtypes.rst:4941 +#: ../../library/stdtypes.rst:4937 msgid ":class:`collections.abc.AsyncIterator`" msgstr ":class:`collections.abc.AsyncIterator`" -#: ../../library/stdtypes.rst:4942 +#: ../../library/stdtypes.rst:4938 msgid ":class:`collections.abc.AsyncGenerator`" msgstr ":class:`collections.abc.AsyncGenerator`" -#: ../../library/stdtypes.rst:4943 +#: ../../library/stdtypes.rst:4939 msgid ":class:`collections.abc.Iterable`" msgstr ":class:`collections.abc.Iterable`" -#: ../../library/stdtypes.rst:4944 +#: ../../library/stdtypes.rst:4940 msgid ":class:`collections.abc.Iterator`" msgstr ":class:`collections.abc.Iterator`" -#: ../../library/stdtypes.rst:4945 +#: ../../library/stdtypes.rst:4941 msgid ":class:`collections.abc.Generator`" msgstr ":class:`collections.abc.Generator`" -#: ../../library/stdtypes.rst:4946 +#: ../../library/stdtypes.rst:4942 msgid ":class:`collections.abc.Reversible`" msgstr ":class:`collections.abc.Reversible`" -#: ../../library/stdtypes.rst:4947 +#: ../../library/stdtypes.rst:4943 msgid ":class:`collections.abc.Container`" msgstr ":class:`collections.abc.Container`" -#: ../../library/stdtypes.rst:4948 +#: ../../library/stdtypes.rst:4944 msgid ":class:`collections.abc.Collection`" msgstr ":class:`collections.abc.Collection`" -#: ../../library/stdtypes.rst:4949 +#: ../../library/stdtypes.rst:4945 msgid ":class:`collections.abc.Callable`" msgstr ":class:`collections.abc.Callable`" -#: ../../library/stdtypes.rst:4950 +#: ../../library/stdtypes.rst:4946 msgid ":class:`collections.abc.Set`" msgstr ":class:`collections.abc.Set`" -#: ../../library/stdtypes.rst:4951 +#: ../../library/stdtypes.rst:4947 msgid ":class:`collections.abc.MutableSet`" msgstr ":class:`collections.abc.MutableSet`" -#: ../../library/stdtypes.rst:4952 +#: ../../library/stdtypes.rst:4948 msgid ":class:`collections.abc.Mapping`" msgstr ":class:`collections.abc.Mapping`" -#: ../../library/stdtypes.rst:4953 +#: ../../library/stdtypes.rst:4949 msgid ":class:`collections.abc.MutableMapping`" msgstr ":class:`collections.abc.MutableMapping`" -#: ../../library/stdtypes.rst:4954 +#: ../../library/stdtypes.rst:4950 msgid ":class:`collections.abc.Sequence`" msgstr ":class:`collections.abc.Sequence`" -#: ../../library/stdtypes.rst:4955 +#: ../../library/stdtypes.rst:4951 msgid ":class:`collections.abc.MutableSequence`" msgstr ":class:`collections.abc.MutableSequence`" -#: ../../library/stdtypes.rst:4956 +#: ../../library/stdtypes.rst:4952 msgid ":class:`collections.abc.ByteString`" msgstr ":class:`collections.abc.ByteString`" -#: ../../library/stdtypes.rst:4957 +#: ../../library/stdtypes.rst:4953 msgid ":class:`collections.abc.MappingView`" msgstr ":class:`collections.abc.MappingView`" -#: ../../library/stdtypes.rst:4958 +#: ../../library/stdtypes.rst:4954 msgid ":class:`collections.abc.KeysView`" msgstr ":class:`collections.abc.KeysView`" -#: ../../library/stdtypes.rst:4959 +#: ../../library/stdtypes.rst:4955 msgid ":class:`collections.abc.ItemsView`" msgstr ":class:`collections.abc.ItemsView`" -#: ../../library/stdtypes.rst:4960 +#: ../../library/stdtypes.rst:4956 msgid ":class:`collections.abc.ValuesView`" msgstr ":class:`collections.abc.ValuesView`" -#: ../../library/stdtypes.rst:4961 +#: ../../library/stdtypes.rst:4957 msgid ":class:`contextlib.AbstractContextManager`" msgstr ":class:`contextlib.AbstractContextManager`" -#: ../../library/stdtypes.rst:4962 +#: ../../library/stdtypes.rst:4958 msgid ":class:`contextlib.AbstractAsyncContextManager`" msgstr ":class:`contextlib.AbstractAsyncContextManager`" -#: ../../library/stdtypes.rst:4963 +#: ../../library/stdtypes.rst:4959 msgid ":class:`dataclasses.Field`" msgstr ":class:`dataclasses.Field`" -#: ../../library/stdtypes.rst:4964 +#: ../../library/stdtypes.rst:4960 msgid ":class:`functools.cached_property`" msgstr ":class:`functools.cached_property`" -#: ../../library/stdtypes.rst:4965 +#: ../../library/stdtypes.rst:4961 msgid ":class:`functools.partialmethod`" msgstr ":class:`functools.partialmethod`" -#: ../../library/stdtypes.rst:4966 +#: ../../library/stdtypes.rst:4962 msgid ":class:`os.PathLike`" msgstr ":class:`os.PathLike`" -#: ../../library/stdtypes.rst:4967 +#: ../../library/stdtypes.rst:4963 msgid ":class:`queue.LifoQueue`" msgstr ":class:`queue.LifoQueue`" -#: ../../library/stdtypes.rst:4968 +#: ../../library/stdtypes.rst:4964 msgid ":class:`queue.Queue`" msgstr ":class:`queue.Queue`" -#: ../../library/stdtypes.rst:4969 +#: ../../library/stdtypes.rst:4965 msgid ":class:`queue.PriorityQueue`" msgstr ":class:`queue.PriorityQueue`" -#: ../../library/stdtypes.rst:4970 +#: ../../library/stdtypes.rst:4966 msgid ":class:`queue.SimpleQueue`" msgstr ":class:`queue.SimpleQueue`" -#: ../../library/stdtypes.rst:4971 +#: ../../library/stdtypes.rst:4967 msgid ":ref:`re.Pattern `" msgstr ":ref:`re.Pattern `" -#: ../../library/stdtypes.rst:4972 +#: ../../library/stdtypes.rst:4968 msgid ":ref:`re.Match `" msgstr ":ref:`re.Match `" -#: ../../library/stdtypes.rst:4973 +#: ../../library/stdtypes.rst:4969 msgid ":class:`shelve.BsdDbShelf`" msgstr ":class:`shelve.BsdDbShelf`" -#: ../../library/stdtypes.rst:4974 +#: ../../library/stdtypes.rst:4970 msgid ":class:`shelve.DbfilenameShelf`" msgstr ":class:`shelve.DbfilenameShelf`" -#: ../../library/stdtypes.rst:4975 +#: ../../library/stdtypes.rst:4971 msgid ":class:`shelve.Shelf`" msgstr ":class:`shelve.Shelf`" -#: ../../library/stdtypes.rst:4976 +#: ../../library/stdtypes.rst:4972 msgid ":class:`types.MappingProxyType`" msgstr ":class:`types.MappingProxyType`" -#: ../../library/stdtypes.rst:4977 +#: ../../library/stdtypes.rst:4973 msgid ":class:`weakref.WeakKeyDictionary`" msgstr ":class:`weakref.WeakKeyDictionary`" -#: ../../library/stdtypes.rst:4978 +#: ../../library/stdtypes.rst:4974 msgid ":class:`weakref.WeakMethod`" msgstr ":class:`weakref.WeakMethod`" -#: ../../library/stdtypes.rst:4979 +#: ../../library/stdtypes.rst:4975 msgid ":class:`weakref.WeakSet`" msgstr ":class:`weakref.WeakSet`" -#: ../../library/stdtypes.rst:4980 +#: ../../library/stdtypes.rst:4976 msgid ":class:`weakref.WeakValueDictionary`" msgstr ":class:`weakref.WeakValueDictionary`" -#: ../../library/stdtypes.rst:4985 +#: ../../library/stdtypes.rst:4981 msgid "Special Attributes of ``GenericAlias`` objects" msgstr "" -#: ../../library/stdtypes.rst:4987 +#: ../../library/stdtypes.rst:4983 msgid "All parameterized generics implement special read-only attributes." msgstr "" -#: ../../library/stdtypes.rst:4991 +#: ../../library/stdtypes.rst:4987 msgid "This attribute points at the non-parameterized generic class::" msgstr "" -#: ../../library/stdtypes.rst:4999 +#: ../../library/stdtypes.rst:4995 msgid "" "This attribute is a :class:`tuple` (possibly of length 1) of generic types " "passed to the original :meth:`~object.__class_getitem__` of the generic " "class::" msgstr "" -#: ../../library/stdtypes.rst:5009 +#: ../../library/stdtypes.rst:5005 msgid "" "This attribute is a lazily computed tuple (possibly empty) of unique type " "variables found in ``__args__``::" msgstr "" -#: ../../library/stdtypes.rst:5020 +#: ../../library/stdtypes.rst:5016 msgid "" "A ``GenericAlias`` object with :class:`typing.ParamSpec` parameters may not " "have correct ``__parameters__`` after substitution because :class:`typing." "ParamSpec` is intended primarily for static type checking." msgstr "" -#: ../../library/stdtypes.rst:5027 +#: ../../library/stdtypes.rst:5023 msgid ":pep:`484` - Type Hints" msgstr "" -#: ../../library/stdtypes.rst:5027 +#: ../../library/stdtypes.rst:5023 msgid "Introducing Python's framework for type annotations." msgstr "" -#: ../../library/stdtypes.rst:5032 +#: ../../library/stdtypes.rst:5028 msgid ":pep:`585` - Type Hinting Generics In Standard Collections" msgstr "" -#: ../../library/stdtypes.rst:5030 +#: ../../library/stdtypes.rst:5026 msgid "" "Introducing the ability to natively parameterize standard-library classes, " "provided they implement the special class method :meth:`~object." "__class_getitem__`." msgstr "" -#: ../../library/stdtypes.rst:5035 +#: ../../library/stdtypes.rst:5031 msgid "" ":ref:`Generics`, :ref:`user-defined generics ` and :" "class:`typing.Generic`" msgstr "" -#: ../../library/stdtypes.rst:5035 +#: ../../library/stdtypes.rst:5031 msgid "" "Documentation on how to implement generic classes that can be parameterized " "at runtime and understood by static type-checkers." msgstr "" -#: ../../library/stdtypes.rst:5044 +#: ../../library/stdtypes.rst:5040 msgid "Union Type" msgstr "" -#: ../../library/stdtypes.rst:5050 +#: ../../library/stdtypes.rst:5046 msgid "" "A union object holds the value of the ``|`` (bitwise or) operation on " "multiple :ref:`type objects `. These types are intended " @@ -5457,7 +5450,7 @@ msgid "" "Union`." msgstr "" -#: ../../library/stdtypes.rst:5057 +#: ../../library/stdtypes.rst:5053 msgid "" "Defines a union object which holds types *X*, *Y*, and so forth. ``X | Y`` " "means either X or Y. It is equivalent to ``typing.Union[X, Y]``. For " @@ -5465,76 +5458,76 @@ msgid "" "class:`float`::" msgstr "" -#: ../../library/stdtypes.rst:5067 +#: ../../library/stdtypes.rst:5063 msgid "" "Union objects can be tested for equality with other union objects. Details:" msgstr "" -#: ../../library/stdtypes.rst:5069 +#: ../../library/stdtypes.rst:5065 msgid "Unions of unions are flattened::" msgstr "" -#: ../../library/stdtypes.rst:5073 +#: ../../library/stdtypes.rst:5069 msgid "Redundant types are removed::" msgstr "" -#: ../../library/stdtypes.rst:5077 +#: ../../library/stdtypes.rst:5073 msgid "When comparing unions, the order is ignored::" msgstr "" -#: ../../library/stdtypes.rst:5081 +#: ../../library/stdtypes.rst:5077 msgid "It is compatible with :data:`typing.Union`::" msgstr "" -#: ../../library/stdtypes.rst:5085 +#: ../../library/stdtypes.rst:5081 msgid "Optional types can be spelled as a union with ``None``::" msgstr "" -#: ../../library/stdtypes.rst:5092 +#: ../../library/stdtypes.rst:5088 msgid "" "Calls to :func:`isinstance` and :func:`issubclass` are also supported with a " "union object::" msgstr "" -#: ../../library/stdtypes.rst:5098 +#: ../../library/stdtypes.rst:5094 msgid "" "However, union objects containing :ref:`parameterized generics ` cannot be used::" msgstr "" -#: ../../library/stdtypes.rst:5106 +#: ../../library/stdtypes.rst:5102 msgid "" "The user-exposed type for the union object can be accessed from :data:`types." "UnionType` and used for :func:`isinstance` checks. An object cannot be " "instantiated from the type::" msgstr "" -#: ../../library/stdtypes.rst:5119 +#: ../../library/stdtypes.rst:5115 msgid "" "The :meth:`__or__` method for type objects was added to support the syntax " "``X | Y``. If a metaclass implements :meth:`__or__`, the Union may override " "it::" msgstr "" -#: ../../library/stdtypes.rst:5137 +#: ../../library/stdtypes.rst:5133 msgid ":pep:`604` -- PEP proposing the ``X | Y`` syntax and the Union type." msgstr "" -#: ../../library/stdtypes.rst:5145 +#: ../../library/stdtypes.rst:5141 msgid "Other Built-in Types" msgstr "" -#: ../../library/stdtypes.rst:5147 +#: ../../library/stdtypes.rst:5143 msgid "" "The interpreter supports several other kinds of objects. Most of these " "support only one or two operations." msgstr "" -#: ../../library/stdtypes.rst:5154 +#: ../../library/stdtypes.rst:5150 msgid "Modules" msgstr "模組" -#: ../../library/stdtypes.rst:5156 +#: ../../library/stdtypes.rst:5152 msgid "" "The only special operation on a module is attribute access: ``m.name``, " "where *m* is a module and *name* accesses a name defined in *m*'s symbol " @@ -5545,7 +5538,7 @@ msgid "" "*foo* somewhere.)" msgstr "" -#: ../../library/stdtypes.rst:5163 +#: ../../library/stdtypes.rst:5159 msgid "" "A special attribute of every module is :attr:`~object.__dict__`. This is the " "dictionary containing the module's symbol table. Modifying this dictionary " @@ -5556,32 +5549,32 @@ msgid "" "recommended." msgstr "" -#: ../../library/stdtypes.rst:5171 +#: ../../library/stdtypes.rst:5167 msgid "" "Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" -#: ../../library/stdtypes.rst:5179 +#: ../../library/stdtypes.rst:5175 msgid "Classes and Class Instances" msgstr "" -#: ../../library/stdtypes.rst:5181 +#: ../../library/stdtypes.rst:5177 msgid "See :ref:`objects` and :ref:`class` for these." msgstr "" -#: ../../library/stdtypes.rst:5187 +#: ../../library/stdtypes.rst:5183 msgid "Functions" msgstr "函式" -#: ../../library/stdtypes.rst:5189 +#: ../../library/stdtypes.rst:5185 msgid "" "Function objects are created by function definitions. The only operation on " "a function object is to call it: ``func(argument-list)``." msgstr "" -#: ../../library/stdtypes.rst:5192 +#: ../../library/stdtypes.rst:5188 msgid "" "There are really two flavors of function objects: built-in functions and " "user-defined functions. Both support the same operation (to call the " @@ -5589,15 +5582,15 @@ msgid "" "types." msgstr "" -#: ../../library/stdtypes.rst:5196 +#: ../../library/stdtypes.rst:5192 msgid "See :ref:`function` for more information." msgstr "更多資訊請見 :ref:`function`\\ 。" -#: ../../library/stdtypes.rst:5202 +#: ../../library/stdtypes.rst:5198 msgid "Methods" msgstr "" -#: ../../library/stdtypes.rst:5206 +#: ../../library/stdtypes.rst:5202 msgid "" "Methods are functions that are called using the attribute notation. There " "are two flavors: built-in methods (such as :meth:`append` on lists) and " @@ -5605,7 +5598,7 @@ msgid "" "support them." msgstr "" -#: ../../library/stdtypes.rst:5211 +#: ../../library/stdtypes.rst:5207 msgid "" "If you access a method (a function defined in a class namespace) through an " "instance, you get a special object: a :dfn:`bound method` (also called :dfn:" @@ -5617,7 +5610,7 @@ msgid "" "arg-2, ..., arg-n)``." msgstr "" -#: ../../library/stdtypes.rst:5220 +#: ../../library/stdtypes.rst:5216 msgid "" "Like function objects, bound method objects support getting arbitrary " "attributes. However, since method attributes are actually stored on the " @@ -5627,15 +5620,15 @@ msgid "" "attribute, you need to explicitly set it on the underlying function object::" msgstr "" -#: ../../library/stdtypes.rst:5240 ../../library/stdtypes.rst:5271 +#: ../../library/stdtypes.rst:5236 ../../library/stdtypes.rst:5267 msgid "See :ref:`types` for more information." msgstr "更多資訊請見 :ref:`types`\\ 。" -#: ../../library/stdtypes.rst:5248 +#: ../../library/stdtypes.rst:5244 msgid "Code Objects" msgstr "" -#: ../../library/stdtypes.rst:5254 +#: ../../library/stdtypes.rst:5250 msgid "" "Code objects are used by the implementation to represent \"pseudo-compiled\" " "executable Python code such as a function body. They differ from function " @@ -5645,23 +5638,23 @@ msgid "" "`__code__` attribute. See also the :mod:`code` module." msgstr "" -#: ../../library/stdtypes.rst:5261 +#: ../../library/stdtypes.rst:5257 msgid "" "Accessing ``__code__`` raises an :ref:`auditing event ` ``object." "__getattr__`` with arguments ``obj`` and ``\"__code__\"``." msgstr "" -#: ../../library/stdtypes.rst:5268 +#: ../../library/stdtypes.rst:5264 msgid "" "A code object can be executed or evaluated by passing it (instead of a " "source string) to the :func:`exec` or :func:`eval` built-in functions." msgstr "" -#: ../../library/stdtypes.rst:5277 +#: ../../library/stdtypes.rst:5273 msgid "Type Objects" msgstr "" -#: ../../library/stdtypes.rst:5283 +#: ../../library/stdtypes.rst:5279 msgid "" "Type objects represent the various object types. An object's type is " "accessed by the built-in function :func:`type`. There are no special " @@ -5669,30 +5662,30 @@ msgid "" "standard built-in types." msgstr "" -#: ../../library/stdtypes.rst:5288 +#: ../../library/stdtypes.rst:5284 msgid "Types are written like this: ````." msgstr "" -#: ../../library/stdtypes.rst:5294 +#: ../../library/stdtypes.rst:5290 msgid "The Null Object" msgstr "" -#: ../../library/stdtypes.rst:5296 +#: ../../library/stdtypes.rst:5292 msgid "" "This object is returned by functions that don't explicitly return a value. " "It supports no special operations. There is exactly one null object, named " "``None`` (a built-in name). ``type(None)()`` produces the same singleton." msgstr "" -#: ../../library/stdtypes.rst:5300 +#: ../../library/stdtypes.rst:5296 msgid "It is written as ``None``." msgstr "" -#: ../../library/stdtypes.rst:5307 +#: ../../library/stdtypes.rst:5303 msgid "The Ellipsis Object" msgstr "" -#: ../../library/stdtypes.rst:5309 +#: ../../library/stdtypes.rst:5305 msgid "" "This object is commonly used by slicing (see :ref:`slicings`). It supports " "no special operations. There is exactly one ellipsis object, named :const:" @@ -5700,15 +5693,15 @@ msgid "" "`Ellipsis` singleton." msgstr "" -#: ../../library/stdtypes.rst:5314 +#: ../../library/stdtypes.rst:5310 msgid "It is written as ``Ellipsis`` or ``...``." msgstr "" -#: ../../library/stdtypes.rst:5320 +#: ../../library/stdtypes.rst:5316 msgid "The NotImplemented Object" msgstr "" -#: ../../library/stdtypes.rst:5322 +#: ../../library/stdtypes.rst:5318 msgid "" "This object is returned from comparisons and binary operations when they are " "asked to operate on types they don't support. See :ref:`comparisons` for " @@ -5716,15 +5709,15 @@ msgid "" "``type(NotImplemented)()`` produces the singleton instance." msgstr "" -#: ../../library/stdtypes.rst:5327 +#: ../../library/stdtypes.rst:5323 msgid "It is written as ``NotImplemented``." msgstr "" -#: ../../library/stdtypes.rst:5333 +#: ../../library/stdtypes.rst:5329 msgid "Boolean Values" msgstr "" -#: ../../library/stdtypes.rst:5335 +#: ../../library/stdtypes.rst:5331 msgid "" "Boolean values are the two constant objects ``False`` and ``True``. They " "are used to represent truth values (although other values can also be " @@ -5735,104 +5728,104 @@ msgid "" "(see section :ref:`truth` above)." msgstr "" -#: ../../library/stdtypes.rst:5348 +#: ../../library/stdtypes.rst:5344 msgid "They are written as ``False`` and ``True``, respectively." msgstr "" -#: ../../library/stdtypes.rst:5354 +#: ../../library/stdtypes.rst:5350 msgid "Internal Objects" msgstr "" -#: ../../library/stdtypes.rst:5356 +#: ../../library/stdtypes.rst:5352 msgid "" "See :ref:`types` for this information. It describes stack frame objects, " "traceback objects, and slice objects." msgstr "" -#: ../../library/stdtypes.rst:5363 +#: ../../library/stdtypes.rst:5359 msgid "Special Attributes" msgstr "" -#: ../../library/stdtypes.rst:5365 +#: ../../library/stdtypes.rst:5361 msgid "" "The implementation adds a few special read-only attributes to several object " "types, where they are relevant. Some of these are not reported by the :func:" "`dir` built-in function." msgstr "" -#: ../../library/stdtypes.rst:5372 +#: ../../library/stdtypes.rst:5368 msgid "" "A dictionary or other mapping object used to store an object's (writable) " "attributes." msgstr "" -#: ../../library/stdtypes.rst:5378 +#: ../../library/stdtypes.rst:5374 msgid "The class to which a class instance belongs." msgstr "" -#: ../../library/stdtypes.rst:5383 +#: ../../library/stdtypes.rst:5379 msgid "The tuple of base classes of a class object." msgstr "" -#: ../../library/stdtypes.rst:5388 +#: ../../library/stdtypes.rst:5384 msgid "" "The name of the class, function, method, descriptor, or generator instance." msgstr "" -#: ../../library/stdtypes.rst:5394 +#: ../../library/stdtypes.rst:5390 msgid "" "The :term:`qualified name` of the class, function, method, descriptor, or " "generator instance." msgstr "" -#: ../../library/stdtypes.rst:5402 +#: ../../library/stdtypes.rst:5398 msgid "" "This attribute is a tuple of classes that are considered when looking for " "base classes during method resolution." msgstr "" -#: ../../library/stdtypes.rst:5408 +#: ../../library/stdtypes.rst:5404 msgid "" "This method can be overridden by a metaclass to customize the method " "resolution order for its instances. It is called at class instantiation, " "and its result is stored in :attr:`~class.__mro__`." msgstr "" -#: ../../library/stdtypes.rst:5415 +#: ../../library/stdtypes.rst:5411 msgid "" "Each class keeps a list of weak references to its immediate subclasses. " "This method returns a list of all those references still alive. The list is " "in definition order. Example::" msgstr "" -#: ../../library/stdtypes.rst:5424 +#: ../../library/stdtypes.rst:5420 msgid "Footnotes" msgstr "註解" -#: ../../library/stdtypes.rst:5425 +#: ../../library/stdtypes.rst:5421 msgid "" "Additional information on these special methods may be found in the Python " "Reference Manual (:ref:`customization`)." msgstr "" -#: ../../library/stdtypes.rst:5428 +#: ../../library/stdtypes.rst:5424 msgid "" "As a consequence, the list ``[1, 2]`` is considered equal to ``[1.0, 2.0]``, " "and similarly for tuples." msgstr "" -#: ../../library/stdtypes.rst:5431 +#: ../../library/stdtypes.rst:5427 msgid "They must have since the parser can't tell the type of the operands." msgstr "" -#: ../../library/stdtypes.rst:5433 +#: ../../library/stdtypes.rst:5429 msgid "" "Cased characters are those with general category property being one of \"Lu" "\" (Letter, uppercase), \"Ll\" (Letter, lowercase), or \"Lt\" (Letter, " "titlecase)." msgstr "" -#: ../../library/stdtypes.rst:5436 +#: ../../library/stdtypes.rst:5432 msgid "" "To format only a tuple you should therefore provide a singleton tuple whose " "only element is the tuple to be formatted." diff --git a/library/urllib.request.po b/library/urllib.request.po index 0dbd395ea1..1c13fe807b 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -8,8 +8,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2021-12-08 23:01+0800\n" +"POT-Creation-Date: 2022-04-21 00:16+0000\n" +"PO-Revision-Date: 2022-04-21 17:59+0800\n" "Last-Translator: Jordan Su \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Poedit 3.0\n" +"X-Generator: Poedit 3.0.1\n" #: ../../library/urllib.request.rst:2 msgid ":mod:`urllib.request` --- Extensible library for opening URLs" @@ -405,7 +405,8 @@ msgid "" "from common browsers as opposed to scripts. For example, Mozilla Firefox may " "identify itself as ``\"Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 " "Firefox/2.0.0.11\"``, while :mod:`urllib`'s default user agent string is ``" -"\"Python-urllib/2.6\"`` (on Python 2.6)." +"\"Python-urllib/2.6\"`` (on Python 2.6). All header keys are sent in camel " +"case." msgstr "" "*headers* 必須是一個 dictionary,並會被視為如同每對 key 和 value 作為引數來呼" "叫 :meth:`add_header`\\ 。經常用於「偽裝」 ``User-Agent`` header 的值,這個 " @@ -413,9 +414,10 @@ msgstr "" "自普通瀏覽器的請求,而不接受來自程式腳本的請求。例如,Mozilla Firefox 會將 " "header 的值設為 ``\"Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 " "Firefox/2.0.0.11\"``,而 :mod:`urllib` 的值則是 ``\"Python-urllib/2.6\"``\\ " -"(在 Python 2.6 上)。" +"(在 Python 2.6 上)。所有 header 的鍵都會以 camel case(駝峰式大小寫)來傳" +"送。" -#: ../../library/urllib.request.rst:222 +#: ../../library/urllib.request.rst:223 msgid "" "An appropriate ``Content-Type`` header should be included if the *data* " "argument is present. If this header has not been provided and *data* is not " @@ -426,14 +428,14 @@ msgstr "" "個 header 沒有被提供且 *data* 也不為 None 時,預設值 ``Content-Type: " "application/x-www-form-urlencoded`` 會被新增至請求中。" -#: ../../library/urllib.request.rst:227 +#: ../../library/urllib.request.rst:228 msgid "" "The next two arguments are only of interest for correct handling of third-" "party HTTP cookies:" msgstr "" "接下來的兩個引數的介紹提供給那些有興趣正確處理第三方 HTTP cookies 的使用者:" -#: ../../library/urllib.request.rst:230 +#: ../../library/urllib.request.rst:231 msgid "" "*origin_req_host* should be the request-host of the origin transaction, as " "defined by :rfc:`2965`. It defaults to ``http.cookiejar." @@ -447,7 +449,7 @@ msgstr "" "者發起的原始請求的主機名稱或是 IP 位址。例如當請求是要求一個 HTML 文件中的一" "個影像,則這個屬性應為請求包含影像頁面的請求主機。" -#: ../../library/urllib.request.rst:238 +#: ../../library/urllib.request.rst:239 msgid "" "*unverifiable* should indicate whether the request is unverifiable, as " "defined by :rfc:`2965`. It defaults to ``False``. An unverifiable request " @@ -460,7 +462,7 @@ msgstr "" "URL,例如一個對於 HTML 文件中的影像所做的請求,而使用者沒有機會去批准是否能自" "動擷取影像,則這個值應該為 true。" -#: ../../library/urllib.request.rst:245 +#: ../../library/urllib.request.rst:246 msgid "" "*method* should be a string that indicates the HTTP request method that will " "be used (e.g. ``'HEAD'``). If provided, its value is stored in the :attr:" @@ -475,7 +477,7 @@ msgstr "" "Subclasses 可以透過設置其 :attr:`~Request.method` 屬性來設定不一樣的預設請求" "方法。" -#: ../../library/urllib.request.rst:253 +#: ../../library/urllib.request.rst:254 msgid "" "The request will not work as expected if the data object is unable to " "deliver its content more than once (e.g. a file or an iterable that can " @@ -489,15 +491,15 @@ msgstr "" "新嘗試傳送,則該請求不會正常運作。*data* 會接在 headers 之後被送至 HTTP 伺服" "器。此函式庫沒有支援 100-continue expectation。" -#: ../../library/urllib.request.rst:260 +#: ../../library/urllib.request.rst:261 msgid ":attr:`Request.method` argument is added to the Request class." msgstr "新增 :attr:`Request.method` 引數到 Request class。" -#: ../../library/urllib.request.rst:263 +#: ../../library/urllib.request.rst:264 msgid "Default :attr:`Request.method` may be indicated at the class level." msgstr "能夠在 class 中設置預設的 :attr:`Request.method`\\ 。" -#: ../../library/urllib.request.rst:266 +#: ../../library/urllib.request.rst:267 msgid "" "Do not raise an error if the ``Content-Length`` has not been provided and " "*data* is neither ``None`` nor a bytes object. Fall back to use chunked " @@ -507,34 +509,34 @@ msgstr "" "串物件,則不會觸發錯誤,並 fall back(後備)使用分塊傳輸編碼 (chunked " "transfer encoding)。" -#: ../../library/urllib.request.rst:273 +#: ../../library/urllib.request.rst:274 msgid "" "The :class:`OpenerDirector` class opens URLs via :class:`BaseHandler`\\ s " "chained together. It manages the chaining of handlers, and recovery from " "errors." msgstr "" -#: ../../library/urllib.request.rst:279 +#: ../../library/urllib.request.rst:280 msgid "" "This is the base class for all registered handlers --- and handles only the " "simple mechanics of registration." msgstr "" -#: ../../library/urllib.request.rst:285 +#: ../../library/urllib.request.rst:286 msgid "" "A class which defines a default handler for HTTP error responses; all " "responses are turned into :exc:`~urllib.error.HTTPError` exceptions." msgstr "" -#: ../../library/urllib.request.rst:291 +#: ../../library/urllib.request.rst:292 msgid "A class to handle redirections." msgstr "" -#: ../../library/urllib.request.rst:296 +#: ../../library/urllib.request.rst:297 msgid "A class to handle HTTP Cookies." msgstr "" -#: ../../library/urllib.request.rst:301 +#: ../../library/urllib.request.rst:302 msgid "" "Cause requests to go through a proxy. If *proxies* is given, it must be a " "dictionary mapping protocol names to URLs of proxies. The default is to read " @@ -545,11 +547,11 @@ msgid "" "Configuration Framework." msgstr "" -#: ../../library/urllib.request.rst:309 +#: ../../library/urllib.request.rst:310 msgid "To disable autodetected proxy pass an empty dictionary." msgstr "" -#: ../../library/urllib.request.rst:311 +#: ../../library/urllib.request.rst:312 msgid "" "The :envvar:`no_proxy` environment variable can be used to specify hosts " "which shouldn't be reached via proxy; if set, it should be a comma-separated " @@ -557,24 +559,24 @@ msgid "" "``cern.ch,ncsa.uiuc.edu,some.host:8080``." msgstr "" -#: ../../library/urllib.request.rst:318 +#: ../../library/urllib.request.rst:319 msgid "" "``HTTP_PROXY`` will be ignored if a variable ``REQUEST_METHOD`` is set; see " "the documentation on :func:`~urllib.request.getproxies`." msgstr "" -#: ../../library/urllib.request.rst:324 +#: ../../library/urllib.request.rst:325 msgid "Keep a database of ``(realm, uri) -> (user, password)`` mappings." msgstr "" -#: ../../library/urllib.request.rst:329 +#: ../../library/urllib.request.rst:330 msgid "" "Keep a database of ``(realm, uri) -> (user, password)`` mappings. A realm " "of ``None`` is considered a catch-all realm, which is searched if no other " "realm fits." msgstr "" -#: ../../library/urllib.request.rst:336 +#: ../../library/urllib.request.rst:337 msgid "" "A variant of :class:`HTTPPasswordMgrWithDefaultRealm` that also has a " "database of ``uri -> is_authenticated`` mappings. Can be used by a " @@ -582,7 +584,7 @@ msgid "" "immediately instead of waiting for a ``401`` response first." msgstr "" -#: ../../library/urllib.request.rst:346 +#: ../../library/urllib.request.rst:347 msgid "" "This is a mixin class that helps with HTTP authentication, both to the " "remote host and to a proxy. *password_mgr*, if given, should be something " @@ -601,11 +603,11 @@ msgid "" "will automatically include the authentication credentials." msgstr "" -#: ../../library/urllib.request.rst:363 +#: ../../library/urllib.request.rst:364 msgid "Added ``is_authenticated`` support." msgstr "新增 ``is_authenticated`` 的支援。" -#: ../../library/urllib.request.rst:369 +#: ../../library/urllib.request.rst:370 msgid "" "Handle authentication with the remote host. *password_mgr*, if given, should " "be something that is compatible with :class:`HTTPPasswordMgr`; refer to " @@ -614,7 +616,7 @@ msgid "" "presented with a wrong Authentication scheme." msgstr "" -#: ../../library/urllib.request.rst:378 ../../library/urllib.request.rst:412 +#: ../../library/urllib.request.rst:379 ../../library/urllib.request.rst:413 msgid "" "Handle authentication with the proxy. *password_mgr*, if given, should be " "something that is compatible with :class:`HTTPPasswordMgr`; refer to " @@ -622,7 +624,7 @@ msgid "" "be supported." msgstr "" -#: ../../library/urllib.request.rst:386 +#: ../../library/urllib.request.rst:387 msgid "" "This is a mixin class that helps with HTTP authentication, both to the " "remote host and to a proxy. *password_mgr*, if given, should be something " @@ -630,7 +632,7 @@ msgid "" "`http-password-mgr` for information on the interface that must be supported." msgstr "" -#: ../../library/urllib.request.rst:395 +#: ../../library/urllib.request.rst:396 msgid "" "Handle authentication with the remote host. *password_mgr*, if given, should " "be something that is compatible with :class:`HTTPPasswordMgr`; refer to " @@ -643,108 +645,108 @@ msgid "" "Digest or Basic." msgstr "" -#: ../../library/urllib.request.rst:405 +#: ../../library/urllib.request.rst:406 msgid "Raise :exc:`ValueError` on unsupported Authentication Scheme." msgstr "" -#: ../../library/urllib.request.rst:420 +#: ../../library/urllib.request.rst:421 msgid "A class to handle opening of HTTP URLs." msgstr "" -#: ../../library/urllib.request.rst:425 +#: ../../library/urllib.request.rst:426 msgid "" "A class to handle opening of HTTPS URLs. *context* and *check_hostname* " "have the same meaning as in :class:`http.client.HTTPSConnection`." msgstr "" -#: ../../library/urllib.request.rst:428 +#: ../../library/urllib.request.rst:429 msgid "*context* and *check_hostname* were added." msgstr "新增 *context* 與 *check_hostname*\\ 。" -#: ../../library/urllib.request.rst:434 +#: ../../library/urllib.request.rst:435 msgid "Open local files." msgstr "" -#: ../../library/urllib.request.rst:438 +#: ../../library/urllib.request.rst:439 msgid "Open data URLs." msgstr "" -#: ../../library/urllib.request.rst:444 +#: ../../library/urllib.request.rst:445 msgid "Open FTP URLs." msgstr "" -#: ../../library/urllib.request.rst:449 +#: ../../library/urllib.request.rst:450 msgid "" "Open FTP URLs, keeping a cache of open FTP connections to minimize delays." msgstr "" -#: ../../library/urllib.request.rst:454 +#: ../../library/urllib.request.rst:455 msgid "A catch-all class to handle unknown URLs." msgstr "" -#: ../../library/urllib.request.rst:459 ../../library/urllib.request.rst:1154 +#: ../../library/urllib.request.rst:460 ../../library/urllib.request.rst:1155 msgid "Process HTTP error responses." msgstr "" -#: ../../library/urllib.request.rst:465 +#: ../../library/urllib.request.rst:466 msgid "Request Objects" msgstr "" -#: ../../library/urllib.request.rst:467 +#: ../../library/urllib.request.rst:468 msgid "" "The following methods describe :class:`Request`'s public interface, and so " "all may be overridden in subclasses. It also defines several public " "attributes that can be used by clients to inspect the parsed request." msgstr "" -#: ../../library/urllib.request.rst:474 +#: ../../library/urllib.request.rst:475 msgid "The original URL passed to the constructor." msgstr "" -#: ../../library/urllib.request.rst:478 +#: ../../library/urllib.request.rst:479 msgid "" "Request.full_url is a property with setter, getter and a deleter. Getting :" "attr:`~Request.full_url` returns the original request URL with the fragment, " "if it was present." msgstr "" -#: ../../library/urllib.request.rst:484 +#: ../../library/urllib.request.rst:485 msgid "The URI scheme." msgstr "" -#: ../../library/urllib.request.rst:488 +#: ../../library/urllib.request.rst:489 msgid "" "The URI authority, typically a host, but may also contain a port separated " "by a colon." msgstr "" -#: ../../library/urllib.request.rst:493 +#: ../../library/urllib.request.rst:494 msgid "The original host for the request, without port." msgstr "" -#: ../../library/urllib.request.rst:497 +#: ../../library/urllib.request.rst:498 msgid "" "The URI path. If the :class:`Request` uses a proxy, then selector will be " "the full URL that is passed to the proxy." msgstr "" -#: ../../library/urllib.request.rst:502 +#: ../../library/urllib.request.rst:503 msgid "The entity body for the request, or ``None`` if not specified." msgstr "" -#: ../../library/urllib.request.rst:504 +#: ../../library/urllib.request.rst:505 msgid "" "Changing value of :attr:`Request.data` now deletes \"Content-Length\" header " "if it was previously set or calculated." msgstr "" -#: ../../library/urllib.request.rst:510 +#: ../../library/urllib.request.rst:511 msgid "" "boolean, indicates whether the request is unverifiable as defined by :rfc:" "`2965`." msgstr "" -#: ../../library/urllib.request.rst:515 +#: ../../library/urllib.request.rst:516 msgid "" "The HTTP request method to use. By default its value is :const:`None`, " "which means that :meth:`~Request.get_method` will do its normal computation " @@ -755,13 +757,13 @@ msgid "" "argument." msgstr "" -#: ../../library/urllib.request.rst:525 +#: ../../library/urllib.request.rst:526 msgid "" "A default value can now be set in subclasses; previously it could only be " "set via the constructor argument." msgstr "" -#: ../../library/urllib.request.rst:532 +#: ../../library/urllib.request.rst:533 msgid "" "Return a string indicating the HTTP request method. If :attr:`Request." "method` is not ``None``, return its value, otherwise return ``'GET'`` if :" @@ -769,11 +771,11 @@ msgid "" "meaningful for HTTP requests." msgstr "" -#: ../../library/urllib.request.rst:537 +#: ../../library/urllib.request.rst:538 msgid "get_method now looks at the value of :attr:`Request.method`." msgstr "" -#: ../../library/urllib.request.rst:543 +#: ../../library/urllib.request.rst:544 msgid "" "Add another header to the request. Headers are currently ignored by all " "handlers except HTTP handlers, where they are added to the list of headers " @@ -784,64 +786,64 @@ msgid "" "way of gaining the same functionality using only one header." msgstr "" -#: ../../library/urllib.request.rst:554 +#: ../../library/urllib.request.rst:555 msgid "Add a header that will not be added to a redirected request." msgstr "" -#: ../../library/urllib.request.rst:559 +#: ../../library/urllib.request.rst:560 msgid "" "Return whether the instance has the named header (checks both regular and " "unredirected)." msgstr "" -#: ../../library/urllib.request.rst:565 +#: ../../library/urllib.request.rst:566 msgid "" "Remove named header from the request instance (both from regular and " "unredirected headers)." msgstr "" -#: ../../library/urllib.request.rst:573 +#: ../../library/urllib.request.rst:574 msgid "Return the URL given in the constructor." msgstr "" -#: ../../library/urllib.request.rst:577 +#: ../../library/urllib.request.rst:578 msgid "Returns :attr:`Request.full_url`" msgstr "" -#: ../../library/urllib.request.rst:582 +#: ../../library/urllib.request.rst:583 msgid "" "Prepare the request by connecting to a proxy server. The *host* and *type* " "will replace those of the instance, and the instance's selector will be the " "original URL given in the constructor." msgstr "" -#: ../../library/urllib.request.rst:589 +#: ../../library/urllib.request.rst:590 msgid "" "Return the value of the given header. If the header is not present, return " "the default value." msgstr "" -#: ../../library/urllib.request.rst:595 +#: ../../library/urllib.request.rst:596 msgid "" "Return a list of tuples (header_name, header_value) of the Request headers." msgstr "" -#: ../../library/urllib.request.rst:597 +#: ../../library/urllib.request.rst:598 msgid "" "The request methods add_data, has_data, get_data, get_type, get_host, " "get_selector, get_origin_req_host and is_unverifiable that were deprecated " "since 3.3 have been removed." msgstr "" -#: ../../library/urllib.request.rst:606 +#: ../../library/urllib.request.rst:607 msgid "OpenerDirector Objects" msgstr "OpenerDirector 物件" -#: ../../library/urllib.request.rst:608 +#: ../../library/urllib.request.rst:609 msgid ":class:`OpenerDirector` instances have the following methods:" msgstr "" -#: ../../library/urllib.request.rst:613 +#: ../../library/urllib.request.rst:614 msgid "" "*handler* should be an instance of :class:`BaseHandler`. The following " "methods are searched, and added to the possible chains (note that HTTP " @@ -852,53 +854,53 @@ msgid "" "`http_error_404` would handle HTTP 404 errors." msgstr "" -#: ../../library/urllib.request.rst:621 +#: ../../library/urllib.request.rst:622 msgid "" ":meth:`_open` --- signal that the handler knows how to open " "*protocol* URLs." msgstr "" -#: ../../library/urllib.request.rst:624 +#: ../../library/urllib.request.rst:625 msgid "See |protocol_open|_ for more information." msgstr "更多資訊請見 |protocol_open|_\\ 。" -#: ../../library/urllib.request.rst:626 +#: ../../library/urllib.request.rst:627 msgid "" ":meth:`http_error_\\` --- signal that the handler knows how to " "handle HTTP errors with HTTP error code *type*." msgstr "" -#: ../../library/urllib.request.rst:629 +#: ../../library/urllib.request.rst:630 msgid "See |http_error_nnn|_ for more information." msgstr "更多資訊請見 |http_error_nnn|_\\ 。" -#: ../../library/urllib.request.rst:631 +#: ../../library/urllib.request.rst:632 msgid "" ":meth:`_error` --- signal that the handler knows how to handle " "errors from (non-\\ ``http``) *protocol*." msgstr "" -#: ../../library/urllib.request.rst:634 +#: ../../library/urllib.request.rst:635 msgid "" ":meth:`_request` --- signal that the handler knows how to pre-" "process *protocol* requests." msgstr "" -#: ../../library/urllib.request.rst:637 +#: ../../library/urllib.request.rst:638 msgid "See |protocol_request|_ for more information." msgstr "更多資訊請見 |protocol_request|_\\ 。" -#: ../../library/urllib.request.rst:639 +#: ../../library/urllib.request.rst:640 msgid "" ":meth:`_response` --- signal that the handler knows how to post-" "process *protocol* responses." msgstr "" -#: ../../library/urllib.request.rst:642 +#: ../../library/urllib.request.rst:643 msgid "See |protocol_response|_ for more information." msgstr "更多資訊請見 |protocol_response|_\\ 。" -#: ../../library/urllib.request.rst:651 +#: ../../library/urllib.request.rst:652 msgid "" "Open the given *url* (which can be a request object or a string), optionally " "passing the given *data*. Arguments, return values and exceptions raised are " @@ -910,7 +912,7 @@ msgid "" "HTTP, HTTPS and FTP connections." msgstr "" -#: ../../library/urllib.request.rst:663 +#: ../../library/urllib.request.rst:664 msgid "" "Handle an error of the given protocol. This will call the registered error " "handlers for the given protocol with the given arguments (which are protocol " @@ -919,28 +921,28 @@ msgid "" "\\` methods of the handler classes." msgstr "" -#: ../../library/urllib.request.rst:669 +#: ../../library/urllib.request.rst:670 msgid "" "Return values and exceptions raised are the same as those of :func:`urlopen`." msgstr "" -#: ../../library/urllib.request.rst:671 +#: ../../library/urllib.request.rst:672 msgid "OpenerDirector objects open URLs in three stages:" msgstr "" -#: ../../library/urllib.request.rst:673 +#: ../../library/urllib.request.rst:674 msgid "" "The order in which these methods are called within each stage is determined " "by sorting the handler instances." msgstr "" -#: ../../library/urllib.request.rst:676 +#: ../../library/urllib.request.rst:677 msgid "" "Every handler with a method named like :meth:`_request` has that " "method called to pre-process the request." msgstr "" -#: ../../library/urllib.request.rst:679 +#: ../../library/urllib.request.rst:680 msgid "" "Handlers with a method named like :meth:`_open` are called to " "handle the request. This stage ends when a handler either returns a non-\\ :" @@ -948,7 +950,7 @@ msgid "" "`~urllib.error.URLError`). Exceptions are allowed to propagate." msgstr "" -#: ../../library/urllib.request.rst:684 +#: ../../library/urllib.request.rst:685 msgid "" "In fact, the above algorithm is first tried for methods named :meth:" "`default_open`. If all such methods return :const:`None`, the algorithm is " @@ -957,64 +959,64 @@ msgid "" "meth:`unknown_open`." msgstr "" -#: ../../library/urllib.request.rst:690 +#: ../../library/urllib.request.rst:691 msgid "" "Note that the implementation of these methods may involve calls of the " "parent :class:`OpenerDirector` instance's :meth:`~OpenerDirector.open` and :" "meth:`~OpenerDirector.error` methods." msgstr "" -#: ../../library/urllib.request.rst:694 +#: ../../library/urllib.request.rst:695 msgid "" "Every handler with a method named like :meth:`_response` has that " "method called to post-process the response." msgstr "" -#: ../../library/urllib.request.rst:701 +#: ../../library/urllib.request.rst:702 msgid "BaseHandler Objects" msgstr "BaseHandler 物件" -#: ../../library/urllib.request.rst:703 +#: ../../library/urllib.request.rst:704 msgid "" ":class:`BaseHandler` objects provide a couple of methods that are directly " "useful, and others that are meant to be used by derived classes. These are " "intended for direct use:" msgstr "" -#: ../../library/urllib.request.rst:710 +#: ../../library/urllib.request.rst:711 msgid "Add a director as parent." msgstr "" -#: ../../library/urllib.request.rst:715 +#: ../../library/urllib.request.rst:716 msgid "Remove any parents." msgstr "" -#: ../../library/urllib.request.rst:717 +#: ../../library/urllib.request.rst:718 msgid "" "The following attribute and methods should only be used by classes derived " "from :class:`BaseHandler`." msgstr "" -#: ../../library/urllib.request.rst:722 +#: ../../library/urllib.request.rst:723 msgid "" "The convention has been adopted that subclasses defining :meth:" "`_request` or :meth:`_response` methods are named :class:" "`\\*Processor`; all others are named :class:`\\*Handler`." msgstr "" -#: ../../library/urllib.request.rst:729 +#: ../../library/urllib.request.rst:730 msgid "" "A valid :class:`OpenerDirector`, which can be used to open using a different " "protocol, or handle errors." msgstr "" -#: ../../library/urllib.request.rst:735 +#: ../../library/urllib.request.rst:736 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "define it if they want to catch all URLs." msgstr "" -#: ../../library/urllib.request.rst:738 +#: ../../library/urllib.request.rst:739 msgid "" "This method, if implemented, will be called by the parent :class:" "`OpenerDirector`. It should return a file-like object as described in the " @@ -1024,38 +1026,38 @@ msgid "" "`URLError`)." msgstr "" -#: ../../library/urllib.request.rst:745 +#: ../../library/urllib.request.rst:746 msgid "This method will be called before any protocol-specific open method." msgstr "" -#: ../../library/urllib.request.rst:752 +#: ../../library/urllib.request.rst:753 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "define it if they want to handle URLs with the given protocol." msgstr "" -#: ../../library/urllib.request.rst:755 +#: ../../library/urllib.request.rst:756 msgid "" "This method, if defined, will be called by the parent :class:" "`OpenerDirector`. Return values should be the same as for :meth:" "`default_open`." msgstr "" -#: ../../library/urllib.request.rst:761 +#: ../../library/urllib.request.rst:762 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "define it if they want to catch all URLs with no specific registered handler " "to open it." msgstr "" -#: ../../library/urllib.request.rst:765 +#: ../../library/urllib.request.rst:766 msgid "" "This method, if implemented, will be called by the :attr:`parent` :class:" "`OpenerDirector`. Return values should be the same as for :meth:" "`default_open`." msgstr "" -#: ../../library/urllib.request.rst:772 +#: ../../library/urllib.request.rst:773 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "override it if they intend to provide a catch-all for otherwise unhandled " @@ -1064,7 +1066,7 @@ msgid "" "other circumstances." msgstr "" -#: ../../library/urllib.request.rst:777 +#: ../../library/urllib.request.rst:778 msgid "" "*req* will be a :class:`Request` object, *fp* will be a file-like object " "with the HTTP error body, *code* will be the three-digit code of the error, " @@ -1072,49 +1074,49 @@ msgid "" "mapping object with the headers of the error." msgstr "" -#: ../../library/urllib.request.rst:782 +#: ../../library/urllib.request.rst:783 msgid "" "Return values and exceptions raised should be the same as those of :func:" "`urlopen`." msgstr "" -#: ../../library/urllib.request.rst:789 +#: ../../library/urllib.request.rst:790 msgid "" "*nnn* should be a three-digit HTTP error code. This method is also not " "defined in :class:`BaseHandler`, but will be called, if it exists, on an " "instance of a subclass, when an HTTP error with code *nnn* occurs." msgstr "" -#: ../../library/urllib.request.rst:793 +#: ../../library/urllib.request.rst:794 msgid "Subclasses should override this method to handle specific HTTP errors." msgstr "" -#: ../../library/urllib.request.rst:795 +#: ../../library/urllib.request.rst:796 msgid "" "Arguments, return values and exceptions raised should be the same as for :" "meth:`http_error_default`." msgstr "" -#: ../../library/urllib.request.rst:803 +#: ../../library/urllib.request.rst:804 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "define it if they want to pre-process requests of the given protocol." msgstr "" -#: ../../library/urllib.request.rst:806 +#: ../../library/urllib.request.rst:807 msgid "" "This method, if defined, will be called by the parent :class:" "`OpenerDirector`. *req* will be a :class:`Request` object. The return value " "should be a :class:`Request` object." msgstr "" -#: ../../library/urllib.request.rst:815 +#: ../../library/urllib.request.rst:816 msgid "" "This method is *not* defined in :class:`BaseHandler`, but subclasses should " "define it if they want to post-process responses of the given protocol." msgstr "" -#: ../../library/urllib.request.rst:818 +#: ../../library/urllib.request.rst:819 msgid "" "This method, if defined, will be called by the parent :class:" "`OpenerDirector`. *req* will be a :class:`Request` object. *response* will " @@ -1123,25 +1125,25 @@ msgid "" "return value of :func:`urlopen`." msgstr "" -#: ../../library/urllib.request.rst:828 +#: ../../library/urllib.request.rst:829 msgid "HTTPRedirectHandler Objects" msgstr "HTTPRedirectHandler 物件" -#: ../../library/urllib.request.rst:832 +#: ../../library/urllib.request.rst:833 msgid "" "Some HTTP redirections require action from this module's client code. If " "this is the case, :exc:`~urllib.error.HTTPError` is raised. See :rfc:`2616` " "for details of the precise meanings of the various redirection codes." msgstr "" -#: ../../library/urllib.request.rst:836 +#: ../../library/urllib.request.rst:837 msgid "" "An :class:`HTTPError` exception raised as a security consideration if the " "HTTPRedirectHandler is presented with a redirected URL which is not an HTTP, " "HTTPS or FTP URL." msgstr "" -#: ../../library/urllib.request.rst:843 +#: ../../library/urllib.request.rst:844 msgid "" "Return a :class:`Request` or ``None`` in response to a redirect. This is " "called by the default implementations of the :meth:`http_error_30\\*` " @@ -1152,7 +1154,7 @@ msgid "" "URL, or return ``None`` if you can't but another handler might." msgstr "" -#: ../../library/urllib.request.rst:853 +#: ../../library/urllib.request.rst:854 msgid "" "The default implementation of this method does not strictly follow :rfc:" "`2616`, which says that 301 and 302 responses to ``POST`` requests must not " @@ -1161,46 +1163,46 @@ msgid "" "POST to a ``GET``, and the default implementation reproduces this behavior." msgstr "" -#: ../../library/urllib.request.rst:862 +#: ../../library/urllib.request.rst:863 msgid "" "Redirect to the ``Location:`` or ``URI:`` URL. This method is called by the " "parent :class:`OpenerDirector` when getting an HTTP 'moved permanently' " "response." msgstr "" -#: ../../library/urllib.request.rst:868 +#: ../../library/urllib.request.rst:869 msgid "" "The same as :meth:`http_error_301`, but called for the 'found' response." msgstr "" -#: ../../library/urllib.request.rst:873 +#: ../../library/urllib.request.rst:874 msgid "" "The same as :meth:`http_error_301`, but called for the 'see other' response." msgstr "" -#: ../../library/urllib.request.rst:878 +#: ../../library/urllib.request.rst:879 msgid "" "The same as :meth:`http_error_301`, but called for the 'temporary redirect' " "response." msgstr "" -#: ../../library/urllib.request.rst:885 +#: ../../library/urllib.request.rst:886 msgid "HTTPCookieProcessor Objects" msgstr "HTTPCookieProcessor 物件" -#: ../../library/urllib.request.rst:887 +#: ../../library/urllib.request.rst:888 msgid ":class:`HTTPCookieProcessor` instances have one attribute:" msgstr "" -#: ../../library/urllib.request.rst:891 +#: ../../library/urllib.request.rst:892 msgid "The :class:`http.cookiejar.CookieJar` in which cookies are stored." msgstr "" -#: ../../library/urllib.request.rst:897 +#: ../../library/urllib.request.rst:898 msgid "ProxyHandler Objects" msgstr "ProxyHandler 物件" -#: ../../library/urllib.request.rst:903 +#: ../../library/urllib.request.rst:904 msgid "" "The :class:`ProxyHandler` will have a method :meth:`_open` for " "every *protocol* which has a proxy in the *proxies* dictionary given in the " @@ -1209,17 +1211,17 @@ msgid "" "actually execute the protocol." msgstr "" -#: ../../library/urllib.request.rst:913 +#: ../../library/urllib.request.rst:914 msgid "HTTPPasswordMgr Objects" msgstr "HTTPPasswordMgr 物件" -#: ../../library/urllib.request.rst:915 +#: ../../library/urllib.request.rst:916 msgid "" "These methods are available on :class:`HTTPPasswordMgr` and :class:" "`HTTPPasswordMgrWithDefaultRealm` objects." msgstr "" -#: ../../library/urllib.request.rst:921 +#: ../../library/urllib.request.rst:922 msgid "" "*uri* can be either a single URI, or a sequence of URIs. *realm*, *user* and " "*passwd* must be strings. This causes ``(user, passwd)`` to be used as " @@ -1227,30 +1229,30 @@ msgid "" "of the given URIs is given." msgstr "" -#: ../../library/urllib.request.rst:929 +#: ../../library/urllib.request.rst:930 msgid "" "Get user/password for given realm and URI, if any. This method will return " "``(None, None)`` if there is no matching user/password." msgstr "" -#: ../../library/urllib.request.rst:932 +#: ../../library/urllib.request.rst:933 msgid "" "For :class:`HTTPPasswordMgrWithDefaultRealm` objects, the realm ``None`` " "will be searched if the given *realm* has no matching user/password." msgstr "" -#: ../../library/urllib.request.rst:939 +#: ../../library/urllib.request.rst:940 msgid "HTTPPasswordMgrWithPriorAuth Objects" msgstr "HTTPPasswordMgrWithPriorAuth 物件" -#: ../../library/urllib.request.rst:941 +#: ../../library/urllib.request.rst:942 msgid "" "This password manager extends :class:`HTTPPasswordMgrWithDefaultRealm` to " "support tracking URIs for which authentication credentials should always be " "sent." msgstr "" -#: ../../library/urllib.request.rst:948 +#: ../../library/urllib.request.rst:949 msgid "" "*realm*, *uri*, *user*, *passwd* are as for :meth:`HTTPPasswordMgr." "add_password`. *is_authenticated* sets the initial value of the " @@ -1258,25 +1260,25 @@ msgid "" "*is_authenticated* is specified as ``True``, *realm* is ignored." msgstr "" -#: ../../library/urllib.request.rst:956 +#: ../../library/urllib.request.rst:957 msgid "Same as for :class:`HTTPPasswordMgrWithDefaultRealm` objects" msgstr "" -#: ../../library/urllib.request.rst:962 +#: ../../library/urllib.request.rst:963 msgid "" "Update the ``is_authenticated`` flag for the given *uri* or list of URIs." msgstr "" -#: ../../library/urllib.request.rst:968 +#: ../../library/urllib.request.rst:969 msgid "" "Returns the current state of the ``is_authenticated`` flag for the given URI." msgstr "" -#: ../../library/urllib.request.rst:975 +#: ../../library/urllib.request.rst:976 msgid "AbstractBasicAuthHandler Objects" msgstr "AbstractBasicAuthHandler 物件" -#: ../../library/urllib.request.rst:980 +#: ../../library/urllib.request.rst:981 msgid "" "Handle an authentication request by getting a user/password pair, and re-" "trying the request. *authreq* should be the name of the header where the " @@ -1285,7 +1287,7 @@ msgid "" "`Request` object, and *headers* should be the error headers." msgstr "" -#: ../../library/urllib.request.rst:986 +#: ../../library/urllib.request.rst:987 msgid "" "*host* is either an authority (e.g. ``\"python.org\"``) or a URL containing " "an authority component (e.g. ``\"http://python.org/\"``). In either case, " @@ -1293,24 +1295,24 @@ msgid "" "and ``\"python.org:80\"`` are fine, ``\"joe:password@python.org\"`` is not)." msgstr "" -#: ../../library/urllib.request.rst:995 +#: ../../library/urllib.request.rst:996 msgid "HTTPBasicAuthHandler Objects" msgstr "HTTPBasicAuthHandler 物件" -#: ../../library/urllib.request.rst:1000 ../../library/urllib.request.rst:1011 -#: ../../library/urllib.request.rst:1036 ../../library/urllib.request.rst:1047 +#: ../../library/urllib.request.rst:1001 ../../library/urllib.request.rst:1012 +#: ../../library/urllib.request.rst:1037 ../../library/urllib.request.rst:1048 msgid "Retry the request with authentication information, if available." msgstr "" -#: ../../library/urllib.request.rst:1006 +#: ../../library/urllib.request.rst:1007 msgid "ProxyBasicAuthHandler Objects" msgstr "ProxyBasicAuthHandler 物件" -#: ../../library/urllib.request.rst:1017 +#: ../../library/urllib.request.rst:1018 msgid "AbstractDigestAuthHandler Objects" msgstr "AbstractDigestAuthHandler 物件" -#: ../../library/urllib.request.rst:1022 +#: ../../library/urllib.request.rst:1023 msgid "" "*authreq* should be the name of the header where the information about the " "realm is included in the request, *host* should be the host to authenticate " @@ -1318,55 +1320,55 @@ msgid "" "should be the error headers." msgstr "" -#: ../../library/urllib.request.rst:1031 +#: ../../library/urllib.request.rst:1032 msgid "HTTPDigestAuthHandler Objects" msgstr "HTTPDigestAuthHandler 物件" -#: ../../library/urllib.request.rst:1042 +#: ../../library/urllib.request.rst:1043 msgid "ProxyDigestAuthHandler Objects" msgstr "ProxyDigestAuthHandler 物件" -#: ../../library/urllib.request.rst:1053 +#: ../../library/urllib.request.rst:1054 msgid "HTTPHandler Objects" msgstr "HTTPHandler 物件" -#: ../../library/urllib.request.rst:1058 +#: ../../library/urllib.request.rst:1059 msgid "" "Send an HTTP request, which can be either GET or POST, depending on ``req." "has_data()``." msgstr "" -#: ../../library/urllib.request.rst:1065 +#: ../../library/urllib.request.rst:1066 msgid "HTTPSHandler Objects" msgstr "HTTPSHandler 物件" -#: ../../library/urllib.request.rst:1070 +#: ../../library/urllib.request.rst:1071 msgid "" "Send an HTTPS request, which can be either GET or POST, depending on ``req." "has_data()``." msgstr "" -#: ../../library/urllib.request.rst:1077 +#: ../../library/urllib.request.rst:1078 msgid "FileHandler Objects" msgstr "FileHandler 物件" -#: ../../library/urllib.request.rst:1082 +#: ../../library/urllib.request.rst:1083 msgid "" "Open the file locally, if there is no host name, or the host name is " "``'localhost'``." msgstr "" -#: ../../library/urllib.request.rst:1085 +#: ../../library/urllib.request.rst:1086 msgid "" "This method is applicable only for local hostnames. When a remote hostname " "is given, an :exc:`~urllib.error.URLError` is raised." msgstr "" -#: ../../library/urllib.request.rst:1093 +#: ../../library/urllib.request.rst:1094 msgid "DataHandler Objects" msgstr "DataHandler 物件" -#: ../../library/urllib.request.rst:1097 +#: ../../library/urllib.request.rst:1098 msgid "" "Read a data URL. This kind of URL contains the content encoded in the URL " "itself. The data URL syntax is specified in :rfc:`2397`. This implementation " @@ -1376,51 +1378,51 @@ msgid "" "implementation will raise an :exc:`ValueError` in that case." msgstr "" -#: ../../library/urllib.request.rst:1108 +#: ../../library/urllib.request.rst:1109 msgid "FTPHandler Objects" msgstr "FTPHandler 物件" -#: ../../library/urllib.request.rst:1113 +#: ../../library/urllib.request.rst:1114 msgid "" "Open the FTP file indicated by *req*. The login is always done with empty " "username and password." msgstr "" -#: ../../library/urllib.request.rst:1120 +#: ../../library/urllib.request.rst:1121 msgid "CacheFTPHandler Objects" msgstr "CacheFTPHandler 物件" -#: ../../library/urllib.request.rst:1122 +#: ../../library/urllib.request.rst:1123 msgid "" ":class:`CacheFTPHandler` objects are :class:`FTPHandler` objects with the " "following additional methods:" msgstr "" -#: ../../library/urllib.request.rst:1128 +#: ../../library/urllib.request.rst:1129 msgid "Set timeout of connections to *t* seconds." msgstr "" -#: ../../library/urllib.request.rst:1133 +#: ../../library/urllib.request.rst:1134 msgid "Set maximum number of cached connections to *m*." msgstr "" -#: ../../library/urllib.request.rst:1139 +#: ../../library/urllib.request.rst:1140 msgid "UnknownHandler Objects" msgstr "UnknownHandler 物件" -#: ../../library/urllib.request.rst:1144 +#: ../../library/urllib.request.rst:1145 msgid "Raise a :exc:`~urllib.error.URLError` exception." msgstr "" -#: ../../library/urllib.request.rst:1150 +#: ../../library/urllib.request.rst:1151 msgid "HTTPErrorProcessor Objects" msgstr "HTTPErrorProcessor 物件" -#: ../../library/urllib.request.rst:1156 +#: ../../library/urllib.request.rst:1157 msgid "For 200 error codes, the response object is returned immediately." msgstr "" -#: ../../library/urllib.request.rst:1158 +#: ../../library/urllib.request.rst:1159 msgid "" "For non-200 error codes, this simply passes the job on to the :meth:" "`http_error_\\` handler methods, via :meth:`OpenerDirector.error`. " @@ -1428,31 +1430,31 @@ msgid "" "error.HTTPError` if no other handler handles the error." msgstr "" -#: ../../library/urllib.request.rst:1166 +#: ../../library/urllib.request.rst:1167 msgid "Process HTTPS error responses." msgstr "" -#: ../../library/urllib.request.rst:1168 +#: ../../library/urllib.request.rst:1169 msgid "The behavior is same as :meth:`http_response`." msgstr "" -#: ../../library/urllib.request.rst:1174 +#: ../../library/urllib.request.rst:1175 msgid "Examples" msgstr "" -#: ../../library/urllib.request.rst:1176 +#: ../../library/urllib.request.rst:1177 msgid "" "In addition to the examples below, more examples are given in :ref:`urllib-" "howto`." msgstr "" -#: ../../library/urllib.request.rst:1179 +#: ../../library/urllib.request.rst:1180 msgid "" "This example gets the python.org main page and displays the first 300 bytes " "of it. ::" msgstr "" -#: ../../library/urllib.request.rst:1192 +#: ../../library/urllib.request.rst:1193 msgid "" "Note that urlopen returns a bytes object. This is because there is no way " "for urlopen to automatically determine the encoding of the byte stream it " @@ -1461,45 +1463,45 @@ msgid "" "appropriate encoding." msgstr "" -#: ../../library/urllib.request.rst:1198 +#: ../../library/urllib.request.rst:1199 msgid "" "The following W3C document, https://www.w3.org/International/O-charset\\ , " "lists the various ways in which an (X)HTML or an XML document could have " "specified its encoding information." msgstr "" -#: ../../library/urllib.request.rst:1202 +#: ../../library/urllib.request.rst:1203 msgid "" "As the python.org website uses *utf-8* encoding as specified in its meta " "tag, we will use the same for decoding the bytes object. ::" msgstr "" -#: ../../library/urllib.request.rst:1211 +#: ../../library/urllib.request.rst:1212 msgid "" "It is also possible to achieve the same result without using the :term:" "`context manager` approach. ::" msgstr "" -#: ../../library/urllib.request.rst:1220 +#: ../../library/urllib.request.rst:1221 msgid "" "In the following example, we are sending a data-stream to the stdin of a CGI " "and reading the data it returns to us. Note that this example will only work " "when the Python installation supports SSL. ::" msgstr "" -#: ../../library/urllib.request.rst:1232 +#: ../../library/urllib.request.rst:1233 msgid "The code for the sample CGI used in the above example is::" msgstr "" -#: ../../library/urllib.request.rst:1239 +#: ../../library/urllib.request.rst:1240 msgid "Here is an example of doing a ``PUT`` request using :class:`Request`::" msgstr "" -#: ../../library/urllib.request.rst:1249 +#: ../../library/urllib.request.rst:1250 msgid "Use of Basic HTTP Authentication::" msgstr "" -#: ../../library/urllib.request.rst:1263 +#: ../../library/urllib.request.rst:1264 msgid "" ":func:`build_opener` provides many handlers by default, including a :class:" "`ProxyHandler`. By default, :class:`ProxyHandler` uses the environment " @@ -1508,71 +1510,71 @@ msgid "" "read to obtain the HTTP proxy's URL." msgstr "" -#: ../../library/urllib.request.rst:1269 +#: ../../library/urllib.request.rst:1270 msgid "" "This example replaces the default :class:`ProxyHandler` with one that uses " "programmatically-supplied proxy URLs, and adds proxy authorization support " "with :class:`ProxyBasicAuthHandler`. ::" msgstr "" -#: ../../library/urllib.request.rst:1281 +#: ../../library/urllib.request.rst:1282 msgid "Adding HTTP headers:" msgstr "" -#: ../../library/urllib.request.rst:1283 +#: ../../library/urllib.request.rst:1284 msgid "Use the *headers* argument to the :class:`Request` constructor, or::" msgstr "" -#: ../../library/urllib.request.rst:1292 +#: ../../library/urllib.request.rst:1293 msgid "" ":class:`OpenerDirector` automatically adds a :mailheader:`User-Agent` header " "to every :class:`Request`. To change this::" msgstr "" -#: ../../library/urllib.request.rst:1300 +#: ../../library/urllib.request.rst:1301 msgid "" "Also, remember that a few standard headers (:mailheader:`Content-Length`, :" "mailheader:`Content-Type` and :mailheader:`Host`) are added when the :class:" "`Request` is passed to :func:`urlopen` (or :meth:`OpenerDirector.open`)." msgstr "" -#: ../../library/urllib.request.rst:1307 +#: ../../library/urllib.request.rst:1308 msgid "" "Here is an example session that uses the ``GET`` method to retrieve a URL " "containing parameters::" msgstr "" -#: ../../library/urllib.request.rst:1318 +#: ../../library/urllib.request.rst:1319 msgid "" "The following example uses the ``POST`` method instead. Note that params " "output from urlencode is encoded to bytes before it is sent to urlopen as " "data::" msgstr "" -#: ../../library/urllib.request.rst:1329 +#: ../../library/urllib.request.rst:1330 msgid "" "The following example uses an explicitly specified HTTP proxy, overriding " "environment settings::" msgstr "" -#: ../../library/urllib.request.rst:1339 +#: ../../library/urllib.request.rst:1340 msgid "" "The following example uses no proxies at all, overriding environment " "settings::" msgstr "" -#: ../../library/urllib.request.rst:1349 +#: ../../library/urllib.request.rst:1350 msgid "Legacy interface" msgstr "" -#: ../../library/urllib.request.rst:1351 +#: ../../library/urllib.request.rst:1352 msgid "" "The following functions and classes are ported from the Python 2 module " "``urllib`` (as opposed to ``urllib2``). They might become deprecated at " "some point in the future." msgstr "" -#: ../../library/urllib.request.rst:1357 +#: ../../library/urllib.request.rst:1358 msgid "" "Copy a network object denoted by a URL to a local file. If the URL points to " "a local file, the object will not be copied unless filename is supplied. " @@ -1582,7 +1584,7 @@ msgid "" "remote object). Exceptions are the same as for :func:`urlopen`." msgstr "" -#: ../../library/urllib.request.rst:1364 +#: ../../library/urllib.request.rst:1365 msgid "" "The second argument, if present, specifies the file location to copy to (if " "absent, the location will be a tempfile with a generated name). The third " @@ -1594,11 +1596,11 @@ msgid "" "file size in response to a retrieval request." msgstr "" -#: ../../library/urllib.request.rst:1373 +#: ../../library/urllib.request.rst:1374 msgid "The following example illustrates the most common usage scenario::" msgstr "" -#: ../../library/urllib.request.rst:1380 +#: ../../library/urllib.request.rst:1381 msgid "" "If the *url* uses the :file:`http:` scheme identifier, the optional *data* " "argument may be given to specify a ``POST`` request (normally the request " @@ -1607,7 +1609,7 @@ msgid "" "parse.urlencode` function." msgstr "" -#: ../../library/urllib.request.rst:1386 +#: ../../library/urllib.request.rst:1387 msgid "" ":func:`urlretrieve` will raise :exc:`ContentTooShortError` when it detects " "that the amount of data available was less than the expected amount (which " @@ -1615,40 +1617,40 @@ msgid "" "example, when the download is interrupted." msgstr "" -#: ../../library/urllib.request.rst:1391 +#: ../../library/urllib.request.rst:1392 msgid "" "The *Content-Length* is treated as a lower bound: if there's more data to " "read, urlretrieve reads more data, but if less data is available, it raises " "the exception." msgstr "" -#: ../../library/urllib.request.rst:1395 +#: ../../library/urllib.request.rst:1396 msgid "" "You can still retrieve the downloaded data in this case, it is stored in " "the :attr:`content` attribute of the exception instance." msgstr "" -#: ../../library/urllib.request.rst:1398 +#: ../../library/urllib.request.rst:1399 msgid "" "If no *Content-Length* header was supplied, urlretrieve can not check the " "size of the data it has downloaded, and just returns it. In this case you " "just have to assume that the download was successful." msgstr "" -#: ../../library/urllib.request.rst:1404 +#: ../../library/urllib.request.rst:1405 msgid "" "Cleans up temporary files that may have been left behind by previous calls " "to :func:`urlretrieve`." msgstr "" -#: ../../library/urllib.request.rst:1411 +#: ../../library/urllib.request.rst:1412 msgid "" "Base class for opening and reading URLs. Unless you need to support opening " "objects using schemes other than :file:`http:`, :file:`ftp:`, or :file:`file:" "`, you probably want to use :class:`FancyURLopener`." msgstr "" -#: ../../library/urllib.request.rst:1415 +#: ../../library/urllib.request.rst:1416 msgid "" "By default, the :class:`URLopener` class sends a :mailheader:`User-Agent` " "header of ``urllib/VVV``, where *VVV* is the :mod:`urllib` version number. " @@ -1658,7 +1660,7 @@ msgid "" "subclass definition." msgstr "" -#: ../../library/urllib.request.rst:1421 +#: ../../library/urllib.request.rst:1422 msgid "" "The optional *proxies* parameter should be a dictionary mapping scheme names " "to proxy URLs, where an empty dictionary turns proxies off completely. Its " @@ -1666,7 +1668,7 @@ msgid "" "be used if present, as discussed in the definition of :func:`urlopen`, above." msgstr "" -#: ../../library/urllib.request.rst:1426 +#: ../../library/urllib.request.rst:1427 msgid "" "Additional keyword parameters, collected in *x509*, may be used for " "authentication of the client when using the :file:`https:` scheme. The " @@ -1674,13 +1676,13 @@ msgid "" "certificate; both are needed to support client authentication." msgstr "" -#: ../../library/urllib.request.rst:1431 +#: ../../library/urllib.request.rst:1432 msgid "" ":class:`URLopener` objects will raise an :exc:`OSError` exception if the " "server returns an error code." msgstr "" -#: ../../library/urllib.request.rst:1436 +#: ../../library/urllib.request.rst:1437 msgid "" "Open *fullurl* using the appropriate protocol. This method sets up cache " "and proxy information, then calls the appropriate open method with its input " @@ -1689,15 +1691,15 @@ msgid "" "`urlopen`." msgstr "" -#: ../../library/urllib.request.rst:1442 +#: ../../library/urllib.request.rst:1443 msgid "This method always quotes *fullurl* using :func:`~urllib.parse.quote`." msgstr "" -#: ../../library/urllib.request.rst:1446 +#: ../../library/urllib.request.rst:1447 msgid "Overridable interface to open unknown URL types." msgstr "" -#: ../../library/urllib.request.rst:1451 +#: ../../library/urllib.request.rst:1452 msgid "" "Retrieves the contents of *url* and places it in *filename*. The return " "value is a tuple consisting of a local filename and either an :class:`email." @@ -1714,7 +1716,7 @@ msgid "" "*reporthook* is ignored for local URLs." msgstr "" -#: ../../library/urllib.request.rst:1464 +#: ../../library/urllib.request.rst:1465 msgid "" "If the *url* uses the :file:`http:` scheme identifier, the optional *data* " "argument may be given to specify a ``POST`` request (normally the request " @@ -1723,7 +1725,7 @@ msgid "" "urlencode` function." msgstr "" -#: ../../library/urllib.request.rst:1473 +#: ../../library/urllib.request.rst:1474 msgid "" "Variable that specifies the user agent of the opener object. To get :mod:" "`urllib` to tell servers that it is a particular user agent, set this in a " @@ -1731,7 +1733,7 @@ msgid "" "constructor." msgstr "" -#: ../../library/urllib.request.rst:1483 +#: ../../library/urllib.request.rst:1484 msgid "" ":class:`FancyURLopener` subclasses :class:`URLopener` providing default " "handling for the following HTTP response codes: 301, 302, 303, 307 and 401. " @@ -1742,14 +1744,14 @@ msgid "" "defaults to 10." msgstr "" -#: ../../library/urllib.request.rst:1490 +#: ../../library/urllib.request.rst:1491 msgid "" "For all other response codes, the method :meth:`http_error_default` is " "called which you can override in subclasses to handle the error " "appropriately." msgstr "" -#: ../../library/urllib.request.rst:1495 +#: ../../library/urllib.request.rst:1496 msgid "" "According to the letter of :rfc:`2616`, 301 and 302 responses to POST " "requests must not be automatically redirected without confirmation by the " @@ -1758,13 +1760,13 @@ msgid "" "behaviour." msgstr "" -#: ../../library/urllib.request.rst:1500 +#: ../../library/urllib.request.rst:1501 msgid "" "The parameters to the constructor are the same as those for :class:" "`URLopener`." msgstr "" -#: ../../library/urllib.request.rst:1504 +#: ../../library/urllib.request.rst:1505 msgid "" "When performing basic authentication, a :class:`FancyURLopener` instance " "calls its :meth:`prompt_user_passwd` method. The default implementation " @@ -1773,59 +1775,59 @@ msgid "" "needed." msgstr "" -#: ../../library/urllib.request.rst:1509 +#: ../../library/urllib.request.rst:1510 msgid "" "The :class:`FancyURLopener` class offers one additional method that should " "be overloaded to provide the appropriate behavior:" msgstr "" -#: ../../library/urllib.request.rst:1514 +#: ../../library/urllib.request.rst:1515 msgid "" "Return information needed to authenticate the user at the given host in the " "specified security realm. The return value should be a tuple, ``(user, " "password)``, which can be used for basic authentication." msgstr "" -#: ../../library/urllib.request.rst:1518 +#: ../../library/urllib.request.rst:1519 msgid "" "The implementation prompts for this information on the terminal; an " "application should override this method to use an appropriate interaction " "model in the local environment." msgstr "" -#: ../../library/urllib.request.rst:1524 +#: ../../library/urllib.request.rst:1525 msgid ":mod:`urllib.request` Restrictions" msgstr "" -#: ../../library/urllib.request.rst:1530 +#: ../../library/urllib.request.rst:1531 msgid "" "Currently, only the following protocols are supported: HTTP (versions 0.9 " "and 1.0), FTP, local files, and data URLs." msgstr "" -#: ../../library/urllib.request.rst:1533 +#: ../../library/urllib.request.rst:1534 msgid "Added support for data URLs." msgstr "" -#: ../../library/urllib.request.rst:1535 +#: ../../library/urllib.request.rst:1536 msgid "" "The caching feature of :func:`urlretrieve` has been disabled until someone " "finds the time to hack proper processing of Expiration time headers." msgstr "" -#: ../../library/urllib.request.rst:1538 +#: ../../library/urllib.request.rst:1539 msgid "" "There should be a function to query whether a particular URL is in the cache." msgstr "" -#: ../../library/urllib.request.rst:1540 +#: ../../library/urllib.request.rst:1541 msgid "" "For backward compatibility, if a URL appears to point to a local file but " "the file can't be opened, the URL is re-interpreted using the FTP protocol. " "This can sometimes cause confusing error messages." msgstr "" -#: ../../library/urllib.request.rst:1544 +#: ../../library/urllib.request.rst:1545 msgid "" "The :func:`urlopen` and :func:`urlretrieve` functions can cause arbitrarily " "long delays while waiting for a network connection to be set up. This means " @@ -1833,7 +1835,7 @@ msgid "" "functions without using threads." msgstr "" -#: ../../library/urllib.request.rst:1553 +#: ../../library/urllib.request.rst:1554 msgid "" "The data returned by :func:`urlopen` or :func:`urlretrieve` is the raw data " "returned by the server. This may be binary data (such as an image), plain " @@ -1843,7 +1845,7 @@ msgid "" "module :mod:`html.parser` to parse it." msgstr "" -#: ../../library/urllib.request.rst:1562 +#: ../../library/urllib.request.rst:1563 msgid "" "The code handling the FTP protocol cannot differentiate between a file and a " "directory. This can lead to unexpected behavior when attempting to read a " @@ -1861,11 +1863,11 @@ msgid "" "meet your needs." msgstr "" -#: ../../library/urllib.request.rst:1579 +#: ../../library/urllib.request.rst:1580 msgid ":mod:`urllib.response` --- Response classes used by urllib" msgstr "" -#: ../../library/urllib.request.rst:1584 +#: ../../library/urllib.request.rst:1585 msgid "" "The :mod:`urllib.response` module defines functions and classes which define " "a minimal file-like interface, including ``read()`` and ``readline()``. " @@ -1874,30 +1876,30 @@ msgid "" "addinfourl` instance:" msgstr "" -#: ../../library/urllib.request.rst:1593 +#: ../../library/urllib.request.rst:1594 msgid "" "URL of the resource retrieved, commonly used to determine if a redirect was " "followed." msgstr "" -#: ../../library/urllib.request.rst:1597 +#: ../../library/urllib.request.rst:1598 msgid "" "Returns the headers of the response in the form of an :class:`~email.message." "EmailMessage` instance." msgstr "" -#: ../../library/urllib.request.rst:1603 +#: ../../library/urllib.request.rst:1604 msgid "Status code returned by server." msgstr "" -#: ../../library/urllib.request.rst:1607 +#: ../../library/urllib.request.rst:1608 msgid "Deprecated in favor of :attr:`~addinfourl.url`." msgstr "" -#: ../../library/urllib.request.rst:1612 +#: ../../library/urllib.request.rst:1613 msgid "Deprecated in favor of :attr:`~addinfourl.headers`." msgstr "" -#: ../../library/urllib.request.rst:1617 ../../library/urllib.request.rst:1622 +#: ../../library/urllib.request.rst:1618 ../../library/urllib.request.rst:1623 msgid "Deprecated in favor of :attr:`~addinfourl.status`." msgstr "" diff --git a/reference/import.po b/reference/import.po index 54ad64c351..b8470bc332 100644 --- a/reference/import.po +++ b/reference/import.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-09 00:12+0000\n" +"POT-Creation-Date: 2022-04-18 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-" @@ -619,17 +619,17 @@ msgid "" "submodule. Let's say you have the following directory structure::" msgstr "" -#: ../../reference/import.rst:495 -msgid "and ``spam/__init__.py`` has the following lines in it::" +#: ../../reference/import.rst:494 +msgid "and ``spam/__init__.py`` has the following line in it::" msgstr "" -#: ../../reference/import.rst:500 +#: ../../reference/import.rst:498 msgid "" -"then executing the following puts a name binding to ``foo`` and ``bar`` in " +"then executing the following puts name bindings for ``foo`` and ``Foo`` in " "the ``spam`` module::" msgstr "" -#: ../../reference/import.rst:509 +#: ../../reference/import.rst:507 msgid "" "Given Python's familiar name binding rules this might seem surprising, but " "it's actually a fundamental feature of the import system. The invariant " @@ -638,11 +638,11 @@ msgid "" "``foo`` attribute of the former." msgstr "" -#: ../../reference/import.rst:516 +#: ../../reference/import.rst:514 msgid "Module spec" msgstr "" -#: ../../reference/import.rst:518 +#: ../../reference/import.rst:516 msgid "" "The import machinery uses a variety of information about each module during " "import, especially before loading. Most of the information is common to all " @@ -650,7 +650,7 @@ msgid "" "related information on a per-module basis." msgstr "" -#: ../../reference/import.rst:523 +#: ../../reference/import.rst:521 msgid "" "Using a spec during import allows state to be transferred between import " "system components, e.g. between the finder that creates the module spec and " @@ -659,31 +659,31 @@ msgid "" "a module spec the loader had that responsibility." msgstr "" -#: ../../reference/import.rst:529 +#: ../../reference/import.rst:527 msgid "" "The module's spec is exposed as the ``__spec__`` attribute on a module " "object. See :class:`~importlib.machinery.ModuleSpec` for details on the " "contents of the module spec." msgstr "" -#: ../../reference/import.rst:538 +#: ../../reference/import.rst:536 msgid "Import-related module attributes" msgstr "" -#: ../../reference/import.rst:540 +#: ../../reference/import.rst:538 msgid "" "The import machinery fills in these attributes on each module object during " "loading, based on the module's spec, before the loader executes the module." msgstr "" -#: ../../reference/import.rst:546 +#: ../../reference/import.rst:544 msgid "" "The ``__name__`` attribute must be set to the fully-qualified name of the " "module. This name is used to uniquely identify the module in the import " "system." msgstr "" -#: ../../reference/import.rst:552 +#: ../../reference/import.rst:550 msgid "" "The ``__loader__`` attribute must be set to the loader object that the " "import machinery used when loading the module. This is mostly for " @@ -691,7 +691,7 @@ msgid "" "for example getting data associated with a loader." msgstr "" -#: ../../reference/import.rst:559 +#: ../../reference/import.rst:557 msgid "" "The module's ``__package__`` attribute must be set. Its value must be a " "string, but it can be the same value as its ``__name__``. When the module " @@ -701,20 +701,20 @@ msgid "" "name. See :pep:`366` for further details." msgstr "" -#: ../../reference/import.rst:567 +#: ../../reference/import.rst:565 msgid "" "This attribute is used instead of ``__name__`` to calculate explicit " "relative imports for main modules, as defined in :pep:`366`. It is expected " "to have the same value as ``__spec__.parent``." msgstr "" -#: ../../reference/import.rst:571 +#: ../../reference/import.rst:569 msgid "" "The value of ``__package__`` is expected to be the same as ``__spec__." "parent``." msgstr "" -#: ../../reference/import.rst:577 +#: ../../reference/import.rst:575 msgid "" "The ``__spec__`` attribute must be set to the module spec that was used when " "importing the module. Setting ``__spec__`` appropriately applies equally to :" @@ -723,19 +723,19 @@ msgid "" "cases `." msgstr "" -#: ../../reference/import.rst:583 +#: ../../reference/import.rst:581 msgid "" "When ``__package__`` is not defined, ``__spec__.parent`` is used as a " "fallback." msgstr "" -#: ../../reference/import.rst:588 +#: ../../reference/import.rst:586 msgid "" "``__spec__.parent`` is used as a fallback when ``__package__`` is not " "defined." msgstr "" -#: ../../reference/import.rst:594 +#: ../../reference/import.rst:592 msgid "" "If the module is a package (either regular or namespace), the module " "object's ``__path__`` attribute must be set. The value must be iterable, " @@ -745,18 +745,18 @@ msgid "" "rules>`." msgstr "" -#: ../../reference/import.rst:601 +#: ../../reference/import.rst:599 msgid "Non-package modules should not have a ``__path__`` attribute." msgstr "" -#: ../../reference/import.rst:606 +#: ../../reference/import.rst:604 msgid "" "``__file__`` is optional. If set, this attribute's value must be a string. " "The import system may opt to leave ``__file__`` unset if it has no semantic " "meaning (e.g. a module loaded from a database)." msgstr "" -#: ../../reference/import.rst:610 +#: ../../reference/import.rst:608 msgid "" "If ``__file__`` is set, it may also be appropriate to set the ``__cached__`` " "attribute which is the path to any compiled version of the code (e.g. byte-" @@ -765,7 +765,7 @@ msgid "" "`3147`)." msgstr "" -#: ../../reference/import.rst:616 +#: ../../reference/import.rst:614 msgid "" "It is also appropriate to set ``__cached__`` when ``__file__`` is not set. " "However, that scenario is quite atypical. Ultimately, the loader is what " @@ -774,16 +774,16 @@ msgid "" "scenario may be appropriate." msgstr "" -#: ../../reference/import.rst:625 +#: ../../reference/import.rst:623 msgid "module.__path__" msgstr "module.__path__" -#: ../../reference/import.rst:627 +#: ../../reference/import.rst:625 msgid "" "By definition, if a module has a ``__path__`` attribute, it is a package." msgstr "" -#: ../../reference/import.rst:629 +#: ../../reference/import.rst:627 msgid "" "A package's ``__path__`` attribute is used during imports of its " "subpackages. Within the import machinery, it functions much the same as :" @@ -792,7 +792,7 @@ msgid "" "than :data:`sys.path`." msgstr "" -#: ../../reference/import.rst:635 +#: ../../reference/import.rst:633 msgid "" "``__path__`` must be an iterable of strings, but it may be empty. The same " "rules used for :data:`sys.path` also apply to a package's ``__path__``, and :" @@ -800,7 +800,7 @@ msgid "" "package's ``__path__``." msgstr "" -#: ../../reference/import.rst:640 +#: ../../reference/import.rst:638 msgid "" "A package's ``__init__.py`` file may set or alter the package's ``__path__`` " "attribute, and this was typically the way namespace packages were " @@ -810,18 +810,18 @@ msgid "" "``__path__`` correctly for the namespace package." msgstr "" -#: ../../reference/import.rst:648 +#: ../../reference/import.rst:646 msgid "Module reprs" msgstr "" -#: ../../reference/import.rst:650 +#: ../../reference/import.rst:648 msgid "" "By default, all modules have a usable repr, however depending on the " "attributes set above, and in the module's spec, you can more explicitly " "control the repr of module objects." msgstr "" -#: ../../reference/import.rst:654 +#: ../../reference/import.rst:652 msgid "" "If the module has a spec (``__spec__``), the import machinery will try to " "generate a repr from it. If that fails or there is no spec, the import " @@ -831,41 +831,41 @@ msgid "" "for whatever information is missing." msgstr "" -#: ../../reference/import.rst:661 +#: ../../reference/import.rst:659 msgid "Here are the exact rules used:" msgstr "" -#: ../../reference/import.rst:663 +#: ../../reference/import.rst:661 msgid "" "If the module has a ``__spec__`` attribute, the information in the spec is " "used to generate the repr. The \"name\", \"loader\", \"origin\", and " "\"has_location\" attributes are consulted." msgstr "" -#: ../../reference/import.rst:667 +#: ../../reference/import.rst:665 msgid "" "If the module has a ``__file__`` attribute, this is used as part of the " "module's repr." msgstr "" -#: ../../reference/import.rst:670 +#: ../../reference/import.rst:668 msgid "" "If the module has no ``__file__`` but does have a ``__loader__`` that is not " "``None``, then the loader's repr is used as part of the module's repr." msgstr "" -#: ../../reference/import.rst:673 +#: ../../reference/import.rst:671 msgid "Otherwise, just use the module's ``__name__`` in the repr." msgstr "" -#: ../../reference/import.rst:675 +#: ../../reference/import.rst:673 msgid "" "Use of :meth:`loader.module_repr() ` has " "been deprecated and the module spec is now used by the import machinery to " "generate a module repr." msgstr "" -#: ../../reference/import.rst:680 +#: ../../reference/import.rst:678 msgid "" "For backward compatibility with Python 3.3, the module repr will be " "generated by calling the loader's :meth:`~importlib.abc.Loader.module_repr` " @@ -873,7 +873,7 @@ msgid "" "the method is deprecated." msgstr "" -#: ../../reference/import.rst:687 +#: ../../reference/import.rst:685 msgid "" "Calling :meth:`~importlib.abc.Loader.module_repr` now occurs after trying to " "use a module's ``__spec__`` attribute but before falling back on " @@ -881,11 +881,11 @@ msgid "" "stop in Python 3.12." msgstr "" -#: ../../reference/import.rst:695 +#: ../../reference/import.rst:693 msgid "Cached bytecode invalidation" msgstr "" -#: ../../reference/import.rst:697 +#: ../../reference/import.rst:695 msgid "" "Before Python loads cached bytecode from a ``.pyc`` file, it checks whether " "the cache is up-to-date with the source ``.py`` file. By default, Python " @@ -895,7 +895,7 @@ msgid "" "source's metadata." msgstr "" -#: ../../reference/import.rst:704 +#: ../../reference/import.rst:702 msgid "" "Python also supports \"hash-based\" cache files, which store a hash of the " "source file's contents rather than its metadata. There are two variants of " @@ -909,17 +909,17 @@ msgid "" "option:`--check-hash-based-pycs` flag." msgstr "" -#: ../../reference/import.rst:715 +#: ../../reference/import.rst:713 msgid "" "Added hash-based ``.pyc`` files. Previously, Python only supported timestamp-" "based invalidation of bytecode caches." msgstr "" -#: ../../reference/import.rst:721 +#: ../../reference/import.rst:719 msgid "The Path Based Finder" msgstr "" -#: ../../reference/import.rst:726 +#: ../../reference/import.rst:724 msgid "" "As mentioned previously, Python comes with several default meta path " "finders. One of these, called the :term:`path based finder` (:class:" @@ -928,14 +928,14 @@ msgid "" "a location to search for modules." msgstr "" -#: ../../reference/import.rst:732 +#: ../../reference/import.rst:730 msgid "" "The path based finder itself doesn't know how to import anything. Instead, " "it traverses the individual path entries, associating each of them with a " "path entry finder that knows how to handle that particular kind of path." msgstr "" -#: ../../reference/import.rst:736 +#: ../../reference/import.rst:734 msgid "" "The default set of path entry finders implement all the semantics for " "finding modules on the file system, handling special file types such as " @@ -946,14 +946,14 @@ msgid "" "from zipfiles." msgstr "" -#: ../../reference/import.rst:743 +#: ../../reference/import.rst:741 msgid "" "Path entries need not be limited to file system locations. They can refer " "to URLs, database queries, or any other location that can be specified as a " "string." msgstr "" -#: ../../reference/import.rst:747 +#: ../../reference/import.rst:745 msgid "" "The path based finder provides additional hooks and protocols so that you " "can extend and customize the types of searchable path entries. For example, " @@ -964,7 +964,7 @@ msgid "" "from the web." msgstr "" -#: ../../reference/import.rst:755 +#: ../../reference/import.rst:753 msgid "" "A word of warning: this section and the previous both use the term *finder*, " "distinguishing between them by using the terms :term:`meta path finder` and :" @@ -975,7 +975,7 @@ msgid "" "process, as keyed off the :data:`sys.meta_path` traversal." msgstr "" -#: ../../reference/import.rst:763 +#: ../../reference/import.rst:761 msgid "" "By contrast, path entry finders are in a sense an implementation detail of " "the path based finder, and in fact, if the path based finder were to be " @@ -983,11 +983,11 @@ msgid "" "would be invoked." msgstr "" -#: ../../reference/import.rst:770 +#: ../../reference/import.rst:768 msgid "Path entry finders" msgstr "" -#: ../../reference/import.rst:778 +#: ../../reference/import.rst:776 msgid "" "The :term:`path based finder` is responsible for finding and loading Python " "modules and packages whose location is specified with a string :term:`path " @@ -995,7 +995,7 @@ msgid "" "not be limited to this." msgstr "" -#: ../../reference/import.rst:783 +#: ../../reference/import.rst:781 msgid "" "As a meta path finder, the :term:`path based finder` implements the :meth:" "`~importlib.abc.MetaPathFinder.find_spec` protocol previously described, " @@ -1003,7 +1003,7 @@ msgid "" "modules are found and loaded from the :term:`import path`." msgstr "" -#: ../../reference/import.rst:788 +#: ../../reference/import.rst:786 msgid "" "Three variables are used by the :term:`path based finder`, :data:`sys." "path`, :data:`sys.path_hooks` and :data:`sys.path_importer_cache`. The " @@ -1011,7 +1011,7 @@ msgid "" "additional ways that the import machinery can be customized." msgstr "" -#: ../../reference/import.rst:793 +#: ../../reference/import.rst:791 msgid "" ":data:`sys.path` contains a list of strings providing search locations for " "modules and packages. It is initialized from the :data:`PYTHONPATH` " @@ -1024,7 +1024,7 @@ msgid "" "determined by the individual :term:`path entry finders `." msgstr "" -#: ../../reference/import.rst:804 +#: ../../reference/import.rst:802 msgid "" "The :term:`path based finder` is a :term:`meta path finder`, so the import " "machinery begins the :term:`import path` search by calling the path based " @@ -1036,7 +1036,7 @@ msgid "" "top level import and :data:`sys.path` is used." msgstr "" -#: ../../reference/import.rst:813 +#: ../../reference/import.rst:811 msgid "" "The path based finder iterates over every entry in the search path, and for " "each of these, looks for an appropriate :term:`path entry finder` (:class:" @@ -1052,7 +1052,7 @@ msgid "" "finder to perform the path entry search again [#fnpic]_." msgstr "" -#: ../../reference/import.rst:826 +#: ../../reference/import.rst:824 msgid "" "If the path entry is not present in the cache, the path based finder " "iterates over every callable in :data:`sys.path_hooks`. Each of the :term:" @@ -1068,7 +1068,7 @@ msgid "" "decode the argument, it should raise :exc:`ImportError`." msgstr "" -#: ../../reference/import.rst:840 +#: ../../reference/import.rst:838 msgid "" "If :data:`sys.path_hooks` iteration ends with no :term:`path entry finder` " "being returned, then the path based finder's :meth:`~importlib.machinery." @@ -1078,7 +1078,7 @@ msgid "" "could not find the module." msgstr "" -#: ../../reference/import.rst:847 +#: ../../reference/import.rst:845 msgid "" "If a :term:`path entry finder` *is* returned by one of the :term:`path entry " "hook` callables on :data:`sys.path_hooks`, then the following protocol is " @@ -1086,7 +1086,7 @@ msgid "" "the module." msgstr "" -#: ../../reference/import.rst:852 +#: ../../reference/import.rst:850 msgid "" "The current working directory -- denoted by an empty string -- is handled " "slightly differently from other entries on :data:`sys.path`. First, if the " @@ -1098,18 +1098,18 @@ msgid "" "and not the empty string." msgstr "" -#: ../../reference/import.rst:862 +#: ../../reference/import.rst:860 msgid "Path entry finder protocol" msgstr "" -#: ../../reference/import.rst:864 +#: ../../reference/import.rst:862 msgid "" "In order to support imports of modules and initialized packages and also to " "contribute portions to namespace packages, path entry finders must implement " "the :meth:`~importlib.abc.PathEntryFinder.find_spec` method." msgstr "" -#: ../../reference/import.rst:868 +#: ../../reference/import.rst:866 msgid "" ":meth:`~importlib.abc.PathEntryFinder.find_spec` takes two arguments: the " "fully qualified name of the module being imported, and the (optional) target " @@ -1117,14 +1117,14 @@ msgid "" "spec will always have \"loader\" set (with one exception)." msgstr "" -#: ../../reference/import.rst:873 +#: ../../reference/import.rst:871 msgid "" "To indicate to the import machinery that the spec represents a namespace :" "term:`portion`, the path entry finder sets \"submodule_search_locations\" to " "a list containing the portion." msgstr "" -#: ../../reference/import.rst:877 +#: ../../reference/import.rst:875 msgid "" ":meth:`~importlib.abc.PathEntryFinder.find_spec` replaced :meth:`~importlib." "abc.PathEntryFinder.find_loader` and :meth:`~importlib.abc.PathEntryFinder." @@ -1132,7 +1132,7 @@ msgid "" "``find_spec()`` is not defined." msgstr "" -#: ../../reference/import.rst:883 +#: ../../reference/import.rst:881 msgid "" "Older path entry finders may implement one of these two deprecated methods " "instead of ``find_spec()``. The methods are still respected for the sake of " @@ -1140,7 +1140,7 @@ msgid "" "path entry finder, the legacy methods are ignored." msgstr "" -#: ../../reference/import.rst:888 +#: ../../reference/import.rst:886 msgid "" ":meth:`~importlib.abc.PathEntryFinder.find_loader` takes one argument, the " "fully qualified name of the module being imported. ``find_loader()`` " @@ -1148,7 +1148,7 @@ msgid "" "a namespace :term:`portion`." msgstr "" -#: ../../reference/import.rst:893 +#: ../../reference/import.rst:891 msgid "" "For backwards compatibility with other implementations of the import " "protocol, many path entry finders also support the same, traditional " @@ -1158,7 +1158,7 @@ msgid "" "initial call to the path hook)." msgstr "" -#: ../../reference/import.rst:900 +#: ../../reference/import.rst:898 msgid "" "The ``find_module()`` method on path entry finders is deprecated, as it does " "not allow the path entry finder to contribute portions to namespace " @@ -1167,25 +1167,25 @@ msgid "" "preference to ``find_module()``." msgstr "" -#: ../../reference/import.rst:906 +#: ../../reference/import.rst:904 msgid "" "Calls to :meth:`~importlib.abc.PathEntryFinder.find_module` and :meth:" "`~importlib.abc.PathEntryFinder.find_loader` by the import system will " "raise :exc:`ImportWarning`." msgstr "" -#: ../../reference/import.rst:913 +#: ../../reference/import.rst:911 msgid "Replacing the standard import system" msgstr "" -#: ../../reference/import.rst:915 +#: ../../reference/import.rst:913 msgid "" "The most reliable mechanism for replacing the entire import system is to " "delete the default contents of :data:`sys.meta_path`, replacing them " "entirely with a custom meta path hook." msgstr "" -#: ../../reference/import.rst:919 +#: ../../reference/import.rst:917 msgid "" "If it is acceptable to only alter the behaviour of import statements without " "affecting other APIs that access the import system, then replacing the " @@ -1194,7 +1194,7 @@ msgid "" "statements within that module." msgstr "" -#: ../../reference/import.rst:925 +#: ../../reference/import.rst:923 msgid "" "To selectively prevent the import of some modules from a hook early on the " "meta path (rather than disabling the standard import system entirely), it is " @@ -1204,11 +1204,11 @@ msgid "" "exception terminates it immediately." msgstr "" -#: ../../reference/import.rst:935 +#: ../../reference/import.rst:933 msgid "Package Relative Imports" msgstr "" -#: ../../reference/import.rst:937 +#: ../../reference/import.rst:935 msgid "" "Relative imports use leading dots. A single leading dot indicates a relative " "import, starting with the current package. Two or more leading dots indicate " @@ -1216,30 +1216,30 @@ msgid "" "after the first. For example, given the following package layout::" msgstr "" -#: ../../reference/import.rst:953 +#: ../../reference/import.rst:951 msgid "" "In either ``subpackage1/moduleX.py`` or ``subpackage1/__init__.py``, the " "following are valid relative imports::" msgstr "" -#: ../../reference/import.rst:963 +#: ../../reference/import.rst:961 msgid "" "Absolute imports may use either the ``import <>`` or ``from <> import <>`` " "syntax, but relative imports may only use the second form; the reason for " "this is that::" msgstr "" -#: ../../reference/import.rst:969 +#: ../../reference/import.rst:967 msgid "" "should expose ``XXX.YYY.ZZZ`` as a usable expression, but .moduleY is not a " "valid expression." msgstr "" -#: ../../reference/import.rst:976 +#: ../../reference/import.rst:974 msgid "Special considerations for __main__" msgstr "" -#: ../../reference/import.rst:978 +#: ../../reference/import.rst:976 msgid "" "The :mod:`__main__` module is a special case relative to Python's import " "system. As noted :ref:`elsewhere `, the ``__main__`` module is " @@ -1250,17 +1250,17 @@ msgid "" "interpreter is invoked." msgstr "" -#: ../../reference/import.rst:989 +#: ../../reference/import.rst:987 msgid "__main__.__spec__" msgstr "__main__.__spec__" -#: ../../reference/import.rst:991 +#: ../../reference/import.rst:989 msgid "" "Depending on how :mod:`__main__` is initialized, ``__main__.__spec__`` gets " "set appropriately or to ``None``." msgstr "" -#: ../../reference/import.rst:994 +#: ../../reference/import.rst:992 msgid "" "When Python is started with the :option:`-m` option, ``__spec__`` is set to " "the module spec of the corresponding module or package. ``__spec__`` is also " @@ -1268,30 +1268,30 @@ msgid "" "directory, zipfile or other :data:`sys.path` entry." msgstr "" -#: ../../reference/import.rst:999 +#: ../../reference/import.rst:997 msgid "" "In :ref:`the remaining cases ` ``__main__." "__spec__`` is set to ``None``, as the code used to populate the :mod:" "`__main__` does not correspond directly with an importable module:" msgstr "" -#: ../../reference/import.rst:1003 +#: ../../reference/import.rst:1001 msgid "interactive prompt" msgstr "" -#: ../../reference/import.rst:1004 +#: ../../reference/import.rst:1002 msgid ":option:`-c` option" msgstr ":option:`-c` 選項" -#: ../../reference/import.rst:1005 +#: ../../reference/import.rst:1003 msgid "running from stdin" msgstr "" -#: ../../reference/import.rst:1006 +#: ../../reference/import.rst:1004 msgid "running directly from a source or bytecode file" msgstr "" -#: ../../reference/import.rst:1008 +#: ../../reference/import.rst:1006 msgid "" "Note that ``__main__.__spec__`` is always ``None`` in the last case, *even " "if* the file could technically be imported directly as a module instead. Use " @@ -1299,7 +1299,7 @@ msgid "" "`__main__`." msgstr "" -#: ../../reference/import.rst:1013 +#: ../../reference/import.rst:1011 msgid "" "Note also that even when ``__main__`` corresponds with an importable module " "and ``__main__.__spec__`` is set accordingly, they're still considered " @@ -1308,44 +1308,44 @@ msgid "" "populate the ``__main__`` namespace, and not during normal import." msgstr "" -#: ../../reference/import.rst:1021 +#: ../../reference/import.rst:1019 msgid "Open issues" msgstr "" -#: ../../reference/import.rst:1023 +#: ../../reference/import.rst:1021 msgid "XXX It would be really nice to have a diagram." msgstr "" -#: ../../reference/import.rst:1025 +#: ../../reference/import.rst:1023 msgid "" "XXX * (import_machinery.rst) how about a section devoted just to the " "attributes of modules and packages, perhaps expanding upon or supplanting " "the related entries in the data model reference page?" msgstr "" -#: ../../reference/import.rst:1029 +#: ../../reference/import.rst:1027 msgid "" "XXX runpy, pkgutil, et al in the library manual should all get \"See Also\" " "links at the top pointing to the new import system section." msgstr "" -#: ../../reference/import.rst:1032 +#: ../../reference/import.rst:1030 msgid "" "XXX Add more explanation regarding the different ways in which ``__main__`` " "is initialized?" msgstr "" -#: ../../reference/import.rst:1035 +#: ../../reference/import.rst:1033 msgid "" "XXX Add more info on ``__main__`` quirks/pitfalls (i.e. copy from :pep:" "`395`)." msgstr "" -#: ../../reference/import.rst:1040 +#: ../../reference/import.rst:1038 msgid "References" msgstr "" -#: ../../reference/import.rst:1042 +#: ../../reference/import.rst:1040 msgid "" "The import machinery has evolved considerably since Python's early days. " "The original `specification for packages ` for " "Python 3.3. :pep:`420` also introduced the :meth:`find_loader` protocol as " "an alternative to :meth:`find_module`." msgstr "" -#: ../../reference/import.rst:1054 +#: ../../reference/import.rst:1052 msgid "" ":pep:`366` describes the addition of the ``__package__`` attribute for " "explicit relative imports in main modules." msgstr "" -#: ../../reference/import.rst:1057 +#: ../../reference/import.rst:1055 msgid "" ":pep:`328` introduced absolute and explicit relative imports and initially " "proposed ``__name__`` for semantics :pep:`366` would eventually specify for " "``__package__``." msgstr "" -#: ../../reference/import.rst:1061 +#: ../../reference/import.rst:1059 msgid ":pep:`338` defines executing modules as scripts." msgstr "" -#: ../../reference/import.rst:1063 +#: ../../reference/import.rst:1061 msgid "" ":pep:`451` adds the encapsulation of per-module import state in spec " "objects. It also off-loads most of the boilerplate responsibilities of " @@ -1392,15 +1392,15 @@ msgid "" "finders and loaders." msgstr "" -#: ../../reference/import.rst:1070 +#: ../../reference/import.rst:1068 msgid "Footnotes" msgstr "註解" -#: ../../reference/import.rst:1071 +#: ../../reference/import.rst:1069 msgid "See :class:`types.ModuleType`." msgstr "參閱 :class:`types.ModuleType`\\ 。" -#: ../../reference/import.rst:1073 +#: ../../reference/import.rst:1071 msgid "" "The importlib implementation avoids using the return value directly. " "Instead, it gets the module object by looking the module name up in :data:" @@ -1409,7 +1409,7 @@ msgid "" "behavior that is not guaranteed to work in other Python implementations." msgstr "" -#: ../../reference/import.rst:1080 +#: ../../reference/import.rst:1078 msgid "" "In legacy code, it is possible to find instances of :class:`imp." "NullImporter` in the :data:`sys.path_importer_cache`. It is recommended " diff --git a/tutorial/modules.po b/tutorial/modules.po index e86334f626..9483cf5aa1 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -11,8 +11,8 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.10\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-26 16:47+0000\n" -"PO-Revision-Date: 2022-01-31 18:09+0800\n" +"POT-Creation-Date: 2022-04-18 00:15+0000\n" +"PO-Revision-Date: 2022-04-21 17:56+0800\n" "Last-Translator: Phil Lin \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -685,10 +685,10 @@ msgstr "" #: ../../tutorial/modules.rst:506 msgid "" "This would mean that ``from sound.effects import *`` would import the three " -"named submodules of the :mod:`sound` package." +"named submodules of the :mod:`sound.effects` package." msgstr "" -"意思是,\\ ``from sound.effects import *`` 將會 import :mod:`sound` 套件中," -"這三個被提名的子模組。" +"意思是,\\ ``from sound.effects import *`` 將會 import :mod:`sound.effects` " +"套件中,這三個被提名的子模組。" #: ../../tutorial/modules.rst:509 msgid ""