diff --git a/library/csv.po b/library/csv.po index bb95db06de..521f820d4f 100644 --- a/library/csv.po +++ b/library/csv.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-01 00:18+0000\n" +"POT-Creation-Date: 2025-08-25 00:17+0000\n" "PO-Revision-Date: 2023-11-08 15:06+0800\n" "Last-Translator: RockLeon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -122,8 +122,8 @@ msgstr "" "`QUOTE_NONNUMERIC` 有被指定(在這個情況之下,沒有引號的欄位都會被轉換成浮點" "數),否則不會進行自動資料型別轉換。" -#: ../../library/csv.rst:76 ../../library/csv.rst:106 ../../library/csv.rst:181 -#: ../../library/csv.rst:219 +#: ../../library/csv.rst:76 ../../library/csv.rst:106 ../../library/csv.rst:182 +#: ../../library/csv.rst:220 msgid "A short usage example::" msgstr "一個簡短的用法範例: ::" @@ -228,7 +228,7 @@ msgstr "" msgid "Return the names of all registered dialects." msgstr "回傳所有已註冊的 dialect 名稱。" -#: ../../library/csv.rst:144 +#: ../../library/csv.rst:145 msgid "" "Returns the current maximum field size allowed by the parser. If *new_limit* " "is given, this becomes the new limit." @@ -236,11 +236,11 @@ msgstr "" "回傳目前的剖析器 (parser) 允許的最大字串大小。如果 *new_limit* 被給定,則會變" "成新的最大字串大小。" -#: ../../library/csv.rst:148 +#: ../../library/csv.rst:149 msgid "The :mod:`csv` module defines the following classes:" msgstr ":mod:`csv` 模組定義了下列的類別:" -#: ../../library/csv.rst:153 +#: ../../library/csv.rst:154 msgid "" "Create an object that operates like a regular reader but maps the " "information in each row to a :class:`dict` whose keys are given by the " @@ -249,7 +249,7 @@ msgstr "" "建立一個物件,其運作上就像一般的讀取器,但可以將每一列資訊 map (對映) 到 :" "class:`dict` 中,可以透過選填的參數 *fieldnames* 設定 key。" -#: ../../library/csv.rst:157 +#: ../../library/csv.rst:158 msgid "" "The *fieldnames* parameter is a :term:`sequence`. If *fieldnames* is " "omitted, the values in the first row of file *f* will be used as the " @@ -263,7 +263,7 @@ msgstr "" "供,它們就會被使用,且第一列會被包含在結果中。不管欄位標題是如何決定的," "dictionary 都會保留原始的排序。" -#: ../../library/csv.rst:164 +#: ../../library/csv.rst:165 msgid "" "If a row has more fields than fieldnames, the remaining data is put in a " "list and stored with the fieldname specified by *restkey* (which defaults to " @@ -275,28 +275,28 @@ msgstr "" "``None``)特指的欄位標題會放入列表當中並儲存。如果一個非空的 (non-blank) 列中" "的欄位比欄位標題還少,缺少的值則會填入 *restval* (預設為 ``None``)的值。" -#: ../../library/csv.rst:170 +#: ../../library/csv.rst:171 msgid "" "All other optional or keyword arguments are passed to the underlying :class:" "`reader` instance." msgstr "所有其他選填的引數或關鍵字引數皆會傳遞至下層的 :class:`reader` 實例。" -#: ../../library/csv.rst:173 ../../library/csv.rst:217 +#: ../../library/csv.rst:174 ../../library/csv.rst:218 msgid "" "If the argument passed to *fieldnames* is an iterator, it will be coerced to " "a :class:`list`." msgstr "" "如果傳遞至 *fieldnames* 的引數是個疊代器,則會被迫成為一個 :class:`list`。" -#: ../../library/csv.rst:175 +#: ../../library/csv.rst:176 msgid "Returned rows are now of type :class:`OrderedDict`." msgstr "回傳的列已成為型別 :class:`OrderedDict`。" -#: ../../library/csv.rst:178 +#: ../../library/csv.rst:179 msgid "Returned rows are now of type :class:`dict`." msgstr "回傳的列已成為型別 :class:`dict`。" -#: ../../library/csv.rst:183 +#: ../../library/csv.rst:184 msgid "" ">>> import csv\n" ">>> with open('names.csv', newline='') as csvfile:\n" @@ -322,7 +322,7 @@ msgstr "" ">>> print(row)\n" "{'first_name': 'John', 'last_name': 'Cleese'}" -#: ../../library/csv.rst:199 +#: ../../library/csv.rst:200 msgid "" "Create an object which operates like a regular writer but maps dictionaries " "onto output rows. The *fieldnames* parameter is a :mod:`sequence " @@ -347,7 +347,7 @@ msgstr "" "被設定為 ``'ignore'``,dictionary 中額外的值會被忽略。其他選填的引數或關鍵字" "引數皆會傳遞至下層的 :class:`writer` 實例。" -#: ../../library/csv.rst:214 +#: ../../library/csv.rst:215 msgid "" "Note that unlike the :class:`DictReader` class, the *fieldnames* parameter " "of the :class:`DictWriter` class is not optional." @@ -355,7 +355,7 @@ msgstr "" "請記得這不像類別 :class:`DictReader`,在類別 :class:`DictWriter` 中,參數 " "*fieldnames* 並不是選填的。" -#: ../../library/csv.rst:221 +#: ../../library/csv.rst:222 msgid "" "import csv\n" "\n" @@ -379,7 +379,7 @@ msgstr "" " writer.writerow({'first_name': 'Lovely', 'last_name': 'Spam'})\n" " writer.writerow({'first_name': 'Wonderful', 'last_name': 'Spam'})" -#: ../../library/csv.rst:235 +#: ../../library/csv.rst:236 msgid "" "The :class:`Dialect` class is a container class whose attributes contain " "information for how to handle doublequotes, whitespace, delimiters, etc. Due " @@ -392,7 +392,7 @@ msgstr "" "巧妙不同的 CSV 資料。:class:`Dialect` 實例定義了 :class:`reader` 以及 :class:" "`writer` 的實例該如何表示。" -#: ../../library/csv.rst:241 +#: ../../library/csv.rst:242 msgid "" "All available :class:`Dialect` names are returned by :func:`list_dialects`, " "and they can be registered with specific :class:`reader` and :class:`writer` " @@ -402,7 +402,7 @@ msgstr "" "透過特定 :class:`reader` 及 :class:`writer` 類別的初始器 (initializer, " "``__init__``) 函式進行註冊,就像這樣: ::" -#: ../../library/csv.rst:245 +#: ../../library/csv.rst:246 msgid "" "import csv\n" "\n" @@ -414,7 +414,7 @@ msgstr "" "with open('students.csv', 'w', newline='') as csvfile:\n" " writer = csv.writer(csvfile, dialect='unix')" -#: ../../library/csv.rst:253 +#: ../../library/csv.rst:254 msgid "" "The :class:`excel` class defines the usual properties of an Excel-generated " "CSV file. It is registered with the dialect name ``'excel'``." @@ -422,7 +422,7 @@ msgstr "" "類別 :class:`excel` 定義了透過 Excel 產生的 CSV 檔案的慣用屬性。它被註冊的 " "dialect 名稱為 ``'excel'``。" -#: ../../library/csv.rst:259 +#: ../../library/csv.rst:260 msgid "" "The :class:`excel_tab` class defines the usual properties of an Excel-" "generated TAB-delimited file. It is registered with the dialect name " @@ -431,7 +431,7 @@ msgstr "" "類別 :class:`excel_tab` 定義了透過 Excel 產生並以 Tab 作為分隔的 CSV 檔案的慣" "用屬性。它被註冊的 dialect 名稱為 ``'excel-tab'``。" -#: ../../library/csv.rst:265 +#: ../../library/csv.rst:266 msgid "" "The :class:`unix_dialect` class defines the usual properties of a CSV file " "generated on UNIX systems, i.e. using ``'\\n'`` as line terminator and " @@ -441,15 +441,15 @@ msgstr "" "句話說,使用 ``'\\n'`` 作為換行符號且所有欄位都被引號包覆起來。它被註冊的 " "dialect 名稱為 ``'unix'``。" -#: ../../library/csv.rst:274 +#: ../../library/csv.rst:275 msgid "The :class:`Sniffer` class is used to deduce the format of a CSV file." msgstr "類別 :class:`Sniffer` 被用來推斷 CSV 檔案的格式。" -#: ../../library/csv.rst:276 +#: ../../library/csv.rst:277 msgid "The :class:`Sniffer` class provides two methods:" msgstr "類別 :class:`Sniffer` 提供了兩個 method:" -#: ../../library/csv.rst:280 +#: ../../library/csv.rst:281 msgid "" "Analyze the given *sample* and return a :class:`Dialect` subclass reflecting " "the parameters found. If the optional *delimiters* parameter is given, it " @@ -459,7 +459,7 @@ msgstr "" "數。如果給定選填的參數 *delimiters*,它會被解釋為一個字串且含有可能、有效的分" "隔字元。" -#: ../../library/csv.rst:288 +#: ../../library/csv.rst:289 msgid "" "Analyze the sample text (presumed to be in CSV format) and return :const:" "`True` if the first row appears to be a series of column headers. Inspecting " @@ -470,18 +470,18 @@ msgstr "" "格式)並回傳 :const:`True`。檢查每一欄時,會考慮是否滿足兩個關鍵標準其中之" "一,判斷 sample 是否包含標題:" -#: ../../library/csv.rst:293 +#: ../../library/csv.rst:294 msgid "the second through n-th rows contain numeric values" msgstr "第二列至第 n 列包含數字" -#: ../../library/csv.rst:294 +#: ../../library/csv.rst:295 msgid "" "the second through n-th rows contain strings where at least one value's " "length differs from that of the putative header of that column." msgstr "" "第二列到第 n 列包含的字串中至少有一個值的長度與該行的假定標題的長度不同。" -#: ../../library/csv.rst:297 +#: ../../library/csv.rst:298 msgid "" "Twenty rows after the first row are sampled; if more than half of columns + " "rows meet the criteria, :const:`True` is returned." @@ -489,7 +489,7 @@ msgstr "" "對第一列之後的二十個列進行取樣;如果超過一半的行及列滿足條件,則返回 :const:" "`True`。" -#: ../../library/csv.rst:302 +#: ../../library/csv.rst:303 msgid "" "This method is a rough heuristic and may produce both false positives and " "negatives." @@ -497,11 +497,11 @@ msgstr "" "此方法是一個粗略的啟發,可能會產生偽陽性及偽陰性 (false positives and " "negatives)。" -#: ../../library/csv.rst:305 +#: ../../library/csv.rst:306 msgid "An example for :class:`Sniffer` use::" msgstr "一個 :class:`Sniffer` 的使用範例: ::" -#: ../../library/csv.rst:307 +#: ../../library/csv.rst:308 msgid "" "with open('example.csv', newline='') as csvfile:\n" " dialect = csv.Sniffer().sniff(csvfile.read(1024))\n" @@ -515,34 +515,34 @@ msgstr "" " reader = csv.reader(csvfile, dialect)\n" " # ... 在這邊處理 CSV 檔案 ..." -#: ../../library/csv.rst:316 +#: ../../library/csv.rst:317 msgid "The :mod:`csv` module defines the following constants:" msgstr ":mod:`csv` 模組定義了以下常數:" -#: ../../library/csv.rst:320 +#: ../../library/csv.rst:321 msgid "Instructs :class:`writer` objects to quote all fields." msgstr "引導 :class:`writer` 物件引用所有欄位。" -#: ../../library/csv.rst:325 +#: ../../library/csv.rst:326 msgid "" "Instructs :class:`writer` objects to only quote those fields which contain " "special characters such as *delimiter*, *quotechar*, ``'\\r'``, ``'\\n'`` or " "any of the characters in *lineterminator*." msgstr "" -"引導 :class:`writer` 物件只引用包含特殊字元的欄位,例如:*delimiter*、*quotechar*、" -"``'\\r'``、``'\\n'`` 或是 *lineterminator* 的其他字元。" +"引導 :class:`writer` 物件只引用包含特殊字元的欄位,例如:*delimiter*、" +"*quotechar*、``'\\r'``、``'\\n'`` 或是 *lineterminator* 的其他字元。" -#: ../../library/csv.rst:332 +#: ../../library/csv.rst:333 msgid "Instructs :class:`writer` objects to quote all non-numeric fields." msgstr "引導 :class:`writer` 物件引用所有非數字的欄位。" -#: ../../library/csv.rst:334 +#: ../../library/csv.rst:335 msgid "" "Instructs :class:`reader` objects to convert all non-quoted fields to type :" "class:`float`." msgstr "引導 :class:`reader` 物件轉換所有非引用的欄位為 :class:`float`。" -#: ../../library/csv.rst:337 +#: ../../library/csv.rst:338 msgid "" "Some numeric types, such as :class:`bool`, :class:`~fractions.Fraction`, or :" "class:`~enum.IntEnum`, have a string representation that cannot be converted " @@ -550,7 +550,7 @@ msgid "" "data:`QUOTE_STRINGS` modes." msgstr "" -#: ../../library/csv.rst:345 +#: ../../library/csv.rst:346 msgid "" "Instructs :class:`writer` objects to never quote fields. When the current " "*delimiter*, *quotechar*, *escapechar*, ``'\\r'``, ``'\\n'`` or any of the " @@ -560,18 +560,17 @@ msgid "" "Set *quotechar* to ``None`` to prevent its escaping." msgstr "" "引導 :class:`writer` 物件不得引用欄位。當目前的 *delimiter*、*quotechar*、" -"``'\\r'``、``'\\n'`` 或是 *lineterminator* 的其他字元出現在輸出資料時,在" -"他之前的字元是目前的 *escapechar*。如果沒有設定 *escapechar*,若遇到任何字" -"元需要逸出,寫入器則會引發 :exc:`Error`。設定 *quotechar* 為 ``None`` 以防止" -"逸出。" +"``'\\r'``、``'\\n'`` 或是 *lineterminator* 的其他字元出現在輸出資料時,在他之" +"前的字元是目前的 *escapechar*。如果沒有設定 *escapechar*,若遇到任何字元需要" +"逸出,寫入器則會引發 :exc:`Error`。設定 *quotechar* 為 ``None`` 以防止逸出。" -#: ../../library/csv.rst:353 +#: ../../library/csv.rst:354 msgid "" "Instructs :class:`reader` objects to perform no special processing of quote " "characters." msgstr "引導 :class:`reader` 物件不對引號進行特別處理。" -#: ../../library/csv.rst:357 +#: ../../library/csv.rst:358 msgid "" "Instructs :class:`writer` objects to quote all fields which are not " "``None``. This is similar to :data:`QUOTE_ALL`, except that if a field " @@ -580,7 +579,7 @@ msgstr "" "引導 :class:`writer` 物件引用所有非 ``None`` 的欄位。這與 :data:`QUOTE_ALL` " "相似,除非如果欄位值為 ``None``,該欄位則被寫成空(沒有引號)字串。" -#: ../../library/csv.rst:361 +#: ../../library/csv.rst:362 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) field as " "``None`` and to otherwise behave as :data:`QUOTE_ALL`." @@ -588,7 +587,7 @@ msgstr "" "引導 :class:`reader` 物件將空(沒有引號)欄位直譯 (interpret) 為 ``None``,否" "則會和 :data:`QUOTE_ALL` 有相同的表現方式。" -#: ../../library/csv.rst:368 +#: ../../library/csv.rst:369 msgid "" "Instructs :class:`writer` objects to always place quotes around fields which " "are strings. This is similar to :data:`QUOTE_NONNUMERIC`, except that if a " @@ -598,7 +597,7 @@ msgstr "" "`QUOTE_NONNUMERIC` 相似,除非如果欄位值為 ``None``,該欄位則被寫成空(沒有引" "號)字串。" -#: ../../library/csv.rst:372 +#: ../../library/csv.rst:373 msgid "" "Instructs :class:`reader` objects to interpret an empty (unquoted) string as " "``None`` and to otherwise behave as :data:`QUOTE_NONNUMERIC`." @@ -606,19 +605,19 @@ msgstr "" "引導 :class:`reader` 物件將空(沒有引號)字串直譯為 ``None``,否則會和 :data:" "`QUOTE_ALL` 有相同的表現方式。" -#: ../../library/csv.rst:377 +#: ../../library/csv.rst:378 msgid "The :mod:`csv` module defines the following exception:" msgstr ":mod:`csv` 模組定義下列例外:" -#: ../../library/csv.rst:382 +#: ../../library/csv.rst:383 msgid "Raised by any of the functions when an error is detected." msgstr "當偵測到錯誤時,任何函式都可以引發。" -#: ../../library/csv.rst:387 +#: ../../library/csv.rst:388 msgid "Dialects and Formatting Parameters" msgstr "Dialect 與格式參數" -#: ../../library/csv.rst:389 +#: ../../library/csv.rst:390 msgid "" "To make it easier to specify the format of input and output records, " "specific formatting parameters are grouped together into dialects. A " @@ -637,16 +636,16 @@ msgstr "" "代,在\\ *dialect*\\ 參數中,程式設計師可以指定個別的格式化參數,其與 :class:" "`Dialect` 類別定義的屬性具有相同的名字。" -#: ../../library/csv.rst:399 +#: ../../library/csv.rst:400 msgid "Dialects support the following attributes:" msgstr "Dialect 支援下列屬性:" -#: ../../library/csv.rst:404 +#: ../../library/csv.rst:405 msgid "" "A one-character string used to separate fields. It defaults to ``','``." msgstr "一個單一字元 (one-character) 的字串可已用來分割欄位。預設為 ``','``。" -#: ../../library/csv.rst:409 +#: ../../library/csv.rst:410 msgid "" "Controls how instances of *quotechar* appearing inside a field should " "themselves be quoted. When :const:`True`, the character is doubled. When :" @@ -657,7 +656,7 @@ msgstr "" "為 :const:`True`,字元會是雙引號。若為 :const:`False`,在 *quotechar* 之前會" "先使用 *escapechar* 作為前綴字。預設為 :const:`True`。" -#: ../../library/csv.rst:414 +#: ../../library/csv.rst:415 msgid "" "On output, if *doublequote* is :const:`False` and no *escapechar* is set, :" "exc:`Error` is raised if a *quotechar* is found in a field." @@ -665,47 +664,46 @@ msgstr "" "在輸出時,若 *doublequote* 是 :const:`False` 且\\ *逸出字元*\\ 沒有被設定,當" "一個\\ *引號*\\ 在欄位中被發現時,:exc:`Error` 會被引發。" -#: ../../library/csv.rst:420 +#: ../../library/csv.rst:421 msgid "" "A one-character string used by the writer to escape characters that require " "escaping:" -msgstr "" -"一個單一字元的字串,會被寫入器用來逸出需要逸出的字元:" +msgstr "一個單一字元的字串,會被寫入器用來逸出需要逸出的字元:" -#: ../../library/csv.rst:423 +#: ../../library/csv.rst:424 msgid "" "the *delimiter*, the *quotechar*, ``'\\r'``, ``'\\n'`` and any of the " "characters in *lineterminator* are escaped if *quoting* is set to :const:" "`QUOTE_NONE`;" msgstr "" -#: ../../library/csv.rst:426 +#: ../../library/csv.rst:427 msgid "the *quotechar* is escaped if *doublequote* is :const:`False`;" msgstr "" -#: ../../library/csv.rst:427 +#: ../../library/csv.rst:428 msgid "the *escapechar* itself." msgstr "*escapechar* 本身。" -#: ../../library/csv.rst:429 +#: ../../library/csv.rst:430 msgid "" "On reading, the *escapechar* removes any special meaning from the following " "character. It defaults to :const:`None`, which disables escaping." msgstr "" -"在讀取時,*escapechar* 會移除後面字元的任何特殊意義。預設為 :const:" -"`None`,表示禁止逸出。" +"在讀取時,*escapechar* 會移除後面字元的任何特殊意義。預設為 :const:`None`,表" +"示禁止逸出。" -#: ../../library/csv.rst:432 +#: ../../library/csv.rst:433 msgid "An empty *escapechar* is not allowed." msgstr "*escapechar* 為空是不被接受的。" -#: ../../library/csv.rst:437 +#: ../../library/csv.rst:438 msgid "" "The string used to terminate lines produced by the :class:`writer`. It " "defaults to ``'\\r\\n'``." msgstr "由 :class:`writer` 產生被用來分行的字串。預設為 ``'\\r\\n'``。" -#: ../../library/csv.rst:442 +#: ../../library/csv.rst:443 msgid "" "The :class:`reader` is hard-coded to recognise either ``'\\r'`` or ``'\\n'`` " "as end-of-line, and ignores *lineterminator*. This behavior may change in " @@ -714,7 +712,7 @@ msgstr "" ":class:`reader` 是 hard-coded 辨別 ``'\\r'`` or ``'\\n'`` 作為行尾 (end-of-" "line),並忽略\\ *lineterminator*。未來可能會改變這個行為。" -#: ../../library/csv.rst:449 +#: ../../library/csv.rst:450 msgid "" "A one-character string used to quote fields containing special characters, " "such as the *delimiter* or the *quotechar*, or which contain new-line " @@ -723,26 +721,26 @@ msgid "" "prevent escaping ``'\"'`` if *quoting* is set to :const:`QUOTE_NONE`." msgstr "" "一個單一字元的字串被用於引用包含特殊字元的欄位,像是 *delimiter*、" -"*quotechar* 或是換行字元(``'\\r'``、``'\\n'`` 或是 *lineterminator* 的任" -"一字元)。預設為 ``'\"'``。如果 *quoting* 設定為 :const:`QUOTE_NONE`,可以" -"設定為 ``None`` 以防止逸出 ``'\"'``。" +"*quotechar* 或是換行字元(``'\\r'``、``'\\n'`` 或是 *lineterminator* 的任一字" +"元)。預設為 ``'\"'``。如果 *quoting* 設定為 :const:`QUOTE_NONE`,可以設定為 " +"``None`` 以防止逸出 ``'\"'``。" -#: ../../library/csv.rst:456 +#: ../../library/csv.rst:457 msgid "An empty *quotechar* is not allowed." msgstr "*quotechar* 為空是不被允許的。" -#: ../../library/csv.rst:461 +#: ../../library/csv.rst:462 msgid "" "Controls when quotes should be generated by the writer and recognised by the " "reader. It can take on any of the :ref:`QUOTE_\\* constants ` and defaults to :const:`QUOTE_MINIMAL` if *quotechar* is not " "``None``, and :const:`QUOTE_NONE` otherwise." msgstr "" -"控制 writer 何時產生引號,以及 reader 如何辨識引號。如 *quotechar* 不為 ``None``," -"則可以使用任何 :ref:`QUOTE_\\* 常數 `\\ 且預設為 :const:" -"`QUOTE_MINIMAL`。否則預設為 :const:`QUOTE_NONE`。" +"控制 writer 何時產生引號,以及 reader 如何辨識引號。如 *quotechar* 不為 " +"``None``,則可以使用任何 :ref:`QUOTE_\\* 常數 `\\ 且預設為 :" +"const:`QUOTE_MINIMAL`。否則預設為 :const:`QUOTE_NONE`。" -#: ../../library/csv.rst:469 +#: ../../library/csv.rst:470 msgid "" "When :const:`True`, spaces immediately following the *delimiter* are " "ignored. The default is :const:`False`." @@ -750,18 +748,18 @@ msgstr "" "若為 :const:`True`,在緊接著\\ *delimiter*\\ 後的空格會被忽略。預設為 :const:" "`False`。" -#: ../../library/csv.rst:475 +#: ../../library/csv.rst:476 msgid "" "When ``True``, raise exception :exc:`Error` on bad CSV input. The default is " "``False``." msgstr "" "若為 ``True``,若有錯誤的 CSV 輸入則會引發 :exc:`Error`。預設為 ``False``。" -#: ../../library/csv.rst:481 +#: ../../library/csv.rst:482 msgid "Reader Objects" msgstr "讀取器物件" -#: ../../library/csv.rst:483 +#: ../../library/csv.rst:484 msgid "" "Reader objects (:class:`DictReader` instances and objects returned by the :" "func:`reader` function) have the following public methods:" @@ -769,7 +767,7 @@ msgstr "" "讀取器物件(:func:`reader` 函式回傳的 :class:`DictReader` 實例與物件)有下列" "公開方法 (public method):" -#: ../../library/csv.rst:488 +#: ../../library/csv.rst:489 msgid "" "Return the next row of the reader's iterable object as a list (if the object " "was returned from :func:`reader`) or a dict (if it is a :class:`DictReader` " @@ -780,25 +778,25 @@ msgstr "" "傳)或是一個 dict(若為 :class:`DictReader` 實例),會依據目前的 :class:" "`Dialect` 進行剖析。通常會用 ``next(reader)`` 來進行呼叫。" -#: ../../library/csv.rst:494 +#: ../../library/csv.rst:495 msgid "Reader objects have the following public attributes:" msgstr "讀取器物件有下列公開屬性 (public attributes):" -#: ../../library/csv.rst:498 +#: ../../library/csv.rst:499 msgid "A read-only description of the dialect in use by the parser." msgstr "dialect 的唯讀敘述,會被剖析器使用。" -#: ../../library/csv.rst:503 +#: ../../library/csv.rst:504 msgid "" "The number of lines read from the source iterator. This is not the same as " "the number of records returned, as records can span multiple lines." msgstr "來源疊代器所讀取的行數。這與回傳的紀錄數不同,因為可以進行跨行紀錄。" -#: ../../library/csv.rst:507 +#: ../../library/csv.rst:508 msgid "DictReader objects have the following public attribute:" msgstr "DictReader 物件有下列公開屬性:" -#: ../../library/csv.rst:511 +#: ../../library/csv.rst:512 msgid "" "If not passed as a parameter when creating the object, this attribute is " "initialized upon first access or when the first record is read from the file." @@ -806,11 +804,11 @@ msgstr "" "若在建立物件時沒有作為參數傳遞,這個屬性會在第一次存取之前或是第一筆資料被讀" "取之前進行初始化 (initialize)。" -#: ../../library/csv.rst:518 +#: ../../library/csv.rst:519 msgid "Writer Objects" msgstr "寫入器物件" -#: ../../library/csv.rst:520 +#: ../../library/csv.rst:521 msgid "" ":class:`writer` objects (:class:`DictWriter` instances and objects returned " "by the :func:`writer` function) have the following public methods. A *row* " @@ -828,7 +826,7 @@ msgstr "" "遞)。請注意,在寫入複數 (complex number) 時會用小括號 (parens) 包起來。這可" "能在其他程式讀取 CSV 檔案時導致某些問題(假設他們完全支援複雜數字)。" -#: ../../library/csv.rst:531 +#: ../../library/csv.rst:532 msgid "" "Write the *row* parameter to the writer's file object, formatted according " "to the current :class:`Dialect`. Return the return value of the call to the " @@ -837,11 +835,11 @@ msgstr "" "將參數 *row* 寫入至寫入器的檔案物件中,並依照目前的 :class:`Dialect` 進行格式" "化。回傳下層檔案物件 *write* 方法的回傳值。" -#: ../../library/csv.rst:535 +#: ../../library/csv.rst:536 msgid "Added support of arbitrary iterables." msgstr "新增對任意可疊代物件 (arbitrary iterables) 的支援。" -#: ../../library/csv.rst:540 +#: ../../library/csv.rst:541 msgid "" "Write all elements in *rows* (an iterable of *row* objects as described " "above) to the writer's file object, formatted according to the current " @@ -850,19 +848,19 @@ msgstr "" "將 *rows* 中所有元素(為上述的一個可疊代的 *row* 物件)寫入至寫入器的檔案物件" "中,並依照目前的 dialect 進行格式化。" -#: ../../library/csv.rst:544 +#: ../../library/csv.rst:545 msgid "Writer objects have the following public attribute:" msgstr "寫入器物件有下列公開屬性:" -#: ../../library/csv.rst:549 +#: ../../library/csv.rst:550 msgid "A read-only description of the dialect in use by the writer." msgstr "dialect 的唯讀敘述,會被寫入器使用。" -#: ../../library/csv.rst:552 +#: ../../library/csv.rst:553 msgid "DictWriter objects have the following public method:" msgstr "DictWriter 物件有下列公開方法:" -#: ../../library/csv.rst:557 +#: ../../library/csv.rst:558 msgid "" "Write a row with the field names (as specified in the constructor) to the " "writer's file object, formatted according to the current dialect. Return the " @@ -872,7 +870,7 @@ msgstr "" "中,並依照目前的 dialect 進行格式化。回傳內部呼叫 :meth:`csvwriter.writerow` " "的回傳值。" -#: ../../library/csv.rst:562 +#: ../../library/csv.rst:563 msgid "" ":meth:`writeheader` now also returns the value returned by the :meth:" "`csvwriter.writerow` method it uses internally." @@ -880,15 +878,15 @@ msgstr "" ":meth:`writeheader` 現在也會回傳內部呼叫 :meth:`csvwriter.writerow` 的回傳" "值。" -#: ../../library/csv.rst:570 +#: ../../library/csv.rst:571 msgid "Examples" msgstr "範例" -#: ../../library/csv.rst:572 +#: ../../library/csv.rst:573 msgid "The simplest example of reading a CSV file::" msgstr "最簡單的讀取 CSV 檔案範例: ::" -#: ../../library/csv.rst:574 +#: ../../library/csv.rst:575 msgid "" "import csv\n" "with open('some.csv', newline='') as f:\n" @@ -902,11 +900,11 @@ msgstr "" " for row in reader:\n" " print(row)" -#: ../../library/csv.rst:580 +#: ../../library/csv.rst:581 msgid "Reading a file with an alternate format::" msgstr "讀取一個其他格式的檔案: ::" -#: ../../library/csv.rst:582 +#: ../../library/csv.rst:583 msgid "" "import csv\n" "with open('passwd', newline='') as f:\n" @@ -920,11 +918,11 @@ msgstr "" " for row in reader:\n" " print(row)" -#: ../../library/csv.rst:588 +#: ../../library/csv.rst:589 msgid "The corresponding simplest possible writing example is::" msgstr "相對最簡單、可行的寫入範例為: ::" -#: ../../library/csv.rst:590 +#: ../../library/csv.rst:591 msgid "" "import csv\n" "with open('some.csv', 'w', newline='') as f:\n" @@ -932,7 +930,7 @@ msgid "" " writer.writerows(someiterable)" msgstr "" -#: ../../library/csv.rst:595 +#: ../../library/csv.rst:596 msgid "" "Since :func:`open` is used to open a CSV file for reading, the file will by " "default be decoded into unicode using the system default encoding (see :func:" @@ -943,7 +941,7 @@ msgstr "" "碼格式(請見 :func:`locale.getencoding`),並解碼為 unicode。若要使用不同編碼" "格式進行檔案解碼,請使用 open 函式的 ``encoding`` 引數: ::" -#: ../../library/csv.rst:600 +#: ../../library/csv.rst:601 msgid "" "import csv\n" "with open('some.csv', newline='', encoding='utf-8') as f:\n" @@ -957,7 +955,7 @@ msgstr "" " for row in reader:\n" " print(row)" -#: ../../library/csv.rst:606 +#: ../../library/csv.rst:607 msgid "" "The same applies to writing in something other than the system default " "encoding: specify the encoding argument when opening the output file." @@ -965,11 +963,11 @@ msgstr "" "同理可以應用到使用不同編碼格式進行寫入:當開啟輸出檔案時,指定 ``encoding`` " "引數。" -#: ../../library/csv.rst:609 +#: ../../library/csv.rst:610 msgid "Registering a new dialect::" msgstr "註冊一個新的 dialect : ::" -#: ../../library/csv.rst:611 +#: ../../library/csv.rst:612 msgid "" "import csv\n" "csv.register_dialect('unixpwd', delimiter=':', quoting=csv.QUOTE_NONE)\n" @@ -981,13 +979,13 @@ msgstr "" "with open('passwd', newline='') as f:\n" " reader = csv.reader(f, 'unixpwd')" -#: ../../library/csv.rst:616 +#: ../../library/csv.rst:617 msgid "" "A slightly more advanced use of the reader --- catching and reporting " "errors::" msgstr "稍微進階的讀取器用法 -- 擷取及回報錯誤: ::" -#: ../../library/csv.rst:618 +#: ../../library/csv.rst:619 msgid "" "import csv, sys\n" "filename = 'some.csv'\n" @@ -1009,13 +1007,13 @@ msgstr "" " except csv.Error as e:\n" " sys.exit(f'file {filename}, line {reader.line_num}: {e}')" -#: ../../library/csv.rst:628 +#: ../../library/csv.rst:629 msgid "" "And while the module doesn't directly support parsing strings, it can easily " "be done::" msgstr "而當模組無法直接支援剖析字串時,仍可以輕鬆的解決: ::" -#: ../../library/csv.rst:631 +#: ../../library/csv.rst:632 msgid "" "import csv\n" "for row in csv.reader(['one,two,three']):\n" @@ -1025,11 +1023,11 @@ msgstr "" "for row in csv.reader(['one,two,three']):\n" " print(row)" -#: ../../library/csv.rst:637 +#: ../../library/csv.rst:638 msgid "Footnotes" msgstr "註解" -#: ../../library/csv.rst:638 +#: ../../library/csv.rst:639 msgid "" "If ``newline=''`` is not specified, newlines embedded inside quoted fields " "will not be interpreted correctly, and on platforms that use ``\\r\\n`` " diff --git a/library/imaplib.po b/library/imaplib.po index 2cdc167ac7..e30c6ea3ac 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-11 00:13+0000\n" +"POT-Creation-Date: 2025-08-24 00:17+0000\n" "PO-Revision-Date: 2018-05-23 16:04+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -395,34 +395,38 @@ msgid "" "includes the phrase ``AUTH=CRAM-MD5``." msgstr "" -#: ../../library/imaplib.rst:331 +#: ../../library/imaplib.rst:328 +msgid "An :exc:`IMAP4.error` is raised if MD5 support is not available." +msgstr "" + +#: ../../library/imaplib.rst:334 msgid "Shutdown connection to server. Returns server ``BYE`` response." msgstr "" -#: ../../library/imaplib.rst:333 +#: ../../library/imaplib.rst:336 msgid "The method no longer ignores silently arbitrary exceptions." msgstr "" -#: ../../library/imaplib.rst:339 +#: ../../library/imaplib.rst:342 msgid "" "List subscribed mailbox names in directory matching pattern. *directory* " "defaults to the top level directory and *pattern* defaults to match any " "mailbox. Returned data are tuples of message part envelope and data." msgstr "" -#: ../../library/imaplib.rst:346 +#: ../../library/imaplib.rst:349 msgid "Show my ACLs for a mailbox (i.e. the rights that I have on mailbox)." msgstr "" -#: ../../library/imaplib.rst:351 +#: ../../library/imaplib.rst:354 msgid "Returns IMAP namespaces as defined in :rfc:`2342`." msgstr "" -#: ../../library/imaplib.rst:356 +#: ../../library/imaplib.rst:359 msgid "Send ``NOOP`` to server." msgstr "" -#: ../../library/imaplib.rst:361 +#: ../../library/imaplib.rst:364 msgid "" "Opens socket to *port* at *host*. The optional *timeout* parameter specifies " "a timeout in seconds for the connection attempt. If timeout is not given or " @@ -435,7 +439,7 @@ msgid "" "You may override this method." msgstr "" -#: ../../library/imaplib.rst:371 +#: ../../library/imaplib.rst:374 msgid "" "Raises an :ref:`auditing event ` ``imaplib.open`` with arguments " "``self``, ``host``, ``port``." @@ -443,48 +447,48 @@ msgstr "" "引發一個附帶引數 ``self``、``host``、``port`` 的\\ :ref:`稽核事件 " "` ``imaplib.open``。" -#: ../../library/imaplib.rst:373 +#: ../../library/imaplib.rst:376 msgid "The *timeout* parameter was added." msgstr "新增 *timeout* 參數。" -#: ../../library/imaplib.rst:378 +#: ../../library/imaplib.rst:381 msgid "" "Fetch truncated part of a message. Returned data is a tuple of message part " "envelope and data." msgstr "" -#: ../../library/imaplib.rst:384 +#: ../../library/imaplib.rst:387 msgid "" "Assume authentication as *user*. Allows an authorised administrator to proxy " "into any user's mailbox." msgstr "" -#: ../../library/imaplib.rst:390 +#: ../../library/imaplib.rst:393 msgid "" "Reads *size* bytes from the remote server. You may override this method." msgstr "" -#: ../../library/imaplib.rst:395 +#: ../../library/imaplib.rst:398 msgid "Reads one line from the remote server. You may override this method." msgstr "" -#: ../../library/imaplib.rst:400 +#: ../../library/imaplib.rst:403 msgid "" "Prompt server for an update. Returned data is ``None`` if no new messages, " "else value of ``RECENT`` response." msgstr "" -#: ../../library/imaplib.rst:406 +#: ../../library/imaplib.rst:409 msgid "Rename mailbox named *oldmailbox* to *newmailbox*." msgstr "" -#: ../../library/imaplib.rst:411 +#: ../../library/imaplib.rst:414 msgid "" "Return data for response *code* if received, or ``None``. Returns the given " "code, instead of the usual type." msgstr "" -#: ../../library/imaplib.rst:417 +#: ../../library/imaplib.rst:420 msgid "" "Search mailbox for matching messages. *charset* may be ``None``, in which " "case no ``CHARSET`` will be specified in the request to the server. The " @@ -494,11 +498,11 @@ msgid "" "`enable` command." msgstr "" -#: ../../library/imaplib.rst:424 +#: ../../library/imaplib.rst:427 msgid "Example::" msgstr "範例: ::" -#: ../../library/imaplib.rst:426 +#: ../../library/imaplib.rst:429 msgid "" "# M is a connected IMAP4 instance...\n" "typ, msgnums = M.search(None, 'FROM', '\"LDJ\"')\n" @@ -507,18 +511,18 @@ msgid "" "typ, msgnums = M.search(None, '(FROM \"LDJ\")')" msgstr "" -#: ../../library/imaplib.rst:435 +#: ../../library/imaplib.rst:438 msgid "" "Select a mailbox. Returned data is the count of messages in *mailbox* " "(``EXISTS`` response). The default *mailbox* is ``'INBOX'``. If the " "*readonly* flag is set, modifications to the mailbox are not allowed." msgstr "" -#: ../../library/imaplib.rst:442 +#: ../../library/imaplib.rst:445 msgid "Sends ``data`` to the remote server. You may override this method." msgstr "" -#: ../../library/imaplib.rst:444 +#: ../../library/imaplib.rst:447 msgid "" "Raises an :ref:`auditing event ` ``imaplib.send`` with arguments " "``self``, ``data``." @@ -526,42 +530,42 @@ msgstr "" "引發一個附帶引數 ``self``、``data`` 的\\ :ref:`稽核事件 ` " "``imaplib.send``。" -#: ../../library/imaplib.rst:449 +#: ../../library/imaplib.rst:452 msgid "" "Set an ``ACL`` for *mailbox*. The method is non-standard, but is supported " "by the ``Cyrus`` server." msgstr "" -#: ../../library/imaplib.rst:455 +#: ../../library/imaplib.rst:458 msgid "" "Set ``ANNOTATION``\\ s for *mailbox*. The method is non-standard, but is " "supported by the ``Cyrus`` server." msgstr "" -#: ../../library/imaplib.rst:461 +#: ../../library/imaplib.rst:464 msgid "" "Set the ``quota`` *root*'s resource *limits*. This method is part of the " "IMAP4 QUOTA extension defined in rfc2087." msgstr "" -#: ../../library/imaplib.rst:467 +#: ../../library/imaplib.rst:470 msgid "" "Close connection established in ``open``. This method is implicitly called " "by :meth:`IMAP4.logout`. You may override this method." msgstr "" -#: ../../library/imaplib.rst:473 +#: ../../library/imaplib.rst:476 msgid "Returns socket instance used to connect to server." msgstr "" -#: ../../library/imaplib.rst:478 +#: ../../library/imaplib.rst:481 msgid "" "The ``sort`` command is a variant of ``search`` with sorting semantics for " "the results. Returned data contains a space separated list of matching " "message numbers." msgstr "" -#: ../../library/imaplib.rst:482 +#: ../../library/imaplib.rst:485 msgid "" "Sort has two arguments before the *search_criterion* argument(s); a " "parenthesized list of *sort_criteria*, and the searching *charset*. Note " @@ -573,39 +577,39 @@ msgid "" "searching criteria. It then returns the numbers of matching messages." msgstr "" -#: ../../library/imaplib.rst:491 ../../library/imaplib.rst:562 +#: ../../library/imaplib.rst:494 ../../library/imaplib.rst:565 msgid "This is an ``IMAP4rev1`` extension command." msgstr "" -#: ../../library/imaplib.rst:496 +#: ../../library/imaplib.rst:499 msgid "" "Send a ``STARTTLS`` command. The *ssl_context* argument is optional and " "should be a :class:`ssl.SSLContext` object. This will enable encryption on " "the IMAP connection. Please read :ref:`ssl-security` for best practices." msgstr "" -#: ../../library/imaplib.rst:503 +#: ../../library/imaplib.rst:506 msgid "" "The method now supports hostname check with :attr:`ssl.SSLContext." "check_hostname` and *Server Name Indication* (see :const:`ssl.HAS_SNI`)." msgstr "" -#: ../../library/imaplib.rst:511 +#: ../../library/imaplib.rst:514 msgid "Request named status conditions for *mailbox*." msgstr "" -#: ../../library/imaplib.rst:516 +#: ../../library/imaplib.rst:519 msgid "" "Alters flag dispositions for messages in mailbox. *command* is specified by " "section 6.4.6 of :rfc:`2060` as being one of \"FLAGS\", \"+FLAGS\", or \"-" "FLAGS\", optionally with a suffix of \".SILENT\"." msgstr "" -#: ../../library/imaplib.rst:520 +#: ../../library/imaplib.rst:523 msgid "For example, to set the delete flag on all messages::" msgstr "" -#: ../../library/imaplib.rst:522 +#: ../../library/imaplib.rst:525 msgid "" "typ, data = M.search(None, 'ALL')\n" "for num in data[0].split():\n" @@ -617,7 +621,7 @@ msgstr "" " M.store(num, '+FLAGS', '\\\\Deleted')\n" "M.expunge()" -#: ../../library/imaplib.rst:529 +#: ../../library/imaplib.rst:532 msgid "" "Creating flags containing ']' (for example: \"[test]\") violates :rfc:`3501` " "(the IMAP protocol). However, imaplib has historically allowed creation of " @@ -629,24 +633,24 @@ msgid "" "are sent from the server, since this improves real-world compatibility." msgstr "" -#: ../../library/imaplib.rst:541 +#: ../../library/imaplib.rst:544 msgid "Subscribe to new mailbox." msgstr "" -#: ../../library/imaplib.rst:546 +#: ../../library/imaplib.rst:549 msgid "" "The ``thread`` command is a variant of ``search`` with threading semantics " "for the results. Returned data contains a space separated list of thread " "members." msgstr "" -#: ../../library/imaplib.rst:549 +#: ../../library/imaplib.rst:552 msgid "" "Thread members consist of zero or more messages numbers, delimited by " "spaces, indicating successive parent and child." msgstr "" -#: ../../library/imaplib.rst:552 +#: ../../library/imaplib.rst:555 msgid "" "Thread has two arguments before the *search_criterion* argument(s); a " "*threading_algorithm*, and the searching *charset*. Note that unlike " @@ -659,7 +663,7 @@ msgid "" "specified threading algorithm." msgstr "" -#: ../../library/imaplib.rst:567 +#: ../../library/imaplib.rst:570 msgid "" "Execute command args with messages identified by UID, rather than message " "number. Returns response appropriate to command. At least one argument " @@ -667,11 +671,11 @@ msgid "" "an exception will be raised." msgstr "" -#: ../../library/imaplib.rst:575 +#: ../../library/imaplib.rst:578 msgid "Unsubscribe from old mailbox." msgstr "" -#: ../../library/imaplib.rst:579 +#: ../../library/imaplib.rst:582 msgid "" ":meth:`imaplib.IMAP4.unselect` frees server's resources associated with the " "selected mailbox and returns the server to the authenticated state. This " @@ -679,46 +683,46 @@ msgid "" "that no messages are permanently removed from the currently selected mailbox." msgstr "" -#: ../../library/imaplib.rst:589 +#: ../../library/imaplib.rst:592 msgid "" "Allow simple extension commands notified by server in ``CAPABILITY`` " "response." msgstr "" -#: ../../library/imaplib.rst:592 +#: ../../library/imaplib.rst:595 msgid "The following attributes are defined on instances of :class:`IMAP4`:" msgstr "" -#: ../../library/imaplib.rst:596 +#: ../../library/imaplib.rst:599 msgid "" "The most recent supported protocol in the ``CAPABILITY`` response from the " "server." msgstr "" -#: ../../library/imaplib.rst:602 +#: ../../library/imaplib.rst:605 msgid "" "Integer value to control debugging output. The initialize value is taken " "from the module variable ``Debug``. Values greater than three trace each " "command." msgstr "" -#: ../../library/imaplib.rst:608 +#: ../../library/imaplib.rst:611 msgid "" "Boolean value that is normally ``False``, but is set to ``True`` if an :meth:" "`enable` command is successfully issued for the ``UTF8=ACCEPT`` capability." msgstr "" -#: ../../library/imaplib.rst:618 +#: ../../library/imaplib.rst:621 msgid "IMAP4 Example" msgstr "IMAP4 範例" -#: ../../library/imaplib.rst:620 +#: ../../library/imaplib.rst:623 msgid "" "Here is a minimal example (without error checking) that opens a mailbox and " "retrieves and prints all messages::" msgstr "" -#: ../../library/imaplib.rst:623 +#: ../../library/imaplib.rst:626 msgid "" "import getpass, imaplib\n" "\n" diff --git a/library/sys.po b/library/sys.po index 4a3bf4a219..d47573d911 100644 --- a/library/sys.po +++ b/library/sys.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-07-07 12:52+0000\n" +"POT-Creation-Date: 2025-08-23 00:15+0000\n" "PO-Revision-Date: 2023-04-26 02:54+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2094,9 +2094,9 @@ msgstr "" #: ../../library/sys.rst:1628 msgid "" "Trace functions should have three arguments: *frame*, *event*, and *arg*. " -"*frame* is the current stack frame. *event* is a string: ``'call'``, " -"``'line'``, ``'return'``, ``'exception'`` or ``'opcode'``. *arg* depends on " -"the event type." +"*frame* is the :ref:`current stack frame `. *event* is a " +"string: ``'call'``, ``'line'``, ``'return'``, ``'exception'`` or " +"``'opcode'``. *arg* depends on the event type." msgstr "" #: ../../library/sys.rst:1633 diff --git a/library/zipfile.po b/library/zipfile.po index b3d90b1c53..72f51531cc 100644 --- a/library/zipfile.po +++ b/library/zipfile.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-03-09 00:13+0000\n" +"POT-Creation-Date: 2025-08-23 00:15+0000\n" "PO-Revision-Date: 2025-06-26 20:00+0800\n" "Last-Translator: Dr-XYZ \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -259,8 +259,8 @@ msgstr "" "*compresslevel* 參數控制寫入檔案到封存時使用的壓縮層級。當使用 :const:" "`ZIP_STORED` 或 :const:`ZIP_LZMA` 時,它沒有效果。當使用 :const:" "`ZIP_DEFLATED` 時,接受整數 ``0`` 到 ``9``\\ (更多資訊請參閱 :class:`zlib " -"`)。當使用 :const:`ZIP_BZIP2` 時,接受整數 ``1`` 到 ``9``" -"\\ (更多資訊請參閱 :class:`bz2 `)。" +"`)。當使用 :const:`ZIP_BZIP2` 時,接受整數 ``1`` 到 " +"``9``\\ (更多資訊請參閱 :class:`bz2 `)。" #: ../../library/zipfile.rst:187 ../../library/zipfile.rst:768 msgid "" @@ -416,9 +416,9 @@ msgid "" "class:`bytes` object." msgstr "" "以二進位類檔案物件的形式存取封存檔案中的一個成員。*name* 可以是封存檔案內的檔" -"案名稱,或是一個 :class:`ZipInfo` 物件。*mode* 參數如果包含,則必須是 ``'r'``" -"\\ (預設值)或 ``'w'``。*pwd* 是用於解密加密 ZIP 檔案的密碼,為一個 :class:" -"`bytes` 物件。" +"案名稱,或是一個 :class:`ZipInfo` 物件。*mode* 參數如果包含,則必須是 " +"``'r'``\\ (預設值)或 ``'w'``。*pwd* 是用於解密加密 ZIP 檔案的密碼,為一個 :" +"class:`bytes` 物件。" #: ../../library/zipfile.rst:285 msgid "" @@ -459,9 +459,9 @@ msgid "" "open, attempting to read or write other files in the ZIP file will raise a :" "exc:`ValueError`." msgstr "" -"在 ``mode='w'`` 時,會回傳一個可寫的檔案控點 (file handle),它支援 :meth:`~io." -"BufferedIOBase.write` 方法。當一個可寫的檔案控點開啟時,嘗試讀取或寫入 ZIP 檔" -"案中的其他檔案將會引發 :exc:`ValueError`。" +"在 ``mode='w'`` 時,會回傳一個可寫的檔案控點 (file handle),它支援 :meth:" +"`~io.BufferedIOBase.write` 方法。當一個可寫的檔案控點開啟時,嘗試讀取或寫入 " +"ZIP 檔案中的其他檔案將會引發 :exc:`ValueError`。" #: ../../library/zipfile.rst:304 msgid "" @@ -592,8 +592,8 @@ msgid "" "\"``. This module attempts to prevent that. See :meth:`extract` note." msgstr "" "絕不要在未經事先檢查的情況下,從不受信任的來源解壓縮封存檔案。檔案有可能被建" -"立在 *path* 之外,例如,成員具有以 ``\"/\"`` 開頭的絕對檔名或帶有兩個點 ``" -"\"..\"`` 的檔名。本模組會試圖防止這種情況。請參閱 :meth:`extract` 的註解。" +"立在 *path* 之外,例如,成員具有以 ``\"/\"`` 開頭的絕對檔名或帶有兩個點 " +"``\"..\"`` 的檔名。本模組會試圖防止這種情況。請參閱 :meth:`extract` 的註解。" #: ../../library/zipfile.rst:382 msgid "" @@ -1184,80 +1184,99 @@ msgid "Name of the file in the archive." msgstr "封存檔案中檔案的名稱。" #: ../../library/zipfile.rst:801 +#, fuzzy msgid "" "The time and date of the last modification to the archive member. This is a " -"tuple of six values:" +"tuple of six values representing the \"last [modified] file time\" and " +"\"last [modified] file date\" fields from the ZIP file's central directory." msgstr "封存成員的最後修改時間和日期。這是一個包含六個值的元組:" #: ../../library/zipfile.rst:805 +msgid "The tuple contains:" +msgstr "" + +#: ../../library/zipfile.rst:808 msgid "Index" msgstr "索引" -#: ../../library/zipfile.rst:805 +#: ../../library/zipfile.rst:808 msgid "Value" msgstr "值" -#: ../../library/zipfile.rst:807 +#: ../../library/zipfile.rst:810 msgid "``0``" msgstr "``0``" -#: ../../library/zipfile.rst:807 +#: ../../library/zipfile.rst:810 msgid "Year (>= 1980)" msgstr "年(>= 1980)" -#: ../../library/zipfile.rst:809 +#: ../../library/zipfile.rst:812 msgid "``1``" msgstr "``1``" -#: ../../library/zipfile.rst:809 +#: ../../library/zipfile.rst:812 msgid "Month (one-based)" msgstr "月(從 1 開始)" -#: ../../library/zipfile.rst:811 +#: ../../library/zipfile.rst:814 msgid "``2``" msgstr "``2``" -#: ../../library/zipfile.rst:811 +#: ../../library/zipfile.rst:814 msgid "Day of month (one-based)" msgstr "日(從 1 開始)" -#: ../../library/zipfile.rst:813 +#: ../../library/zipfile.rst:816 msgid "``3``" msgstr "``3``" -#: ../../library/zipfile.rst:813 +#: ../../library/zipfile.rst:816 msgid "Hours (zero-based)" msgstr "時(從 0 開始)" -#: ../../library/zipfile.rst:815 +#: ../../library/zipfile.rst:818 msgid "``4``" msgstr "``4``" -#: ../../library/zipfile.rst:815 +#: ../../library/zipfile.rst:818 msgid "Minutes (zero-based)" msgstr "分(從 0 開始)" -#: ../../library/zipfile.rst:817 +#: ../../library/zipfile.rst:820 msgid "``5``" msgstr "``5``" -#: ../../library/zipfile.rst:817 +#: ../../library/zipfile.rst:820 msgid "Seconds (zero-based)" msgstr "秒(從 0 開始)" -#: ../../library/zipfile.rst:822 -msgid "The ZIP file format does not support timestamps before 1980." -msgstr "ZIP 檔案格式不支援 1980 年以前的時間戳記。" +#: ../../library/zipfile.rst:825 +msgid "" +"The ZIP format supports multiple timestamp fields in different locations " +"(central directory, extra fields for NTFS/UNIX systems, etc.). This " +"attribute specifically returns the timestamp from the central directory. The " +"central directory timestamp format in ZIP files does not support timestamps " +"before 1980. While some extra field formats (such as UNIX timestamps) can " +"represent earlier dates, this attribute only returns the central directory " +"timestamp." +msgstr "" -#: ../../library/zipfile.rst:827 +#: ../../library/zipfile.rst:832 +msgid "" +"The central directory timestamp is interpreted as representing local time, " +"rather than UTC time, to match the behavior of other zip tools." +msgstr "" + +#: ../../library/zipfile.rst:838 msgid "Type of compression for the archive member." msgstr "封存成員的壓縮型別。" -#: ../../library/zipfile.rst:832 +#: ../../library/zipfile.rst:843 msgid "Comment for the individual archive member as a :class:`bytes` object." msgstr "個別封存成員的註解,為一個 :class:`bytes` 物件。" -#: ../../library/zipfile.rst:837 +#: ../../library/zipfile.rst:848 msgid "" "Expansion field data. The `PKZIP Application Note`_ contains some comments " "on the internal structure of the data contained in this :class:`bytes` " @@ -1266,66 +1285,66 @@ msgstr "" "擴充欄位資料。`PKZIP Application Note`_ 包含一些關於此 :class:`bytes` 物件中" "所含資料內部結構的註解。" -#: ../../library/zipfile.rst:844 +#: ../../library/zipfile.rst:855 msgid "System which created ZIP archive." msgstr "建立 ZIP 封存檔案的系統。" -#: ../../library/zipfile.rst:849 +#: ../../library/zipfile.rst:860 msgid "PKZIP version which created ZIP archive." msgstr "建立 ZIP 封存檔案的 PKZIP 版本。" -#: ../../library/zipfile.rst:854 +#: ../../library/zipfile.rst:865 msgid "PKZIP version needed to extract archive." msgstr "解壓縮封存檔案所需的 PKZIP 版本。" -#: ../../library/zipfile.rst:859 +#: ../../library/zipfile.rst:870 msgid "Must be zero." msgstr "必須為零。" -#: ../../library/zipfile.rst:864 +#: ../../library/zipfile.rst:875 msgid "ZIP flag bits." msgstr "ZIP 旗標位元。" -#: ../../library/zipfile.rst:869 +#: ../../library/zipfile.rst:880 msgid "Volume number of file header." msgstr "檔案標頭的磁碟空間編號。" -#: ../../library/zipfile.rst:874 +#: ../../library/zipfile.rst:885 msgid "Internal attributes." msgstr "內部屬性。" -#: ../../library/zipfile.rst:879 +#: ../../library/zipfile.rst:890 msgid "External file attributes." msgstr "外部檔案屬性。" -#: ../../library/zipfile.rst:884 +#: ../../library/zipfile.rst:895 msgid "Byte offset to the file header." msgstr "到檔案標頭的位元組偏移量。" -#: ../../library/zipfile.rst:889 +#: ../../library/zipfile.rst:900 msgid "CRC-32 of the uncompressed file." msgstr "未壓縮檔案的 CRC-32。" -#: ../../library/zipfile.rst:894 +#: ../../library/zipfile.rst:905 msgid "Size of the compressed data." msgstr "壓縮資料的大小。" -#: ../../library/zipfile.rst:899 +#: ../../library/zipfile.rst:910 msgid "Size of the uncompressed file." msgstr "未壓縮檔案的大小。" -#: ../../library/zipfile.rst:906 +#: ../../library/zipfile.rst:917 msgid "Command-Line Interface" msgstr "命令列介面" -#: ../../library/zipfile.rst:908 +#: ../../library/zipfile.rst:919 msgid "" "The :mod:`zipfile` module provides a simple command-line interface to " "interact with ZIP archives." msgstr "" ":mod:`zipfile` 模組提供了一個簡單的命令列介面,用以與 ZIP 封存檔案互動。" -#: ../../library/zipfile.rst:911 +#: ../../library/zipfile.rst:922 msgid "" "If you want to create a new ZIP archive, specify its name after the :option:" "`-c` option and then list the filename(s) that should be included:" @@ -1333,78 +1352,78 @@ msgstr "" "如果你想建立一個新的 ZIP 封存檔案,請在 :option:`-c` 選項後指定其名稱,然後列" "出應包含的檔名:" -#: ../../library/zipfile.rst:914 +#: ../../library/zipfile.rst:925 msgid "$ python -m zipfile -c monty.zip spam.txt eggs.txt" msgstr "$ python -m zipfile -c monty.zip spam.txt eggs.txt" -#: ../../library/zipfile.rst:918 +#: ../../library/zipfile.rst:929 msgid "Passing a directory is also acceptable:" msgstr "傳遞一個目錄也是可以的:" -#: ../../library/zipfile.rst:920 +#: ../../library/zipfile.rst:931 msgid "$ python -m zipfile -c monty.zip life-of-brian_1979/" msgstr "$ python -m zipfile -c monty.zip life-of-brian_1979/" -#: ../../library/zipfile.rst:924 +#: ../../library/zipfile.rst:935 msgid "" "If you want to extract a ZIP archive into the specified directory, use the :" "option:`-e` option:" msgstr "" "如果你想將一個 ZIP 封存檔案解壓縮到指定的目錄,請使用 :option:`-e` 選項:" -#: ../../library/zipfile.rst:927 +#: ../../library/zipfile.rst:938 msgid "$ python -m zipfile -e monty.zip target-dir/" msgstr "$ python -m zipfile -e monty.zip target-dir/" -#: ../../library/zipfile.rst:931 +#: ../../library/zipfile.rst:942 msgid "For a list of the files in a ZIP archive, use the :option:`-l` option:" msgstr "要列出 ZIP 封存檔案中的檔案,請使用 :option:`-l` 選項:" -#: ../../library/zipfile.rst:933 +#: ../../library/zipfile.rst:944 msgid "$ python -m zipfile -l monty.zip" msgstr "$ python -m zipfile -l monty.zip" -#: ../../library/zipfile.rst:939 +#: ../../library/zipfile.rst:950 msgid "Command-line options" msgstr "命令列選項" -#: ../../library/zipfile.rst:944 +#: ../../library/zipfile.rst:955 msgid "List files in a zipfile." msgstr "列出 zipfile 中的檔案。" -#: ../../library/zipfile.rst:949 +#: ../../library/zipfile.rst:960 msgid "Create zipfile from source files." msgstr "從來源檔案建立 zipfile。" -#: ../../library/zipfile.rst:954 +#: ../../library/zipfile.rst:965 msgid "Extract zipfile into target directory." msgstr "將 zipfile 解壓縮到目標目錄。" -#: ../../library/zipfile.rst:959 +#: ../../library/zipfile.rst:970 msgid "Test whether the zipfile is valid or not." msgstr "測試 zipfile 是否有效。" -#: ../../library/zipfile.rst:963 +#: ../../library/zipfile.rst:974 msgid "" "Specify encoding of member names for :option:`-l`, :option:`-e` and :option:" "`-t`." msgstr "為 :option:`-l`、:option:`-e` 和 :option:`-t` 指定成員名稱的編碼。" -#: ../../library/zipfile.rst:970 +#: ../../library/zipfile.rst:981 msgid "Decompression pitfalls" msgstr "解壓縮的陷阱" -#: ../../library/zipfile.rst:972 +#: ../../library/zipfile.rst:983 msgid "" "The extraction in zipfile module might fail due to some pitfalls listed " "below." msgstr "zipfile 模組中的解壓縮可能會由於下面列出的一些陷阱而失敗。" -#: ../../library/zipfile.rst:975 +#: ../../library/zipfile.rst:986 msgid "From file itself" msgstr "來自檔案本身" -#: ../../library/zipfile.rst:977 +#: ../../library/zipfile.rst:988 msgid "" "Decompression may fail due to incorrect password / CRC checksum / ZIP format " "or unsupported compression method / decryption." @@ -1412,11 +1431,11 @@ msgstr "" "解壓縮可能由於不正確的密碼 / CRC 校驗和 / ZIP 格式或不支援的壓縮方法 / 解密而" "失敗。" -#: ../../library/zipfile.rst:981 +#: ../../library/zipfile.rst:992 msgid "File System limitations" msgstr "檔案系統限制" -#: ../../library/zipfile.rst:983 +#: ../../library/zipfile.rst:994 msgid "" "Exceeding limitations on different file systems can cause decompression " "failed. Such as allowable characters in the directory entries, length of the " @@ -1426,11 +1445,11 @@ msgstr "" "超出不同檔案系統的限制可能導致解壓縮失敗。例如目錄條目中允許的字元、檔名長" "度、路徑名長度、單一檔案的大小以及檔案數量等。" -#: ../../library/zipfile.rst:990 +#: ../../library/zipfile.rst:1001 msgid "Resources limitations" msgstr "資源限制" -#: ../../library/zipfile.rst:992 +#: ../../library/zipfile.rst:1003 msgid "" "The lack of memory or disk volume would lead to decompression failed. For " "example, decompression bombs (aka `ZIP bomb`_) apply to zipfile library that " @@ -1439,11 +1458,11 @@ msgstr "" "記憶體或磁碟空間不足會導致解壓縮失敗。例如,解壓縮炸彈(又稱 `ZIP bomb`_)適" "用於 zipfile 函式庫,可能導致磁碟空間耗盡。" -#: ../../library/zipfile.rst:997 +#: ../../library/zipfile.rst:1008 msgid "Interruption" msgstr "中斷" -#: ../../library/zipfile.rst:999 +#: ../../library/zipfile.rst:1010 msgid "" "Interruption during the decompression, such as pressing control-C or killing " "the decompression process may result in incomplete decompression of the " @@ -1452,11 +1471,11 @@ msgstr "" "在解壓縮過程中斷,例如按下 control-C 或終止解壓縮過程,可能導致封存檔案解壓縮" "不完整。" -#: ../../library/zipfile.rst:1003 +#: ../../library/zipfile.rst:1014 msgid "Default behaviors of extraction" msgstr "解壓縮的預設行為" -#: ../../library/zipfile.rst:1005 +#: ../../library/zipfile.rst:1016 msgid "" "Not knowing the default extraction behaviors can cause unexpected " "decompression results. For example, when extracting the same archive twice, " @@ -1464,3 +1483,6 @@ msgid "" msgstr "" "不了解預設的解壓縮行為可能導致非預期的解壓縮結果。例如,當兩次解壓縮同一個封" "存檔案時,它會不經詢問就覆寫檔案。" + +#~ msgid "The ZIP file format does not support timestamps before 1980." +#~ msgstr "ZIP 檔案格式不支援 1980 年以前的時間戳記。"