diff --git a/c-api/dict.po b/c-api/dict.po index 047f4ecc52..38af0fac7c 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -150,10 +150,9 @@ msgid "If the key is missing, set *\\*result* to ``NULL`` and return ``0``." msgstr "如果鍵不存在,將 *\\*result* 設為 ``NULL`` 並回傳 ``0``。" #: ../../c-api/dict.rst:136 -#, fuzzy msgid "" "On error, raise an exception, set *\\*result* to ``NULL`` and return ``-1``." -msgstr "錯誤發生時,引發一個例外並回傳 ``-1``。" +msgstr "錯誤發生時,引發一個例外,將 *\\*result* 設為 ``NULL`` 並回傳 ``-1``。" #: ../../c-api/dict.rst:145 msgid "See also the :c:func:`PyObject_GetItem` function." diff --git a/c-api/unicode.po b/c-api/unicode.po index 1b3f8c7366..afa44298af 100644 --- a/c-api/unicode.po +++ b/c-api/unicode.po @@ -1021,11 +1021,10 @@ msgid "" msgstr "" #: ../../c-api/unicode.rst:752 -#, fuzzy msgid "" "Return the number of written characters, or return ``-1`` and raise an " "exception on error." -msgstr "成功時回傳字元,發生錯誤時設定例外並回傳 ``-1``。" +msgstr "回傳已寫入的字元數,發生錯誤時引發例外並回傳 ``-1``。" #: ../../c-api/unicode.rst:761 msgid "" @@ -1464,7 +1463,6 @@ msgid "" msgstr "" #: ../../c-api/unicode.rst:1163 ../../c-api/unicode.rst:1185 -#, fuzzy msgid "The return type is now ``const char *`` rather than ``char *``." msgstr "回傳型別現在是 ``const char *`` 而不是 ``char *``。" diff --git a/library/ast.po b/library/ast.po index 78f73b3461..9ad1803d84 100644 --- a/library/ast.po +++ b/library/ast.po @@ -821,7 +821,6 @@ msgid "" msgstr "" #: ../../library/ast.rst:288 -#, fuzzy msgid "" ">>> print(ast.dump(ast.parse('123', mode='eval'), indent=4))\n" "Expression(\n" @@ -830,13 +829,12 @@ msgid "" "Expression(\n" " body=Constant(value='hello', kind='u'))" msgstr "" -">>> print(ast.dump(ast.parse('{1, 2, 3}', mode='eval'), indent=4))\n" +">>> print(ast.dump(ast.parse('123', mode='eval'), indent=4))\n" "Expression(\n" -" body=Set(\n" -" elts=[\n" -" Constant(value=1),\n" -" Constant(value=2),\n" -" Constant(value=3)]))" +" body=Constant(value=123))\n" +">>> print(ast.dump(ast.parse(\"u'hello'\", mode='eval'), indent=4))\n" +"Expression(\n" +" body=Constant(value='hello', kind='u'))" #: ../../library/ast.rst:300 msgid "" diff --git a/library/base64.po b/library/base64.po index c9aab4d6ee..8751ab62cc 100644 --- a/library/base64.po +++ b/library/base64.po @@ -27,7 +27,6 @@ msgid "**Source code:** :source:`Lib/base64.py`" msgstr "**原始碼:** :source:`Lib/base64.py`" #: ../../library/base64.rst:16 -#, fuzzy msgid "" "This module provides functions for encoding binary data to printable ASCII " "characters and decoding such encodings back to binary data. This includes " @@ -38,7 +37,9 @@ msgid "" msgstr "" "這個模組提供將二進位資料編碼成可顯示 ASCII 字元以及解碼回原始資料的功能。這包" "括了 :rfc:`4648` 中\\ :ref:`指定的編碼 `\\ (Base64、Base32 " -"和 Base16)和非標準的 :ref:`Base85 編碼 `。" +"和 Base16)、`PDF 2.0 `_ 中指定的" +":ref:`Base85 編碼 `,以及其他地方使用的 Base85 非標準變" +"體。" #: ../../library/base64.rst:24 msgid "" @@ -362,15 +363,14 @@ msgstr "" "傳編碼後的 :class:`bytes`。" #: ../../library/base64.rst:224 -#, fuzzy msgid "" "*foldspaces* is an optional flag that uses the special short sequence 'y' " "instead of 4 consecutive spaces (ASCII 0x20) as supported by 'btoa'. This " "feature is not supported by the standard encoding used in PDF." msgstr "" "*foldspaces* 是一個可選的旗標,它使用特殊的短序列 'y' 來替代連續的 4 個空格 " -"(ASCII 0x20),這是由 'btoa' 支援的功能。這個特性不被「標準」的 Ascii85 編碼所" -"支援。" +"(ASCII 0x20),這是由 'btoa' 支援的功能。這個特性不被 PDF 中使用的標準編碼所支" +"援。" #: ../../library/base64.rst:228 msgid "" @@ -406,14 +406,14 @@ msgstr "" "ASCII 字串 *b*,並回傳解碼後的 :class:`bytes`。" #: ../../library/base64.rst:251 -#, fuzzy msgid "" "*foldspaces* is a flag that specifies whether the 'y' short sequence should " "be accepted as shorthand for 4 consecutive spaces (ASCII 0x20). This feature " "is not supported by the standard Ascii85 encoding used in PDF and PostScript." msgstr "" "*foldspaces* 是一個旗標,指定是否應該將短序列 'y' 視為 4 個連續的空格 (ASCII " -"0x20) 的簡寫。這個功能不受「標準」Ascii85 編碼的支援。" +"0x20) 的簡寫。這個功能不受 PDF 和 PostScript 中使用的標準 Ascii85 編碼的支" +"援。" #: ../../library/base64.rst:256 msgid "" @@ -448,22 +448,20 @@ msgid "" msgstr "" #: ../../library/base64.rst:283 -#, fuzzy msgid "" "Decode the base85-encoded :term:`bytes-like object` or ASCII string *b* and " "return the decoded :class:`bytes`." msgstr "" -"解碼經過 Ascii85 編碼的\\ :term:`類位元組物件 `\\ 或 " -"ASCII 字串 *b*,並回傳解碼後的 :class:`bytes`。" +"解碼經過 base85 編碼的\\ :term:`類位元組物件 `\\ 或 ASCII " +"字串 *b*,並回傳解碼後的 :class:`bytes`。" #: ../../library/base64.rst:291 -#, fuzzy msgid "" "Encode the :term:`bytes-like object` *s* using Z85 (as used in ZeroMQ) and " "return the encoded :class:`bytes`." msgstr "" -"使用 Base64 對\\ :term:`類位元組物件 ` *s* 進行編碼並回傳" -"編碼過的 :class:`bytes`。" +"使用 Z85(如用於 ZeroMQ)對\\ :term:`類位元組物件 ` *s* 進" +"行編碼,並回傳編碼後的 :class:`bytes`。" #: ../../library/base64.rst:294 msgid "" @@ -474,13 +472,12 @@ msgid "" msgstr "" #: ../../library/base64.rst:304 -#, fuzzy msgid "" "Decode the Z85-encoded :term:`bytes-like object` or ASCII string *s* and " "return the decoded :class:`bytes`." msgstr "" -"解碼經過 Ascii85 編碼的\\ :term:`類位元組物件 `\\ 或 " -"ASCII 字串 *b*,並回傳解碼後的 :class:`bytes`。" +"解碼經 Z85 編碼的\\ :term:`類位元組物件 `\\ 或 ASCII 字串 " +"*s*,並回傳解碼後的 :class:`bytes`。" #: ../../library/base64.rst:313 msgid "Legacy Interface" diff --git a/library/calendar.po b/library/calendar.po index 0cba01ab28..f2093fb3c6 100644 --- a/library/calendar.po +++ b/library/calendar.po @@ -661,12 +661,12 @@ msgid "The :mod:`!calendar` module defines the following exceptions:" msgstr ":mod:`!calendar` 模組定義了以下例外:" #: ../../library/calendar.rst:547 -#, fuzzy msgid "" "A subclass of :exc:`ValueError` and :exc:`IndexError`, raised when the given " "month number is outside of the range 1-12 (inclusive)." msgstr "" -":exc:`ValueError` 的子類別,當給定的月份數字超出 1-12 範圍(含)時引發。" +":exc:`ValueError` 和 :exc:`IndexError` 的子類別,當給定的月份數字超出 1-12 範" +"圍(含)時引發。" #: ../../library/calendar.rst:550 msgid "" diff --git a/library/codecs.po b/library/codecs.po index db4198b550..9a1e9e8354 100644 --- a/library/codecs.po +++ b/library/codecs.po @@ -1616,9 +1616,8 @@ msgid "cp858" msgstr "cp858" #: ../../library/codecs.rst:1155 -#, fuzzy msgid "858, IBM00858" -msgstr "858, IBM858" +msgstr "858, IBM00858" #: ../../library/codecs.rst:1157 msgid "cp860" diff --git a/library/dataclasses.po b/library/dataclasses.po index b49f3c7f39..25a63d685c 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -977,14 +977,13 @@ msgid "" msgstr "" #: ../../library/dataclasses.rst:499 -#, fuzzy msgid "" "Return ``True`` if its parameter is a dataclass (including subclasses of a " "dataclass, but not including :ref:`generic aliases `) or " "an instance of one, otherwise return ``False``." msgstr "" -"如果它的參數是一個資料類別(包含一個資料類別的子類別)或一個實例則回傳 " -"``True``,否則回傳 ``False``。" +"如果它的參數是一個資料類別(包含一個資料類別的子類別,但不包含\\ :ref:`通用別" +"名 `)或一個實例則回傳 ``True``,否則回傳 ``False``。" #: ../../library/dataclasses.rst:503 #, fuzzy diff --git a/library/gc.po b/library/gc.po index 796b0d55d9..c94ba0a6a4 100644 --- a/library/gc.po +++ b/library/gc.po @@ -63,16 +63,15 @@ msgid "Return ``True`` if automatic collection is enabled." msgstr "如果啟用了自動回收則回傳 ``True``。" #: ../../library/gc.rst:43 -#, fuzzy msgid "" "With no arguments, run a full collection. The optional argument " "*generation* may be an integer specifying which generation to collect (from " "0 to 2). A :exc:`ValueError` is raised if the generation number is invalid. " "The sum of collected objects and uncollectable objects is returned." msgstr "" -"啟動垃圾回收。可選的引數 *generation* 可以是一個指明需要回收哪一代垃圾的整數" -"(從 0 到 2)。當 generation 數值無效時,會引發 :exc:`ValueError` 例外。可回" -"收物件與不可回收物件的總和會被回傳。" +"不帶引數執行完整的垃圾回收。可選的引數 *generation* 可以是一個指明需要回" +"收哪一代垃圾的整數(從 0 到 2)。當 generation 數值無效時,會引發 :exc:" +"`ValueError` 例外。可回收物件與不可回收物件的總和會被回傳。" #: ../../library/gc.rst:48 msgid "" @@ -96,9 +95,8 @@ msgid "``generation=1`` performs an increment of collection." msgstr "``generation=1`` 會執行增量收集。" #: ../../library/gc.rst:59 -#, fuzzy msgid "``generation=1`` performs collection of the middle generation." -msgstr "``generation=1`` 會執行增量收集。" +msgstr "``generation=1`` 會執行中間代的回收。" #: ../../library/gc.rst:65 msgid "" @@ -114,14 +112,13 @@ msgid "Return the debugging flags currently set." msgstr "回傳目前設置的除錯旗標。" #: ../../library/gc.rst:77 -#, fuzzy msgid "" "Returns a list of all objects tracked by the collector, excluding the list " "returned. If *generation* is not ``None``, return only the objects tracked " "by the collector that are in that generation." msgstr "" "回傳一個包含回收器正在追蹤的所有物件的 list,除去所回傳的 list。如果 " -"*generation* 不為 ``None``,只回傳以下物件。" +"*generation* 不為 ``None``,只回傳在該代中由回收器追蹤的物件。" #: ../../library/gc.rst:81 msgid "New *generation* parameter." @@ -179,7 +176,6 @@ msgid "" msgstr "設定垃圾回收閾值(回收頻率)。 將 *threshold0* 設為零會停止回收。" #: ../../library/gc.rst:116 -#, fuzzy msgid "" "The GC classifies objects into three generations depending on how many " "collection sweeps they have survived. New objects are placed in the " @@ -199,14 +195,15 @@ msgid "" "information." msgstr "" "垃圾回收器會根據物件在多少次垃圾回收後仍倖存來把所有物件分類為三代。新建物件" -"會被放在最年輕代(第 ``0`` 代)。 如果一個物件在一次垃圾回收後倖存,它會被移" -"入下一個較老代。由於第 ``2`` 代是最老代,這一代的物件在一次垃圾回收後仍會保留" -"原樣。為了確定何時要執行,垃圾回收器會追蹤自上一次回收後物件分配和釋放的數" -"量。當分配數量減去釋放數量的結果大於 *threshold0* 時,垃圾回收就會開始。初始" -"時只有第 ``0`` 代會被檢查。如果自第 ``1`` 代被檢查後第 ``0`` 代已被檢查超過 " +"會被放在最年輕代(第 ``0`` 代)。如果一個物件在一次垃圾回收後倖存,它會被移入" +"下一個較老代。由於第 ``2`` 代是最老代,這一代的物件在一次垃圾回收後仍會保留原" +"樣。為了確定何時要執行,垃圾回收器會追蹤自上一次回收後物件分配和釋放的數量。" +"當分配數量減去釋放數量的結果大於 *threshold0* 時,垃圾回收就會開始。初始時只" +"有第 ``0`` 代會被檢查。如果自第 ``1`` 代被檢查後第 ``0`` 代已被檢查超過 " "*threshold1* 次,則第 ``1`` 代也會被檢查。對於第三代來說,情況還會更復雜一" -"些,請參閱 `Collecting the oldest generation `_ 來了解詳情。" +"些,請參閱 `Collecting the oldest generation `_ 來了解詳情。" #: ../../library/gc.rst:130 msgid "" diff --git a/library/html.parser.po b/library/html.parser.po index f379b9af46..8cafbe69df 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -235,7 +235,6 @@ msgid "" msgstr "呼叫此方法來處理元素的開始標籤(例如 ``
``)。" #: ../../library/html.parser.rst:140 -#, fuzzy msgid "" "The *tag* argument is the name of the tag converted to lower case. The " "*attrs* argument is a list of ``(name, value)`` pairs containing the " @@ -246,7 +245,7 @@ msgid "" msgstr "" "*tag* 引數是轉換為小寫的標籤名稱。 *attrs* 引數是一個 ``(name, value)`` 對的" "列表,包含在標籤的 ``<>`` 括號內找到的屬性。 *name* 將被轉成小寫,*value* 中" -"的引號會被刪除,字元和實體參照也會被替換。" +"的引號會被刪除,字元和實體參照也會被替換。對於空屬性,*value* 為 ``None``。" #: ../../library/html.parser.rst:146 msgid "" diff --git a/library/itertools.po b/library/itertools.po index ec3498485e..e84b9172cc 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -1808,7 +1808,6 @@ msgstr "" "term:`產生器 `,則能保持高速度。" #: ../../library/itertools.rst:831 -#, fuzzy msgid "" "from itertools import (accumulate, batched, chain, combinations, compress,\n" " count, cycle, filterfalse, groupby, islice, permutations, product,\n" @@ -2182,6 +2181,7 @@ msgstr "" "from collections import Counter, deque\n" "from contextlib import suppress\n" "from functools import reduce\n" +"from heapq import heappush, heappushpop, heappush_max, heappushpop_max\n" "from math import comb, isqrt, prod, sumprod\n" "from operator import getitem, is_not, itemgetter, mul, neg, truediv\n" "\n" @@ -2197,11 +2197,6 @@ msgstr "" " # prepend(1, [2, 3, 4]) → 1 2 3 4\n" " return chain([value], iterable)\n" "\n" -"def running_mean(iterable):\n" -" \"產生到目前為止所有值的平均值。\"\n" -" # running_mean([8.5, 9.5, 7.5, 6.5]) → 8.5 9.0 8.5 8.0\n" -" return map(truediv, accumulate(iterable), count(1))\n" -"\n" "def repeatfunc(function, times=None, *args):\n" " \"重複呼叫一個帶指定引數的函式。\"\n" " if times is None:\n" @@ -2497,4 +2492,47 @@ msgstr "" " # totient(12) → 4 因為 len([1, 5, 7, 11]) == 4\n" " for prime in set(factor(n)):\n" " n -= n // prime\n" -" return n" +" return n\n" +"\n" +"\n" +"# ==== 執行統計 ====\n" +"\n" +"def running_mean(iterable):\n" +" \"到目前為止所見值的平均值。\"\n" +" # running_mean([37, 33, 38, 28]) → 37 35 36 34\n" +" return map(truediv, accumulate(iterable), count(1))\n" +"\n" +"def running_min(iterable):\n" +" \"到目前為止所見值中最小的。\"\n" +" # running_min([37, 33, 38, 28]) → 37 33 33 28\n" +" return accumulate(iterable, func=min)\n" +"\n" +"def running_max(iterable):\n" +" \"到目前為止所見值中最大的。\"\n" +" # running_max([37, 33, 38, 28]) → 37 37 38 38\n" +" return accumulate(iterable, func=max)\n" +"\n" +"def running_median(iterable):\n" +" \"到目前為止所見值的中位數。\"\n" +" # running_median([37, 33, 38, 28]) → 37 35 37 35\n" +" read = iter(iterable).__next__\n" +" lo = [] # max-heap\n" +" hi = [] # min-heap the same size as or one smaller than lo\n" +" with suppress(StopIteration):\n" +" while True:\n" +" heappush_max(lo, heappushpop(hi, read()))\n" +" yield lo[0]\n" +" heappush(hi, heappushpop_max(lo, read()))\n" +" yield (lo[0] + hi[0]) / 2\n" +"\n" +"def running_statistics(iterable):\n" +" \"到目前為止所見值的彙總統計。\"\n" +" # 產生元組:(大小, 最小值, 中位數, 最大值, 平均值)\n" +" t0, t1, t2, t3 = tee(iterable, 4)\n" +" return zip(\n" +" count(1),\n" +" running_min(t0),\n" +" running_median(t1),\n" +" running_max(t2),\n" +" running_mean(t3),\n" +" )" diff --git a/library/pickle.po b/library/pickle.po index dbff83b1a7..6d3ab10512 100644 --- a/library/pickle.po +++ b/library/pickle.po @@ -106,16 +106,15 @@ msgid "" msgstr ":mod:`!pickle` 和 :mod:`marshal` 有幾個明顯不同的地方:" #: ../../library/pickle.rst:59 -#, fuzzy msgid "" ":mod:`marshal` cannot be used to serialize user-defined classes and their " "instances. :mod:`!pickle` can save and restore class instances " "transparently, however the class definition must be importable and live in " "the same module as when the object was pickled." msgstr "" -":mod:`marshal` 無法序列化使用者自訂的類別和的實例。:mod:`!pickle` 則可以讓使" -"用者儲存並還原自訂的類別實例,前提是儲存時該類別的定義存在於與要被儲存的物件" -"所在的模組中、且可以被引入(import)。" +":mod:`marshal` 無法序列化使用者自訂的類別及其實例。:mod:`!pickle` 則可以讓使" +"用者儲存並還原自訂的類別實例,前提是儲存時該類別的定義存在於與要被 pickle 的" +"物件所在的模組中、且可以被引入(import)。" #: ../../library/pickle.rst:64 msgid "" @@ -1254,7 +1253,6 @@ msgstr "" "個元組(元組一般而言是較佳的選擇;所回傳的物件通常稱為「縮減值」)。" #: ../../library/pickle.rst:696 -#, fuzzy 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 " @@ -1265,8 +1263,10 @@ msgid "" "behaviour is typically useful for singletons." msgstr "" "如果回傳的是字串,該字串應被解讀為一個全域變數的名稱。它應是該物件相對其所在" -"模組的本地名稱;pickle 模組會在模組命名空間中尋找,以確定該物件所在的模組。這" -"種行為通常對於單例物件特別有用。" +"模組的本地名稱;pickle 模組會在模組命名空間中尋找,以確定該物件所在的模組:對" +"於要被 pickle 的指定 ``obj``,會直接在 ``obj`` 上查找 ``__module__`` 屬性,若" +"沒有設定 ``__module__`` 實例屬性,則退而查找 ``obj`` 的型別。這種行為通常對於" +"單例物件特別有用。" #: ../../library/pickle.rst:704 msgid "" diff --git a/library/select.po b/library/select.po index 453b63b255..e7f1afbb70 100644 --- a/library/select.po +++ b/library/select.po @@ -361,9 +361,8 @@ msgid ":const:`EPOLLOUT`" msgstr ":const:`EPOLLOUT`" #: ../../library/select.rst:299 -#, fuzzy msgid "Available for write." -msgstr "可用性" +msgstr "可供寫入。" #: ../../library/select.rst:301 msgid ":const:`EPOLLPRI`" @@ -447,9 +446,8 @@ msgid ":const:`EPOLLWRNORM`" msgstr ":const:`EPOLLWRNORM`" #: ../../library/select.rst:325 -#, fuzzy msgid "Equivalent to :const:`EPOLLOUT`." -msgstr "等價於 :const:`EPOLLOUT`" +msgstr "等價於 :const:`EPOLLOUT`。" #: ../../library/select.rst:327 msgid ":const:`EPOLLWRBAND`" diff --git a/library/stdtypes.po b/library/stdtypes.po index 03e5e37eba..53a8f40e67 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -8332,7 +8332,6 @@ msgstr "" "種 :ref:`re.Match ` 物件。" #: ../../library/stdtypes.rst:5784 -#, fuzzy msgid "" "``GenericAlias`` objects are instances of the class :class:`types." "GenericAlias`, which can also be used to create ``GenericAlias`` objects " @@ -8341,7 +8340,9 @@ msgid "" "provide similar functionality." msgstr "" "``GenericAlias`` 物件是 :class:`types.GenericAlias` 類別的實例,也可以用來直" -"接建立 ``GenericAlias`` 物件。" +"接建立 ``GenericAlias`` 物件。使用者自訂\\ :ref:`通用類別 `\\ 的特化可能不是 :class:`types.GenericAlias` 的實例,但它們提供類似" +"的功能。" #: ../../library/stdtypes.rst:5791 msgid "" diff --git a/library/struct.po b/library/struct.po index 0e89d56727..4f836242e2 100644 --- a/library/struct.po +++ b/library/struct.po @@ -446,9 +446,8 @@ msgstr ":c:expr:`signed char`" #: ../../library/struct.rst:248 ../../library/struct.rst:250 #: ../../library/struct.rst:253 ../../library/struct.rst:255 #: ../../library/struct.rst:271 -#, fuzzy msgid "int" -msgstr "整數" +msgstr "int" #: ../../library/struct.rst:230 ../../library/struct.rst:232 #: ../../library/struct.rst:236 ../../library/struct.rst:238 @@ -571,9 +570,8 @@ msgid ":c:type:`ssize_t`" msgstr ":c:type:`ssize_t`" #: ../../library/struct.rst:253 ../../library/struct.rst:255 -#, fuzzy msgid "\\(2), \\(3)" -msgstr "\\(1), \\(2)" +msgstr "\\(2), \\(3)" #: ../../library/struct.rst:255 msgid "``N``" @@ -681,9 +679,8 @@ msgid ":c:expr:`void \\*`" msgstr ":c:expr:`void \\*`" #: ../../library/struct.rst:271 -#, fuzzy msgid "\\(2), \\(5)" -msgstr "\\(1), \\(2)" +msgstr "\\(2), \\(5)" #: ../../library/struct.rst:274 msgid "Added support for the ``'n'`` and ``'N'`` formats." @@ -785,7 +782,6 @@ msgid "When packing, ``'x'`` inserts one NUL byte." msgstr "打包時,``'x'`` 插入一個 NUL 位元組。" #: ../../library/struct.rst:342 -#, fuzzy msgid "" "The ``'p'`` format character encodes a \"Pascal string\", meaning a short " "variable-length string stored in a *fixed number of bytes*, given by the " @@ -801,14 +797,14 @@ msgid "" msgstr "" "``'p'`` 格式字元編碼一個「Pascal 字串」,意思是儲存在\\ *固定位元組數*\\ 中的" "短、長度可變字串,由計數指定。儲存的第一個位元組是字串的長度,或與 255 間取較" -"小者。字串的位元組在其後。如果傳遞給 :func:`pack` 的字串太長(長於計數減 " -"1),則只儲存字串的前 ``count-1`` 個位元組。如果字串短於 ``count-1``,則用空" -"位元組填充,使得總共使用恰好 count 個位元組。請注意,對於 :func:`unpack`, " -"``'p'`` 格式字元消耗 ``count`` 個位元組,但回傳的字串永遠不能包含超過 255 個" -"位元組。" +"小者。字串的位元組在其後。如果傳遞給 :func:`pack` 的位元組字串太長(長於計數" +"減 1),則只儲存字串的前 ``count-1`` 個位元組。如果位元組字串短於 " +"``count-1``,則用空位元組填充,使得總共使用恰好 count 個位元組。請注意,對" +"於 :func:`unpack`,``'p'`` 格式字元消耗 ``count`` 個位元組,但回傳的 :class:" +"`!bytes` 物件永遠不能包含超過 255 個位元組。打包時,接受 :class:`bytes` 和 :" +"class:`bytearray` 型別的引數。" #: ../../library/struct.rst:356 -#, fuzzy msgid "" "For the ``'s'`` format character, the count is interpreted as the length of " "the byte string, not a repeat count like for the other format characters; " @@ -824,13 +820,14 @@ msgid "" "characters). When packing, arguments of types :class:`bytes` and :class:" "`bytearray` are accepted." msgstr "" -"對於 ``'s'`` 格式字元,計數被直譯為位元組的長度,而不是像其他格式字元那樣的重" -"複次數;例如,``'10s'`` 表示一個 10 位元組字串,對應於單一 Python 位元組字" -"串,而 ``'10c'`` 表示 10 個獨立的單位元組字元元素(例如 ``cccccccccc``),對" -"應於十個不同的 Python 位元組物件。(請參見 :ref:`struct-examples` 以了解具體" -"差異的示範。)如果未給定計數,則預設為 1。打包時,會適當地截斷或用空位元組填" -"充字串以使其適合。解包時,結果位元組物件總是恰好具有指定的位元組數。作為特殊" -"情況,``'0s'`` 表示單一空字串(而 ``'0c'`` 表示 0 個字元)。" +"對於 ``'s'`` 格式字元,計數被直譯為位元組字串的長度,而不是像其他格式字元那樣" +"的重複次數;例如,``'10s'`` 表示一個 10 位元組字串,對應於單一 Python 位元組" +"字串,而 ``'10c'`` 表示 10 個獨立的單位元組字元元素(例如 ``cccccccccc``)," +"對應於十個不同的 Python 位元組物件。(請參見 :ref:`struct-examples` 以了解具" +"體差異的示範。)如果未給定計數,則預設為 1。打包時,會適當地截斷或用空位元組" +"填充位元組字串以使其適合。解包時,結果\\ :class:`!bytes` 物件總是恰好具有指定" +"的位元組數。作為特殊情況,``'0s'`` 表示單一空位元組字串(而 ``'0c'`` 表示 0 " +"個字元)。打包時,接受 :class:`bytes` 和 :class:`bytearray` 型別的引數。" #: ../../library/struct.rst:372 msgid "" diff --git a/library/typing.po b/library/typing.po index d2e4e0e935..72a20aec52 100644 --- a/library/typing.po +++ b/library/typing.po @@ -5549,7 +5549,6 @@ msgid "Determine if a type is a :class:`Protocol`." msgstr "確定一個型別是否 :class:`Protocol`。" #: ../../library/typing.rst:3485 -#, fuzzy msgid "" "class P(Protocol):\n" " def a(self) -> str: ...\n" @@ -5562,8 +5561,8 @@ msgstr "" " def a(self) -> str: ...\n" " b: int\n" "\n" -"is_protocol(P) # => True\n" -"is_protocol(int) # => False" +"assert is_protocol(P)\n" +"assert not is_protocol(int)" #: ../../library/typing.rst:3494 msgid "" @@ -5572,7 +5571,6 @@ msgid "" msgstr "" #: ../../library/typing.rst:3497 -#, fuzzy msgid "" "class GenericP[T](Protocol):\n" " def a(self) -> T: ...\n" @@ -5580,12 +5578,11 @@ msgid "" "\n" "assert not is_protocol(GenericP[int])" msgstr "" -"class P(Protocol):\n" -" def a(self) -> str: ...\n" +"class GenericP[T](Protocol):\n" +" def a(self) -> T: ...\n" " b: int\n" "\n" -"is_protocol(P) # => True\n" -"is_protocol(int) # => False" +"assert not is_protocol(GenericP[int])" #: ../../library/typing.rst:3509 msgid "Check if a type is a :class:`TypedDict`." diff --git a/library/unittest.po b/library/unittest.po index ef0d4bee1b..833941f3e0 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -2077,18 +2077,16 @@ msgid ":meth:`assertHasAttr(a, b) `" msgstr ":meth:`assertHasAttr(a, b) `" #: ../../library/unittest.rst:1240 -#, fuzzy msgid "``hasattr(a, b)``" -msgstr "``hastattr(a, b)``" +msgstr "``hasattr(a, b)``" #: ../../library/unittest.rst:1243 msgid ":meth:`assertNotHasAttr(a, b) `" msgstr ":meth:`assertNotHasAttr(a, b) `" #: ../../library/unittest.rst:1243 -#, fuzzy msgid "``not hasattr(a, b)``" -msgstr "``not hastattr(a, b)``" +msgstr "``not hasattr(a, b)``" #: ../../library/unittest.rst:1251 msgid "" diff --git a/library/urllib.robotparser.po b/library/urllib.robotparser.po index d03148a97f..a7b67d337b 100644 --- a/library/urllib.robotparser.po +++ b/library/urllib.robotparser.po @@ -29,17 +29,15 @@ msgid "**Source code:** :source:`Lib/urllib/robotparser.py`" msgstr "**原始碼:**\\ :source:`Lib/urllib/robotparser.py`" #: ../../library/urllib.robotparser.rst:20 -#, fuzzy msgid "" "This module provides a single class, :class:`RobotFileParser`, which answers " "questions about whether or not a particular user agent can fetch a URL on " "the website that published the :file:`robots.txt` file. For more details on " "the structure of :file:`robots.txt` files, see :rfc:`9309`." msgstr "" -"此模組 (module) 提供了一個單獨的類別 (class) \\ :class:`RobotFileParser`,它" -"可以知道某個特定 user agent(使用者代理)是否能在有發布 :file:`robots.txt` 文" -"件的網站 fetch(擷取)特定 URL。有關 :file:`robots.txt` 文件結構的更多細節," -"請參閱 http://www.robotstxt.org/orig.html。" +"此模組提供了一個單獨的類別\\ :class:`RobotFileParser`,它可以知道某個特定 " +"user agent(使用者代理)是否能在有發布 :file:`robots.txt` 文件的網站擷取特定 " +"URL。有關 :file:`robots.txt` 文件結構的更多細節,請參閱 :rfc:`9309`。" #: ../../library/urllib.robotparser.rst:28 msgid "" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index f2e2867f32..5dc7718bc4 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -1052,13 +1052,13 @@ msgid "find a module, loading and initializing it if necessary" msgstr "找到一個模組,如有必要則載入並初始化它" #: ../../reference/simple_stmts.rst:763 -#, fuzzy msgid "" "define a name or names in the current namespace for the scope where the :" "keyword:`import` statement occurs, just as an assignment statement would " "(including :keyword:`global` and :keyword:`nonlocal` semantics)." msgstr "" -"在 :keyword:`import` 陳述式出現的作用域的區域命名空間中定義一個或多個名稱。" +"在 :keyword:`import` 陳述式出現的作用域中定義一個或多個名稱,就如同賦值陳述式" +"一樣(包括 :keyword:`global` 和 :keyword:`nonlocal` 語意)。" #: ../../reference/simple_stmts.rst:767 msgid "" @@ -1149,13 +1149,12 @@ msgid "if the attribute is not found, :exc:`ImportError` is raised." msgstr "如果找不到該屬性,則會引發 :exc:`ImportError`。" #: ../../reference/simple_stmts.rst:810 -#, fuzzy msgid "" "otherwise, a reference to that value is stored in the current namespace, " "using the name in the :keyword:`!as` clause if it is present, otherwise " "using the attribute name" msgstr "" -"否則,對該值的參照會儲存在區域命名空間中,如果存在 :keyword:`!as` 子句則使用" +"否則,對該值的參照會儲存在目前的命名空間中,如果存在 :keyword:`!as` 子句則使用" "其中的名稱,否則使用屬性名稱" #: ../../reference/simple_stmts.rst:814 diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index 594fe3f582..5ae1647e9d 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -22,7 +22,6 @@ msgstr "" "X-Generator: Poedit 2.4.3\n" #: ../../tutorial/stdlib2.rst:5 -#, fuzzy msgid "Brief tour of the standard library --- part II" msgstr "Python 標準函式庫概覽——第二部份" @@ -35,9 +34,8 @@ msgstr "" "中。" #: ../../tutorial/stdlib2.rst:14 -#, fuzzy msgid "Output formatting" -msgstr "輸出格式化 (Output Formatting)" +msgstr "輸出格式化 (Output formatting)" #: ../../tutorial/stdlib2.rst:16 msgid "" @@ -292,9 +290,8 @@ msgstr "" "XML 檔案、純文字報表和 HTML 網路報表替換自訂的模板。" #: ../../tutorial/stdlib2.rst:134 -#, fuzzy msgid "Working with binary data record layouts" -msgstr "二進制資料記錄編排 (Binary Data Record Layouts)" +msgstr "二進制資料記錄編排 (Binary data record layouts)" #: ../../tutorial/stdlib2.rst:136 msgid "" @@ -379,7 +376,6 @@ msgstr "" "繼續運行: ::" #: ../../tutorial/stdlib2.rst:177 -#, fuzzy msgid "" "import threading, zipfile\n" "\n" @@ -405,14 +401,13 @@ msgstr "" "\n" "class AsyncZip(threading.Thread):\n" " def __init__(self, infile, outfile):\n" -" threading.Thread.__init__(self)\n" +" super().__init__()\n" " self.infile = infile\n" " self.outfile = outfile\n" "\n" " def run(self):\n" -" f = zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED)\n" -" f.write(self.infile)\n" -" f.close()\n" +" with zipfile.ZipFile(self.outfile, 'w', zipfile.ZIP_DEFLATED) as f:\n" +" f.write(self.infile)\n" " print('Finished background zip of:', self.infile)\n" "\n" "background = AsyncZip('mydata.txt', 'myarchive.zip')\n" @@ -516,9 +511,8 @@ msgstr "" "行客製化的日誌記錄,而無須對應用程式做出變更。" #: ../../tutorial/stdlib2.rst:248 -#, fuzzy msgid "Weak references" -msgstr "弱引用 (Weak References)" +msgstr "弱引用 (Weak references)" #: ../../tutorial/stdlib2.rst:250 msgid "" @@ -597,9 +591,8 @@ msgstr "" "KeyError: 'primary'" #: ../../tutorial/stdlib2.rst:289 -#, fuzzy msgid "Tools for working with lists" -msgstr "使用於 List 的工具" +msgstr "使用於 list 的工具" #: ../../tutorial/stdlib2.rst:291 msgid "" @@ -734,9 +727,8 @@ msgstr "" "[-5, 0, 1]" #: ../../tutorial/stdlib2.rst:355 -#, fuzzy msgid "Decimal floating-point arithmetic" -msgstr "十進制浮點數運算 (Decimal Floating-Point Arithmetic)" +msgstr "十進制浮點數運算 (Decimal floating-point arithmetic)" #: ../../tutorial/stdlib2.rst:357 msgid "" diff --git a/whatsnew/3.14.po b/whatsnew/3.14.po index 7095c09188..d29c6be9ce 100644 --- a/whatsnew/3.14.po +++ b/whatsnew/3.14.po @@ -6957,9 +6957,8 @@ msgid "" msgstr "" #: ../../whatsnew/3.14.rst:3487 -#, fuzzy msgid "Notable changes in 3.14.5" -msgstr "Python 3.14.1 中顯著的變更" +msgstr "Python 3.14.5 中顯著的變更" #: ../../whatsnew/3.14.rst:3492 msgid ""