From 4c862bbddab6d8ecdb41acc5b4eb47037b5cf952 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 25 May 2024 00:04:52 +0000 Subject: [PATCH 01/13] sync with cpython 2d700670 --- library/itertools.po | 153 +++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 77 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 2d2be02739..bcbdfda41b 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-19 00:03+0000\n" +"POT-Creation-Date: 2024-05-25 00:03+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-" @@ -444,20 +444,20 @@ msgid "" "input iterable." msgstr "" -#: ../../library/itertools.rst:118 ../../library/itertools.rst:191 -#: ../../library/itertools.rst:240 ../../library/itertools.rst:289 -#: ../../library/itertools.rst:489 ../../library/itertools.rst:518 -#: ../../library/itertools.rst:547 ../../library/itertools.rst:627 -#: ../../library/itertools.rst:689 +#: ../../library/itertools.rst:118 ../../library/itertools.rst:184 +#: ../../library/itertools.rst:233 ../../library/itertools.rst:282 +#: ../../library/itertools.rst:483 ../../library/itertools.rst:514 +#: ../../library/itertools.rst:543 ../../library/itertools.rst:626 +#: ../../library/itertools.rst:687 msgid "Roughly equivalent to::" msgstr "大致等價於: ::" #: ../../library/itertools.rst:137 msgid "" -"There are a number of uses for the *func* argument. It can be set to :func:" -"`min` for a running minimum, :func:`max` for a running maximum, or :func:" -"`operator.mul` for a running product. Amortization tables can be built by " -"accumulating interest and applying payments:" +"The *func* argument can be set to :func:`min` for a running minimum, :func:" +"`max` for a running maximum, or :func:`operator.mul` for a running product. " +"Amortization tables can be built by accumulating interest and applying " +"payments:" msgstr "" #: ../../library/itertools.rst:155 @@ -488,7 +488,7 @@ msgid "" "exhausted:" msgstr "" -#: ../../library/itertools.rst:206 +#: ../../library/itertools.rst:199 msgid "" "Make an iterator that returns elements from the first iterable until it is " "exhausted, then proceeds to the next iterable, until all of the iterables " @@ -496,77 +496,76 @@ msgid "" "sequence. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:219 +#: ../../library/itertools.rst:212 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:230 +#: ../../library/itertools.rst:223 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:232 ../../library/itertools.rst:281 +#: ../../library/itertools.rst:225 ../../library/itertools.rst:274 msgid "" -"The combination tuples are emitted in lexicographic ordering according to " -"the order of the input *iterable*. So, if the input *iterable* is sorted, " -"the output tuples will be produced in sorted order." +"The combination tuples are emitted in lexicographic order according to the " +"order of the input *iterable*. So, if the input *iterable* is sorted, the " +"output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:236 +#: ../../library/itertools.rst:229 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So if the input elements are unique, there will be no repeated values in " -"each combination." +"So, if the input elements are unique, there will be no repeated values " +"within each combination." msgstr "" -#: ../../library/itertools.rst:262 +#: ../../library/itertools.rst:255 msgid "" "The code for :func:`combinations` can be also expressed as a subsequence of :" "func:`permutations` after filtering entries where the elements are not in " "sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:273 +#: ../../library/itertools.rst:266 msgid "" "The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " "zero when ``r > n``." msgstr "" -#: ../../library/itertools.rst:278 +#: ../../library/itertools.rst:271 msgid "" "Return *r* length subsequences of elements from the input *iterable* " "allowing individual elements to be repeated more than once." msgstr "" -#: ../../library/itertools.rst:285 +#: ../../library/itertools.rst:278 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So if the input elements are unique, the generated combinations will also be " -"unique." +"So, if the input elements are unique, the generated combinations will also " +"be unique." msgstr "" -#: ../../library/itertools.rst:308 +#: ../../library/itertools.rst:301 msgid "" "The code for :func:`combinations_with_replacement` can be also expressed as " "a subsequence of :func:`product` after filtering entries where the elements " "are not in sorted order (according to their position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:319 +#: ../../library/itertools.rst:312 msgid "" "The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." msgstr "" -#: ../../library/itertools.rst:326 +#: ../../library/itertools.rst:319 msgid "" "Make an iterator that filters elements from *data* returning only those that " -"have a corresponding element in *selectors* that evaluates to ``True``. " -"Stops when either the *data* or *selectors* iterables has been exhausted. " -"Roughly equivalent to::" +"have a corresponding element in *selectors* is true. Stops when either the " +"*data* or *selectors* iterables have been exhausted. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:340 +#: ../../library/itertools.rst:333 msgid "" "Make an iterator that returns evenly spaced values starting with number " "*start*. Often used as an argument to :func:`map` to generate consecutive " @@ -574,31 +573,31 @@ msgid "" "equivalent to::" msgstr "" -#: ../../library/itertools.rst:352 +#: ../../library/itertools.rst:345 msgid "" "When counting with floating point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" -#: ../../library/itertools.rst:356 +#: ../../library/itertools.rst:349 msgid "Added *step* argument and allowed non-integer arguments." msgstr "新增 *step* 引數並允許非整數引數。" -#: ../../library/itertools.rst:361 +#: ../../library/itertools.rst:354 msgid "" "Make an iterator returning elements from the iterable and saving a copy of " "each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:375 +#: ../../library/itertools.rst:368 msgid "" "Note, this member of the toolkit may require significant auxiliary storage " "(depending on the length of the iterable)." msgstr "" -#: ../../library/itertools.rst:381 +#: ../../library/itertools.rst:374 msgid "" "Make an iterator that drops elements from the iterable as long as the " "predicate is true; afterwards, returns every element. Note, the iterator " @@ -606,14 +605,14 @@ msgid "" "may have a lengthy start-up time. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:398 +#: ../../library/itertools.rst:391 msgid "" "Make an iterator that filters elements from iterable returning only those " "for which the predicate is false. If *predicate* is ``None``, return the " "items that are false. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:413 +#: ../../library/itertools.rst:406 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " @@ -622,7 +621,7 @@ msgid "" "sorted on the same key function." msgstr "" -#: ../../library/itertools.rst:419 +#: ../../library/itertools.rst:412 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " @@ -631,7 +630,7 @@ msgid "" "aggregates common elements regardless of their input order." msgstr "" -#: ../../library/itertools.rst:425 +#: ../../library/itertools.rst:418 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" @@ -639,14 +638,14 @@ msgid "" "if that data is needed later, it should be stored as a list::" msgstr "" -#: ../../library/itertools.rst:437 +#: ../../library/itertools.rst:430 msgid ":func:`groupby` is roughly equivalent to::" msgstr "" ":func:`groupby` 大致等價於:\n" "\n" "::" -#: ../../library/itertools.rst:474 +#: ../../library/itertools.rst:468 msgid "" "Make an iterator that returns selected elements from the iterable. If " "*start* is non-zero, then elements from the iterable are skipped until start " @@ -656,13 +655,13 @@ msgid "" "all; otherwise, it stops at the specified position." msgstr "" -#: ../../library/itertools.rst:481 +#: ../../library/itertools.rst:475 msgid "" "If *start* is ``None``, then iteration starts at zero. If *step* is " "``None``, then the step defaults to one." msgstr "" -#: ../../library/itertools.rst:484 +#: ../../library/itertools.rst:478 msgid "" "Unlike regular slicing, :func:`islice` does not support negative values for " "*start*, *stop*, or *step*. Can be used to extract related fields from data " @@ -670,67 +669,67 @@ msgid "" "report may list a name field on every third line)." msgstr "" -#: ../../library/itertools.rst:512 +#: ../../library/itertools.rst:508 msgid "Return successive overlapping pairs taken from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:514 +#: ../../library/itertools.rst:510 msgid "" "The number of 2-tuples in the output iterator will be one fewer than the " "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" -#: ../../library/itertools.rst:533 +#: ../../library/itertools.rst:529 msgid "" "Return successive *r* length permutations of elements in the *iterable*." msgstr "" -#: ../../library/itertools.rst:535 +#: ../../library/itertools.rst:531 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../library/itertools.rst:539 +#: ../../library/itertools.rst:535 msgid "" "The permutation tuples are emitted in lexicographic order according to the " "order of the input *iterable*. So, if the input *iterable* is sorted, the " "output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:543 +#: ../../library/itertools.rst:539 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So if the input elements are unique, there will be no repeated values within " -"a permutation." +"So, if the input elements are unique, there will be no repeated values " +"within a permutation." msgstr "" -#: ../../library/itertools.rst:574 +#: ../../library/itertools.rst:573 msgid "" "The code for :func:`permutations` can be also expressed as a subsequence of :" -"func:`product`, filtered to exclude entries with repeated elements (those " +"func:`product` filtered to exclude entries with repeated elements (those " "from the same position in the input pool)::" msgstr "" -#: ../../library/itertools.rst:586 +#: ../../library/itertools.rst:585 msgid "" "The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " "when ``r > n``." msgstr "" -#: ../../library/itertools.rst:591 +#: ../../library/itertools.rst:590 msgid "Cartesian product of input iterables." msgstr "" -#: ../../library/itertools.rst:593 +#: ../../library/itertools.rst:592 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../library/itertools.rst:596 +#: ../../library/itertools.rst:595 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -738,39 +737,39 @@ msgid "" "sorted order." msgstr "" -#: ../../library/itertools.rst:601 +#: ../../library/itertools.rst:600 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../library/itertools.rst:605 +#: ../../library/itertools.rst:604 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../library/itertools.rst:618 +#: ../../library/itertools.rst:617 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../library/itertools.rst:624 +#: ../../library/itertools.rst:623 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" -#: ../../library/itertools.rst:638 +#: ../../library/itertools.rst:637 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" msgstr "" -#: ../../library/itertools.rst:648 +#: ../../library/itertools.rst:647 msgid "" "Make an iterator that computes the function using arguments obtained from " "the iterable. Used instead of :func:`map` when argument parameters are " @@ -778,48 +777,48 @@ msgid "" "\"pre-zipped\")." msgstr "" -#: ../../library/itertools.rst:653 +#: ../../library/itertools.rst:652 msgid "" "The difference between :func:`map` and :func:`starmap` parallels the " "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../library/itertools.rst:665 +#: ../../library/itertools.rst:664 msgid "" "Make an iterator that returns elements from the iterable as long as the " "predicate is true. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:676 +#: ../../library/itertools.rst:674 msgid "" "Note, the element that first fails the predicate condition is consumed from " "the input iterator and there is no way to access it. This could be an issue " "if an application wants to further consume the input iterator after " -"takewhile has been run to exhaustion. To work around this problem, consider " -"using `more-iterools before_and_after() `_ instead." +"*takewhile* has been run to exhaustion. To work around this problem, " +"consider using `more-iterools before_and_after() `_ instead." msgstr "" -#: ../../library/itertools.rst:687 +#: ../../library/itertools.rst:685 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:707 +#: ../../library/itertools.rst:705 msgid "" "Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:711 +#: ../../library/itertools.rst:709 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:715 +#: ../../library/itertools.rst:713 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -827,7 +826,7 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:723 +#: ../../library/itertools.rst:721 msgid "" "Make an iterator that aggregates elements from each of the iterables. If the " "iterables are of uneven length, missing values are filled-in with " From 1d3818dba9d46e1eef858a0f9b02b2b181a11694 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 26 May 2024 00:05:20 +0000 Subject: [PATCH 02/13] sync with cpython d4e382ba --- faq/general.po | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/faq/general.po b/faq/general.po index 56acda8cec..05ad154172 100644 --- a/faq/general.po +++ b/faq/general.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-04 00:03+0000\n" +"POT-Creation-Date: 2024-05-26 00:03+0000\n" "PO-Revision-Date: 2023-06-23 16:56+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -246,32 +246,32 @@ msgstr "" "目錄,以了解可用的函式。此外,還有各式各樣的第三方擴充。請查詢 `Python 套件索" "引 (Python Package Index) `_ 來尋找你有興趣的套件。" -#: ../../faq/general.rst:126 +#: ../../faq/general.rst:128 msgid "How does the Python version numbering scheme work?" msgstr "Python 的版本編號系統是如何運作的?" -#: ../../faq/general.rst:128 +#: ../../faq/general.rst:130 msgid "Python versions are numbered \"A.B.C\" or \"A.B\":" msgstr "Python 各版本會被編號為 \"A.B.C\" 或 \"A.B\":" -#: ../../faq/general.rst:130 +#: ../../faq/general.rst:132 msgid "" "*A* is the major version number -- it is only incremented for really major " "changes in the language." msgstr "*A* 為主要版本編號 -- 它只會在語言中有真正重大的變更時才會增加。" -#: ../../faq/general.rst:132 +#: ../../faq/general.rst:134 msgid "" "*B* is the minor version number -- it is incremented for less earth-" "shattering changes." msgstr "*B* 為次要版本編號 -- 只有在影響範圍較小的變更出現時增加。" -#: ../../faq/general.rst:134 +#: ../../faq/general.rst:136 msgid "" "*C* is the micro version number -- it is incremented for each bugfix release." msgstr "*C* 為微小版本編號 —- 會在每個錯誤修正發布 (bugfix release) 增加。" -#: ../../faq/general.rst:136 +#: ../../faq/general.rst:138 msgid "" "Not all releases are bugfix releases. In the run-up to a new feature " "release, a series of development releases are made, denoted as alpha, beta, " @@ -287,25 +287,25 @@ msgstr "" "不會令人意外。Beta 則更為穩定,保留了現有的介面,但可能會增加新的模組,而候選" "發布版本會被凍結,除了需要修正關鍵錯誤之外,不會再進行任何變更。" -#: ../../faq/general.rst:144 +#: ../../faq/general.rst:146 msgid "Alpha, beta and release candidate versions have an additional suffix:" msgstr "Alpha、beta 和候選發布版本都有一個額外的後綴:" -#: ../../faq/general.rst:146 +#: ../../faq/general.rst:148 msgid "The suffix for an alpha version is \"aN\" for some small number *N*." msgstr "Alpha 版本的後綴是 \"aN\",其中 *N* 是某個較小的數字。" -#: ../../faq/general.rst:147 +#: ../../faq/general.rst:149 msgid "The suffix for a beta version is \"bN\" for some small number *N*." msgstr "Beta 版本的後綴是 \"bN\",其中 *N* 是某個較小的數字。" -#: ../../faq/general.rst:148 +#: ../../faq/general.rst:150 msgid "" "The suffix for a release candidate version is \"rcN\" for some small number " "*N*." msgstr "候選發布版本的後綴是 \"rcN\",其中 *N* 是某個較小的數字。" -#: ../../faq/general.rst:150 +#: ../../faq/general.rst:152 msgid "" "In other words, all versions labeled *2.0aN* precede the versions labeled " "*2.0bN*, which precede versions labeled *2.0rcN*, and *those* precede 2.0." @@ -313,7 +313,7 @@ msgstr "" "換句話說,所有標記為 *2.0aN* 的版本都在標記為 *2.0bN* 的版本之前,而 *2.0bN* " "版本都在標記為 *2.0rcN* 的版本之前,而\\ *它們*\\ 都是在 2.0 版之前。" -#: ../../faq/general.rst:153 +#: ../../faq/general.rst:155 msgid "" "You may also find version numbers with a \"+\" suffix, e.g. \"2.2+\". These " "are unreleased versions, built directly from the CPython development " @@ -325,7 +325,7 @@ msgstr "" "從 CPython 的開發儲存庫被建置。實際上,在每一次的最終次要版本發布完成之後,版" "本編號將會被增加到下一個次要版本,並成為「a0」版,例如「2.4a0」。" -#: ../../faq/general.rst:158 +#: ../../faq/general.rst:160 msgid "" "See the `Developer's Guide `__ for more information about the development cycle, " @@ -334,11 +334,11 @@ msgid "" "and :data:`sys.version_info`." msgstr "" -#: ../../faq/general.rst:167 +#: ../../faq/general.rst:169 msgid "How do I obtain a copy of the Python source?" msgstr "我要如何得到 Python 的原始碼複本?" -#: ../../faq/general.rst:169 +#: ../../faq/general.rst:171 msgid "" "The latest Python source distribution is always available from python.org, " "at https://www.python.org/downloads/. The latest development sources can be " @@ -348,7 +348,7 @@ msgstr "" "org/downloads/。最新的開發中原始碼可以在 https://github.com/python/cpython/ " "取得。" -#: ../../faq/general.rst:173 +#: ../../faq/general.rst:175 msgid "" "The source distribution is a gzipped tar file containing the complete C " "source, Sphinx-formatted documentation, Python library modules, example " @@ -359,7 +359,7 @@ msgstr "" "說明文件、Python 函式庫模組、範例程式,以及幾個好用的可自由發行軟體。該原始碼" "在大多數 UNIX 平台上,都是可以立即編譯及運行的。" -#: ../../faq/general.rst:178 +#: ../../faq/general.rst:180 msgid "" "Consult the `Getting Started section of the Python Developer's Guide " "`__ for more information on getting the " @@ -368,7 +368,7 @@ msgstr "" "關於取得和編譯原始碼的詳細資訊,請參閱 `Python 開發人員指南中的 \"Getting " "Started\" 段落 `__。" -#: ../../faq/general.rst:184 +#: ../../faq/general.rst:186 msgid "How do I get documentation on Python?" msgstr "我要如何取得 Python 的說明文件?" From 9e9c33ef52e4b34f15f663c96e4877e03a317f01 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 May 2024 00:05:06 +0000 Subject: [PATCH 03/13] sync with cpython 7f86c769 --- c-api/weakref.po | 6 +++--- extending/extending.po | 4 ++-- extending/newtypes.po | 4 ++-- howto/mro.po | 4 ++-- library/curses.po | 4 ++-- library/numbers.po | 8 +++++--- library/optparse.po | 4 ++-- library/ssl.po | 8 +++++--- library/textwrap.po | 4 ++-- library/turtle.po | 4 ++-- tutorial/venv.po | 5 +++-- whatsnew/2.2.po | 4 ++-- whatsnew/2.7.po | 20 ++++++++++---------- whatsnew/3.12.po | 4 ++-- whatsnew/3.4.po | 4 ++-- whatsnew/3.6.po | 6 +++--- whatsnew/3.9.po | 4 ++-- 17 files changed, 51 insertions(+), 46 deletions(-) diff --git a/c-api/weakref.po b/c-api/weakref.po index 9b51f1de97..9217888102 100644 --- a/c-api/weakref.po +++ b/c-api/weakref.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-07-29 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2017-09-22 18:26+0000\n" "Last-Translator: Leon H.\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -54,7 +54,7 @@ msgid "" "a callable object that receives notification when *ob* is garbage collected; " "it should accept a single parameter, which will be the weak reference object " "itself. *callback* may also be ``None`` or ``NULL``. If *ob* is not a " -"weakly referencable object, or if *callback* is not callable, ``None``, or " +"weakly referenceable object, or if *callback* is not callable, ``None``, or " "``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." msgstr "" @@ -66,7 +66,7 @@ msgid "" "can be a callable object that receives notification when *ob* is garbage " "collected; it should accept a single parameter, which will be the weak " "reference object itself. *callback* may also be ``None`` or ``NULL``. If " -"*ob* is not a weakly referencable object, or if *callback* is not callable, " +"*ob* is not a weakly referenceable object, or if *callback* is not callable, " "``None``, or ``NULL``, this will return ``NULL`` and raise :exc:`TypeError`." msgstr "" diff --git a/extending/extending.po b/extending/extending.po index 6245e652d9..485f4863c9 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-12 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -759,7 +759,7 @@ msgid "" "memory it occupies cannot be reused until the program terminates. This is " "called a :dfn:`memory leak`. On the other hand, if a program calls :c:func:" "`free` for a block and then continues to use the block, it creates a " -"conflict with re-use of the block through another :c:func:`malloc` call. " +"conflict with reuse of the block through another :c:func:`malloc` call. " "This is called :dfn:`using freed memory`. It has the same bad consequences " "as referencing uninitialized data --- core dumps, wrong results, mysterious " "crashes." diff --git a/extending/newtypes.po b/extending/newtypes.po index 657f146dcb..870c2b3775 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:34+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -530,7 +530,7 @@ msgstr "" #: ../../extending/newtypes.rst:548 msgid "" -"For an object to be weakly referencable, the extension type must set the " +"For an object to be weakly referenceable, the extension type must set the " "``Py_TPFLAGS_MANAGED_WEAKREF`` bit of the :c:member:`~PyTypeObject.tp_flags` " "field. The legacy :c:member:`~PyTypeObject.tp_weaklistoffset` field should " "be left as zero." diff --git a/howto/mro.po b/howto/mro.po index ec460d337a..73af9a2376 100644 --- a/howto/mro.po +++ b/howto/mro.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-15 12:57+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -436,7 +436,7 @@ msgstr "" #: ../../howto/mro.rst:428 msgid "" "As a general rule, hierarchies such as the previous one should be avoided, " -"since it is unclear if F should override E or viceversa. Python 2.3 solves " +"since it is unclear if F should override E or vice-versa. Python 2.3 solves " "the ambiguity by raising an exception in the creation of class G, " "effectively stopping the programmer from generating ambiguous hierarchies. " "The reason for that is that the C3 algorithm fails when the merge::" diff --git a/library/curses.po b/library/curses.po index 0a63835a87..d57c306de6 100644 --- a/library/curses.po +++ b/library/curses.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:42+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1071,7 +1071,7 @@ msgid "Clear the window." msgstr "" #: ../../library/curses.rst:925 -msgid "Return a tuple ``(y, x)`` of co-ordinates of upper-left corner." +msgid "Return a tuple ``(y, x)`` of coordinates of upper-left corner." msgstr "" #: ../../library/curses.rst:930 diff --git a/library/numbers.po b/library/numbers.po index 730fb15d0a..41df5f3445 100644 --- a/library/numbers.po +++ b/library/numbers.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2022-11-16 04:57+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -138,12 +138,14 @@ msgstr "" "operations) 的抽象方法:``<<``、``>>``、``&``、``^``、``|``、``~``。" #: ../../library/numbers.rst:88 -msgid "Notes for type implementors" +#, fuzzy +msgid "Notes for type implementers" msgstr "給型別實作者的註記" #: ../../library/numbers.rst:90 +#, fuzzy msgid "" -"Implementors should be careful to make equal numbers equal and hash them to " +"Implementers should be careful to make equal numbers equal and hash them to " "the same values. This may be subtle if there are two different extensions of " "the real numbers. For example, :class:`fractions.Fraction` implements :func:" "`hash` as follows::" diff --git a/library/optparse.po b/library/optparse.po index 717d3303dd..a4d9cbb574 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+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-" @@ -2134,7 +2134,7 @@ msgstr "" #: ../../library/optparse.rst:1741 msgid "" -"If you want to re-use this callback for several similar options (set a flag, " +"If you want to reuse this callback for several similar options (set a flag, " "but blow up if ``-b`` has already been seen), it needs a bit of work: the " "error message and the flag that it sets must be generalized. ::" msgstr "" diff --git a/library/ssl.po b/library/ssl.po index baae9bb3ff..3a0ceb58fa 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2024-05-01 14:51+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -995,8 +995,9 @@ msgstr "" "SSLv2 伺服器的 sockets。" #: ../../library/ssl.rst:762 +#, fuzzy msgid "" -"Prevents re-use of the same DH key for distinct SSL sessions. This improves " +"Prevents reuse of the same DH key for distinct SSL sessions. This improves " "forward secrecy but requires more computational resources. This option only " "applies to server sockets." msgstr "" @@ -1004,8 +1005,9 @@ msgstr "" "資源。此選項只適用於伺服器 sockets。" #: ../../library/ssl.rst:770 +#, fuzzy msgid "" -"Prevents re-use of the same ECDH key for distinct SSL sessions. This " +"Prevents reuse of the same ECDH key for distinct SSL sessions. This " "improves forward secrecy but requires more computational resources. This " "option only applies to server sockets." msgstr "" diff --git a/library/textwrap.po b/library/textwrap.po index 9c6cac520b..3a8a72217b 100644 --- a/library/textwrap.po +++ b/library/textwrap.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2015-12-09 17:51+0000\n" "Last-Translator: Liang-Bo Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -167,7 +167,7 @@ msgstr "" #: ../../library/textwrap.rst:157 msgid "" -"You can re-use the same :class:`TextWrapper` object many times, and you can " +"You can reuse the same :class:`TextWrapper` object many times, and you can " "change any of its options through direct assignment to instance attributes " "between uses." msgstr "" diff --git a/library/turtle.po b/library/turtle.po index 945ead6d14..e53b29bde6 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:13+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -152,7 +152,7 @@ msgstr "" #: ../../library/turtle.rst:113 msgid "" "The home position is at the center of the turtle's screen. If you ever need " -"to know them, get the turtle's x-y co-ordinates with::" +"to know them, get the turtle's x-y coordinates with::" msgstr "" #: ../../library/turtle.rst:118 diff --git a/tutorial/venv.po b/tutorial/venv.po index 6f0cc2c9ff..d5c0b6d443 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-19 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2022-10-16 05:35+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -80,11 +80,12 @@ msgid "Creating Virtual Environments" msgstr "建立虛擬環境" #: ../../tutorial/venv.rst:38 +#, fuzzy msgid "" "The module used to create and manage virtual environments is called :mod:" "`venv`. :mod:`venv` will install the Python version from which the command " "was run (as reported by the :option:`--version` option). For instance, " -"excuting the command with ``python3.12`` will install version 3.12." +"executing the command with ``python3.12`` will install version 3.12." msgstr "" "用來建立與管理虛擬環境的模組叫做 :mod:`venv`。:mod:`venv` 將安裝執行命令的 " "Python 版本(如 :option:`--version` 選項所報告的)。例如使用 ``python3.12`` " diff --git a/whatsnew/2.2.po b/whatsnew/2.2.po index 8bda506a7f..2e677d9394 100644 --- a/whatsnew/2.2.po +++ b/whatsnew/2.2.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:19+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1244,7 +1244,7 @@ msgstr "" #: ../../whatsnew/2.2.rst:1065 msgid "" -"Another low-level API, primarily of interest to implementors of Python " +"Another low-level API, primarily of interest to implementers of Python " "debuggers and development tools, was added. :c:func:" "`PyInterpreterState_Head` and :c:func:`PyInterpreterState_Next` let a caller " "walk through all the existing interpreter objects; :c:func:" diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 66e8418c6a..14199854b0 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1949,7 +1949,7 @@ msgstr "" msgid "" "Python 3.1 includes the :mod:`importlib` package, a re-implementation of the " "logic underlying Python's :keyword:`import` statement. :mod:`importlib` is " -"useful for implementors of Python interpreters and to users who wish to " +"useful for implementers of Python interpreters and to users who wish to " "write new importers that can participate in the import process. Python 2.7 " "doesn't contain the complete :mod:`importlib` package, but instead has a " "tiny subset that contains a single function, :func:`~importlib." @@ -2385,14 +2385,14 @@ msgid "" "ElementTree's code for converting trees to a string has been significantly " "reworked, making it roughly twice as fast in many cases. The :meth:" "`ElementTree.write() ` and :meth:" -"`Element.write` methods now have a *method* parameter that can be \"xml\" " -"(the default), \"html\", or \"text\". HTML mode will output empty elements " -"as ```` instead of ````, and text mode will skip over " -"elements and only output the text chunks. If you set the :attr:`~xml.etree." -"ElementTree.Element.tag` attribute of an element to ``None`` but leave its " -"children in place, the element will be omitted when the tree is written out, " -"so you don't need to do more extensive rearrangement to remove a single " -"element." +"`Element.write` methods now have a *method* parameter that can be " +"\"xml\" (the default), \"html\", or \"text\". HTML mode will output empty " +"elements as ```` instead of ````, and text mode will " +"skip over elements and only output the text chunks. If you set the :attr:" +"`~xml.etree.ElementTree.Element.tag` attribute of an element to ``None`` but " +"leave its children in place, the element will be omitted when the tree is " +"written out, so you don't need to do more extensive rearrangement to remove " +"a single element." msgstr "" #: ../../whatsnew/2.7.rst:2044 diff --git a/whatsnew/3.12.po b/whatsnew/3.12.po index 48a0110132..adfd644211 100644 --- a/whatsnew/3.12.po +++ b/whatsnew/3.12.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-23 00:03+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1731,7 +1731,7 @@ msgid "" "`DeprecationWarning` when it can detect being called from a multithreaded " "process. There has always been a fundamental incompatibility with the POSIX " "platform when doing so. Even if such code *appeared* to work. We added the " -"warning to to raise awareness as issues encounted by code doing this are " +"warning to raise awareness as issues encountered by code doing this are " "becoming more frequent. See the :func:`os.fork` documentation for more " "details along with `this discussion on fork being incompatible with threads " "`_ for *why* we're now surfacing this " diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index 7b195e364d..dc97a81592 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-05-23 16:20+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -3353,7 +3353,7 @@ msgstr "" #: ../../whatsnew/3.4.rst:2415 msgid "" "Because :mod:`unittest.TestSuite` now drops references to tests after they " -"are run, test harnesses that re-use a :class:`~unittest.TestSuite` to re-run " +"are run, test harnesses that reuse a :class:`~unittest.TestSuite` to re-run " "a set of tests may fail. Test suites should not be re-used in this fashion " "since it means state is retained between test runs, breaking the test " "isolation that :mod:`unittest` is designed to provide. However, if the lack " diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 3b00521a7f..8e049b4ab9 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: 2018-07-15 18:56+0800\n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -3065,9 +3065,9 @@ msgid "" "may start expecting import system replacements to raise that more specific " "exception when appropriate, rather than the less-specific :exc:" "`ImportError`. To provide future compatibility with such consumers, " -"implementors of alternative import systems that completely replace :func:" +"implementers of alternative import systems that completely replace :func:" "`__import__` will need to update their implementations to raise the new " -"subclass when a module can't be found at all. Implementors of compliant " +"subclass when a module can't be found at all. Implementers of compliant " "plugins to the default import system shouldn't need to make any changes, as " "the default import system will raise the new subclass when appropriate." msgstr "" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 8cd885abb8..78b95c73c0 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-29 00:04+0000\n" +"POT-Creation-Date: 2024-05-27 00:03+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -1270,7 +1270,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:892 msgid "" "Deprecated the ``split()`` method of :class:`!_tkinter.TkappType` in favour " -"of the ``splitlist()`` method which has more consistent and predicable " +"of the ``splitlist()`` method which has more consistent and predictable " "behavior. (Contributed by Serhiy Storchaka in :issue:`38371`.)" msgstr "" From 76056ecbbfdc170b5529e9281816fc561719d1b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 28 May 2024 00:05:14 +0000 Subject: [PATCH 04/13] sync with cpython 8fb48542 --- c-api/buffer.po | 4 +- library/itertools.po | 345 ++++++++++++++++++++++--------------------- library/pdb.po | 136 ++++++++--------- 3 files changed, 248 insertions(+), 237 deletions(-) diff --git a/c-api/buffer.po b/c-api/buffer.po index ee9c312b61..f6a84dd790 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-12 00:03+0000\n" +"POT-Creation-Date: 2024-05-28 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:30+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -214,7 +214,7 @@ msgstr "" #: ../../c-api/buffer.rst:152 msgid "" -"A *NUL* terminated string in :mod:`struct` module style syntax describing " +"A *NULL* terminated string in :mod:`struct` module style syntax describing " "the contents of a single item. If this is ``NULL``, ``\"B\"`` (unsigned " "bytes) is assumed." msgstr "" diff --git a/library/itertools.po b/library/itertools.po index bcbdfda41b..bd4abdad94 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-25 00:03+0000\n" +"POT-Creation-Date: 2024-05-28 00:03+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-" @@ -219,7 +219,8 @@ msgid "seq[n], seq[n+1], starting when predicate fails" msgstr "" #: ../../library/itertools.rst:59 -msgid "``dropwhile(lambda x: x<5, [1,4,6,4,1]) → 6 4 1``" +#, fuzzy +msgid "``dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8``" msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) → 6 4 1``" #: ../../library/itertools.rst:60 @@ -231,8 +232,9 @@ msgid "elements of seq where predicate(elem) fails" msgstr "" #: ../../library/itertools.rst:60 -msgid "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" -msgstr "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" +#, fuzzy +msgid "``filterfalse(lambda x: x<5, [1,4,6,3,8]) → 6 8``" +msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" #: ../../library/itertools.rst:61 msgid ":func:`groupby`" @@ -299,7 +301,8 @@ msgid "seq[0], seq[1], until predicate fails" msgstr "" #: ../../library/itertools.rst:65 -msgid "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" +#, fuzzy +msgid "``takewhile(lambda x: x<5, [1,4,6,3,8]) → 1 4``" msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" #: ../../library/itertools.rst:66 @@ -421,66 +424,63 @@ msgid "" "functions or loops that truncate the stream." msgstr "" -#: ../../library/itertools.rst:102 +#: ../../library/itertools.rst:103 msgid "" -"Make an iterator that returns accumulated sums, or accumulated results of " -"other binary functions (specified via the optional *func* argument)." +"Make an iterator that returns accumulated sums or accumulated results from " +"other binary functions." msgstr "" #: ../../library/itertools.rst:106 msgid "" -"If *func* is supplied, it should be a function of two arguments. Elements of " -"the input *iterable* may be any type that can be accepted as arguments to " -"*func*. (For example, with the default operation of addition, elements may " -"be any addable type including :class:`~decimal.Decimal` or :class:" -"`~fractions.Fraction`.)" +"The *function* defaults to addition. The *function* should accept two " +"arguments, an accumulated total and a value from the *iterable*." msgstr "" -#: ../../library/itertools.rst:113 +#: ../../library/itertools.rst:109 msgid "" -"Usually, the number of elements output matches the input iterable. However, " -"if the keyword argument *initial* is provided, the accumulation leads off " -"with the *initial* value so that the output has one more element than the " -"input iterable." +"If an *initial* value is provided, the accumulation will start with that " +"value and the output will have one more element than the input iterable." msgstr "" -#: ../../library/itertools.rst:118 ../../library/itertools.rst:184 -#: ../../library/itertools.rst:233 ../../library/itertools.rst:282 -#: ../../library/itertools.rst:483 ../../library/itertools.rst:514 -#: ../../library/itertools.rst:543 ../../library/itertools.rst:626 -#: ../../library/itertools.rst:687 +#: ../../library/itertools.rst:113 ../../library/itertools.rst:182 +#: ../../library/itertools.rst:236 ../../library/itertools.rst:279 +#: ../../library/itertools.rst:476 ../../library/itertools.rst:507 +#: ../../library/itertools.rst:542 ../../library/itertools.rst:615 +#: ../../library/itertools.rst:676 ../../library/itertools.rst:718 msgid "Roughly equivalent to::" msgstr "大致等價於: ::" -#: ../../library/itertools.rst:137 +#: ../../library/itertools.rst:134 msgid "" -"The *func* argument can be set to :func:`min` for a running minimum, :func:" -"`max` for a running maximum, or :func:`operator.mul` for a running product. " -"Amortization tables can be built by accumulating interest and applying " +"The *function* argument can be set to :func:`min` for a running minimum, :" +"func:`max` for a running maximum, or :func:`operator.mul` for a running " +"product. `Amortization tables `_ can be built by accumulating interest and applying " "payments:" msgstr "" -#: ../../library/itertools.rst:155 +#: ../../library/itertools.rst:153 msgid "" "See :func:`functools.reduce` for a similar function that returns only the " "final accumulated value." msgstr "" -#: ../../library/itertools.rst:160 -msgid "Added the optional *func* parameter." +#: ../../library/itertools.rst:158 +#, fuzzy +msgid "Added the optional *function* parameter." msgstr "新增選用的 *func* 參數。" -#: ../../library/itertools.rst:163 +#: ../../library/itertools.rst:161 msgid "Added the optional *initial* parameter." msgstr "新增選用的 *initial* 參數。" -#: ../../library/itertools.rst:169 +#: ../../library/itertools.rst:167 msgid "" "Batch data from the *iterable* into tuples of length *n*. The last batch may " "be shorter than *n*." msgstr "" -#: ../../library/itertools.rst:172 +#: ../../library/itertools.rst:170 msgid "" "Loops over the input iterable and accumulates data into tuples up to size " "*n*. The input is consumed lazily, just enough to fill a batch. The result " @@ -488,7 +488,7 @@ msgid "" "exhausted:" msgstr "" -#: ../../library/itertools.rst:199 +#: ../../library/itertools.rst:197 msgid "" "Make an iterator that returns elements from the first iterable until it is " "exhausted, then proceeds to the next iterable, until all of the iterables " @@ -496,123 +496,125 @@ msgid "" "sequence. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:212 +#: ../../library/itertools.rst:210 msgid "" "Alternate constructor for :func:`chain`. Gets chained inputs from a single " "iterable argument that is evaluated lazily. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:223 +#: ../../library/itertools.rst:221 msgid "Return *r* length subsequences of elements from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:225 ../../library/itertools.rst:274 +#: ../../library/itertools.rst:223 +msgid "" +"The output is a subsequence of :func:`product` keeping only entries that are " +"subsequences of the *iterable*. The length of the output is given by :func:" +"`math.comb` which computes ``n! / r! / (n - r)!`` when ``0 ≤ r ≤ n`` or zero " +"when ``r > n``." +msgstr "" + +#: ../../library/itertools.rst:228 msgid "" "The combination tuples are emitted in lexicographic order according to the " -"order of the input *iterable*. So, if the input *iterable* is sorted, the " -"output tuples will be produced in sorted order." +"order of the input *iterable*. If the input *iterable* is sorted, the output " +"tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:229 +#: ../../library/itertools.rst:232 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So, if the input elements are unique, there will be no repeated values " -"within each combination." +"If the input elements are unique, there will be no repeated values within " +"each combination." msgstr "" -#: ../../library/itertools.rst:255 +#: ../../library/itertools.rst:263 msgid "" -"The code for :func:`combinations` can be also expressed as a subsequence of :" -"func:`permutations` after filtering entries where the elements are not in " -"sorted order (according to their position in the input pool)::" +"Return *r* length subsequences of elements from the input *iterable* " +"allowing individual elements to be repeated more than once." msgstr "" #: ../../library/itertools.rst:266 msgid "" -"The number of items returned is ``n! / r! / (n-r)!`` when ``0 <= r <= n`` or " -"zero when ``r > n``." +"The output is a subsequence of :func:`product` that keeps only entries that " +"are subsequences (with possible repeated elements) of the *iterable*. The " +"number of subsequence returned is ``(n + r - 1)! / r! / (n - 1)!`` when ``n " +"> 0``." msgstr "" #: ../../library/itertools.rst:271 msgid "" -"Return *r* length subsequences of elements from the input *iterable* " -"allowing individual elements to be repeated more than once." +"The combination tuples are emitted in lexicographic order according to the " +"order of the input *iterable*. if the input *iterable* is sorted, the output " +"tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:278 +#: ../../library/itertools.rst:275 msgid "" "Elements are treated as unique based on their position, not on their value. " -"So, if the input elements are unique, the generated combinations will also " -"be unique." +"If the input elements are unique, the generated combinations will also be " +"unique." msgstr "" -#: ../../library/itertools.rst:301 +#: ../../library/itertools.rst:305 msgid "" -"The code for :func:`combinations_with_replacement` can be also expressed as " -"a subsequence of :func:`product` after filtering entries where the elements " -"are not in sorted order (according to their position in the input pool)::" -msgstr "" - -#: ../../library/itertools.rst:312 -msgid "" -"The number of items returned is ``(n+r-1)! / r! / (n-1)!`` when ``n > 0``." +"Make an iterator that returns elements from *data* where the corresponding " +"element in *selectors* is true. Stops when either the *data* or *selectors* " +"iterables have been exhausted. Roughly equivalent to::" msgstr "" #: ../../library/itertools.rst:319 msgid "" -"Make an iterator that filters elements from *data* returning only those that " -"have a corresponding element in *selectors* is true. Stops when either the " -"*data* or *selectors* iterables have been exhausted. Roughly equivalent to::" +"Make an iterator that returns evenly spaced values beginning with *start*. " +"Can be used with :func:`map` to generate consecutive data points or with :" +"func:`zip` to add sequence numbers. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:333 -msgid "" -"Make an iterator that returns evenly spaced values starting with number " -"*start*. Often used as an argument to :func:`map` to generate consecutive " -"data points. Also, used with :func:`zip` to add sequence numbers. Roughly " -"equivalent to::" -msgstr "" - -#: ../../library/itertools.rst:345 +#: ../../library/itertools.rst:332 msgid "" "When counting with floating point numbers, better accuracy can sometimes be " "achieved by substituting multiplicative code such as: ``(start + step * i " "for i in count())``." msgstr "" -#: ../../library/itertools.rst:349 +#: ../../library/itertools.rst:336 msgid "Added *step* argument and allowed non-integer arguments." msgstr "新增 *step* 引數並允許非整數引數。" -#: ../../library/itertools.rst:354 +#: ../../library/itertools.rst:342 msgid "" -"Make an iterator returning elements from the iterable and saving a copy of " -"each. When the iterable is exhausted, return elements from the saved copy. " +"Make an iterator returning elements from the *iterable* and saving a copy of " +"each. When the iterable is exhausted, return elements from the saved copy. " "Repeats indefinitely. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:368 +#: ../../library/itertools.rst:356 msgid "" -"Note, this member of the toolkit may require significant auxiliary storage " -"(depending on the length of the iterable)." +"This itertool may require significant auxiliary storage (depending on the " +"length of the iterable)." msgstr "" -#: ../../library/itertools.rst:374 +#: ../../library/itertools.rst:362 msgid "" -"Make an iterator that drops elements from the iterable as long as the " -"predicate is true; afterwards, returns every element. Note, the iterator " -"does not produce *any* output until the predicate first becomes false, so it " -"may have a lengthy start-up time. Roughly equivalent to::" +"Make an iterator that drops elements from the *iterable* while the " +"*predicate* is true and afterwards returns every element. Roughly " +"equivalent to::" msgstr "" -#: ../../library/itertools.rst:391 +#: ../../library/itertools.rst:378 msgid "" -"Make an iterator that filters elements from iterable returning only those " -"for which the predicate is false. If *predicate* is ``None``, return the " -"items that are false. Roughly equivalent to::" +"Note this does not produce *any* output until the predicate first becomes " +"false, so this itertool may have a lengthy start-up time." msgstr "" -#: ../../library/itertools.rst:406 +#: ../../library/itertools.rst:384 +msgid "" +"Make an iterator that filters elements from the *iterable* returning only " +"those for which the *predicate* returns a false value. If *predicate* is " +"``None``, returns the items that are false. Roughly equivalent to::" +msgstr "" + +#: ../../library/itertools.rst:400 msgid "" "Make an iterator that returns consecutive keys and groups from the " "*iterable*. The *key* is a function computing a key value for each element. " @@ -621,7 +623,7 @@ msgid "" "sorted on the same key function." msgstr "" -#: ../../library/itertools.rst:412 +#: ../../library/itertools.rst:406 msgid "" "The operation of :func:`groupby` is similar to the ``uniq`` filter in Unix. " "It generates a break or new group every time the value of the key function " @@ -630,7 +632,7 @@ msgid "" "aggregates common elements regardless of their input order." msgstr "" -#: ../../library/itertools.rst:418 +#: ../../library/itertools.rst:412 msgid "" "The returned group is itself an iterator that shares the underlying iterable " "with :func:`groupby`. Because the source is shared, when the :func:" @@ -638,98 +640,96 @@ msgid "" "if that data is needed later, it should be stored as a list::" msgstr "" -#: ../../library/itertools.rst:430 +#: ../../library/itertools.rst:424 msgid ":func:`groupby` is roughly equivalent to::" msgstr "" ":func:`groupby` 大致等價於:\n" "\n" "::" -#: ../../library/itertools.rst:468 +#: ../../library/itertools.rst:462 +msgid "" +"Make an iterator that returns selected elements from the iterable. Works " +"like sequence slicing but does not support negative values for *start*, " +"*stop*, or *step*." +msgstr "" + +#: ../../library/itertools.rst:466 msgid "" -"Make an iterator that returns selected elements from the iterable. If " -"*start* is non-zero, then elements from the iterable are skipped until start " -"is reached. Afterward, elements are returned consecutively unless *step* is " -"set higher than one which results in items being skipped. If *stop* is " -"``None``, then iteration continues until the iterator is exhausted, if at " -"all; otherwise, it stops at the specified position." +"If *start* is zero or ``None``, iteration starts at zero. Otherwise, " +"elements from the iterable are skipped until *start* is reached." msgstr "" -#: ../../library/itertools.rst:475 +#: ../../library/itertools.rst:469 msgid "" -"If *start* is ``None``, then iteration starts at zero. If *step* is " -"``None``, then the step defaults to one." +"If *stop* is ``None``, iteration continues until the iterator is exhausted, " +"if at all. Otherwise, it stops at the specified position." msgstr "" -#: ../../library/itertools.rst:478 +#: ../../library/itertools.rst:472 msgid "" -"Unlike regular slicing, :func:`islice` does not support negative values for " -"*start*, *stop*, or *step*. Can be used to extract related fields from data " -"where the internal structure has been flattened (for example, a multi-line " -"report may list a name field on every third line)." +"If *step* is ``None``, the step defaults to one. Elements are returned " +"consecutively unless *step* is set higher than one which results in items " +"being skipped." msgstr "" -#: ../../library/itertools.rst:508 +#: ../../library/itertools.rst:501 msgid "Return successive overlapping pairs taken from the input *iterable*." msgstr "" -#: ../../library/itertools.rst:510 +#: ../../library/itertools.rst:503 msgid "" "The number of 2-tuples in the output iterator will be one fewer than the " "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" -#: ../../library/itertools.rst:529 +#: ../../library/itertools.rst:522 msgid "" -"Return successive *r* length permutations of elements in the *iterable*." +"Return successive *r* length `permutations of elements `_ from the *iterable*." msgstr "" -#: ../../library/itertools.rst:531 +#: ../../library/itertools.rst:525 msgid "" "If *r* is not specified or is ``None``, then *r* defaults to the length of " "the *iterable* and all possible full-length permutations are generated." msgstr "" -#: ../../library/itertools.rst:535 -msgid "" -"The permutation tuples are emitted in lexicographic order according to the " -"order of the input *iterable*. So, if the input *iterable* is sorted, the " -"output tuples will be produced in sorted order." -msgstr "" - -#: ../../library/itertools.rst:539 +#: ../../library/itertools.rst:529 msgid "" -"Elements are treated as unique based on their position, not on their value. " -"So, if the input elements are unique, there will be no repeated values " -"within a permutation." +"The output is a subsequence of :func:`product` where entries with repeated " +"elements have been filtered out. The length of the output is given by :func:" +"`math.perm` which computes ``n! / (n - r)!`` when ``0 ≤ r ≤ n`` or zero when " +"``r > n``." msgstr "" -#: ../../library/itertools.rst:573 +#: ../../library/itertools.rst:534 msgid "" -"The code for :func:`permutations` can be also expressed as a subsequence of :" -"func:`product` filtered to exclude entries with repeated elements (those " -"from the same position in the input pool)::" +"The permutation tuples are emitted in lexicographic order according to the " +"order of the input *iterable*. If the input *iterable* is sorted, the " +"output tuples will be produced in sorted order." msgstr "" -#: ../../library/itertools.rst:585 +#: ../../library/itertools.rst:538 msgid "" -"The number of items returned is ``n! / (n-r)!`` when ``0 <= r <= n`` or zero " -"when ``r > n``." +"Elements are treated as unique based on their position, not on their value. " +"If the input elements are unique, there will be no repeated values within a " +"permutation." msgstr "" -#: ../../library/itertools.rst:590 +#: ../../library/itertools.rst:575 msgid "Cartesian product of input iterables." msgstr "" -#: ../../library/itertools.rst:592 +#: ../../library/itertools.rst:577 msgid "" "Roughly equivalent to nested for-loops in a generator expression. For " "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" -#: ../../library/itertools.rst:595 +#: ../../library/itertools.rst:580 msgid "" "The nested loops cycle like an odometer with the rightmost element advancing " "on every iteration. This pattern creates a lexicographic ordering so that " @@ -737,60 +737,59 @@ msgid "" "sorted order." msgstr "" -#: ../../library/itertools.rst:600 +#: ../../library/itertools.rst:585 msgid "" "To compute the product of an iterable with itself, specify the number of " "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" -#: ../../library/itertools.rst:604 +#: ../../library/itertools.rst:589 msgid "" "This function is roughly equivalent to the following code, except that the " "actual implementation does not build up intermediate results in memory::" msgstr "" -#: ../../library/itertools.rst:617 +#: ../../library/itertools.rst:605 msgid "" "Before :func:`product` runs, it completely consumes the input iterables, " "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" -#: ../../library/itertools.rst:623 +#: ../../library/itertools.rst:612 msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" -#: ../../library/itertools.rst:637 +#: ../../library/itertools.rst:626 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" msgstr "" -#: ../../library/itertools.rst:647 +#: ../../library/itertools.rst:637 msgid "" -"Make an iterator that computes the function using arguments obtained from " -"the iterable. Used instead of :func:`map` when argument parameters are " -"already grouped in tuples from a single iterable (when the data has been " -"\"pre-zipped\")." +"Make an iterator that computes the *function* using arguments obtained from " +"the *iterable*. Used instead of :func:`map` when argument parameters have " +"already been \"pre-zipped\" into tuples." msgstr "" -#: ../../library/itertools.rst:652 +#: ../../library/itertools.rst:641 msgid "" "The difference between :func:`map` and :func:`starmap` parallels the " "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" -#: ../../library/itertools.rst:664 +#: ../../library/itertools.rst:653 msgid "" -"Make an iterator that returns elements from the iterable as long as the " -"predicate is true. Roughly equivalent to::" +"Make an iterator that returns elements from the *iterable* as long as the " +"*predicate* is true. Roughly equivalent to::" msgstr "" -#: ../../library/itertools.rst:674 +#: ../../library/itertools.rst:663 msgid "" "Note, the element that first fails the predicate condition is consumed from " "the input iterator and there is no way to access it. This could be an issue " @@ -800,25 +799,25 @@ msgid "" "readthedocs.io/en/stable/api.html#more_itertools.before_and_after>`_ instead." msgstr "" -#: ../../library/itertools.rst:685 +#: ../../library/itertools.rst:674 msgid "Return *n* independent iterators from a single iterable." msgstr "" -#: ../../library/itertools.rst:705 +#: ../../library/itertools.rst:694 msgid "" "Once a :func:`tee` has been created, the original *iterable* should not be " "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" -#: ../../library/itertools.rst:709 +#: ../../library/itertools.rst:698 msgid "" "``tee`` iterators are not threadsafe. A :exc:`RuntimeError` may be raised " "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" -#: ../../library/itertools.rst:713 +#: ../../library/itertools.rst:702 msgid "" "This itertool may require significant auxiliary storage (depending on how " "much temporary data needs to be stored). In general, if one iterator uses " @@ -826,33 +825,38 @@ msgid "" "func:`list` instead of :func:`tee`." msgstr "" -#: ../../library/itertools.rst:721 +#: ../../library/itertools.rst:710 +msgid "Make an iterator that aggregates elements from each of the *iterables*." +msgstr "" + +#: ../../library/itertools.rst:713 msgid "" -"Make an iterator that aggregates elements from each of the iterables. If the " -"iterables are of uneven length, missing values are filled-in with " -"*fillvalue*. Iteration continues until the longest iterable is exhausted. " -"Roughly equivalent to::" +"If the iterables are of uneven length, missing values are filled-in with " +"*fillvalue*. If not specified, *fillvalue* defaults to ``None``." +msgstr "" + +#: ../../library/itertools.rst:716 +msgid "Iteration continues until the longest iterable is exhausted." msgstr "" -#: ../../library/itertools.rst:747 +#: ../../library/itertools.rst:742 msgid "" "If one of the iterables is potentially infinite, then the :func:" "`zip_longest` function should be wrapped with something that limits the " -"number of calls (for example :func:`islice` or :func:`takewhile`). If not " -"specified, *fillvalue* defaults to ``None``." +"number of calls (for example :func:`islice` or :func:`takewhile`)." msgstr "" -#: ../../library/itertools.rst:756 +#: ../../library/itertools.rst:750 msgid "Itertools Recipes" msgstr "" -#: ../../library/itertools.rst:758 +#: ../../library/itertools.rst:752 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" -#: ../../library/itertools.rst:761 +#: ../../library/itertools.rst:755 msgid "" "The primary purpose of the itertools recipes is educational. The recipes " "show various ways of thinking about individual tools — for example, that " @@ -864,7 +868,7 @@ msgid "" "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" -#: ../../library/itertools.rst:770 +#: ../../library/itertools.rst:764 msgid "" "A secondary purpose of the recipes is to serve as an incubator. The " "``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out " @@ -872,13 +876,13 @@ msgid "" "``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" -#: ../../library/itertools.rst:775 +#: ../../library/itertools.rst:769 msgid "" "Substantially all of these recipes and many, many others can be installed " "from the :pypi:`more-itertools` project found on the Python Package Index::" msgstr "" -#: ../../library/itertools.rst:781 +#: ../../library/itertools.rst:775 msgid "" "Many of the recipes offer the same high performance as the underlying " "toolset. Superior memory performance is kept by processing elements one at a " @@ -890,6 +894,9 @@ msgid "" "overhead." msgstr "" -#: ../../library/itertools.rst:957 +#: ../../library/itertools.rst:951 msgid "The following recipes have a more mathematical flavor:" msgstr "" + +#~ msgid "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" +#~ msgstr "``filterfalse(lambda x: x%2, range(10)) → 0 2 4 6 8``" diff --git a/library/pdb.po b/library/pdb.po index 528d9ab7fd..d2db334f8f 100644 --- a/library/pdb.po +++ b/library/pdb.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-05-28 00:03+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-" @@ -335,7 +335,11 @@ msgstr "" msgid "``$_exception``: the exception if the frame is raising an exception" msgstr "" -#: ../../library/pdb.rst:285 +#: ../../library/pdb.rst:281 +msgid "Added the *convenience variable* feature." +msgstr "" + +#: ../../library/pdb.rst:287 msgid "" "If a file :file:`.pdbrc` exists in the user's home directory or in the " "current directory, it is read with ``'utf-8'`` encoding and executed as if " @@ -345,20 +349,20 @@ msgid "" "read first and aliases defined there can be overridden by the local file." msgstr "" -#: ../../library/pdb.rst:292 +#: ../../library/pdb.rst:294 msgid "" ":file:`.pdbrc` can now contain commands that continue debugging, such as :" "pdbcmd:`continue` or :pdbcmd:`next`. Previously, these commands had no " "effect." msgstr "" -#: ../../library/pdb.rst:297 +#: ../../library/pdb.rst:299 msgid "" ":file:`.pdbrc` is now read with ``'utf-8'`` encoding. Previously, it was " "read with the system locale encoding." msgstr "" -#: ../../library/pdb.rst:304 +#: ../../library/pdb.rst:306 msgid "" "Without argument, print the list of available commands. With a *command* as " "argument, print help about that command. ``help pdb`` displays the full " @@ -367,26 +371,26 @@ msgid "" "the ``!`` command." msgstr "" -#: ../../library/pdb.rst:312 +#: ../../library/pdb.rst:314 msgid "" "Print a stack trace, with the most recent frame at the bottom. An arrow " "(``>``) indicates the current frame, which determines the context of most " "commands." msgstr "" -#: ../../library/pdb.rst:317 +#: ../../library/pdb.rst:319 msgid "" "Move the current frame *count* (default one) levels down in the stack trace " "(to a newer frame)." msgstr "" -#: ../../library/pdb.rst:322 +#: ../../library/pdb.rst:324 msgid "" "Move the current frame *count* (default one) levels up in the stack trace " "(to an older frame)." msgstr "" -#: ../../library/pdb.rst:327 +#: ../../library/pdb.rst:329 msgid "" "With a *lineno* argument, set a break there in the current file. With a " "*function* argument, set a break at the first executable statement within " @@ -397,33 +401,33 @@ msgid "" "refer." msgstr "" -#: ../../library/pdb.rst:334 +#: ../../library/pdb.rst:336 msgid "" "If a second argument is present, it is an expression which must evaluate to " "true before the breakpoint is honored." msgstr "" -#: ../../library/pdb.rst:337 +#: ../../library/pdb.rst:339 msgid "" "Without argument, list all breaks, including for each breakpoint, the number " "of times that breakpoint has been hit, the current ignore count, and the " "associated condition if any." msgstr "" -#: ../../library/pdb.rst:343 +#: ../../library/pdb.rst:345 msgid "" "Temporary breakpoint, which is removed automatically when it is first hit. " "The arguments are the same as for :pdbcmd:`break`." msgstr "" -#: ../../library/pdb.rst:348 +#: ../../library/pdb.rst:350 msgid "" "With a *filename:lineno* argument, clear all the breakpoints at this line. " "With a space separated list of breakpoint numbers, clear those breakpoints. " "Without argument, clear all breaks (but first ask confirmation)." msgstr "" -#: ../../library/pdb.rst:354 +#: ../../library/pdb.rst:356 msgid "" "Disable the breakpoints given as a space separated list of breakpoint " "numbers. Disabling a breakpoint means it cannot cause the program to stop " @@ -431,11 +435,11 @@ msgid "" "breakpoints and can be (re-)enabled." msgstr "" -#: ../../library/pdb.rst:361 +#: ../../library/pdb.rst:363 msgid "Enable the breakpoints specified." msgstr "" -#: ../../library/pdb.rst:365 +#: ../../library/pdb.rst:367 msgid "" "Set the ignore count for the given breakpoint number. If *count* is " "omitted, the ignore count is set to 0. A breakpoint becomes active when the " @@ -444,39 +448,39 @@ msgid "" "associated condition evaluates to true." msgstr "" -#: ../../library/pdb.rst:373 +#: ../../library/pdb.rst:375 msgid "" "Set a new *condition* for the breakpoint, an expression which must evaluate " "to true before the breakpoint is honored. If *condition* is absent, any " "existing condition is removed; i.e., the breakpoint is made unconditional." msgstr "" -#: ../../library/pdb.rst:379 +#: ../../library/pdb.rst:381 msgid "" "Specify a list of commands for breakpoint number *bpnumber*. The commands " "themselves appear on the following lines. Type a line containing just " "``end`` to terminate the commands. An example::" msgstr "" -#: ../../library/pdb.rst:388 +#: ../../library/pdb.rst:390 msgid "" "To remove all commands from a breakpoint, type ``commands`` and follow it " "immediately with ``end``; that is, give no commands." msgstr "" -#: ../../library/pdb.rst:391 +#: ../../library/pdb.rst:393 msgid "" "With no *bpnumber* argument, ``commands`` refers to the last breakpoint set." msgstr "" -#: ../../library/pdb.rst:393 +#: ../../library/pdb.rst:395 msgid "" "You can use breakpoint commands to start your program up again. Simply use " "the :pdbcmd:`continue` command, or :pdbcmd:`step`, or any other command that " "resumes execution." msgstr "" -#: ../../library/pdb.rst:397 +#: ../../library/pdb.rst:399 msgid "" "Specifying any command resuming execution (currently :pdbcmd:`continue`, :" "pdbcmd:`step`, :pdbcmd:`next`, :pdbcmd:`return`, :pdbcmd:`jump`, :pdbcmd:" @@ -487,7 +491,7 @@ msgid "" "ambiguities about which list to execute." msgstr "" -#: ../../library/pdb.rst:406 +#: ../../library/pdb.rst:408 msgid "" "If you use the ``silent`` command in the command list, the usual message " "about stopping at a breakpoint is not printed. This may be desirable for " @@ -496,13 +500,13 @@ msgid "" "was reached." msgstr "" -#: ../../library/pdb.rst:413 +#: ../../library/pdb.rst:415 msgid "" "Execute the current line, stop at the first possible occasion (either in a " "function that is called or on the next line in the current function)." msgstr "" -#: ../../library/pdb.rst:418 +#: ../../library/pdb.rst:420 msgid "" "Continue execution until the next line in the current function is reached or " "it returns. (The difference between :pdbcmd:`next` and :pdbcmd:`step` is " @@ -511,46 +515,46 @@ msgid "" "line in the current function.)" msgstr "" -#: ../../library/pdb.rst:426 +#: ../../library/pdb.rst:428 msgid "" "Without argument, continue execution until the line with a number greater " "than the current one is reached." msgstr "" -#: ../../library/pdb.rst:429 +#: ../../library/pdb.rst:431 msgid "" "With *lineno*, continue execution until a line with a number greater or " "equal to *lineno* is reached. In both cases, also stop when the current " "frame returns." msgstr "" -#: ../../library/pdb.rst:433 +#: ../../library/pdb.rst:435 msgid "Allow giving an explicit line number." msgstr "" -#: ../../library/pdb.rst:438 +#: ../../library/pdb.rst:440 msgid "Continue execution until the current function returns." msgstr "" -#: ../../library/pdb.rst:442 +#: ../../library/pdb.rst:444 msgid "Continue execution, only stop when a breakpoint is encountered." msgstr "" -#: ../../library/pdb.rst:446 +#: ../../library/pdb.rst:448 msgid "" "Set the next line that will be executed. Only available in the bottom-most " "frame. This lets you jump back and execute code again, or jump forward to " "skip code that you don't want to run." msgstr "" -#: ../../library/pdb.rst:450 +#: ../../library/pdb.rst:452 msgid "" "It should be noted that not all jumps are allowed -- for instance it is not " "possible to jump into the middle of a :keyword:`for` loop or out of a :" "keyword:`finally` clause." msgstr "" -#: ../../library/pdb.rst:456 +#: ../../library/pdb.rst:458 msgid "" "List source code for the current file. Without arguments, list 11 lines " "around the current line or continue the previous listing. With ``.`` as " @@ -559,7 +563,7 @@ msgid "" "second argument is less than the first, it is interpreted as a count." msgstr "" -#: ../../library/pdb.rst:462 +#: ../../library/pdb.rst:464 msgid "" "The current line in the current frame is indicated by ``->``. If an " "exception is being debugged, the line where the exception was originally " @@ -567,90 +571,90 @@ msgid "" "line." msgstr "" -#: ../../library/pdb.rst:467 +#: ../../library/pdb.rst:469 msgid "Added the ``>>`` marker." msgstr "" -#: ../../library/pdb.rst:472 +#: ../../library/pdb.rst:474 msgid "" "List all source code for the current function or frame. Interesting lines " "are marked as for :pdbcmd:`list`." msgstr "" -#: ../../library/pdb.rst:479 +#: ../../library/pdb.rst:481 msgid "Print the arguments of the current function and their current values." msgstr "" -#: ../../library/pdb.rst:483 +#: ../../library/pdb.rst:485 msgid "Evaluate *expression* in the current context and print its value." msgstr "" -#: ../../library/pdb.rst:487 +#: ../../library/pdb.rst:489 msgid "" "``print()`` can also be used, but is not a debugger command --- this " "executes the Python :func:`print` function." msgstr "" -#: ../../library/pdb.rst:493 +#: ../../library/pdb.rst:495 msgid "" "Like the :pdbcmd:`p` command, except the value of *expression* is pretty-" "printed using the :mod:`pprint` module." msgstr "" -#: ../../library/pdb.rst:498 +#: ../../library/pdb.rst:500 msgid "Print the type of *expression*." msgstr "" -#: ../../library/pdb.rst:502 +#: ../../library/pdb.rst:504 msgid "Try to get source code of *expression* and display it." msgstr "" -#: ../../library/pdb.rst:508 +#: ../../library/pdb.rst:510 msgid "" "Display the value of *expression* if it changed, each time execution stops " "in the current frame." msgstr "" -#: ../../library/pdb.rst:511 +#: ../../library/pdb.rst:513 msgid "" "Without *expression*, list all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:515 +#: ../../library/pdb.rst:517 msgid "" "Display evaluates *expression* and compares to the result of the previous " "evaluation of *expression*, so when the result is mutable, display may not " "be able to pick up the changes." msgstr "" -#: ../../library/pdb.rst:519 +#: ../../library/pdb.rst:521 msgid "Example::" msgstr "範例: ::" -#: ../../library/pdb.rst:527 +#: ../../library/pdb.rst:529 msgid "" "Display won't realize ``lst`` has been changed because the result of " "evaluation is modified in place by ``lst.append(1)`` before being compared::" msgstr "" -#: ../../library/pdb.rst:542 +#: ../../library/pdb.rst:544 msgid "You can do some tricks with copy mechanism to make it work::" msgstr "" -#: ../../library/pdb.rst:561 +#: ../../library/pdb.rst:563 msgid "" "Do not display *expression* anymore in the current frame. Without " "*expression*, clear all display expressions for the current frame." msgstr "" -#: ../../library/pdb.rst:568 +#: ../../library/pdb.rst:570 msgid "" "Start an interactive interpreter (using the :mod:`code` module) whose global " "namespace contains all the (global and local) names found in the current " "scope." msgstr "" -#: ../../library/pdb.rst:578 +#: ../../library/pdb.rst:580 msgid "" "Create an alias called *name* that executes *command*. The *command* must " "*not* be enclosed in quotes. Replaceable parameters can be indicated by " @@ -659,7 +663,7 @@ msgid "" "arguments are given, all aliases are listed." msgstr "" -#: ../../library/pdb.rst:584 +#: ../../library/pdb.rst:586 msgid "" "Aliases may be nested and can contain anything that can be legally typed at " "the pdb prompt. Note that internal pdb commands *can* be overridden by " @@ -668,30 +672,30 @@ msgid "" "other words in the line are left alone." msgstr "" -#: ../../library/pdb.rst:590 +#: ../../library/pdb.rst:592 msgid "" "As an example, here are two useful aliases (especially when placed in the :" "file:`.pdbrc` file)::" msgstr "" -#: ../../library/pdb.rst:600 +#: ../../library/pdb.rst:602 msgid "Delete the specified alias *name*." msgstr "" -#: ../../library/pdb.rst:604 +#: ../../library/pdb.rst:606 msgid "" "Execute the (one-line) *statement* in the context of the current stack " "frame. The exclamation point can be omitted unless the first word of the " "statement resembles a debugger command, e.g.:" msgstr "" -#: ../../library/pdb.rst:613 +#: ../../library/pdb.rst:615 msgid "" "To set a global variable, you can prefix the assignment command with a :" "keyword:`global` statement on the same line, e.g.:" msgstr "" -#: ../../library/pdb.rst:624 +#: ../../library/pdb.rst:626 msgid "" "Restart the debugged Python program. If *args* is supplied, it is split " "with :mod:`shlex` and the result is used as the new :data:`sys.argv`. " @@ -699,25 +703,25 @@ msgid "" "`restart` is an alias for :pdbcmd:`run`." msgstr "" -#: ../../library/pdb.rst:631 +#: ../../library/pdb.rst:633 msgid "Quit from the debugger. The program being executed is aborted." msgstr "" -#: ../../library/pdb.rst:635 +#: ../../library/pdb.rst:637 msgid "" "Enter a recursive debugger that steps through *code* (which is an arbitrary " "expression or statement to be executed in the current environment)." msgstr "" -#: ../../library/pdb.rst:641 +#: ../../library/pdb.rst:643 msgid "Print the return value for the last return of the current function." msgstr "" -#: ../../library/pdb.rst:644 +#: ../../library/pdb.rst:646 msgid "Footnotes" msgstr "註解" -#: ../../library/pdb.rst:645 +#: ../../library/pdb.rst:647 msgid "" "Whether a frame is considered to originate in a certain module is determined " "by the ``__name__`` in the frame globals." @@ -743,18 +747,18 @@ msgstr "bdb" msgid "cmd" msgstr "cmd" -#: ../../library/pdb.rst:281 +#: ../../library/pdb.rst:283 msgid ".pdbrc" msgstr ".pdbrc" -#: ../../library/pdb.rst:281 +#: ../../library/pdb.rst:283 msgid "file" msgstr "file(檔案)" -#: ../../library/pdb.rst:281 +#: ../../library/pdb.rst:283 msgid "debugger" msgstr "debugger(除錯器)" -#: ../../library/pdb.rst:281 +#: ../../library/pdb.rst:283 msgid "configuration" msgstr "configuration(設定)" From ca55b4ad9a1f63d1939487f6c4e64f2a9dc269d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 29 May 2024 00:05:12 +0000 Subject: [PATCH 05/13] sync with cpython 46a37a1a --- library/base64.po | 5 +- library/logging.po | 216 +++++++++++++++++++++++---------------------- 2 files changed, 112 insertions(+), 109 deletions(-) diff --git a/library/base64.po b/library/base64.po index 7464782443..d16ab07b1c 100644 --- a/library/base64.po +++ b/library/base64.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-29 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:39+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -315,10 +315,11 @@ msgstr "" "支援。" #: ../../library/base64.rst:194 +#, fuzzy msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " -"most this many characters long." +"most this many characters long, excluding the trailing newline." msgstr "" "*wrapcol* 控制輸出是否應該包含換行字元 (``b'\\n'``) 。如果這個值不為零,每行" "輸出的長度將不超過這個字元長度。" diff --git a/library/logging.po b/library/logging.po index e502d9f24d..1d2d84dd54 100644 --- a/library/logging.po +++ b/library/logging.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-29 00:03+0000\n" "PO-Revision-Date: 2024-03-28 22:40+0800\n" "Last-Translator: RockLeon \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -148,9 +148,10 @@ msgid "" "Loggers that are further down in the hierarchical list are children of " "loggers higher up in the list. For example, given a logger with a name of " "``foo``, loggers with names of ``foo.bar``, ``foo.bar.baz``, and ``foo.bam`` " -"are all descendants of ``foo``. The logger name hierarchy is analogous to " -"the Python package hierarchy, and identical to it if you organise your " -"loggers on a per-module basis using the recommended construction ``logging." +"are all descendants of ``foo``. In addition, all loggers are descendants of " +"the root logger. The logger name hierarchy is analogous to the Python " +"package hierarchy, and identical to it if you organise your loggers on a per-" +"module basis using the recommended construction ``logging." "getLogger(__name__)``. That's because in a module, ``__name__`` is the " "module's name in the Python package namespace." msgstr "" @@ -1207,11 +1208,11 @@ msgstr "" msgid "Attribute name" msgstr "" -#: ../../library/logging.rst:992 ../../library/logging.rst:1352 +#: ../../library/logging.rst:992 ../../library/logging.rst:1354 msgid "Format" msgstr "格式" -#: ../../library/logging.rst:992 ../../library/logging.rst:1352 +#: ../../library/logging.rst:992 ../../library/logging.rst:1354 msgid "Description" msgstr "描述" @@ -1595,21 +1596,22 @@ msgstr "" #: ../../library/logging.rst:1147 msgid "" -"Return a logger with the specified name or, if name is ``None``, return a " -"logger which is the root logger of the hierarchy. If specified, the name is " -"typically a dot-separated hierarchical name like *'a'*, *'a.b'* or *'a.b.c." -"d'*. Choice of these names is entirely up to the developer who is using " -"logging." +"Return a logger with the specified name or, if name is ``None``, return the " +"root logger of the hierarchy. If specified, the name is typically a dot-" +"separated hierarchical name like *'a'*, *'a.b'* or *'a.b.c.d'*. Choice of " +"these names is entirely up to the developer who is using logging, though it " +"is recommended that ``__name__`` be used unless you have a specific reason " +"for not doing that, as mentioned in :ref:`logger`." msgstr "" -#: ../../library/logging.rst:1152 +#: ../../library/logging.rst:1154 msgid "" "All calls to this function with a given name return the same logger " "instance. This means that logger instances never need to be passed between " "different parts of an application." msgstr "" -#: ../../library/logging.rst:1159 +#: ../../library/logging.rst:1161 msgid "" "Return either the standard :class:`Logger` class, or the last class passed " "to :func:`setLoggerClass`. This function may be called from within a new " @@ -1618,37 +1620,37 @@ msgid "" "example::" msgstr "" -#: ../../library/logging.rst:1170 +#: ../../library/logging.rst:1172 msgid "Return a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1172 +#: ../../library/logging.rst:1174 msgid "" "This function has been provided, along with :func:`setLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1177 +#: ../../library/logging.rst:1179 msgid "" "See :func:`setLogRecordFactory` for more information about the how the " "factory is called." msgstr "" -#: ../../library/logging.rst:1182 +#: ../../library/logging.rst:1184 msgid "" "This is a convenience function that calls :meth:`Logger.debug`, on the root " "logger. The handling of the arguments is in every way identical to what is " "described in that method." msgstr "" -#: ../../library/logging.rst:1186 +#: ../../library/logging.rst:1188 msgid "" "The only difference is that if the root logger has no handlers, then :func:" "`basicConfig` is called, prior to calling ``debug`` on the root logger." msgstr "" -#: ../../library/logging.rst:1189 +#: ../../library/logging.rst:1191 msgid "" "For very short scripts or quick demonstrations of ``logging`` facilities, " "``debug`` and the other module-level functions may be convenient. However, " @@ -1658,38 +1660,38 @@ msgid "" "described at the beginnning of this documentation." msgstr "" -#: ../../library/logging.rst:1199 +#: ../../library/logging.rst:1201 msgid "" "Logs a message with level :const:`INFO` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1205 +#: ../../library/logging.rst:1207 msgid "" "Logs a message with level :const:`WARNING` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1208 +#: ../../library/logging.rst:1210 msgid "" "There is an obsolete function ``warn`` which is functionally identical to " "``warning``. As ``warn`` is deprecated, please do not use it - use " "``warning`` instead." msgstr "" -#: ../../library/logging.rst:1215 +#: ../../library/logging.rst:1217 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1221 +#: ../../library/logging.rst:1223 msgid "" "Logs a message with level :const:`CRITICAL` on the root logger. The " "arguments and behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1227 +#: ../../library/logging.rst:1229 msgid "" "Logs a message with level :const:`ERROR` on the root logger. The arguments " "and behavior are otherwise the same as for :func:`debug`. Exception info is " @@ -1697,13 +1699,13 @@ msgid "" "exception handler." msgstr "" -#: ../../library/logging.rst:1233 +#: ../../library/logging.rst:1235 msgid "" "Logs a message with level *level* on the root logger. The arguments and " "behavior are otherwise the same as for :func:`debug`." msgstr "" -#: ../../library/logging.rst:1238 +#: ../../library/logging.rst:1240 msgid "" "Provides an overriding level *level* for all loggers which takes precedence " "over the logger's own level. When the need arises to temporarily throttle " @@ -1717,7 +1719,7 @@ msgid "" "individual loggers." msgstr "" -#: ../../library/logging.rst:1249 +#: ../../library/logging.rst:1251 msgid "" "Note that if you have defined any custom logging level higher than " "``CRITICAL`` (this is not recommended), you won't be able to rely on the " @@ -1725,13 +1727,13 @@ msgid "" "a suitable value." msgstr "" -#: ../../library/logging.rst:1254 +#: ../../library/logging.rst:1256 msgid "" "The *level* parameter was defaulted to level ``CRITICAL``. See :issue:" "`28524` for more information about this change." msgstr "" -#: ../../library/logging.rst:1260 +#: ../../library/logging.rst:1262 msgid "" "Associates level *level* with text *levelName* in an internal dictionary, " "which is used to map numeric levels to a textual representation, for example " @@ -1741,24 +1743,24 @@ msgid "" "and they should increase in increasing order of severity." msgstr "" -#: ../../library/logging.rst:1267 +#: ../../library/logging.rst:1269 msgid "" "If you are thinking of defining your own levels, please see the section on :" "ref:`custom-levels`." msgstr "" -#: ../../library/logging.rst:1272 +#: ../../library/logging.rst:1274 msgid "" "Returns a mapping from level names to their corresponding logging levels. " "For example, the string \"CRITICAL\" maps to :const:`CRITICAL`. The returned " "mapping is copied from an internal mapping on each call to this function." msgstr "" -#: ../../library/logging.rst:1280 +#: ../../library/logging.rst:1282 msgid "Returns the textual or numeric representation of logging level *level*." msgstr "" -#: ../../library/logging.rst:1282 +#: ../../library/logging.rst:1284 msgid "" "If *level* is one of the predefined levels :const:`CRITICAL`, :const:" "`ERROR`, :const:`WARNING`, :const:`INFO` or :const:`DEBUG` then you get the " @@ -1768,20 +1770,20 @@ msgid "" "the corresponding string representation is returned." msgstr "" -#: ../../library/logging.rst:1289 +#: ../../library/logging.rst:1291 msgid "" "The *level* parameter also accepts a string representation of the level such " "as 'INFO'. In such cases, this functions returns the corresponding numeric " "value of the level." msgstr "" -#: ../../library/logging.rst:1293 +#: ../../library/logging.rst:1295 msgid "" "If no matching numeric or string value is passed in, the string 'Level %s' % " "level is returned." msgstr "" -#: ../../library/logging.rst:1296 +#: ../../library/logging.rst:1298 msgid "" "Levels are internally integers (as they need to be compared in the logging " "logic). This function is used to convert between an integer level and the " @@ -1790,7 +1792,7 @@ msgid "" "vice versa." msgstr "" -#: ../../library/logging.rst:1302 +#: ../../library/logging.rst:1304 msgid "" "In Python versions earlier than 3.4, this function could also be passed a " "text level, and would return the corresponding numeric value of the level. " @@ -1798,17 +1800,17 @@ msgid "" "Python 3.4, but reinstated in 3.4.2 due to retain backward compatibility." msgstr "" -#: ../../library/logging.rst:1310 +#: ../../library/logging.rst:1312 msgid "" "Returns a handler with the specified *name*, or ``None`` if there is no " "handler with that name." msgstr "" -#: ../../library/logging.rst:1317 +#: ../../library/logging.rst:1319 msgid "Returns an immutable set of all known handler names." msgstr "" -#: ../../library/logging.rst:1323 +#: ../../library/logging.rst:1325 msgid "" "Creates and returns a new :class:`LogRecord` instance whose attributes are " "defined by *attrdict*. This function is useful for taking a pickled :class:" @@ -1816,7 +1818,7 @@ msgid "" "as a :class:`LogRecord` instance at the receiving end." msgstr "" -#: ../../library/logging.rst:1331 +#: ../../library/logging.rst:1333 msgid "" "Does basic configuration for the logging system by creating a :class:" "`StreamHandler` with a default :class:`Formatter` and adding it to the root " @@ -1825,13 +1827,13 @@ msgid "" "no handlers are defined for the root logger." msgstr "" -#: ../../library/logging.rst:1337 +#: ../../library/logging.rst:1339 msgid "" "This function does nothing if the root logger already has handlers " "configured, unless the keyword argument *force* is set to ``True``." msgstr "" -#: ../../library/logging.rst:1340 +#: ../../library/logging.rst:1342 msgid "" "This function should be called from the main thread before other threads are " "started. In versions of Python prior to 2.7.1 and 3.2, if this function is " @@ -1840,54 +1842,54 @@ msgid "" "unexpected results such as messages being duplicated in the log." msgstr "" -#: ../../library/logging.rst:1347 +#: ../../library/logging.rst:1349 msgid "The following keyword arguments are supported." msgstr "" -#: ../../library/logging.rst:1354 +#: ../../library/logging.rst:1356 msgid "*filename*" msgstr "*filename*" -#: ../../library/logging.rst:1354 +#: ../../library/logging.rst:1356 msgid "" "Specifies that a :class:`FileHandler` be created, using the specified " "filename, rather than a :class:`StreamHandler`." msgstr "" -#: ../../library/logging.rst:1358 +#: ../../library/logging.rst:1360 msgid "*filemode*" msgstr "*filemode*" -#: ../../library/logging.rst:1358 +#: ../../library/logging.rst:1360 msgid "" "If *filename* is specified, open the file in this :ref:`mode `. " "Defaults to ``'a'``." msgstr "" -#: ../../library/logging.rst:1362 +#: ../../library/logging.rst:1364 msgid "*format*" msgstr "*format*" -#: ../../library/logging.rst:1362 +#: ../../library/logging.rst:1364 msgid "" "Use the specified format string for the handler. Defaults to attributes " "``levelname``, ``name`` and ``message`` separated by colons." msgstr "" -#: ../../library/logging.rst:1367 +#: ../../library/logging.rst:1369 msgid "*datefmt*" msgstr "*datefmt*" -#: ../../library/logging.rst:1367 +#: ../../library/logging.rst:1369 msgid "" "Use the specified date/time format, as accepted by :func:`time.strftime`." msgstr "" -#: ../../library/logging.rst:1370 +#: ../../library/logging.rst:1372 msgid "*style*" msgstr "*style*" -#: ../../library/logging.rst:1370 +#: ../../library/logging.rst:1372 msgid "" "If *format* is specified, use this style for the format string. One of " "``'%'``, ``'{'`` or ``'$'`` for :ref:`printf-style `." msgstr "" -#: ../../library/logging.rst:1381 +#: ../../library/logging.rst:1383 msgid "*stream*" msgstr "*stream*" -#: ../../library/logging.rst:1381 +#: ../../library/logging.rst:1383 msgid "" "Use the specified stream to initialize the :class:`StreamHandler`. Note that " "this argument is incompatible with *filename* - if both are present, a " "``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1387 +#: ../../library/logging.rst:1389 msgid "*handlers*" msgstr "*handlers*" -#: ../../library/logging.rst:1387 +#: ../../library/logging.rst:1389 msgid "" "If specified, this should be an iterable of already created handlers to add " "to the root logger. Any handlers which don't already have a formatter set " @@ -1927,33 +1929,33 @@ msgid "" "present, a ``ValueError`` is raised." msgstr "" -#: ../../library/logging.rst:1396 +#: ../../library/logging.rst:1398 msgid "*force*" msgstr "*force*" -#: ../../library/logging.rst:1396 +#: ../../library/logging.rst:1398 msgid "" "If this keyword argument is specified as true, any existing handlers " "attached to the root logger are removed and closed, before carrying out the " "configuration as specified by the other arguments." msgstr "" -#: ../../library/logging.rst:1402 +#: ../../library/logging.rst:1404 msgid "*encoding*" msgstr "*encoding*" -#: ../../library/logging.rst:1402 +#: ../../library/logging.rst:1404 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " "the output file." msgstr "" -#: ../../library/logging.rst:1407 +#: ../../library/logging.rst:1409 msgid "*errors*" msgstr "*errors*" -#: ../../library/logging.rst:1407 +#: ../../library/logging.rst:1409 msgid "" "If this keyword argument is specified along with *filename*, its value is " "used when the :class:`FileHandler` is created, and thus used when opening " @@ -1962,39 +1964,39 @@ msgid "" "`open`, which means that it will be treated the same as passing 'errors'." msgstr "" -#: ../../library/logging.rst:1418 +#: ../../library/logging.rst:1420 msgid "The *style* argument was added." msgstr "新增 *style* 引數。" -#: ../../library/logging.rst:1421 +#: ../../library/logging.rst:1423 msgid "" "The *handlers* argument was added. Additional checks were added to catch " "situations where incompatible arguments are specified (e.g. *handlers* " "together with *stream* or *filename*, or *stream* together with *filename*)." msgstr "" -#: ../../library/logging.rst:1427 +#: ../../library/logging.rst:1429 msgid "The *force* argument was added." msgstr "新增 *force* 引數。" -#: ../../library/logging.rst:1430 +#: ../../library/logging.rst:1432 msgid "The *encoding* and *errors* arguments were added." msgstr "新增 *encoding* 與 *errors* 引數。" -#: ../../library/logging.rst:1435 +#: ../../library/logging.rst:1437 msgid "" "Informs the logging system to perform an orderly shutdown by flushing and " "closing all handlers. This should be called at application exit and no " "further use of the logging system should be made after this call." msgstr "" -#: ../../library/logging.rst:1439 +#: ../../library/logging.rst:1441 msgid "" "When the logging module is imported, it registers this function as an exit " "handler (see :mod:`atexit`), so normally there's no need to do that manually." msgstr "" -#: ../../library/logging.rst:1446 +#: ../../library/logging.rst:1448 msgid "" "Tells the logging system to use the class *klass* when instantiating a " "logger. The class should define :meth:`!__init__` such that only a name " @@ -2006,32 +2008,32 @@ msgid "" "loggers." msgstr "" -#: ../../library/logging.rst:1457 +#: ../../library/logging.rst:1459 msgid "Set a callable which is used to create a :class:`LogRecord`." msgstr "" -#: ../../library/logging.rst:1459 +#: ../../library/logging.rst:1461 msgid "The factory callable to be used to instantiate a log record." msgstr "" -#: ../../library/logging.rst:1461 +#: ../../library/logging.rst:1463 msgid "" "This function has been provided, along with :func:`getLogRecordFactory`, to " "allow developers more control over how the :class:`LogRecord` representing a " "logging event is constructed." msgstr "" -#: ../../library/logging.rst:1466 +#: ../../library/logging.rst:1468 msgid "The factory has the following signature:" msgstr "" -#: ../../library/logging.rst:1468 +#: ../../library/logging.rst:1470 msgid "" "``factory(name, level, fn, lno, msg, args, exc_info, func=None, sinfo=None, " "**kwargs)``" msgstr "" -#: ../../library/logging.rst:1470 +#: ../../library/logging.rst:1472 msgid "The logger name." msgstr "" @@ -2039,7 +2041,7 @@ msgstr "" msgid "level" msgstr "" -#: ../../library/logging.rst:1471 +#: ../../library/logging.rst:1473 msgid "The logging level (numeric)." msgstr "" @@ -2047,7 +2049,7 @@ msgstr "" msgid "fn" msgstr "fn" -#: ../../library/logging.rst:1472 +#: ../../library/logging.rst:1474 msgid "The full pathname of the file where the logging call was made." msgstr "" @@ -2055,19 +2057,19 @@ msgstr "" msgid "lno" msgstr "lno" -#: ../../library/logging.rst:1473 +#: ../../library/logging.rst:1475 msgid "The line number in the file where the logging call was made." msgstr "" -#: ../../library/logging.rst:1474 +#: ../../library/logging.rst:1476 msgid "The logging message." msgstr "" -#: ../../library/logging.rst:1475 +#: ../../library/logging.rst:1477 msgid "The arguments for the logging message." msgstr "" -#: ../../library/logging.rst:1476 +#: ../../library/logging.rst:1478 msgid "An exception tuple, or ``None``." msgstr "" @@ -2075,7 +2077,7 @@ msgstr "" msgid "func" msgstr "func" -#: ../../library/logging.rst:1477 +#: ../../library/logging.rst:1479 msgid "The name of the function or method which invoked the logging call." msgstr "" @@ -2083,7 +2085,7 @@ msgstr "" msgid "sinfo" msgstr "sinfo" -#: ../../library/logging.rst:1479 +#: ../../library/logging.rst:1481 msgid "" "A stack traceback such as is provided by :func:`traceback.print_stack`, " "showing the call hierarchy." @@ -2093,15 +2095,15 @@ msgstr "" msgid "kwargs" msgstr "kwargs" -#: ../../library/logging.rst:1481 +#: ../../library/logging.rst:1483 msgid "Additional keyword arguments." msgstr "額外的關鍵字引數。" -#: ../../library/logging.rst:1485 +#: ../../library/logging.rst:1487 msgid "Module-Level Attributes" msgstr "" -#: ../../library/logging.rst:1489 +#: ../../library/logging.rst:1491 msgid "" "A \"handler of last resort\" is available through this attribute. This is a :" "class:`StreamHandler` writing to ``sys.stderr`` with a level of ``WARNING``, " @@ -2112,15 +2114,15 @@ msgid "" "reason, ``lastResort`` can be set to ``None``." msgstr "" -#: ../../library/logging.rst:1501 +#: ../../library/logging.rst:1503 msgid "Used to see if exceptions during handling should be propagated." msgstr "" -#: ../../library/logging.rst:1503 +#: ../../library/logging.rst:1505 msgid "Default: ``True``." msgstr "" -#: ../../library/logging.rst:1505 +#: ../../library/logging.rst:1507 msgid "" "If :data:`raiseExceptions` is ``False``, exceptions get silently ignored. " "This is what is mostly wanted for a logging system - most users will not " @@ -2128,22 +2130,22 @@ msgid "" "application errors." msgstr "" -#: ../../library/logging.rst:1512 +#: ../../library/logging.rst:1514 msgid "Integration with the warnings module" msgstr "" -#: ../../library/logging.rst:1514 +#: ../../library/logging.rst:1516 msgid "" "The :func:`captureWarnings` function can be used to integrate :mod:`logging` " "with the :mod:`warnings` module." msgstr "" -#: ../../library/logging.rst:1519 +#: ../../library/logging.rst:1521 msgid "" "This function is used to turn the capture of warnings by logging on and off." msgstr "" -#: ../../library/logging.rst:1522 +#: ../../library/logging.rst:1524 msgid "" "If *capture* is ``True``, warnings issued by the :mod:`warnings` module will " "be redirected to the logging system. Specifically, a warning will be " @@ -2152,46 +2154,46 @@ msgid "" "`WARNING`." msgstr "" -#: ../../library/logging.rst:1527 +#: ../../library/logging.rst:1529 msgid "" "If *capture* is ``False``, the redirection of warnings to the logging system " "will stop, and warnings will be redirected to their original destinations (i." "e. those in effect before ``captureWarnings(True)`` was called)." msgstr "" -#: ../../library/logging.rst:1534 +#: ../../library/logging.rst:1536 msgid "Module :mod:`logging.config`" msgstr "" -#: ../../library/logging.rst:1535 +#: ../../library/logging.rst:1537 msgid "Configuration API for the logging module." msgstr "" -#: ../../library/logging.rst:1537 +#: ../../library/logging.rst:1539 msgid "Module :mod:`logging.handlers`" msgstr "" -#: ../../library/logging.rst:1538 +#: ../../library/logging.rst:1540 msgid "Useful handlers included with the logging module." msgstr "" -#: ../../library/logging.rst:1540 +#: ../../library/logging.rst:1542 msgid ":pep:`282` - A Logging System" msgstr "" -#: ../../library/logging.rst:1541 +#: ../../library/logging.rst:1543 msgid "" "The proposal which described this feature for inclusion in the Python " "standard library." msgstr "" -#: ../../library/logging.rst:1544 +#: ../../library/logging.rst:1546 msgid "" "`Original Python logging package `_" msgstr "" -#: ../../library/logging.rst:1545 +#: ../../library/logging.rst:1547 msgid "" "This is the original source for the :mod:`logging` package. The version of " "the package available from this site is suitable for use with Python 1.5.2, " From 1e175d9b30a065bb568ba3c63a20f13095eeb950 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 31 May 2024 00:05:09 +0000 Subject: [PATCH 06/13] sync with cpython bd0d97ce --- glossary.po | 12 +- howto/pyporting.po | 6 +- library/cmath.po | 106 ++--- library/dataclasses.po | 6 +- library/functions.po | 889 ++++++++++++++++++++++------------------- library/subprocess.po | 4 +- 6 files changed, 541 insertions(+), 482 deletions(-) diff --git a/glossary.po b/glossary.po index 384a71e74d..12282b1e18 100644 --- a/glossary.po +++ b/glossary.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-15 12:57+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+0000\n" "PO-Revision-Date: 2023-07-02 22:47+0800\n" "Last-Translator: Matt Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -969,10 +969,11 @@ msgstr "" "一個物件,它會嘗試為正在被 import 的模組尋找 :term:`loader`\\ (載入器)。" #: ../../glossary.rst:436 +#, fuzzy msgid "" -"Since Python 3.3, there are two types of finder: :term:`meta path finders " -"` for use with :data:`sys.meta_path`, and :term:`path " -"entry finders ` for use with :data:`sys.path_hooks`." +"There are two types of finder: :term:`meta path finders ` " +"for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." msgstr "" "從 Python 3.3 開始,有兩種類型的尋檢器:\\ :term:`元路徑尋檢器 (meta path " "finder) ` 會使用 :data:`sys.meta_path`,而\\ :term:`路徑項" @@ -980,7 +981,8 @@ msgstr "" "path_hooks`。" #: ../../glossary.rst:440 -msgid "See :pep:`302`, :pep:`420` and :pep:`451` for much more detail." +#, fuzzy +msgid "See :ref:`importsystem` and :mod:`importlib` for much more detail." msgstr "請參閱 :pep:`302`、:pep:`420` 和 :pep:`451` 以了解更多細節。" #: ../../glossary.rst:441 diff --git a/howto/pyporting.po b/howto/pyporting.po index 4be4e852b8..4184ecf0de 100644 --- a/howto/pyporting.po +++ b/howto/pyporting.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-02-22 00:03+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:37+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -52,8 +52,8 @@ msgstr "" #: ../../howto/pyporting.rst:21 msgid "" -"Since Python 3.13 the original porting guide was discontinued. You can find " -"the old guide in the `archive `_." msgstr "" diff --git a/library/cmath.po b/library/cmath.po index 61e464c2f0..01ba53a37b 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+0000\n" "PO-Revision-Date: 2024-03-14 09:26+0800\n" "Last-Translator: Enkai Huang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -76,15 +76,16 @@ msgid "Conversions to and from polar coordinates" msgstr "轉換到極座標和從極座標做轉換" #: ../../library/cmath.rst:44 +#, fuzzy msgid "" "A Python complex number ``z`` is stored internally using *rectangular* or " "*Cartesian* coordinates. It is completely determined by its *real part* ``z." -"real`` and its *imaginary part* ``z.imag``. In other words::" +"real`` and its *imaginary part* ``z.imag``." msgstr "" "Python 複數 ``z`` 是用 *直角坐標* 或 *笛卡爾坐標* 儲存在內部的。它完全是由其 " "*實部* ``z.real`` 和 *虛部* ``z.imag`` 所決定。換句話說: ::" -#: ../../library/cmath.rst:51 +#: ../../library/cmath.rst:48 msgid "" "*Polar coordinates* give an alternative way to represent a complex number. " "In polar coordinates, a complex number *z* is defined by the modulus *r* and " @@ -97,13 +98,13 @@ msgstr "" "*r* 和相位角 (phase) *phi* 定義。絕對值 *r* 是從 *z* 到原點的距離,而相位角 " "*phi* 是從正 x 軸到連接原點到 *z* 的線段的逆時針角度(以弧度為單位)。" -#: ../../library/cmath.rst:58 +#: ../../library/cmath.rst:55 msgid "" "The following functions can be used to convert from the native rectangular " "coordinates to polar coordinates and back." msgstr "以下的函式可用於原始直角座標與極座標之間的相互轉換。" -#: ../../library/cmath.rst:63 +#: ../../library/cmath.rst:60 msgid "" "Return the phase of *x* (also known as the *argument* of *x*), as a float. " "``phase(x)`` is equivalent to ``math.atan2(x.imag, x.real)``. The result " @@ -116,7 +117,7 @@ msgstr "" "作的分枝切割將位於負實軸上。結果的符號會與 ``x.imag`` 的符號相同,即使 ``x." "imag`` 為零: ::" -#: ../../library/cmath.rst:77 +#: ../../library/cmath.rst:74 msgid "" "The modulus (absolute value) of a complex number *x* can be computed using " "the built-in :func:`abs` function. There is no separate :mod:`cmath` module " @@ -125,7 +126,7 @@ msgstr "" "複數 *x* 的絕對值可以使用內建的 :func:`abs` 函式計算。沒有單獨的 :mod:" "`cmath` 模組函式適用於此操作。" -#: ../../library/cmath.rst:84 +#: ../../library/cmath.rst:81 msgid "" "Return the representation of *x* in polar coordinates. Returns a pair ``(r, " "phi)`` where *r* is the modulus of *x* and phi is the phase of *x*. " @@ -134,25 +135,26 @@ msgstr "" "回傳 *x* 在極座標中的表達方式。回傳一組數對 ``(r, phi)``, *r* 是 *x* 的絕對" "值, *phi* 是 *x* 的相位角。 ``polar(x)`` 相當於 ``(abs(x), phase(x))``。" -#: ../../library/cmath.rst:92 +#: ../../library/cmath.rst:89 +#, fuzzy msgid "" "Return the complex number *x* with polar coordinates *r* and *phi*. " -"Equivalent to ``r * (math.cos(phi) + math.sin(phi)*1j)``." +"Equivalent to ``complex(r * math.cos(phi), r * math.sin(phi))``." msgstr "" "透過極座標 *r* 和 *phi* 回傳複數 *x*。相當於 ``r * (math.cos(phi) + math." "sin(phi)*1j)``。" -#: ../../library/cmath.rst:97 +#: ../../library/cmath.rst:94 msgid "Power and logarithmic functions" msgstr "冪函數和對數函數" -#: ../../library/cmath.rst:101 +#: ../../library/cmath.rst:98 msgid "" "Return *e* raised to the power *x*, where *e* is the base of natural " "logarithms." msgstr "回傳 *e* 的 *x* 次方,其中 *e* 是自然對數的底數。" -#: ../../library/cmath.rst:107 +#: ../../library/cmath.rst:104 msgid "" "Returns the logarithm of *x* to the given *base*. If the *base* is not " "specified, returns the natural logarithm of *x*. There is one branch cut, " @@ -161,22 +163,22 @@ msgstr "" "回傳 *x* 給定 *base* 的對數。如果未指定 *base*,則傳回 *x* 的自然對數。存在一" "條分枝切割,從 0 沿負實數軸到 -∞。" -#: ../../library/cmath.rst:114 +#: ../../library/cmath.rst:111 msgid "" "Return the base-10 logarithm of *x*. This has the same branch cut as :func:" "`log`." msgstr "回傳 *x* 以 10 為底的對數。它與 :func:`log` 具有相同的分枝切割。" -#: ../../library/cmath.rst:120 +#: ../../library/cmath.rst:117 msgid "" "Return the square root of *x*. This has the same branch cut as :func:`log`." msgstr "回傳 *x* 的平方根。它與 :func:`log` 具有相同的分枝切割。" -#: ../../library/cmath.rst:124 +#: ../../library/cmath.rst:121 msgid "Trigonometric functions" msgstr "三角函數" -#: ../../library/cmath.rst:128 +#: ../../library/cmath.rst:125 msgid "" "Return the arc cosine of *x*. There are two branch cuts: One extends right " "from 1 along the real axis to ∞. The other extends left from -1 along the " @@ -185,12 +187,12 @@ msgstr "" "回傳 *x* 的反餘弦值。存在兩條分枝切割:一條是從 1 沿著實數軸向右延伸到 ∞。另" "一條從 -1 沿實數軸向左延伸到 -∞。" -#: ../../library/cmath.rst:135 +#: ../../library/cmath.rst:132 msgid "" "Return the arc sine of *x*. This has the same branch cuts as :func:`acos`." msgstr "回傳 *x* 的反正弦值。它與 :func:`acos` 具有相同的分枝切割。" -#: ../../library/cmath.rst:140 +#: ../../library/cmath.rst:137 msgid "" "Return the arc tangent of *x*. There are two branch cuts: One extends from " "``1j`` along the imaginary axis to ``∞j``. The other extends from ``-1j`` " @@ -199,30 +201,30 @@ msgstr "" "回傳 *x* 的反正切值。有兩條分枝切割:一條是從 ``1j`` 沿著虛軸延伸到 ``∞j``。" "另一條從 ``-1j`` 沿著虛軸延伸到 ``-∞j``。" -#: ../../library/cmath.rst:147 +#: ../../library/cmath.rst:144 msgid "Return the cosine of *x*." msgstr "回傳 *x* 的餘弦值。" -#: ../../library/cmath.rst:152 +#: ../../library/cmath.rst:149 msgid "Return the sine of *x*." msgstr "回傳 *x* 的正弦值。" -#: ../../library/cmath.rst:157 +#: ../../library/cmath.rst:154 msgid "Return the tangent of *x*." msgstr "回傳 *x* 的正切值。" -#: ../../library/cmath.rst:161 +#: ../../library/cmath.rst:158 msgid "Hyperbolic functions" msgstr "雙曲函數" -#: ../../library/cmath.rst:165 +#: ../../library/cmath.rst:162 msgid "" "Return the inverse hyperbolic cosine of *x*. There is one branch cut, " "extending left from 1 along the real axis to -∞." msgstr "" "回傳 *x* 的反雙曲餘弦值。存在一條分枝切割,從 1 沿實數軸向左延伸到 -∞。" -#: ../../library/cmath.rst:171 +#: ../../library/cmath.rst:168 msgid "" "Return the inverse hyperbolic sine of *x*. There are two branch cuts: One " "extends from ``1j`` along the imaginary axis to ``∞j``. The other extends " @@ -231,7 +233,7 @@ msgstr "" "回傳 *x* 的反雙曲正弦值。存在兩條分枝切割:一條是從 ``1j`` 沿著虛軸延伸到 " "``∞j``。另一條從 ``-1j`` 沿著虛軸延伸到 ``-∞j``。" -#: ../../library/cmath.rst:178 +#: ../../library/cmath.rst:175 msgid "" "Return the inverse hyperbolic tangent of *x*. There are two branch cuts: One " "extends from ``1`` along the real axis to ``∞``. The other extends from " @@ -240,54 +242,54 @@ msgstr "" "回傳 *x* 的反雙曲正切值。存在兩條分枝切割:一條是從 ``1`` 沿著實數軸延伸到 " "``∞``。另一條從 ``-1`` 沿著實數軸延伸到 ``-∞``。" -#: ../../library/cmath.rst:185 +#: ../../library/cmath.rst:182 msgid "Return the hyperbolic cosine of *x*." msgstr "回傳 *x* 的反雙曲餘弦值。" -#: ../../library/cmath.rst:190 +#: ../../library/cmath.rst:187 msgid "Return the hyperbolic sine of *x*." msgstr "回傳 *x* 的反雙曲正弦值。" -#: ../../library/cmath.rst:195 +#: ../../library/cmath.rst:192 msgid "Return the hyperbolic tangent of *x*." msgstr "回傳 *x* 的反雙曲正切值。" -#: ../../library/cmath.rst:199 +#: ../../library/cmath.rst:196 msgid "Classification functions" msgstr "分類函式" -#: ../../library/cmath.rst:203 +#: ../../library/cmath.rst:200 msgid "" "Return ``True`` if both the real and imaginary parts of *x* are finite, and " "``False`` otherwise." msgstr "如果 *x* 的實部和虛部都是有限的,則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/cmath.rst:211 +#: ../../library/cmath.rst:208 msgid "" "Return ``True`` if either the real or the imaginary part of *x* is an " "infinity, and ``False`` otherwise." msgstr "如果 *x* 的實部或虛部是無窮大,則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/cmath.rst:217 +#: ../../library/cmath.rst:214 msgid "" "Return ``True`` if either the real or the imaginary part of *x* is a NaN, " "and ``False`` otherwise." msgstr "如果 *x* 的實部或虛部為 NaN,則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/cmath.rst:223 +#: ../../library/cmath.rst:220 msgid "" "Return ``True`` if the values *a* and *b* are close to each other and " "``False`` otherwise." msgstr "如果 *a* 和 *b* 的值相互接近,則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/cmath.rst:226 +#: ../../library/cmath.rst:223 msgid "" "Whether or not two values are considered close is determined according to " "given absolute and relative tolerances." msgstr "" "兩個值是否被認為相互接近是由給定的絕對和相對容許偏差 (tolerance) 所決定的。" -#: ../../library/cmath.rst:229 +#: ../../library/cmath.rst:226 msgid "" "*rel_tol* is the relative tolerance -- it is the maximum allowed difference " "between *a* and *b*, relative to the larger absolute value of *a* or *b*. " @@ -300,7 +302,7 @@ msgstr "" "設容許偏差是 ``1e-09``,它確保兩個值在大約 9 位十進制數字內相同。 *rel_tol* " "必須大於零。" -#: ../../library/cmath.rst:235 +#: ../../library/cmath.rst:232 msgid "" "*abs_tol* is the minimum absolute tolerance -- useful for comparisons near " "zero. *abs_tol* must be at least zero." @@ -308,7 +310,7 @@ msgstr "" "*abs_tol* 是最小絕對容許偏差 -- 對於接近零的比較很有用。 *abs_tol* 必須至少為" "零。" -#: ../../library/cmath.rst:238 +#: ../../library/cmath.rst:235 msgid "" "If no errors occur, the result will be: ``abs(a-b) <= max(rel_tol * " "max(abs(a), abs(b)), abs_tol)``." @@ -316,7 +318,7 @@ msgstr "" "如果未發生錯誤,結果將為: ``abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), " "abs_tol)``。" -#: ../../library/cmath.rst:241 +#: ../../library/cmath.rst:238 msgid "" "The IEEE 754 special values of ``NaN``, ``inf``, and ``-inf`` will be " "handled according to IEEE rules. Specifically, ``NaN`` is not considered " @@ -327,49 +329,49 @@ msgstr "" "體來說, ``NaN`` 不被認為接近任何其他值,包括 ``NaN``。 ``inf`` 和 ``-inf`` " "只被認為是接近它們自己的。" -#: ../../library/cmath.rst:250 +#: ../../library/cmath.rst:247 msgid ":pep:`485` -- A function for testing approximate equality" msgstr ":pep:`485` -- 一個用來測試近似相等的函式" -#: ../../library/cmath.rst:254 +#: ../../library/cmath.rst:251 msgid "Constants" msgstr "常數" -#: ../../library/cmath.rst:258 +#: ../../library/cmath.rst:255 msgid "The mathematical constant *π*, as a float." msgstr "數學常數 *π*,作為一個浮點數。" -#: ../../library/cmath.rst:263 +#: ../../library/cmath.rst:260 msgid "The mathematical constant *e*, as a float." msgstr "數學常數 *e*,作為一個浮點數。" -#: ../../library/cmath.rst:268 +#: ../../library/cmath.rst:265 msgid "The mathematical constant *τ*, as a float." msgstr "數學常數 *τ*,作為一個浮點數。" -#: ../../library/cmath.rst:275 +#: ../../library/cmath.rst:272 msgid "Floating-point positive infinity. Equivalent to ``float('inf')``." msgstr "正無窮大的浮點數。相當於 ``float('inf')``。" -#: ../../library/cmath.rst:282 +#: ../../library/cmath.rst:279 msgid "" "Complex number with zero real part and positive infinity imaginary part. " "Equivalent to ``complex(0.0, float('inf'))``." msgstr "實部為零和虛部為正無窮的複數。相當於 ``complex(0.0, float('inf'))``。" -#: ../../library/cmath.rst:290 +#: ../../library/cmath.rst:287 msgid "" "A floating-point \"not a number\" (NaN) value. Equivalent to " "``float('nan')``." msgstr "浮點「非數字」 (NaN) 值。相當於 ``float('nan')``。" -#: ../../library/cmath.rst:298 +#: ../../library/cmath.rst:295 msgid "" "Complex number with zero real part and NaN imaginary part. Equivalent to " "``complex(0.0, float('nan'))``." msgstr "實部為零和虛部為 NaN 的複數。相當於 ``complex(0.0, float('nan'))``。" -#: ../../library/cmath.rst:306 +#: ../../library/cmath.rst:303 msgid "" "Note that the selection of functions is similar, but not identical, to that " "in module :mod:`math`. The reason for having two modules is that some users " @@ -385,7 +387,7 @@ msgstr "" "sqrt(-1)`` 引發異常,也不願它回傳複數。另請注意, :mod:`cmath` 中所定義的函式" "始終都會回傳複數,即使答案可以表示為實數(在這種情況下,複數的虛部為零)。" -#: ../../library/cmath.rst:314 +#: ../../library/cmath.rst:311 msgid "" "A note on branch cuts: They are curves along which the given function fails " "to be continuous. They are a necessary feature of many complex functions. " @@ -400,17 +402,17 @@ msgstr "" "所有關於複變函數的(不是太初級的)書籍以獲得啟發。對於如何正確地基於數值目的" "選擇分枝切割的相關訊息,以下內容應該是一個很好的參考:" -#: ../../library/cmath.rst:324 +#: ../../library/cmath.rst:321 msgid "" "Kahan, W: Branch cuts for complex elementary functions; or, Much ado about " "nothing's sign bit. In Iserles, A., and Powell, M. (eds.), The state of the " "art in numerical analysis. Clarendon Press (1987) pp165--211." msgstr "" -#: ../../library/cmath.rst:304 +#: ../../library/cmath.rst:301 msgid "module" msgstr "module(模組)" -#: ../../library/cmath.rst:304 +#: ../../library/cmath.rst:301 msgid "math" msgstr "math(數學)" diff --git a/library/dataclasses.po b/library/dataclasses.po index aa98ab8d0b..dd4888002a 100644 --- a/library/dataclasses.po +++ b/library/dataclasses.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-24 00:03+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+0000\n" "PO-Revision-Date: 2023-02-11 15:02+0800\n" "Last-Translator: \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -750,8 +750,8 @@ msgstr "" #: ../../library/dataclasses.rst:462 #, fuzzy msgid "" -"Return ``True`` if its parameter is a dataclass or an instance of one, " -"otherwise return ``False``." +"Return ``True`` if its parameter is a dataclass (including subclasses of a " +"dataclass) or an instance of one, otherwise return ``False``." msgstr "" "如果它的參數是一個資料類別或一個實例,則回傳 ``True``,否則回傳 ``False``。" diff --git a/library/functions.po b/library/functions.po index d6f5ca498e..23758c277b 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-21 00:03+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+0000\n" "PO-Revision-Date: 2024-05-06 17:06+0800\n" "Last-Translator: KNChiu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -489,19 +489,20 @@ msgid "" "ways." msgstr "如果不一定需要 \"0b\" 前綴,還可以使用如下的方法。" -#: ../../library/functions.rst:141 ../../library/functions.rst:859 -#: ../../library/functions.rst:1177 +#: ../../library/functions.rst:141 ../../library/functions.rst:909 +#: ../../library/functions.rst:1246 msgid "See also :func:`format` for more information." msgstr "可參考 :func:`format` 獲取更多資訊。" #: ../../library/functions.rst:146 +#, fuzzy msgid "" -"Return a Boolean value, i.e. one of ``True`` or ``False``. *x* is converted " -"using the standard :ref:`truth testing procedure `. If *x* is false " -"or omitted, this returns ``False``; otherwise, it returns ``True``. The :" -"class:`bool` class is a subclass of :class:`int` (see :ref:`typesnumeric`). " -"It cannot be subclassed further. Its only instances are ``False`` and " -"``True`` (see :ref:`typebool`)." +"Return a Boolean value, i.e. one of ``True`` or ``False``. The argument is " +"converted using the standard :ref:`truth testing procedure `. If the " +"argument is false or omitted, this returns ``False``; otherwise, it returns " +"``True``. The :class:`bool` class is a subclass of :class:`int` (see :ref:" +"`typesnumeric`). It cannot be subclassed further. Its only instances are " +"``False`` and ``True`` (see :ref:`typebool`)." msgstr "" "回傳一個布林值,即 ``True`` 或者 ``False``。*x* 使用標準的\\ :ref:`真值測試程" "序 `\\ 來轉換。如果 *x* 為假或者被省略,則回傳 ``False``;其他情況回" @@ -509,12 +510,12 @@ msgstr "" "(參見 :ref:`typesnumeric`),其他 class 不能繼承自它。它只有 ``False`` 和 " "``True`` 兩個實例(參見 :ref:`typebool`)。" -#: ../../library/functions.rst:155 ../../library/functions.rst:724 -#: ../../library/functions.rst:948 -msgid "*x* is now a positional-only parameter." +#: ../../library/functions.rst:156 ../../library/functions.rst:774 +#, fuzzy +msgid "The parameter is now positional-only." msgstr "*x* 現在為僅限位置參數。" -#: ../../library/functions.rst:160 +#: ../../library/functions.rst:161 msgid "" "This function drops you into the debugger at the call site. Specifically, " "it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight " @@ -534,7 +535,7 @@ msgstr "" "`breakpoint` 將自動呼叫該函式,讓你進入所選擇的除錯器。如果無法存取 :func:" "`sys.breakpointhook` 這個函式,則此函式將引發 :exc:`RuntimeError`。" -#: ../../library/functions.rst:172 +#: ../../library/functions.rst:173 msgid "" "By default, the behavior of :func:`breakpoint` can be changed with the :" "envvar:`PYTHONBREAKPOINT` environment variable. See :func:`sys." @@ -543,13 +544,13 @@ msgstr "" "預設情況下,:func:`breakpoint` 的行為可以通過 :envvar:`PYTHONBREAKPOINT` 環境" "變數來更改。有關使用詳情,請參考 :func:`sys.breakpointhook`。" -#: ../../library/functions.rst:176 +#: ../../library/functions.rst:177 msgid "" "Note that this is not guaranteed if :func:`sys.breakpointhook` has been " "replaced." msgstr "請注意,如果 :func:`sys.breakpointhook` 被替換了,則無法保證此功能。" -#: ../../library/functions.rst:179 +#: ../../library/functions.rst:180 msgid "" "Raises an :ref:`auditing event ` ``builtins.breakpoint`` with " "argument ``breakpointhook``." @@ -557,7 +558,7 @@ msgstr "" "引發一個附帶引數 ``breakpointhook`` 的\\ :ref:`稽核事件 ` " "``builtins.breakpoint``。" -#: ../../library/functions.rst:189 +#: ../../library/functions.rst:190 msgid "" "Return a new array of bytes. The :class:`bytearray` class is a mutable " "sequence of integers in the range 0 <= x < 256. It has most of the usual " @@ -569,13 +570,13 @@ msgstr "" "`typesseq-mutable` 中所述),同時也有 :class:`bytes` 型別大部分的 method,參" "見 :ref:`bytes-methods`。" -#: ../../library/functions.rst:194 +#: ../../library/functions.rst:195 msgid "" "The optional *source* parameter can be used to initialize the array in a few " "different ways:" msgstr "選擇性參數 *source* 可以被用來以不同的方式初始化陣列:" -#: ../../library/functions.rst:197 +#: ../../library/functions.rst:198 msgid "" "If it is a *string*, you must also give the *encoding* (and optionally, " "*errors*) parameters; :func:`bytearray` then converts the string to bytes " @@ -585,14 +586,14 @@ msgstr "" "*errors* );\\ :func:`bytearray` 會使用 :meth:`str.encode` method 來將 " "string 轉變成 bytes。" -#: ../../library/functions.rst:201 +#: ../../library/functions.rst:202 msgid "" "If it is an *integer*, the array will have that size and will be initialized " "with null bytes." msgstr "" "如果是一個 *integer*,陣列則會有該數值的長度,並以 null bytes 來當作初始值。" -#: ../../library/functions.rst:204 +#: ../../library/functions.rst:205 msgid "" "If it is an object conforming to the :ref:`buffer interface " "`, a read-only buffer of the object will be used to " @@ -601,7 +602,7 @@ msgstr "" "如果是一個符合 :ref:`buffer 介面 `\\ 的物件,該物件的唯讀 " "buffer 會被用來初始化 bytes 陣列。" -#: ../../library/functions.rst:207 +#: ../../library/functions.rst:208 msgid "" "If it is an *iterable*, it must be an iterable of integers in the range ``0 " "<= x < 256``, which are used as the initial contents of the array." @@ -609,15 +610,15 @@ msgstr "" "如果是一個 *iterable*,它的元素必須是範圍為 ``0 <= x < 256`` 的整數,並且會被" "用作陣列的初始值。" -#: ../../library/functions.rst:210 +#: ../../library/functions.rst:211 msgid "Without an argument, an array of size 0 is created." msgstr "如果沒有引數,則建立長度為 0 的陣列。" -#: ../../library/functions.rst:212 +#: ../../library/functions.rst:213 msgid "See also :ref:`binaryseq` and :ref:`typebytearray`." msgstr "可參考 :ref:`binaryseq` 和 :ref:`typebytearray`。" -#: ../../library/functions.rst:221 +#: ../../library/functions.rst:222 msgid "" "Return a new \"bytes\" object which is an immutable sequence of integers in " "the range ``0 <= x < 256``. :class:`bytes` is an immutable version of :" @@ -628,20 +629,20 @@ msgstr "" "變序列。:class:`bytes` 是 :class:`bytearray` 的不可變版本 — 它的同樣具備不改" "變物件的 method,也有相同的索引和切片操作。" -#: ../../library/functions.rst:226 +#: ../../library/functions.rst:227 msgid "" "Accordingly, constructor arguments are interpreted as for :func:`bytearray`." msgstr "因此,建構函式的引數和 :func:`bytearray` 相同。" -#: ../../library/functions.rst:228 +#: ../../library/functions.rst:229 msgid "Bytes objects can also be created with literals, see :ref:`strings`." msgstr "Bytes 物件還可以用文字建立,參見 :ref:`strings`。" -#: ../../library/functions.rst:230 +#: ../../library/functions.rst:231 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." msgstr "可參考 :ref:`binaryseq`、\\ :ref:`typebytes` 和 :ref:`bytes-methods`。" -#: ../../library/functions.rst:235 +#: ../../library/functions.rst:236 msgid "" "Return :const:`True` if the *object* argument appears callable, :const:" "`False` if not. If this returns ``True``, it is still possible that a call " @@ -654,13 +655,13 @@ msgstr "" "會失敗。注意 class 是可呼叫的(呼叫 class 會回傳一個新的實例);如果實例的 " "class 有定義 :meth:`~object.__call__` method,則它是可呼叫的。" -#: ../../library/functions.rst:241 +#: ../../library/functions.rst:242 msgid "" "This function was first removed in Python 3.0 and then brought back in " "Python 3.2." msgstr "這個函式一開始在 Python 3.0 被移除,但在 Python 3.2 又被重新加入。" -#: ../../library/functions.rst:248 +#: ../../library/functions.rst:249 msgid "" "Return the string representing a character whose Unicode code point is the " "integer *i*. For example, ``chr(97)`` returns the string ``'a'``, while " @@ -669,7 +670,7 @@ msgstr "" "回傳代表字元之 Unicode 編碼位置為整數 *i* 的字串。例如,``chr(97)`` 回傳字串 " "``'a'``,而 ``chr(8364)`` 回傳字串 ``'€'``。這是 :func:`ord` 的逆函式。" -#: ../../library/functions.rst:252 +#: ../../library/functions.rst:253 msgid "" "The valid range for the argument is from 0 through 1,114,111 (0x10FFFF in " "base 16). :exc:`ValueError` will be raised if *i* is outside that range." @@ -677,11 +678,11 @@ msgstr "" "引數的有效範圍是 0 到 1,114,111(16 進制表示為 0x10FFFF)。如果 *i* 超過這個" "範圍,會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:258 +#: ../../library/functions.rst:259 msgid "Transform a method into a class method." msgstr "把一個 method 封裝成 class method(類別方法)。" -#: ../../library/functions.rst:260 +#: ../../library/functions.rst:261 msgid "" "A class method receives the class as an implicit first argument, just like " "an instance method receives the instance. To declare a class method, use " @@ -692,7 +693,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:268 +#: ../../library/functions.rst:269 msgid "" "The ``@classmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -700,7 +701,7 @@ msgstr "" "``@classmethod`` 語法是一個函式 :term:`decorator` — 參見 :ref:`function` 中關" "於函式定義的詳細介紹。" -#: ../../library/functions.rst:271 +#: ../../library/functions.rst:272 msgid "" "A class method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). The instance is ignored except for its " @@ -711,7 +712,7 @@ msgstr "" "叫。實例除了它的 class 資訊,其他都會被忽略。如果一個 class method 在 " "subclass 上呼叫,subclass 會作為第一個引數傳入。" -#: ../../library/functions.rst:276 +#: ../../library/functions.rst:277 msgid "" "Class methods are different than C++ or Java static methods. If you want " "those, see :func:`staticmethod` in this section. For more information on " @@ -721,7 +722,7 @@ msgstr "" "method,請看本節的 :func:`staticmethod`。關於 class method 的更多資訊,請參" "考 :ref:`types`。" -#: ../../library/functions.rst:280 +#: ../../library/functions.rst:281 msgid "" "Class methods can now wrap other :term:`descriptors ` such as :" "func:`property`." @@ -729,7 +730,7 @@ msgstr "" "Class methods 現在可以包裝其他\\ :term:`描述器 ` ,例如 :func:" "`property`" -#: ../../library/functions.rst:284 +#: ../../library/functions.rst:285 msgid "" "Class methods now inherit the method attributes (``__module__``, " "``__name__``, ``__qualname__``, ``__doc__`` and ``__annotations__``) and " @@ -739,7 +740,7 @@ msgstr "" "``__qualname__``、``__doc__`` 和 ``__annotations__``),並擁有一個新的 " "``__wrapped__`` 屬性。" -#: ../../library/functions.rst:289 +#: ../../library/functions.rst:290 msgid "" "Class methods can no longer wrap other :term:`descriptors ` such " "as :func:`property`." @@ -747,7 +748,7 @@ msgstr "" "Class methods 不能再包裝其他的\\ :term:`描述器 `,例如 :func:" "`property`。" -#: ../../library/functions.rst:296 +#: ../../library/functions.rst:297 msgid "" "Compile the *source* into a code or AST object. Code objects can be " "executed by :func:`exec` or :func:`eval`. *source* can either be a normal " @@ -758,7 +759,7 @@ msgstr "" "`eval` 執行。*source* 可以是一般的字串、bytes 字串、或者 AST 物件。參見 :mod:" "`ast` module(模組)的文件瞭解如何使用 AST 物件。" -#: ../../library/functions.rst:301 +#: ../../library/functions.rst:302 msgid "" "The *filename* argument should give the file from which the code was read; " "pass some recognizable value if it wasn't read from a file (``''`` " @@ -767,7 +768,7 @@ msgstr "" "*filename* 引數必須是程式碼的檔名;如果程式碼不是從檔案中讀取,可以傳入一些可" "辨識的值(經常會使用 ``''`` 來替代)。" -#: ../../library/functions.rst:305 +#: ../../library/functions.rst:306 msgid "" "The *mode* argument specifies what kind of code must be compiled; it can be " "``'exec'`` if *source* consists of a sequence of statements, ``'eval'`` if " @@ -780,7 +781,7 @@ msgstr "" "式,可以是 ``'single'`` (在最後一種情況下,如果運算式執行結果不是 ``None`` " "則會被印出來)。" -#: ../../library/functions.rst:311 +#: ../../library/functions.rst:312 msgid "" "The optional arguments *flags* and *dont_inherit* control which :ref:" "`compiler options ` should be activated and which :ref:" @@ -800,7 +801,7 @@ msgstr "" "引數所指定的編譯器選項和未來陳述式。如果 *dont_inherit* 是一個非零整數,則使" "用 *flags* 引數 -- 周圍程式碼中的旗標(未來功能和編譯器選項)將被忽略。" -#: ../../library/functions.rst:322 +#: ../../library/functions.rst:323 msgid "" "Compiler options and future statements are specified by bits which can be " "bitwise ORed together to specify multiple options. The bitfield required to " @@ -815,7 +816,7 @@ msgstr "" "compiler_flag` 屬性來獲得。\\ :ref:`編譯器旗標 `\\ 可以" "在 :mod:`ast` module 中搜尋有 ``PyCF_`` 前綴的名稱。" -#: ../../library/functions.rst:330 +#: ../../library/functions.rst:331 msgid "" "The argument *optimize* specifies the optimization level of the compiler; " "the default value of ``-1`` selects the optimization level of the " @@ -828,7 +829,7 @@ msgstr "" "``__debug__`` 為真值)、\\ ``1``\\ (assert 被刪除,\\ ``__debug__`` 為假值)" "或 ``2``\\ (文件字串也被刪除)。" -#: ../../library/functions.rst:336 +#: ../../library/functions.rst:337 msgid "" "This function raises :exc:`SyntaxError` if the compiled source is invalid, " "and :exc:`ValueError` if the source contains null bytes." @@ -836,13 +837,13 @@ msgstr "" "如果編譯的原始碼無效,此函式會觸發 :exc:`SyntaxError`,如果原始碼包含 null " "bytes,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:339 +#: ../../library/functions.rst:340 msgid "" "If you want to parse Python code into its AST representation, see :func:`ast." "parse`." msgstr "如果您想解析 Python 程式碼為 AST 運算式,請參閱 :func:`ast.parse`。" -#: ../../library/functions.rst:342 +#: ../../library/functions.rst:343 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source``, ``filename``." @@ -850,7 +851,7 @@ msgstr "" "引發一個附帶引數 ``source``、``filename`` 的\\ :ref:`稽核事件 ` " "``compile``。" -#: ../../library/functions.rst:344 +#: ../../library/functions.rst:345 msgid "" "Raises an :ref:`auditing event ` ``compile`` with arguments " "``source`` and ``filename``. This event may also be raised by implicit " @@ -859,7 +860,7 @@ msgstr "" "引發一個附帶引數 ``source``、``filename`` 的\\ :ref:`稽核事件 ` " "``compile``。此事件也可能會由 implicit compilation 所引發。" -#: ../../library/functions.rst:350 +#: ../../library/functions.rst:351 msgid "" "When compiling a string with multi-line code in ``'single'`` or ``'eval'`` " "mode, input must be terminated by at least one newline character. This is " @@ -869,7 +870,7 @@ msgstr "" "在 ``'single'`` 或 ``'eval'`` 模式編譯多行程式碼時,輸入必須以至少一個換行符" "結尾。這使 :mod:`code` module 更容易檢測陳述式的完整性。" -#: ../../library/functions.rst:357 +#: ../../library/functions.rst:358 msgid "" "It is possible to crash the Python interpreter with a sufficiently large/" "complex string when compiling to an AST object due to stack depth " @@ -878,7 +879,7 @@ msgstr "" "如果編譯足夠大或者足夠複雜的字串成 AST 物件時,Python 直譯器會因為 Python " "AST 編譯器的 stack 深度限制而崩潰。" -#: ../../library/functions.rst:361 +#: ../../library/functions.rst:362 msgid "" "Allowed use of Windows and Mac newlines. Also, input in ``'exec'`` mode " "does not have to end in a newline anymore. Added the *optimize* parameter." @@ -886,14 +887,14 @@ msgstr "" "允許使用 Windows 和 Mac 的換行符號。在 ``'exec'`` 模式不需要以換行符號結尾。" "增加了 *optimize* 參數。" -#: ../../library/functions.rst:365 +#: ../../library/functions.rst:366 msgid "" "Previously, :exc:`TypeError` was raised when null bytes were encountered in " "*source*." msgstr "" "在之前的版本,*source* 中包含 null bytes 會觸發 :exc:`TypeError` 異常。" -#: ../../library/functions.rst:369 +#: ../../library/functions.rst:370 msgid "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` can now be passed in flags to enable " "support for top-level ``await``, ``async for``, and ``async with``." @@ -901,60 +902,81 @@ msgstr "" "``ast.PyCF_ALLOW_TOP_LEVEL_AWAIT`` 現在可以傳遞旗標以啟用對頂層 ``await``、" "``async for`` 和 ``async with`` 的支援。" -#: ../../library/functions.rst:377 +#: ../../library/functions.rst:379 +msgid "" +"Convert a single string or number to a complex number, or create a complex " +"number from real and imaginary parts." +msgstr "" + +#: ../../library/functions.rst:382 ../../library/functions.rst:719 +#: ../../library/functions.rst:965 +#, fuzzy +msgid "Examples:" +msgstr "" +"例如:\n" +"\n" +"::" + +#: ../../library/functions.rst:403 msgid "" -"Return a complex number with the value *real* + *imag*\\*1j or convert a " -"string or number to a complex number. If the first parameter is a string, " -"it will be interpreted as a complex number and the function must be called " -"without a second parameter. The second parameter can never be a string. " -"Each argument may be any numeric type (including complex). If *imag* is " -"omitted, it defaults to zero and the constructor serves as a numeric " -"conversion like :class:`int` and :class:`float`. If both arguments are " -"omitted, returns ``0j``." +"If the argument is a string, it must contain either a real part (in the same " +"format as for :func:`float`) or an imaginary part (in the same format but " +"with a ``'j'`` or ``'J'`` suffix), or both real and imaginary parts (the " +"sign of the imaginary part is mandatory in this case). The string can " +"optionally be surrounded by whitespaces and the round parentheses ``'('`` " +"and ``')'``, which are ignored. The string must not contain whitespace " +"between ``'+'``, ``'-'``, the ``'j'`` or ``'J'`` suffix, and the decimal " +"number. For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` " +"raises :exc:`ValueError`. More precisely, the input must conform to the :" +"token:`~float:complexvalue` production rule in the following grammar, after " +"parentheses and leading and trailing whitespace characters are removed:" msgstr "" -"回傳值為 *real* + *imag*\\*1j 的複數,或將字串、數字轉換為複數。如果第一個引" -"數是字串,則它被視為一個複數,並且函式呼叫時不得有第二個引數。第二個引數絕對" -"不能是字串。每個引數都可以是任意的數值型別(包括複數)。如果省略了 *imag*,則" -"預設值為零,建構函式會像 :class:`int` 和 :class:`float` 一樣進行數值轉換。如" -"果兩個引數都省略,則回傳 ``0j``。" -#: ../../library/functions.rst:386 +#: ../../library/functions.rst:422 +#, fuzzy msgid "" -"For a general Python object ``x``, ``complex(x)`` delegates to ``x." -"__complex__()``. If :meth:`~object.__complex__` is not defined then it " -"falls back to :meth:`~object.__float__`. If :meth:`!__float__` is not " -"defined then it falls back to :meth:`~object.__index__`." +"If the argument is a number, the constructor serves as a numeric conversion " +"like :class:`int` and :class:`float`. For a general Python object ``x``, " +"``complex(x)`` delegates to ``x.__complex__()``. If :meth:`~object." +"__complex__` is not defined then it falls back to :meth:`~object.__float__`. " +"If :meth:`!__float__` is not defined then it falls back to :meth:`~object." +"__index__`." msgstr "" "對於一般的 Python 物件 ``x``,``complex(x)`` 指派給 ``x.__complex__()``。如果" "未定義 :meth:`~object.__complex__` 則會回退使用 :meth:`~object.__float__`。如" "果未定義 :meth:`!__float__` 則會回退使用 :meth:`~object.__index__`。" -#: ../../library/functions.rst:393 +#: ../../library/functions.rst:431 msgid "" -"When converting from a string, the string must not contain whitespace around " -"the central ``+`` or ``-`` operator. For example, ``complex('1+2j')`` is " -"fine, but ``complex('1 + 2j')`` raises :exc:`ValueError`." +"If two arguments are provided or keyword arguments are used, each argument " +"may be any numeric type (including complex). If both arguments are real " +"numbers, return a complex number with the real component *real* and the " +"imaginary component *imag*. If both arguments are complex numbers, return a " +"complex number with the real component ``real.real-imag.imag`` and the " +"imaginary component ``real.imag+imag.real``. If one of arguments is a real " +"number, only its real component is used in the above expressions." +msgstr "" + +#: ../../library/functions.rst:441 +msgid "If all arguments are omitted, returns ``0j``." msgstr "" -"當轉換自一字串時,字串在 ``+`` 或 ``-`` 運算子的周圍必須不能有空格。例如 " -"``complex('1+2j')`` 是有效的,但 ``complex('1 + 2j')`` 會觸發 :exc:" -"`ValueError`。" -#: ../../library/functions.rst:398 +#: ../../library/functions.rst:443 msgid "The complex type is described in :ref:`typesnumeric`." msgstr "複數型別在 :ref:`typesnumeric` 中有相關描述。" -#: ../../library/functions.rst:400 ../../library/functions.rst:721 -#: ../../library/functions.rst:945 +#: ../../library/functions.rst:445 ../../library/functions.rst:771 +#: ../../library/functions.rst:1014 msgid "Grouping digits with underscores as in code literals is allowed." msgstr "可以使用底線將程式碼文字中的數字進行分組。" -#: ../../library/functions.rst:403 +#: ../../library/functions.rst:448 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__complex__` and :" "meth:`~object.__float__` are not defined." msgstr "" -#: ../../library/functions.rst:410 +#: ../../library/functions.rst:455 msgid "" "This is a relative of :func:`setattr`. The arguments are an object and a " "string. The string must be the name of one of the object's attributes. The " @@ -967,7 +989,7 @@ msgstr "" "'foobar')`` 等價於 ``del x.foobar``。*name* 不必是個 Python 識別符 " "(identifier)(請見 :func:`setattr`)。" -#: ../../library/functions.rst:423 +#: ../../library/functions.rst:468 msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See :class:`dict` and :ref:`typesmapping` for documentation about this class." @@ -975,7 +997,7 @@ msgstr "" "建立一個新的 dictionary(字典)。\\ :class:`dict` 物件是一個 dictionary " "class。參見 :class:`dict` 和 :ref:`typesmapping` 來瞭解這個 class。" -#: ../../library/functions.rst:426 +#: ../../library/functions.rst:471 msgid "" "For other containers see the built-in :class:`list`, :class:`set`, and :" "class:`tuple` classes, as well as the :mod:`collections` module." @@ -983,7 +1005,7 @@ msgstr "" "其他容器型別,請參見內建的 :class:`list`、:class:`set` 和 :class:`tuple` " "class,以及 :mod:`collections` module。" -#: ../../library/functions.rst:433 +#: ../../library/functions.rst:478 msgid "" "Without arguments, return the list of names in the current local scope. " "With an argument, attempt to return a list of valid attributes for that " @@ -992,7 +1014,7 @@ msgstr "" "如果沒有引數,則回傳當前本地作用域中的名稱列表。如果有引數,它會嘗試回傳該物" "件的有效屬性列表。" -#: ../../library/functions.rst:436 +#: ../../library/functions.rst:481 msgid "" "If the object has a method named :meth:`~object.__dir__`, this method will " "be called and must return the list of attributes. This allows objects that " @@ -1005,7 +1027,7 @@ msgstr "" "或 :func:`~object.__getattribute__` 函式的物件能夠自定義 :func:`dir` 來報告它" "們的屬性。" -#: ../../library/functions.rst:443 +#: ../../library/functions.rst:488 msgid "" "If the object does not provide :meth:`~object.__dir__`, the function tries " "its best to gather information from the object's :attr:`~object.__dict__` " @@ -1017,7 +1039,7 @@ msgstr "" "`~object.__dict__` 屬性和型別物件收集資訊。結果列表並不總是完整的,如果物件有" "自定義 :func:`~object.__getattr__`,那結果可能不準確。" -#: ../../library/functions.rst:449 +#: ../../library/functions.rst:494 msgid "" "The default :func:`dir` mechanism behaves differently with different types " "of objects, as it attempts to produce the most relevant, rather than " @@ -1026,13 +1048,13 @@ msgstr "" "預設的 :func:`dir` 機制對不同型別的物件有不同行為,它會試圖回傳最相關而非最完" "整的資訊:" -#: ../../library/functions.rst:453 +#: ../../library/functions.rst:498 msgid "" "If the object is a module object, the list contains the names of the " "module's attributes." msgstr "如果物件是 module 物件,則列表包含 module 的屬性名稱。" -#: ../../library/functions.rst:456 +#: ../../library/functions.rst:501 msgid "" "If the object is a type or class object, the list contains the names of its " "attributes, and recursively of the attributes of its bases." @@ -1040,7 +1062,7 @@ msgstr "" "如果物件是型別或 class 物件,則列表包含它們的屬性名稱,並且遞迴查詢其基礎的所" "有屬性。" -#: ../../library/functions.rst:459 +#: ../../library/functions.rst:504 msgid "" "Otherwise, the list contains the object's attributes' names, the names of " "its class's attributes, and recursively of the attributes of its class's " @@ -1049,11 +1071,11 @@ msgstr "" "否則,包含物件的屬性名稱列表、它的 class 屬性名稱,並且遞迴查詢它的 class 的" "所有基礎 class 的屬性。" -#: ../../library/functions.rst:463 +#: ../../library/functions.rst:508 msgid "The resulting list is sorted alphabetically. For example:" msgstr "回傳的列表按字母表排序,例如:" -#: ../../library/functions.rst:483 +#: ../../library/functions.rst:528 msgid "" "Because :func:`dir` is supplied primarily as a convenience for use at an " "interactive prompt, it tries to supply an interesting set of names more than " @@ -1066,7 +1088,7 @@ msgstr "" "版本之間改變。例如,當引數是一個 class 時,metaclass 的屬性不包含在結果列表" "中。" -#: ../../library/functions.rst:493 +#: ../../library/functions.rst:538 msgid "" "Take two (non-complex) numbers as arguments and return a pair of numbers " "consisting of their quotient and remainder when using integer division. " @@ -1084,7 +1106,7 @@ msgstr "" "等,如果 ``a % b`` 非零,則它的符號和 *b* 一樣,且 ``0 <= abs(a % b) < " "abs(b)``。" -#: ../../library/functions.rst:505 +#: ../../library/functions.rst:550 msgid "" "Return an enumerate object. *iterable* must be a sequence, an :term:" "`iterator`, or some other object which supports iteration. The :meth:" @@ -1097,7 +1119,7 @@ msgstr "" "meth:`~iterator.__next__` method 回傳一個 tuple(元組),裡面包含一個計數值" "(從 *start* 開始,預設為 0)和通過疊代 *iterable* 獲得的值。" -#: ../../library/functions.rst:517 +#: ../../library/functions.rst:562 msgid "Equivalent to::" msgstr "" "等價於:\n" @@ -1108,15 +1130,15 @@ msgstr "" msgid "Parameters" msgstr "" -#: ../../library/functions.rst:529 +#: ../../library/functions.rst:574 msgid "A Python expression." msgstr "" -#: ../../library/functions.rst:533 +#: ../../library/functions.rst:578 msgid "The global namespace (default: ``None``)." msgstr "" -#: ../../library/functions.rst:537 +#: ../../library/functions.rst:582 msgid "The local namespace (default: ``None``)." msgstr "" @@ -1124,7 +1146,7 @@ msgstr "" msgid "Returns" msgstr "" -#: ../../library/functions.rst:541 +#: ../../library/functions.rst:586 msgid "The result of the evaluated expression." msgstr "" @@ -1132,11 +1154,11 @@ msgstr "" msgid "raises" msgstr "" -#: ../../library/functions.rst:542 +#: ../../library/functions.rst:587 msgid "Syntax errors are reported as exceptions." msgstr "" -#: ../../library/functions.rst:544 +#: ../../library/functions.rst:589 msgid "" "The *expression* argument is parsed and evaluated as a Python expression " "(technically speaking, a condition list) using the *globals* and *locals* " @@ -1162,11 +1184,11 @@ msgstr "" "呼叫的環境中執行運算式。請注意,*eval()* 在封閉環境中無法存取\\ :term:`巢狀" "域 ` (non-locals)。" -#: ../../library/functions.rst:559 +#: ../../library/functions.rst:604 msgid "Example:" msgstr "範例:" -#: ../../library/functions.rst:565 +#: ../../library/functions.rst:610 msgid "" "This function can also be used to execute arbitrary code objects (such as " "those created by :func:`compile`). In this case, pass a code object instead " @@ -1177,7 +1199,7 @@ msgstr "" "情況下,傳入的引數是程式碼物件而不是字串。如果編譯該物件時的 *mode* 引數是 " "``'exec'``,那麼 :func:`eval` 回傳值為 ``None``。" -#: ../../library/functions.rst:570 +#: ../../library/functions.rst:615 msgid "" "Hints: dynamic execution of statements is supported by the :func:`exec` " "function. The :func:`globals` and :func:`locals` functions return the " @@ -1188,13 +1210,13 @@ msgstr "" "`locals` 函式分別回傳當前的全域性和局部性 dictionary,它們對於將引數傳遞給 :" "func:`eval` 或 :func:`exec` 可能會方便許多。" -#: ../../library/functions.rst:575 +#: ../../library/functions.rst:620 msgid "" "If the given source is a string, then leading and trailing spaces and tabs " "are stripped." msgstr "如果給定來源是一個字串,那麼其前後的空格和定位字元會被移除。" -#: ../../library/functions.rst:578 +#: ../../library/functions.rst:623 msgid "" "See :func:`ast.literal_eval` for a function that can safely evaluate strings " "with expressions containing only literals." @@ -1202,14 +1224,14 @@ msgstr "" "另外可以參閱 :func:`ast.literal_eval`,該函式可以安全執行僅包含文字的運算式字" "串。" -#: ../../library/functions.rst:581 ../../library/functions.rst:626 +#: ../../library/functions.rst:626 ../../library/functions.rst:671 msgid "" "Raises an :ref:`auditing event ` ``exec`` with argument " "``code_object``." msgstr "" "引發一個附帶引數 ``code_object`` 的\\ :ref:`稽核事件 ` ``exec``。" -#: ../../library/functions.rst:583 ../../library/functions.rst:628 +#: ../../library/functions.rst:628 ../../library/functions.rst:673 msgid "" "Raises an :ref:`auditing event ` ``exec`` with the code object as " "the argument. Code compilation events may also be raised." @@ -1217,7 +1239,7 @@ msgstr "" "引發一個附帶程式碼物件為引數的\\ :ref:`稽核事件 ` ``exec``。也可能" "會引發程式碼編譯事件。" -#: ../../library/functions.rst:590 +#: ../../library/functions.rst:635 msgid "" "This function supports dynamic execution of Python code. *object* must be " "either a string or a code object. If it is a string, the string is parsed " @@ -1237,7 +1259,7 @@ msgstr "" "`yield` 和 :keyword:`return` 陳述式也不能在函式之外使用。該函式回傳值是 " "``None``。" -#: ../../library/functions.rst:601 +#: ../../library/functions.rst:646 #, fuzzy msgid "" "In all cases, if the optional parts are omitted, the code is executed in the " @@ -1254,7 +1276,7 @@ msgstr "" "供了 *locals* 引數,則它可以是任何映射物件。請記住在 module 層級中全域性和本" "地變數是相同的 dictionary。" -#: ../../library/functions.rst:611 +#: ../../library/functions.rst:656 msgid "" "Most users should just pass a *globals* argument and never *locals*. If exec " "gets two separate objects as *globals* and *locals*, the code will be " @@ -1263,7 +1285,7 @@ msgstr "" "大部分使用者只需要傳入 *globals* 引數,而不用傳遞 *locals*。如果 exec 有兩個" "不同的 *globals* 和 *locals* 物件,程式碼就像嵌入在 class 定義中一樣執行。" -#: ../../library/functions.rst:615 +#: ../../library/functions.rst:660 msgid "" "If the *globals* dictionary does not contain a value for the key " "``__builtins__``, a reference to the dictionary of the built-in module :mod:" @@ -1276,7 +1298,7 @@ msgstr "" "func:`exec` 之前,可以通過將自己的 ``__builtins__`` dictionary 插入到 " "*globals* 中來控制可以使用哪些內建程式碼。" -#: ../../library/functions.rst:621 +#: ../../library/functions.rst:666 msgid "" "The *closure* argument specifies a closure--a tuple of cellvars. It's only " "valid when the *object* is a code object containing free variables. The " @@ -1284,7 +1306,7 @@ msgid "" "referenced by the code object." msgstr "" -#: ../../library/functions.rst:633 +#: ../../library/functions.rst:678 msgid "" "The built-in functions :func:`globals` and :func:`locals` return the current " "global and local dictionary, respectively, which may be useful to pass " @@ -1293,7 +1315,7 @@ msgstr "" "內建 :func:`globals` 和 :func:`locals` 函式各自回傳當前的全域性和本地 " "dictionary,因此可以將它們傳遞給 :func:`exec` 的第二個和第三個引數。" -#: ../../library/functions.rst:639 +#: ../../library/functions.rst:684 msgid "" "The default *locals* act as described for function :func:`locals` below: " "modifications to the default *locals* dictionary should not be attempted. " @@ -1304,11 +1326,11 @@ msgstr "" "預設的 *locals* dictionary。如果您想在 :func:`exec` 函式回傳時知道程式碼對 " "*locals* 的變動,請明確地傳遞 *locals* dictionary 。" -#: ../../library/functions.rst:644 +#: ../../library/functions.rst:689 msgid "Added the *closure* parameter." msgstr "增加了 *closure* 參數。" -#: ../../library/functions.rst:650 +#: ../../library/functions.rst:695 msgid "" "Construct an iterator from those elements of *iterable* for which *function* " "is true. *iterable* may be either a sequence, a container which supports " @@ -1320,7 +1342,7 @@ msgstr "" "*function* 是 ``None``,則會假設它是一個識別性函式,即 *iterable* 中所有假值" "元素會被移除。" -#: ../../library/functions.rst:656 +#: ../../library/functions.rst:701 msgid "" "Note that ``filter(function, iterable)`` is equivalent to the generator " "expression ``(item for item in iterable if function(item))`` if function is " @@ -1331,7 +1353,7 @@ msgstr "" "是 ``None`` 的時候為 ``(item for item in iterable if function(item))``;" "function 是 ``None`` 的時候為 ``(item for item in iterable if item)``。" -#: ../../library/functions.rst:661 +#: ../../library/functions.rst:706 msgid "" "See :func:`itertools.filterfalse` for the complementary function that " "returns elements of *iterable* for which *function* is false." @@ -1339,26 +1361,28 @@ msgstr "" "請參閱 :func:`itertools.filterfalse`,只有 *function* 為 false 時才選取 " "*iterable* 中元素的互補函式。" -#: ../../library/functions.rst:671 -msgid "Return a floating point number constructed from a number or string *x*." +#: ../../library/functions.rst:717 +#, fuzzy +msgid "Return a floating point number constructed from a number or a string." msgstr "回傳從數字或字串 *x* 生成的浮點數。" -#: ../../library/functions.rst:673 +#: ../../library/functions.rst:734 +#, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " "sign may be ``'+'`` or ``'-'``; a ``'+'`` sign has no effect on the value " "produced. The argument may also be a string representing a NaN (not-a-" -"number), or positive or negative infinity. More precisely, the input must " -"conform to the ``floatvalue`` production rule in the following grammar, " -"after leading and trailing whitespace characters are removed:" +"number), or positive or negative infinity. More precisely, the input must " +"conform to the :token:`~float:floatvalue` production rule in the following " +"grammar, after leading and trailing whitespace characters are removed:" msgstr "" "如果引數是字串,則它必須是包含十進位制數字的字串,字串前面可以有符號,之前也" "可以有空格。選擇性的符號有 ``'+'`` 和 ``'-'``;``'+'`` 對建立的值沒有影響。引" "數也可以是 NaN(非數字)或正負無窮大的字串。確切地說,除去首尾的空格後,輸入" "必須遵循以下語法中 ``floatvalue`` 的生成規則:" -#: ../../library/functions.rst:692 +#: ../../library/functions.rst:755 msgid "" "Case is not significant, so, for example, \"inf\", \"Inf\", \"INFINITY\", " "and \"iNfINity\" are all acceptable spellings for positive infinity." @@ -1366,7 +1390,7 @@ msgstr "" "字母大小寫不影響,例如,\"inf\"、\"Inf\"、\"INFINITY\"、\"iNfINity\" 都可以表" "示正無窮大。" -#: ../../library/functions.rst:695 +#: ../../library/functions.rst:758 msgid "" "Otherwise, if the argument is an integer or a floating point number, a " "floating point number with the same value (within Python's floating point " @@ -1376,7 +1400,7 @@ msgstr "" "否則,如果引數是整數或浮點數,則回傳具有相同值(在 Python 浮點精度範圍內)的" "浮點數。如果引數在 Python 浮點精度範圍外,則會觸發 :exc:`OverflowError`。" -#: ../../library/functions.rst:700 +#: ../../library/functions.rst:763 msgid "" "For a general Python object ``x``, ``float(x)`` delegates to ``x." "__float__()``. If :meth:`~object.__float__` is not defined then it falls " @@ -1385,28 +1409,21 @@ msgstr "" "對於一般的 Python 物件 ``x``,``float(x)`` 指派給 ``x.__float__()``。如果未定" "義 :meth:`~object.__float__` 則回退使用 :meth:`~object.__index__`。" -#: ../../library/functions.rst:704 +#: ../../library/functions.rst:767 msgid "If no argument is given, ``0.0`` is returned." msgstr "如果沒有引數,則回傳 ``0.0``。" -#: ../../library/functions.rst:706 -msgid "Examples::" -msgstr "" -"例如:\n" -"\n" -"::" - -#: ../../library/functions.rst:719 +#: ../../library/functions.rst:769 msgid "The float type is described in :ref:`typesnumeric`." msgstr ":ref:`typesnumeric` 描述了浮點數型別。" -#: ../../library/functions.rst:727 +#: ../../library/functions.rst:777 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__float__` is not " "defined." msgstr "" -#: ../../library/functions.rst:737 +#: ../../library/functions.rst:787 msgid "" "Convert a *value* to a \"formatted\" representation, as controlled by " "*format_spec*. The interpretation of *format_spec* will depend on the type " @@ -1417,7 +1434,7 @@ msgstr "" "取決於 *value* 引數的型別,但是大多數內建型別使用標準格式化語法::ref:" "`formatspec`。" -#: ../../library/functions.rst:742 +#: ../../library/functions.rst:792 msgid "" "The default *format_spec* is an empty string which usually gives the same " "effect as calling :func:`str(value) `." @@ -1425,7 +1442,7 @@ msgstr "" "預設的 *format_spec* 是一個空字串,它通常和呼叫 :func:`str(value) ` 的效" "果相同。" -#: ../../library/functions.rst:745 +#: ../../library/functions.rst:795 msgid "" "A call to ``format(value, format_spec)`` is translated to ``type(value)." "__format__(value, format_spec)`` which bypasses the instance dictionary when " @@ -1439,7 +1456,7 @@ msgstr "" "實例中的字典。如果搜尋到 :mod:`object` 這個 method 但 *format_spec* 不為空," "或是 *format_spec* 或回傳值不是字串,則會觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:752 +#: ../../library/functions.rst:802 msgid "" "``object().__format__(format_spec)`` raises :exc:`TypeError` if " "*format_spec* is not an empty string." @@ -1447,7 +1464,7 @@ msgstr "" "當 *format_spec* 不是空字串時,``object().__format__(format_spec)`` 會觸發 :" "exc:`TypeError`。" -#: ../../library/functions.rst:761 +#: ../../library/functions.rst:811 msgid "" "Return a new :class:`frozenset` object, optionally with elements taken from " "*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" @@ -1457,7 +1474,7 @@ msgstr "" "素。\\ ``frozenset`` 是一個內建的 class。有關此 class 的文件,請參閱 :class:" "`frozenset` 和 :ref:`types-set`。" -#: ../../library/functions.rst:765 +#: ../../library/functions.rst:815 msgid "" "For other containers see the built-in :class:`set`, :class:`list`, :class:" "`tuple`, and :class:`dict` classes, as well as the :mod:`collections` module." @@ -1465,7 +1482,7 @@ msgstr "" "請參閱內建的 :class:`set`、:class:`list`、:class:`tuple` 和 :class:`dict` " "class,以及 :mod:`collections` module 來了解其它的容器。" -#: ../../library/functions.rst:773 +#: ../../library/functions.rst:823 msgid "" "Return the value of the named attribute of *object*. *name* must be a " "string. If the string is the name of one of the object's attributes, the " @@ -1480,7 +1497,7 @@ msgstr "" "`AttributeError`。*name* 不必是個 Python 識別符 (identifier)(請見 :func:" "`setattr`)。" -#: ../../library/functions.rst:782 +#: ../../library/functions.rst:832 msgid "" "Since :ref:`private name mangling ` happens at " "compilation time, one must manually mangle a private attribute's (attributes " @@ -1488,7 +1505,7 @@ msgid "" "`getattr`." msgstr "" -#: ../../library/functions.rst:790 +#: ../../library/functions.rst:840 msgid "" "Return the dictionary implementing the current module namespace. For code " "within functions, this is set when the function is defined and remains the " @@ -1497,7 +1514,7 @@ msgstr "" "回傳代表當前 module 命名空間的 dictionary。對於在函式中的程式碼來說,這在定義" "函式時設定且不論該函式是在何處呼叫都會保持相同。" -#: ../../library/functions.rst:797 +#: ../../library/functions.rst:847 msgid "" "The arguments are an object and a string. The result is ``True`` if the " "string is the name of one of the object's attributes, ``False`` if not. " @@ -1508,7 +1525,7 @@ msgstr "" "則回傳 ``False``。(此功能是通過呼叫 ``getattr(object, name)`` 看是否有 :exc:" "`AttributeError` 來實現的。)" -#: ../../library/functions.rst:805 +#: ../../library/functions.rst:855 msgid "" "Return the hash value of the object (if it has one). Hash values are " "integers. They are used to quickly compare dictionary keys during a " @@ -1519,7 +1536,7 @@ msgstr "" "時用來快速比較 dictionary 的鍵。相同大小的數字數值有相同的雜湊值(即使它們型" "別不同,如 1 和 1.0)。" -#: ../../library/functions.rst:812 +#: ../../library/functions.rst:862 msgid "" "For objects with custom :meth:`~object.__hash__` methods, note that :func:" "`hash` truncates the return value based on the bit width of the host machine." @@ -1527,7 +1544,7 @@ msgstr "" "請注意,如果物件帶有自訂的 :meth:`~object.__hash__` 方法,:func:`hash` 將根據" "運行機器的位元長度來截斷回傳值。" -#: ../../library/functions.rst:819 +#: ../../library/functions.rst:869 msgid "" "Invoke the built-in help system. (This function is intended for interactive " "use.) If no argument is given, the interactive help system starts on the " @@ -1541,7 +1558,7 @@ msgstr "" "鍵字或文件主題中搜索該字串,並在控制台上列印幫助資訊。如果引數是其他任意物" "件,則會生成該物件的幫助頁。" -#: ../../library/functions.rst:826 +#: ../../library/functions.rst:876 msgid "" "Note that if a slash(/) appears in the parameter list of a function when " "invoking :func:`help`, it means that the parameters prior to the slash are " @@ -1549,12 +1566,12 @@ msgid "" "parameters `." msgstr "" -#: ../../library/functions.rst:831 +#: ../../library/functions.rst:881 msgid "" "This function is added to the built-in namespace by the :mod:`site` module." msgstr "該函式透過 :mod:`site` module 加入到內建命名空間。" -#: ../../library/functions.rst:833 +#: ../../library/functions.rst:883 msgid "" "Changes to :mod:`pydoc` and :mod:`inspect` mean that the reported signatures " "for callables are now more comprehensive and consistent." @@ -1562,7 +1579,7 @@ msgstr "" "變更至 :mod:`pydoc` 和 :mod:`inspect` 使得可呼叫物件的簽名信息 (signature) 更" "加全面和一致。" -#: ../../library/functions.rst:840 +#: ../../library/functions.rst:890 msgid "" "Convert an integer number to a lowercase hexadecimal string prefixed with " "\"0x\". If *x* is not a Python :class:`int` object, it has to define an :" @@ -1572,7 +1589,7 @@ msgstr "" "class:`int` 物件,則必須定義一個 :meth:`~object.__index__` method 並且回傳一" "個整數。舉例來說:" -#: ../../library/functions.rst:849 +#: ../../library/functions.rst:899 msgid "" "If you want to convert an integer number to an uppercase or lower " "hexadecimal string with prefix or not, you can use either of the following " @@ -1581,20 +1598,20 @@ msgstr "" "如果要將整數轉換為大寫或小寫的十六進位制字串,並可選擇有無 \"0x\" 前綴,則可" "以使用如下方法:" -#: ../../library/functions.rst:861 +#: ../../library/functions.rst:911 msgid "" "See also :func:`int` for converting a hexadecimal string to an integer using " "a base of 16." msgstr "另請參閱 :func:`int` 將十六進位制字串轉換為以 16 為基數的整數。" -#: ../../library/functions.rst:866 +#: ../../library/functions.rst:916 msgid "" "To obtain a hexadecimal string representation for a float, use the :meth:" "`float.hex` method." msgstr "" "如果要獲取浮點數的十六進位制字串形式,請使用 :meth:`float.hex` method。" -#: ../../library/functions.rst:872 +#: ../../library/functions.rst:922 msgid "" "Return the \"identity\" of an object. This is an integer which is " "guaranteed to be unique and constant for this object during its lifetime. " @@ -1604,18 +1621,18 @@ msgstr "" "回傳物件的 \"識別性\" 。該值是一個整數,在此物件的生命週期中保證是唯一且恆定" "的。兩個生命期不重疊的物件可能具有相同的 :func:`id` 值。" -#: ../../library/functions.rst:877 +#: ../../library/functions.rst:927 msgid "This is the address of the object in memory." msgstr "" -#: ../../library/functions.rst:879 +#: ../../library/functions.rst:929 msgid "" "Raises an :ref:`auditing event ` ``builtins.id`` with argument " "``id``." msgstr "" "引發一個附帶引數 ``id`` 的\\ :ref:`稽核事件 ` ``builtins.id``。" -#: ../../library/functions.rst:885 +#: ../../library/functions.rst:935 msgid "" "If the *prompt* argument is present, it is written to standard output " "without a trailing newline. The function then reads a line from input, " @@ -1628,7 +1645,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:895 +#: ../../library/functions.rst:945 msgid "" "If the :mod:`readline` module was loaded, then :func:`input` will use it to " "provide elaborate line editing and history features." @@ -1636,7 +1653,7 @@ msgstr "" "如果載入了 :mod:`readline` module,:func:`input` 將使用它來提供複雜的行編輯和" "歷史記錄功能。" -#: ../../library/functions.rst:898 +#: ../../library/functions.rst:948 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt``." @@ -1644,7 +1661,7 @@ msgstr "" "引發一個附帶引數 ``prompt`` 的\\ :ref:`稽核事件 ` ``builtins." "input``。" -#: ../../library/functions.rst:900 +#: ../../library/functions.rst:950 msgid "" "Raises an :ref:`auditing event ` ``builtins.input`` with argument " "``prompt`` before reading input" @@ -1652,7 +1669,7 @@ msgstr "" "引發一個附帶讀取輸入前的引數 ``prompt`` 的\\ :ref:`稽核事件 ` " "``builtins.input``。" -#: ../../library/functions.rst:903 +#: ../../library/functions.rst:953 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "argument ``result``." @@ -1660,7 +1677,7 @@ msgstr "" "引發一個附帶引數 ``result`` 的\\ :ref:`稽核事件 ` ``builtins.input/" "result``。" -#: ../../library/functions.rst:905 +#: ../../library/functions.rst:955 msgid "" "Raises an :ref:`auditing event ` ``builtins.input/result`` with " "the result after successfully reading input." @@ -1668,34 +1685,42 @@ msgstr "" "引發一個附帶成功讀取結果的\\ :ref:`稽核事件 ` ``builtins.input/" "result``。" -#: ../../library/functions.rst:912 +#: ../../library/functions.rst:962 +#, fuzzy +msgid "" +"Return an integer object constructed from a number or a string, or return " +"``0`` if no arguments are given." +msgstr "回傳從數字或字串 *x* 生成的浮點數。" + +#: ../../library/functions.rst:982 +#, fuzzy msgid "" -"Return an integer object constructed from a number or string *x*, or return " -"``0`` if no arguments are given. If *x* defines :meth:`~object.__int__`, " -"``int(x)`` returns ``x.__int__()``. If *x* defines :meth:`~object." -"__index__`, it returns ``x.__index__()``. If *x* defines :meth:`~object." -"__trunc__`, it returns ``x.__trunc__()``. For floating point numbers, this " -"truncates towards zero." +"If the argument defines :meth:`~object.__int__`, ``int(x)`` returns ``x." +"__int__()``. If the argument defines :meth:`~object.__index__`, it returns " +"``x.__index__()``. If the argument defines :meth:`~object.__trunc__`, it " +"returns ``x.__trunc__()``. For floating point numbers, this truncates " +"towards zero." msgstr "" "回傳一個使用數字或字串 *x* 建構的整數物件,或者在沒有引數時回傳 ``0``。如果 " "*x* 定義了 :meth:`~object.__int__`,``int(x)`` 回傳 ``x.__int__()``。如果 " "*x* 定義了 :meth:`~object.__index__` 則回傳 ``x.__index__()``。如果 *x* 定義" "了 :meth:`~object.__trunc__` 則回傳 ``x.__trunc__()``。對於浮點數則向零舍入。" -#: ../../library/functions.rst:919 +#: ../../library/functions.rst:988 +#, fuzzy msgid "" -"If *x* is not a number or if *base* is given, then *x* must be a string, :" -"class:`bytes`, or :class:`bytearray` instance representing an integer in " -"radix *base*. Optionally, the string can be preceded by ``+`` or ``-`` " -"(with no space in between), have leading zeros, be surrounded by whitespace, " -"and have single underscores interspersed between digits." +"If the argument is not a number or if *base* is given, then it must be a " +"string, :class:`bytes`, or :class:`bytearray` instance representing an " +"integer in radix *base*. Optionally, the string can be preceded by ``+`` or " +"``-`` (with no space in between), have leading zeros, be surrounded by " +"whitespace, and have single underscores interspersed between digits." msgstr "" "如果 *x* 不是數字或如果有給定 *base*,則 *x* 必須是個字串、:class:`bytes` " "或 :class:`bytearray` 實例,表示基數 (radix) *base* 中的整數。可選地,字串之" "前可以有 ``+`` 或 ``-``\\ (中間沒有空格)、可有個前導的零、也可被空格包圍、" "或在數字間有單一底線。" -#: ../../library/functions.rst:925 +#: ../../library/functions.rst:994 msgid "" "A base-n integer string contains digits, each representing a value from 0 to " "n-1. The values 0--9 can be represented by any Unicode decimal digit. The " @@ -1717,11 +1742,11 @@ msgstr "" "進制中的一個,所以 ``int('010', 0)`` 是非法的,但 ``int('010')`` 和 " "``int('010', 8)`` 是有效的。" -#: ../../library/functions.rst:936 +#: ../../library/functions.rst:1005 msgid "The integer type is described in :ref:`typesnumeric`." msgstr "整數型別定義請參閱 :ref:`typesnumeric`。" -#: ../../library/functions.rst:938 +#: ../../library/functions.rst:1007 msgid "" "If *base* is not an instance of :class:`int` and the *base* object has a :" "meth:`base.__index__ ` method, that method is called to " @@ -1733,27 +1758,31 @@ msgstr "" "使用 :meth:`base.__int__ ` 而不是 :meth:`base.__index__ " "`。" -#: ../../library/functions.rst:951 +#: ../../library/functions.rst:1017 +msgid "The first parameter is now positional-only." +msgstr "" + +#: ../../library/functions.rst:1020 msgid "" "Falls back to :meth:`~object.__index__` if :meth:`~object.__int__` is not " "defined." msgstr "" -#: ../../library/functions.rst:954 +#: ../../library/functions.rst:1023 msgid "The delegation to :meth:`~object.__trunc__` is deprecated." msgstr "" -#: ../../library/functions.rst:957 +#: ../../library/functions.rst:1026 msgid "" ":class:`int` string inputs and string representations can be limited to help " "avoid denial of service attacks. A :exc:`ValueError` is raised when the " -"limit is exceeded while converting a string *x* to an :class:`int` or when " +"limit is exceeded while converting a string to an :class:`int` or when " "converting an :class:`int` into a string would exceed the limit. See the :" "ref:`integer string conversion length limitation ` " "documentation." msgstr "" -#: ../../library/functions.rst:967 +#: ../../library/functions.rst:1036 msgid "" "Return ``True`` if the *object* argument is an instance of the *classinfo* " "argument, or of a (direct, indirect, or :term:`virtual `) of *classinfo*. A class is considered a " @@ -1793,7 +1822,7 @@ msgstr "" "*class* 是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會" "觸發 :exc:`TypeError`。" -#: ../../library/functions.rst:999 +#: ../../library/functions.rst:1068 msgid "" "Return an :term:`iterator` object. The first argument is interpreted very " "differently depending on the presence of the second argument. Without a " @@ -1817,18 +1846,18 @@ msgstr "" "__next__` 時會不帶引數地呼叫 *object*\\ ;如果回傳的結果是 *sentinel* 則觸" "發 :exc:`StopIteration`,否則回傳呼叫結果。" -#: ../../library/functions.rst:1013 +#: ../../library/functions.rst:1082 msgid "See also :ref:`typeiter`." msgstr "另請參閱 :ref:`typeiter`。" -#: ../../library/functions.rst:1015 +#: ../../library/functions.rst:1084 msgid "" "One useful application of the second form of :func:`iter` is to build a " "block-reader. For example, reading fixed-width blocks from a binary database " "file until the end of file is reached::" msgstr "" -#: ../../library/functions.rst:1027 +#: ../../library/functions.rst:1096 msgid "" "Return the length (the number of items) of an object. The argument may be a " "sequence (such as a string, bytes, tuple, list, or range) or a collection " @@ -1837,13 +1866,13 @@ msgstr "" "回傳物件的長度(元素個數)。引數可以是序列(如 string、bytes、tuple、list 或 " "range)或集合(如 dictionary、set 或 frozen set)。" -#: ../../library/functions.rst:1033 +#: ../../library/functions.rst:1102 msgid "" "``len`` raises :exc:`OverflowError` on lengths larger than :data:`sys." "maxsize`, such as :class:`range(2 ** 100) `." msgstr "" -#: ../../library/functions.rst:1042 +#: ../../library/functions.rst:1111 msgid "" "Rather than being a function, :class:`list` is actually a mutable sequence " "type, as documented in :ref:`typesseq-list` and :ref:`typesseq`." @@ -1851,7 +1880,7 @@ msgstr "" "除了是函式,:class:`list` 也是可變序列型別,詳情請參閱 :ref:`typesseq-list` " "和 :ref:`typesseq`。" -#: ../../library/functions.rst:1048 +#: ../../library/functions.rst:1117 msgid "" "Update and return a dictionary representing the current local symbol table. " "Free variables are returned by :func:`locals` when it is called in function " @@ -1862,7 +1891,7 @@ msgstr "" "叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,\\ :func:" "`locals` 和 :func:`globals` 是相同的 dictionary。" -#: ../../library/functions.rst:1054 +#: ../../library/functions.rst:1123 msgid "" "The contents of this dictionary should not be modified; changes may not " "affect the values of local and free variables used by the interpreter." @@ -1870,7 +1899,7 @@ msgstr "" "此 dictionary 的內容不應該被更動;更改可能不會影響直譯器使用的本地變數或自由" "變數的值。" -#: ../../library/functions.rst:1059 +#: ../../library/functions.rst:1128 msgid "" "Return an iterator that applies *function* to every item of *iterable*, " "yielding the results. If additional *iterables* arguments are passed, " @@ -1885,13 +1914,13 @@ msgstr "" "iteratable 耗盡時 iterator 也會結束。如果函式的輸入已經是 tuple 的引數,請參" "閱 :func:`itertools.starmap`\\。" -#: ../../library/functions.rst:1071 +#: ../../library/functions.rst:1140 msgid "" "Return the largest item in an iterable or the largest of two or more " "arguments." msgstr "回傳 iterable 中最大的元素,或者回傳兩個及以上引數中最大的。" -#: ../../library/functions.rst:1074 +#: ../../library/functions.rst:1143 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The largest item in the iterable is returned. If two or more positional " @@ -1900,7 +1929,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是個 :term:`iterable`,iterable 中最大的元素" "會被回傳。如果提供了兩個或以上的位置引數,則回傳最大的位置引數。" -#: ../../library/functions.rst:1079 ../../library/functions.rst:1117 +#: ../../library/functions.rst:1148 ../../library/functions.rst:1186 msgid "" "There are two optional keyword-only arguments. The *key* argument specifies " "a one-argument ordering function like that used for :meth:`list.sort`. The " @@ -1912,7 +1941,7 @@ msgstr "" "式,如同 :meth:`list.sort` 使用方式。*default* 引數是當 iterable 為空時回傳的" "值。如果 iterable 為空,並且沒有提供 *default*,則會觸發 :exc:`ValueError`。" -#: ../../library/functions.rst:1085 +#: ../../library/functions.rst:1154 msgid "" "If multiple items are maximal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1923,15 +1952,15 @@ msgstr "" "``sorted(iterable, key=keyfunc, reverse=True)[0]`` 和 ``heapq.nlargest(1, " "iterable, key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1090 ../../library/functions.rst:1128 +#: ../../library/functions.rst:1159 ../../library/functions.rst:1197 msgid "Added the *default* keyword-only parameter." msgstr "新增 *default* 僅限關鍵字參數。" -#: ../../library/functions.rst:1093 ../../library/functions.rst:1131 +#: ../../library/functions.rst:1162 ../../library/functions.rst:1200 msgid "The *key* can be ``None``." msgstr "" -#: ../../library/functions.rst:1101 +#: ../../library/functions.rst:1170 msgid "" "Return a \"memory view\" object created from the given argument. See :ref:" "`typememoryview` for more information." @@ -1939,13 +1968,13 @@ msgstr "" "回傳由給定的引數建立之 \"memory view\" 物件。有關詳細資訊,請參閱 :ref:" "`typememoryview`。" -#: ../../library/functions.rst:1109 +#: ../../library/functions.rst:1178 msgid "" "Return the smallest item in an iterable or the smallest of two or more " "arguments." msgstr "回傳 iterable 中最小的元素,或者回傳兩個及以上引數中最小的。" -#: ../../library/functions.rst:1112 +#: ../../library/functions.rst:1181 msgid "" "If one positional argument is provided, it should be an :term:`iterable`. " "The smallest item in the iterable is returned. If two or more positional " @@ -1954,7 +1983,7 @@ msgstr "" "如果只提供了一個位置引數,它必須是 :term:`iterable`,iterable 中最小的元素會" "被回傳。如果提供了兩個或以上的位置引數,則回傳最小的位置引數。" -#: ../../library/functions.rst:1123 +#: ../../library/functions.rst:1192 msgid "" "If multiple items are minimal, the function returns the first one " "encountered. This is consistent with other sort-stability preserving tools " @@ -1965,7 +1994,7 @@ msgstr "" "``sorted(iterable, key=keyfunc)[0]`` 和 ``heapq.nsmallest(1, iterable, " "key=keyfunc)`` 一致。" -#: ../../library/functions.rst:1138 +#: ../../library/functions.rst:1207 msgid "" "Retrieve the next item from the :term:`iterator` by calling its :meth:" "`~iterator.__next__` method. If *default* is given, it is returned if the " @@ -1975,7 +2004,7 @@ msgstr "" "素。如果 iterator 耗盡,則回傳給定的預設值 *default*,如果沒有預設值則觸發 :" "exc:`StopIteration`。" -#: ../../library/functions.rst:1145 +#: ../../library/functions.rst:1214 msgid "" "Return a new featureless object. :class:`object` is a base for all classes. " "It has methods that are common to all instances of Python classes. This " @@ -1984,7 +2013,7 @@ msgstr "" "回傳一個沒有特徵的新物件。:class:`object` 是所有 class 的基礎,它具有所有 " "Python class 實例的通用 method。這個函式不接受任何引數。" -#: ../../library/functions.rst:1151 +#: ../../library/functions.rst:1220 msgid "" ":class:`object` does *not* have a :attr:`~object.__dict__`, so you can't " "assign arbitrary attributes to an instance of the :class:`object` class." @@ -1992,7 +2021,7 @@ msgstr "" "由於 :class:`object` *沒有* :attr:`~object.__dict__`,因此無法將任意屬性賦" "給 :class:`object` class 的實例。" -#: ../../library/functions.rst:1157 +#: ../../library/functions.rst:1226 msgid "" "Convert an integer number to an octal string prefixed with \"0o\". The " "result is a valid Python expression. If *x* is not a Python :class:`int` " @@ -2003,7 +2032,7 @@ msgstr "" "Python 運算式。如果 *x* 不是 Python 的 :class:`int` 物件,那它需要定義 :meth:" "`~object.__index__` method 回傳一個整數。舉例來說:" -#: ../../library/functions.rst:1167 +#: ../../library/functions.rst:1236 msgid "" "If you want to convert an integer number to an octal string either with the " "prefix \"0o\" or not, you can use either of the following ways." @@ -2011,7 +2040,7 @@ msgstr "" "如果要將整數轉換為八進位制字串,不論是否具備 \"0o\" 前綴,都可以使用下面的方" "法。" -#: ../../library/functions.rst:1184 +#: ../../library/functions.rst:1253 msgid "" "Open *file* and return a corresponding :term:`file object`. If the file " "cannot be opened, an :exc:`OSError` is raised. See :ref:`tut-files` for more " @@ -2020,7 +2049,7 @@ msgstr "" "開啟 *file* 並回傳對應的 :term:`file object`。如果該檔案不能開啟,則觸發 :" "exc:`OSError`。關於使用此函式的更多方法請參閱\\ :ref:`tut-files`。" -#: ../../library/functions.rst:1188 +#: ../../library/functions.rst:1257 msgid "" "*file* is a :term:`path-like object` giving the pathname (absolute or " "relative to the current working directory) of the file to be opened or an " @@ -2033,7 +2062,7 @@ msgstr "" "果有提供檔案描述器,它會隨著回傳的 I/O 物件關閉而關閉,除非 *closefd* 被設為 " "``False``。)" -#: ../../library/functions.rst:1194 +#: ../../library/functions.rst:1263 msgid "" "*mode* is an optional string that specifies the mode in which the file is " "opened. It defaults to ``'r'`` which means open for reading in text mode. " @@ -2054,71 +2083,71 @@ msgstr "" "getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 bytes,請使用二進位制" "模式且不要指定 *encoding*。)可用的模式有:" -#: ../../library/functions.rst:1211 +#: ../../library/functions.rst:1280 msgid "Character" msgstr "字元" -#: ../../library/functions.rst:1211 +#: ../../library/functions.rst:1280 msgid "Meaning" msgstr "意義" -#: ../../library/functions.rst:1213 +#: ../../library/functions.rst:1282 msgid "``'r'``" msgstr "``'r'``" -#: ../../library/functions.rst:1213 +#: ../../library/functions.rst:1282 msgid "open for reading (default)" msgstr "讀取(預設)" -#: ../../library/functions.rst:1214 +#: ../../library/functions.rst:1283 msgid "``'w'``" msgstr "``'w'``" -#: ../../library/functions.rst:1214 +#: ../../library/functions.rst:1283 msgid "open for writing, truncating the file first" msgstr "" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1284 msgid "``'x'``" msgstr "``'x'``" -#: ../../library/functions.rst:1215 +#: ../../library/functions.rst:1284 msgid "open for exclusive creation, failing if the file already exists" msgstr "唯一性建立,如果文件已存在則會失敗" -#: ../../library/functions.rst:1216 +#: ../../library/functions.rst:1285 msgid "``'a'``" msgstr "``'a'``" -#: ../../library/functions.rst:1216 +#: ../../library/functions.rst:1285 msgid "open for writing, appending to the end of file if it exists" msgstr "寫入,如果文件存在則在末尾追加寫入內容" -#: ../../library/functions.rst:1217 +#: ../../library/functions.rst:1286 msgid "``'b'``" msgstr "``'b'``" -#: ../../library/functions.rst:1217 ../../library/functions.rst:1361 +#: ../../library/functions.rst:1286 ../../library/functions.rst:1430 msgid "binary mode" msgstr "binary mode(二進位模式)" -#: ../../library/functions.rst:1218 +#: ../../library/functions.rst:1287 msgid "``'t'``" msgstr "``'t'``" -#: ../../library/functions.rst:1218 +#: ../../library/functions.rst:1287 msgid "text mode (default)" msgstr "文字模式(預設)" -#: ../../library/functions.rst:1219 +#: ../../library/functions.rst:1288 msgid "``'+'``" msgstr "``'+'``" -#: ../../library/functions.rst:1219 +#: ../../library/functions.rst:1288 msgid "open for updating (reading and writing)" msgstr "更新(讀取並寫入)" -#: ../../library/functions.rst:1222 +#: ../../library/functions.rst:1291 msgid "" "The default mode is ``'r'`` (open for reading text, a synonym of ``'rt'``). " "Modes ``'w+'`` and ``'w+b'`` open and truncate the file. Modes ``'r+'`` and " @@ -2127,7 +2156,7 @@ msgstr "" "預設的模式是 ``'r'``\\ (開啟並讀取文字,同 ``'rt'``)。對於二進位制寫入," "``'w+b'`` 模式開啟並把檔案內容變成 0 bytes,``'r+b'`` 則不會捨棄原始內容。" -#: ../../library/functions.rst:1226 +#: ../../library/functions.rst:1295 msgid "" "As mentioned in the :ref:`io-overview`, Python distinguishes between binary " "and text I/O. Files opened in binary mode (including ``'b'`` in the *mode* " @@ -2138,14 +2167,14 @@ msgid "" "specified *encoding* if given." msgstr "" -#: ../../library/functions.rst:1236 +#: ../../library/functions.rst:1305 msgid "" "Python doesn't depend on the underlying operating system's notion of text " "files; all the processing is done by Python itself, and is therefore " "platform-independent." msgstr "" -#: ../../library/functions.rst:1240 +#: ../../library/functions.rst:1309 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 " @@ -2158,7 +2187,7 @@ msgid "" "*buffering* argument is given, the default buffering policy works as follows:" msgstr "" -#: ../../library/functions.rst:1250 +#: ../../library/functions.rst:1319 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 " @@ -2166,14 +2195,14 @@ msgid "" "systems, the buffer will typically be 4096 or 8192 bytes long." msgstr "" -#: ../../library/functions.rst:1255 +#: ../../library/functions.rst:1324 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:1259 +#: ../../library/functions.rst:1328 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 " @@ -2182,7 +2211,7 @@ msgid "" "the list of supported encodings." msgstr "" -#: ../../library/functions.rst:1265 +#: ../../library/functions.rst:1334 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 " @@ -2191,25 +2220,25 @@ msgid "" "register_error` is also valid. The standard names include:" msgstr "" -#: ../../library/functions.rst:1273 +#: ../../library/functions.rst:1342 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:1277 +#: ../../library/functions.rst:1346 msgid "" "``'ignore'`` ignores errors. Note that ignoring encoding errors can lead to " "data loss." msgstr "" -#: ../../library/functions.rst:1280 +#: ../../library/functions.rst:1349 msgid "" "``'replace'`` causes a replacement marker (such as ``'?'``) to be inserted " "where there is malformed data." msgstr "" -#: ../../library/functions.rst:1283 +#: ../../library/functions.rst:1352 msgid "" "``'surrogateescape'`` will represent any incorrect bytes as low surrogate " "code units ranging from U+DC80 to U+DCFF. These surrogate code units will " @@ -2218,33 +2247,33 @@ msgid "" "an unknown encoding." msgstr "" -#: ../../library/functions.rst:1290 +#: ../../library/functions.rst:1359 msgid "" "``'xmlcharrefreplace'`` is only supported when writing to a file. Characters " "not supported by the encoding are replaced with the appropriate XML " "character reference :samp:`&#{nnn};`." msgstr "" -#: ../../library/functions.rst:1294 +#: ../../library/functions.rst:1363 msgid "" "``'backslashreplace'`` replaces malformed data by Python's backslashed " "escape sequences." msgstr "" -#: ../../library/functions.rst:1297 +#: ../../library/functions.rst:1366 msgid "" "``'namereplace'`` (also only supported when writing) replaces unsupported " "characters with ``\\N{...}`` escape sequences." msgstr "" -#: ../../library/functions.rst:1305 +#: ../../library/functions.rst:1374 msgid "" "*newline* determines how to parse newline characters from the stream. It can " "be ``None``, ``''``, ``'\\n'``, ``'\\r'``, and ``'\\r\\n'``. It works as " "follows:" msgstr "" -#: ../../library/functions.rst:1309 +#: ../../library/functions.rst:1378 msgid "" "When reading input from the stream, if *newline* is ``None``, universal " "newlines mode is enabled. Lines in the input can end in ``'\\n'``, " @@ -2255,7 +2284,7 @@ msgid "" "given string, and the line ending is returned to the caller untranslated." msgstr "" -#: ../../library/functions.rst:1317 +#: ../../library/functions.rst:1386 msgid "" "When writing output to the stream, if *newline* is ``None``, any ``'\\n'`` " "characters written are translated to the system default line separator, :" @@ -2264,7 +2293,7 @@ msgid "" "characters written are translated to the given string." msgstr "" -#: ../../library/functions.rst:1323 +#: ../../library/functions.rst:1392 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 " @@ -2272,7 +2301,7 @@ msgid "" "otherwise, an error will be raised." msgstr "" -#: ../../library/functions.rst:1328 +#: ../../library/functions.rst:1397 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 " @@ -2281,11 +2310,11 @@ msgid "" "similar to passing ``None``)." msgstr "" -#: ../../library/functions.rst:1334 +#: ../../library/functions.rst:1403 msgid "The newly created file is :ref:`non-inheritable `." msgstr "新建立的檔案是\\ :ref:`不可繼承的 `。" -#: ../../library/functions.rst:1336 +#: ../../library/functions.rst:1405 msgid "" "The following example uses the :ref:`dir_fd ` parameter of the :func:" "`os.open` function to open a file relative to a given directory::" @@ -2295,7 +2324,7 @@ msgstr "" "\n" "::" -#: ../../library/functions.rst:1349 +#: ../../library/functions.rst:1418 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 " @@ -2310,7 +2339,7 @@ msgid "" "FileIO`, is returned." msgstr "" -#: ../../library/functions.rst:1370 +#: ../../library/functions.rst:1439 msgid "" "See also the file handling modules, such as :mod:`fileinput`, :mod:`io` " "(where :func:`open` is declared), :mod:`os`, :mod:`os.path`, :mod:" @@ -2320,7 +2349,7 @@ msgstr "" "`open` 的 module )、:mod:`os`、:mod:`os.path`、:mod:`tempfile` 以及 :mod:" "`shutil`。" -#: ../../library/functions.rst:1374 +#: ../../library/functions.rst:1443 msgid "" "Raises an :ref:`auditing event ` ``open`` with arguments ``file``, " "``mode``, ``flags``." @@ -2328,25 +2357,25 @@ msgstr "" "引發一個附帶引數 ``file``、``model``、``flags`` 的\\ :ref:`稽核事件 " "` ``open``。" -#: ../../library/functions.rst:1376 +#: ../../library/functions.rst:1445 msgid "" "The ``mode`` and ``flags`` arguments may have been modified or inferred from " "the original call." msgstr "" -#: ../../library/functions.rst:1381 +#: ../../library/functions.rst:1450 msgid "The *opener* parameter was added." msgstr "增加了 *opener* 參數。" -#: ../../library/functions.rst:1382 +#: ../../library/functions.rst:1451 msgid "The ``'x'`` mode was added." msgstr "增加了 ``'x'`` 模式。" -#: ../../library/functions.rst:1383 +#: ../../library/functions.rst:1452 msgid ":exc:`IOError` used to be raised, it is now an alias of :exc:`OSError`." msgstr "過去觸發的 :exc:`IOError`,現在是 :exc:`OSError` 的別名。" -#: ../../library/functions.rst:1384 +#: ../../library/functions.rst:1453 msgid "" ":exc:`FileExistsError` is now raised if the file opened in exclusive " "creation mode (``'x'``) already exists." @@ -2354,11 +2383,11 @@ msgstr "" "如果檔案已存在但使用了唯一性建立模式 (\\ ``'x'``\\ ),現在會觸發 :exc:" "`FileExistsError`。" -#: ../../library/functions.rst:1389 +#: ../../library/functions.rst:1458 msgid "The file is now non-inheritable." msgstr "檔案在當前版本開始禁止繼承。" -#: ../../library/functions.rst:1393 +#: ../../library/functions.rst:1462 msgid "" "If the system call is interrupted and the signal handler does not raise an " "exception, the function now retries the system call instead of raising an :" @@ -2367,15 +2396,15 @@ msgstr "" "如果系統呼叫被中斷,但訊號處理程序沒有觸發例外,此函式現在會重試系統呼叫,而" "不是觸發 :exc:`InterruptedError`\\ (原因詳見 :pep:`475`)。" -#: ../../library/functions.rst:1396 +#: ../../library/functions.rst:1465 msgid "The ``'namereplace'`` error handler was added." msgstr "增加了 ``'namereplace'`` 錯誤處理程式。" -#: ../../library/functions.rst:1400 +#: ../../library/functions.rst:1469 msgid "Support added to accept objects implementing :class:`os.PathLike`." msgstr "增加對實現了 :class:`os.PathLike` 物件的支援。" -#: ../../library/functions.rst:1401 +#: ../../library/functions.rst:1470 msgid "" "On Windows, opening a console buffer may return a subclass of :class:`io." "RawIOBase` other than :class:`io.FileIO`." @@ -2383,11 +2412,11 @@ msgstr "" "在 Windows 上,開啟一個控制臺緩衝區可能會回傳 :class:`io.RawIOBase` 的 " "subclass,而不是 :class:`io.FileIO`。" -#: ../../library/functions.rst:1404 +#: ../../library/functions.rst:1473 msgid "The ``'U'`` mode has been removed." msgstr "``'U'`` 模式被移除。" -#: ../../library/functions.rst:1409 +#: ../../library/functions.rst:1478 msgid "" "Given a string representing one Unicode character, return an integer " "representing the Unicode code point of that character. For example, " @@ -2398,7 +2427,7 @@ msgstr "" "``ord('a')`` 回傳整數 ``97``、\\ ``ord('€')``\\ (歐元符號)回傳 ``8364``。這" "是 :func:`chr` 的逆函式。" -#: ../../library/functions.rst:1417 +#: ../../library/functions.rst:1486 msgid "" "Return *base* to the power *exp*; if *mod* is present, return *base* to the " "power *exp*, modulo *mod* (computed more efficiently than ``pow(base, exp) % " @@ -2409,7 +2438,7 @@ msgstr "" "*mod* 取餘數(比直接呼叫 ``pow(base, exp) % mod`` 計算更高效)。兩個引數形式" "的 ``pow(exp, exp)`` 等價於次方運算子:``base**exp``。" -#: ../../library/functions.rst:1422 +#: ../../library/functions.rst:1491 msgid "" "The arguments must have numeric types. With mixed operand types, the " "coercion rules for binary arithmetic operators apply. For :class:`int` " @@ -2422,7 +2451,7 @@ msgid "" "close to ``3j``." msgstr "" -#: ../../library/functions.rst:1432 +#: ../../library/functions.rst:1501 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 " @@ -2431,29 +2460,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1438 +#: ../../library/functions.rst:1507 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1445 +#: ../../library/functions.rst:1514 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:1450 +#: ../../library/functions.rst:1519 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1457 +#: ../../library/functions.rst:1526 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:1461 +#: ../../library/functions.rst:1530 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* " @@ -2462,7 +2491,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1467 +#: ../../library/functions.rst:1536 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 " @@ -2470,38 +2499,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1472 +#: ../../library/functions.rst:1541 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1476 +#: ../../library/functions.rst:1545 msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* 關鍵字引數。" -#: ../../library/functions.rst:1482 +#: ../../library/functions.rst:1551 msgid "Return a property attribute." msgstr "回傳 property 屬性。" -#: ../../library/functions.rst:1484 +#: ../../library/functions.rst:1553 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:1488 +#: ../../library/functions.rst:1557 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1505 +#: ../../library/functions.rst:1574 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:1508 +#: ../../library/functions.rst:1577 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 " @@ -2509,14 +2538,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1521 +#: ../../library/functions.rst:1590 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:1529 +#: ../../library/functions.rst:1598 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -2524,30 +2553,30 @@ msgid "" "with an example:" msgstr "" -#: ../../library/functions.rst:1553 +#: ../../library/functions.rst:1622 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:1557 +#: ../../library/functions.rst:1626 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1560 +#: ../../library/functions.rst:1629 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1569 +#: ../../library/functions.rst:1638 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:1575 +#: ../../library/functions.rst:1644 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 " @@ -2560,11 +2589,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../library/functions.rst:1586 +#: ../../library/functions.rst:1655 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../library/functions.rst:1599 +#: ../../library/functions.rst:1668 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`~object.__reversed__` method or supports the sequence protocol (the :" @@ -2572,14 +2601,14 @@ msgid "" "with integer arguments starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1607 +#: ../../library/functions.rst:1676 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:1611 +#: ../../library/functions.rst:1680 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 " @@ -2590,13 +2619,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1620 +#: ../../library/functions.rst:1689 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1625 +#: ../../library/functions.rst:1694 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 " @@ -2605,21 +2634,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1637 +#: ../../library/functions.rst:1706 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:1641 +#: ../../library/functions.rst:1710 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:1648 +#: ../../library/functions.rst:1717 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2628,7 +2657,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../library/functions.rst:1654 +#: ../../library/functions.rst:1723 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2637,21 +2666,21 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../library/functions.rst:1662 +#: ../../library/functions.rst:1731 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:1671 +#: ../../library/functions.rst:1740 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``." msgstr "" -#: ../../library/functions.rst:1679 +#: ../../library/functions.rst:1748 msgid "" "Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " "and :attr:`!step` which merely return the argument values (or their " @@ -2659,48 +2688,48 @@ msgid "" "by NumPy and other third-party packages." msgstr "" -#: ../../library/functions.rst:1684 +#: ../../library/functions.rst:1753 msgid "" "Slice objects are also generated when extended indexing syntax is used. For " "example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:" "`itertools.islice` for an alternate version that returns an :term:`iterator`." msgstr "" -#: ../../library/functions.rst:1689 +#: ../../library/functions.rst:1758 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../library/functions.rst:1695 +#: ../../library/functions.rst:1764 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1697 +#: ../../library/functions.rst:1766 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性引數,只能使用關鍵字引數來指定。" -#: ../../library/functions.rst:1699 +#: ../../library/functions.rst:1768 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:1703 +#: ../../library/functions.rst:1772 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:1706 +#: ../../library/functions.rst:1775 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1709 +#: ../../library/functions.rst:1778 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 " @@ -2708,7 +2737,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1714 +#: ../../library/functions.rst:1783 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2720,22 +2749,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1723 +#: ../../library/functions.rst:1792 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1727 +#: ../../library/functions.rst:1796 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1729 +#: ../../library/functions.rst:1798 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1736 +#: ../../library/functions.rst:1805 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2743,7 +2772,7 @@ msgstr "" "``@staticmethod`` 語法是一個函式 :term:`decorator` - 參見 :ref:`function` 中" "的詳細介紹。" -#: ../../library/functions.rst:1739 +#: ../../library/functions.rst:1808 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, the static method :term:" @@ -2751,14 +2780,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../library/functions.rst:1744 +#: ../../library/functions.rst:1813 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:1748 +#: ../../library/functions.rst:1817 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 " @@ -2767,36 +2796,36 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1760 +#: ../../library/functions.rst:1829 msgid "For more information on static methods, see :ref:`types`." msgstr "關於 static method 的更多資訊,請參考 :ref:`types`。" -#: ../../library/functions.rst:1762 +#: ../../library/functions.rst:1831 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:1777 +#: ../../library/functions.rst:1846 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1779 +#: ../../library/functions.rst:1848 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1785 +#: ../../library/functions.rst:1854 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:1789 +#: ../../library/functions.rst:1858 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 ``''." @@ -2805,37 +2834,37 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1795 +#: ../../library/functions.rst:1864 msgid "The *start* parameter can be specified as a keyword argument." msgstr "*start* 參數可被指定為關鍵字引數。" -#: ../../library/functions.rst:1798 +#: ../../library/functions.rst:1867 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy on " "most builds." msgstr "" -#: ../../library/functions.rst:1805 +#: ../../library/functions.rst:1874 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:1809 +#: ../../library/functions.rst:1878 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:1813 +#: ../../library/functions.rst:1882 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:1817 +#: ../../library/functions.rst:1886 msgid "" "The :attr:`~class.__mro__` attribute of the *object_or_type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2843,7 +2872,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1822 +#: ../../library/functions.rst:1891 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. " @@ -2851,7 +2880,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1827 +#: ../../library/functions.rst:1896 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 " @@ -2859,7 +2888,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1832 +#: ../../library/functions.rst:1901 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 " @@ -2872,18 +2901,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1842 +#: ../../library/functions.rst:1911 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1849 +#: ../../library/functions.rst:1918 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:1853 +#: ../../library/functions.rst:1922 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2893,7 +2922,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1861 +#: ../../library/functions.rst:1930 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 " @@ -2903,33 +2932,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1868 +#: ../../library/functions.rst:1937 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1878 +#: ../../library/functions.rst:1947 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:1887 +#: ../../library/functions.rst:1956 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:1891 +#: ../../library/functions.rst:1960 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:1895 +#: ../../library/functions.rst:1964 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 " @@ -2942,11 +2971,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1910 +#: ../../library/functions.rst:1979 msgid "See also :ref:`bltin-type-objects`." msgstr "另請參閱 :ref:`bltin-type-objects`。" -#: ../../library/functions.rst:1912 +#: ../../library/functions.rst:1981 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2954,23 +2983,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1917 +#: ../../library/functions.rst:1986 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1919 +#: ../../library/functions.rst:1988 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:1926 +#: ../../library/functions.rst:1995 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:1929 +#: ../../library/functions.rst:1998 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -2978,54 +3007,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:1934 +#: ../../library/functions.rst:2003 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:1938 +#: ../../library/functions.rst:2007 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:1944 +#: ../../library/functions.rst:2013 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:1947 +#: ../../library/functions.rst:2016 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:1956 +#: ../../library/functions.rst:2025 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:1959 +#: ../../library/functions.rst:2028 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:1963 +#: ../../library/functions.rst:2032 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:1967 +#: ../../library/functions.rst:2036 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 " @@ -3033,51 +3062,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:1972 +#: ../../library/functions.rst:2041 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:1979 +#: ../../library/functions.rst:2048 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:1986 +#: ../../library/functions.rst:2055 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../library/functions.rst:2004 +#: ../../library/functions.rst:2073 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:2008 +#: ../../library/functions.rst:2077 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:2012 +#: ../../library/functions.rst:2081 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:2015 +#: ../../library/functions.rst:2084 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:2017 +#: ../../library/functions.rst:2086 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 " @@ -3086,23 +3115,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:2023 +#: ../../library/functions.rst:2092 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:2034 +#: ../../library/functions.rst:2103 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 引數。" -#: ../../library/functions.rst:2046 +#: ../../library/functions.rst:2115 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2049 +#: ../../library/functions.rst:2118 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3114,7 +3143,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2058 +#: ../../library/functions.rst:2127 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3124,7 +3153,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2065 +#: ../../library/functions.rst:2134 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3133,7 +3162,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:2071 +#: ../../library/functions.rst:2140 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 " @@ -3141,58 +3170,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:2076 +#: ../../library/functions.rst:2145 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:2081 +#: ../../library/functions.rst:2150 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:2085 +#: ../../library/functions.rst:2154 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:2088 +#: ../../library/functions.rst:2157 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:2095 +#: ../../library/functions.rst:2164 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:2099 +#: ../../library/functions.rst:2168 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2102 +#: ../../library/functions.rst:2171 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:2106 +#: ../../library/functions.rst:2175 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:2111 +#: ../../library/functions.rst:2180 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:2112 +#: ../../library/functions.rst:2181 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -3201,114 +3230,140 @@ msgstr "" "剖析器只接受 Unix 風格的行結束符。如果您從檔案中讀取程式碼,請確保用換行符轉" "換模式轉換 Windows 或 Mac 風格的換行符。" -#: ../../library/functions.rst:153 +#: ../../library/functions.rst:154 msgid "Boolean" msgstr "Boolean(布林值)" -#: ../../library/functions.rst:153 ../../library/functions.rst:1885 +#: ../../library/functions.rst:154 ../../library/functions.rst:1954 msgid "type" msgstr "type(型別)" -#: ../../library/functions.rst:586 +#: ../../library/functions.rst:631 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../library/functions.rst:586 +#: ../../library/functions.rst:631 msgid "exec" msgstr "exec" -#: ../../library/functions.rst:667 +#: ../../library/functions.rst:713 msgid "NaN" msgstr "NaN" -#: ../../library/functions.rst:667 +#: ../../library/functions.rst:713 msgid "Infinity" msgstr "Infinity(無窮)" -#: ../../library/functions.rst:731 +#: ../../library/functions.rst:781 msgid "__format__" msgstr "__format__" -#: ../../library/functions.rst:731 ../../library/functions.rst:1769 +#: ../../library/functions.rst:781 ../../library/functions.rst:1838 msgid "string" msgstr "string(字串)" -#: ../../library/functions.rst:731 +#: ../../library/functions.rst:781 msgid "format() (built-in function)" msgstr "format()(內建函式)" -#: ../../library/functions.rst:1179 +#: ../../library/functions.rst:1248 msgid "file object" msgstr "file object(檔案物件)" -#: ../../library/functions.rst:1179 ../../library/functions.rst:1300 +#: ../../library/functions.rst:1248 ../../library/functions.rst:1369 msgid "open() built-in function" msgstr "open() 內建函式" -#: ../../library/functions.rst:1207 +#: ../../library/functions.rst:1276 msgid "file" msgstr "file(檔案)" -#: ../../library/functions.rst:1207 +#: ../../library/functions.rst:1276 msgid "modes" msgstr "modes(模式)" -#: ../../library/functions.rst:1300 +#: ../../library/functions.rst:1369 msgid "universal newlines" msgstr "universal newlines" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "line-buffered I/O" msgstr "line-buffered I/O(列緩衝 I/O)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "unbuffered I/O" msgstr "unbuffered I/O(非緩衝 I/O)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "buffer size, I/O" msgstr "buffer size, I/O(緩衝區大小、I/O)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "I/O control" msgstr "I/O control(I/O 控制)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "buffering" msgstr "buffering(緩衝)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "text mode" msgstr "text mode(文字模式)" -#: ../../library/functions.rst:1361 ../../library/functions.rst:2040 +#: ../../library/functions.rst:1430 ../../library/functions.rst:2109 msgid "module" msgstr "module(模組)" -#: ../../library/functions.rst:1361 +#: ../../library/functions.rst:1430 msgid "sys" msgstr "sys" -#: ../../library/functions.rst:1769 +#: ../../library/functions.rst:1838 msgid "str() (built-in function)" msgstr "str() (內建函式)" -#: ../../library/functions.rst:1885 +#: ../../library/functions.rst:1954 msgid "object" msgstr "object(物件)" -#: ../../library/functions.rst:2040 +#: ../../library/functions.rst:2109 msgid "statement" msgstr "statement(陳述式)" -#: ../../library/functions.rst:2040 +#: ../../library/functions.rst:2109 msgid "import" msgstr "import(引入)" -#: ../../library/functions.rst:2040 +#: ../../library/functions.rst:2109 msgid "builtins" msgstr "builtins(內建)" +#~ msgid "" +#~ "Return a complex number with the value *real* + *imag*\\*1j or convert a " +#~ "string or number to a complex number. If the first parameter is a " +#~ "string, it will be interpreted as a complex number and the function must " +#~ "be called without a second parameter. The second parameter can never be " +#~ "a string. Each argument may be any numeric type (including complex). If " +#~ "*imag* is omitted, it defaults to zero and the constructor serves as a " +#~ "numeric conversion like :class:`int` and :class:`float`. If both " +#~ "arguments are omitted, returns ``0j``." +#~ msgstr "" +#~ "回傳值為 *real* + *imag*\\*1j 的複數,或將字串、數字轉換為複數。如果第一個" +#~ "引數是字串,則它被視為一個複數,並且函式呼叫時不得有第二個引數。第二個引數" +#~ "絕對不能是字串。每個引數都可以是任意的數值型別(包括複數)。如果省略了 " +#~ "*imag*,則預設值為零,建構函式會像 :class:`int` 和 :class:`float` 一樣進行" +#~ "數值轉換。如果兩個引數都省略,則回傳 ``0j``。" + +#~ msgid "" +#~ "When converting from a string, the string must not contain whitespace " +#~ "around the central ``+`` or ``-`` operator. For example, " +#~ "``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises :exc:" +#~ "`ValueError`." +#~ msgstr "" +#~ "當轉換自一字串時,字串在 ``+`` 或 ``-`` 運算子的周圍必須不能有空格。例如 " +#~ "``complex('1+2j')`` 是有效的,但 ``complex('1 + 2j')`` 會觸發 :exc:" +#~ "`ValueError`。" + #~ msgid "" #~ "The arguments are a string and optional globals and locals. If provided, " #~ "*globals* must be a dictionary. If provided, *locals* can be any mapping " diff --git a/library/subprocess.po b/library/subprocess.po index e45f3829a2..4d4688cf58 100644 --- a/library/subprocess.po +++ b/library/subprocess.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-05-31 00:03+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-" @@ -86,7 +86,7 @@ msgstr "" msgid "" "If *capture_output* is true, stdout and stderr will be captured. When used, " "the internal :class:`Popen` object is automatically created with *stdout* " -"and *stdin* both set to :data:`~subprocess.PIPE`. The *stdout* and *stderr* " +"and *stderr* both set to :data:`~subprocess.PIPE`. The *stdout* and *stderr* " "arguments may not be supplied at the same time as *capture_output*. If you " "wish to capture and combine both streams into one, set *stdout* to :data:" "`~subprocess.PIPE` and *stderr* to :data:`~subprocess.STDOUT`, instead of " From 814d0ec3acd76de257ef9a299005b859e9ac2170 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 1 Jun 2024 00:05:19 +0000 Subject: [PATCH 07/13] sync with cpython 2f7fada5 --- library/contextlib.po | 4 ++-- reference/datamodel.po | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/library/contextlib.po b/library/contextlib.po index 26f925ebba..9825f7f2cc 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-06-01 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -699,7 +699,7 @@ msgstr "" #: ../../library/contextlib.rst:799 msgid "" -"This allows the intended cleanup up behaviour to be made explicit up front, " +"This allows the intended cleanup behaviour to be made explicit up front, " "rather than requiring a separate flag variable." msgstr "" diff --git a/reference/datamodel.po b/reference/datamodel.po index b7ef9e5b81..24a791db59 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-18 00:04+0000\n" +"POT-Creation-Date: 2024-06-01 00:03+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-" @@ -1371,7 +1371,7 @@ msgstr "" msgid "" "The iterator returns :class:`tuple`\\s containing the ``(start_line, " "end_line, start_column, end_column)``. The *i-th* tuple corresponds to the " -"position of the source code that compiled to the *i-th* instruction. Column " +"position of the source code that compiled to the *i-th* code unit. Column " "information is 0-indexed utf-8 byte offsets on the given source line." msgstr "" From a5e5866e3bc9532f6b0a15b21311a3480efd4ad5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 2 Jun 2024 00:05:21 +0000 Subject: [PATCH 08/13] sync with cpython e57a4a19 --- library/itertools.po | 4 +- tutorial/classes.po | 163 ++++++++++++++++++++++--------------------- 2 files changed, 86 insertions(+), 81 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index bd4abdad94..80996b7982 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-28 00:03+0000\n" +"POT-Creation-Date: 2024-06-02 00:03+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-" @@ -894,7 +894,7 @@ msgid "" "overhead." msgstr "" -#: ../../library/itertools.rst:951 +#: ../../library/itertools.rst:956 msgid "The following recipes have a more mathematical flavor:" msgstr "" diff --git a/tutorial/classes.po b/tutorial/classes.po index ad2cb04994..62f592c351 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-15 12:57+0000\n" +"POT-Creation-Date: 2024-06-02 00:03+0000\n" "PO-Revision-Date: 2022-12-26 23:12+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -568,20 +568,10 @@ msgstr "" #: ../../tutorial/classes.rst:340 msgid "" "The other kind of instance attribute reference is a *method*. A method is a " -"function that \"belongs to\" an object. (In Python, the term method is not " -"unique to class instances: other object types can have methods as well. For " -"example, list objects have methods called append, insert, remove, sort, and " -"so on. However, in the following discussion, we'll use the term method " -"exclusively to mean methods of class instance objects, unless explicitly " -"stated otherwise.)" +"function that \"belongs to\" an object." msgstr "" -"實例的另一種屬性參照是 *method*。Method 是一個「屬於」物件的函式。(在 " -"Python 中,術語 method 並不是 class 實例所獨有的:其他物件型別也可以有 " -"method。例如,list 物件具有稱為 append、insert、remove、sort 等 method。但" -"是,在下面的討論中,我們將用術語 method 來專門表示 class 實例物件的 method," -"除非另有明確說明。)" -#: ../../tutorial/classes.rst:349 +#: ../../tutorial/classes.rst:345 msgid "" "Valid method names of an instance object depend on its class. By " "definition, all attributes of a class that are function objects define " @@ -596,18 +586,18 @@ msgstr "" "i`` 不是。但 ``x.f`` 與 ``MyClass.f`` 是不一樣的——它是一個 *method 物件*,而" "不是函式物件。" -#: ../../tutorial/classes.rst:360 +#: ../../tutorial/classes.rst:356 msgid "Method Objects" msgstr "Method 物件" -#: ../../tutorial/classes.rst:362 +#: ../../tutorial/classes.rst:358 msgid "Usually, a method is called right after it is bound::" msgstr "" "通常,一個 method 在它被連結後隨即被呼叫:\n" "\n" "::" -#: ../../tutorial/classes.rst:366 +#: ../../tutorial/classes.rst:362 msgid "" "In the :class:`!MyClass` example, this will return the string ``'hello " "world'``. However, it is not necessary to call a method right away: ``x.f`` " @@ -620,11 +610,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:374 +#: ../../tutorial/classes.rst:370 msgid "will continue to print ``hello world`` until the end of time." msgstr "將會持續印出 ``hello world`` 直到天荒地老。" -#: ../../tutorial/classes.rst:376 +#: ../../tutorial/classes.rst:372 msgid "" "What exactly happens when a method is called? You may have noticed that ``x." "f()`` was called without an argument above, even though the function " @@ -638,7 +628,7 @@ msgstr "" "事?當一個需要引數的函式被呼叫而沒有給任何引數時,Python 肯定會引發例外——即使" "該引數實際上沒有被使用..." -#: ../../tutorial/classes.rst:382 +#: ../../tutorial/classes.rst:378 msgid "" "Actually, you may have guessed the answer: the special thing about methods " "is that the instance object is passed as the first argument of the " @@ -653,7 +643,7 @@ msgstr "" "般來說,呼叫一個有 *n* 個引數的 method,等同於呼叫一個對應函式,其引數列表 " "(argument list) 被建立時,會在第一個引數前插入該 method 的實例物件。" -#: ../../tutorial/classes.rst:389 +#: ../../tutorial/classes.rst:385 msgid "" "In general, methods work as follows. When a non-data attribute of an " "instance is referenced, the instance's class is searched. If the name " @@ -668,11 +658,11 @@ msgstr "" "和函式物件的參照都會被打包到方法物件中。當使用引數串列呼叫方法物件時,會根據" "實例物件和引數串列來建構一個新的引數串列,並使用該新引數串列來呼叫函式物件。" -#: ../../tutorial/classes.rst:402 +#: ../../tutorial/classes.rst:398 msgid "Class and Instance Variables" msgstr "Class 及實例變數" -#: ../../tutorial/classes.rst:404 +#: ../../tutorial/classes.rst:400 msgid "" "Generally speaking, instance variables are for data unique to each instance " "and class variables are for attributes and methods shared by all instances " @@ -683,7 +673,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:426 +#: ../../tutorial/classes.rst:422 msgid "" "As discussed in :ref:`tut-object`, shared data can have possibly surprising " "effects with involving :term:`mutable` objects such as lists and " @@ -698,18 +688,18 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:449 +#: ../../tutorial/classes.rst:445 msgid "Correct design of the class should use an instance variable instead::" msgstr "" "正確的 class 設計應該使用實例變數:\n" "\n" "::" -#: ../../tutorial/classes.rst:473 +#: ../../tutorial/classes.rst:469 msgid "Random Remarks" msgstr "隨意的備註" -#: ../../tutorial/classes.rst:477 +#: ../../tutorial/classes.rst:473 msgid "" "If the same attribute name occurs in both an instance and in a class, then " "attribute lookup prioritizes the instance::" @@ -718,7 +708,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:492 +#: ../../tutorial/classes.rst:488 msgid "" "Data attributes may be referenced by methods as well as by ordinary users " "(\"clients\") of an object. In other words, classes are not usable to " @@ -734,7 +724,7 @@ msgstr "" "全隱藏實作細節並且在必要時控制物件的存取;這可以被以 C 編寫的 Python 擴充所使" "用。)" -#: ../../tutorial/classes.rst:500 +#: ../../tutorial/classes.rst:496 msgid "" "Clients should use data attributes with care --- clients may mess up " "invariants maintained by the methods by stamping on their data attributes. " @@ -747,7 +737,7 @@ msgstr "" "響 method 的有效性,只要避免名稱衝突即可——再一次提醒,命名慣例可以在這裡節省" "很多麻煩。" -#: ../../tutorial/classes.rst:506 +#: ../../tutorial/classes.rst:502 msgid "" "There is no shorthand for referencing data attributes (or other methods!) " "from within methods. I find that this actually increases the readability of " @@ -757,7 +747,7 @@ msgstr "" "在 method 中參照資料屬性(或其他 method!)是沒有簡寫的。我發現這實際上增加" "了 method 的可閱讀性:在瀏覽 method 時,絕不會混淆區域變數和實例變數。" -#: ../../tutorial/classes.rst:511 +#: ../../tutorial/classes.rst:507 msgid "" "Often, the first argument of a method is called ``self``. This is nothing " "more than a convention: the name ``self`` has absolutely no special meaning " @@ -771,7 +761,7 @@ msgstr "" "他 Python 程式設計師來說可讀性較低,此外,也可以想像一個可能因信任此慣例而編" "寫的 *class 瀏覽器 (browser)* 程式。" -#: ../../tutorial/classes.rst:517 +#: ../../tutorial/classes.rst:513 msgid "" "Any function object that is a class attribute defines a method for instances " "of that class. It is not necessary that the function definition is " @@ -784,7 +774,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:534 +#: ../../tutorial/classes.rst:530 msgid "" "Now ``f``, ``g`` and ``h`` are all attributes of class :class:`!C` that " "refer to function objects, and consequently they are all methods of " @@ -795,7 +785,7 @@ msgstr "" "以他們都是class :class:`!C` 實例的 method —— ``h`` 與 ``g`` 是完全一樣的。請" "注意,這種做法通常只會使該程式的讀者感到困惑。" -#: ../../tutorial/classes.rst:539 +#: ../../tutorial/classes.rst:535 msgid "" "Methods may call other methods by using method attributes of the ``self`` " "argument::" @@ -804,7 +794,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:553 +#: ../../tutorial/classes.rst:549 msgid "" "Methods may reference global names in the same way as ordinary functions. " "The global scope associated with a method is the module containing its " @@ -823,7 +813,7 @@ msgstr "" "class 所使用。通常,包含 method 的 class,它本身就是被定義在這個全域作用域," "在下一節,我們將看到 method 想要參照自己的 class 的一些好原因。" -#: ../../tutorial/classes.rst:563 +#: ../../tutorial/classes.rst:559 msgid "" "Each value is an object, and therefore has a *class* (also called its " "*type*). It is stored as ``object.__class__``." @@ -831,11 +821,11 @@ msgstr "" "每個值都是一個物件,因此都具有一個 *class*,也可以稱為它的 *type(型別)*。它" "以 ``object.__class__`` 被儲存。" -#: ../../tutorial/classes.rst:570 +#: ../../tutorial/classes.rst:566 msgid "Inheritance" msgstr "繼承 (Inheritance)" -#: ../../tutorial/classes.rst:572 +#: ../../tutorial/classes.rst:568 msgid "" "Of course, a language feature would not be worthy of the name \"class\" " "without supporting inheritance. The syntax for a derived class definition " @@ -846,7 +836,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:583 +#: ../../tutorial/classes.rst:579 msgid "" "The name :class:`!BaseClassName` must be defined in a namespace accessible " "from the scope containing the derived class definition. In place of a base " @@ -860,7 +850,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:591 +#: ../../tutorial/classes.rst:587 msgid "" "Execution of a derived class definition proceeds the same as for a base " "class. When the class object is constructed, the base class is remembered. " @@ -874,7 +864,7 @@ msgstr "" "class 中找到,則會繼續在 base class 中搜尋。假如該 base class 本身也是衍生自" "其他 class,則這個規則會遞迴地被應用。" -#: ../../tutorial/classes.rst:597 +#: ../../tutorial/classes.rst:593 msgid "" "There's nothing special about instantiation of derived classes: " "``DerivedClassName()`` creates a new instance of the class. Method " @@ -887,7 +877,7 @@ msgstr "" "需要,沿著 base class 的繼承鍊往下走,如果這產生了一個函式物件,則該 method " "的參照是有效的。" -#: ../../tutorial/classes.rst:603 +#: ../../tutorial/classes.rst:599 msgid "" "Derived classes may override methods of their base classes. Because methods " "have no special privileges when calling other methods of the same object, a " @@ -901,7 +891,7 @@ msgstr "" "class 中的 method。(給 C++ 程式設計師:Python 中所有 method 實際上都是 " "``virtual``。)" -#: ../../tutorial/classes.rst:609 +#: ../../tutorial/classes.rst:605 msgid "" "An overriding method in a derived class may in fact want to extend rather " "than simply replace the base class method of the same name. There is a " @@ -916,11 +906,11 @@ msgstr "" "用。(請注意,只有在 base class 在全域作用域可以用 ``BaseClassName`` 被存取" "時,這方法才有效。)" -#: ../../tutorial/classes.rst:616 +#: ../../tutorial/classes.rst:612 msgid "Python has two built-in functions that work with inheritance:" msgstr "Python 有兩個內建函式可以用於繼承:" -#: ../../tutorial/classes.rst:618 +#: ../../tutorial/classes.rst:614 msgid "" "Use :func:`isinstance` to check an instance's type: ``isinstance(obj, int)`` " "will be ``True`` only if ``obj.__class__`` is :class:`int` or some class " @@ -930,7 +920,7 @@ msgstr "" "``obj.__class__`` 是 :class:`int` 或衍伸自 :class:`int` 時,結果才會是 " "``True``。" -#: ../../tutorial/classes.rst:622 +#: ../../tutorial/classes.rst:618 msgid "" "Use :func:`issubclass` to check class inheritance: ``issubclass(bool, int)`` " "is ``True`` since :class:`bool` is a subclass of :class:`int`. However, " @@ -942,11 +932,11 @@ msgstr "" "``issubclass(float, int)`` 是 ``False``,因為 :class:`float` 並不是 :class:" "`int` 的 subclass。" -#: ../../tutorial/classes.rst:632 +#: ../../tutorial/classes.rst:628 msgid "Multiple Inheritance" msgstr "多重繼承" -#: ../../tutorial/classes.rst:634 +#: ../../tutorial/classes.rst:630 msgid "" "Python supports a form of multiple inheritance as well. A class definition " "with multiple base classes looks like this::" @@ -956,7 +946,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:644 +#: ../../tutorial/classes.rst:640 msgid "" "For most purposes, in the simplest cases, you can think of the search for " "attributes inherited from a parent class as depth-first, left-to-right, not " @@ -972,7 +962,7 @@ msgstr "" "class:`!Base1` 搜尋它,接著(遞迴地)在 :class:`!Base1` 的 base class 中搜" "尋,假如在那裡又沒有找到的話,會在 :class:`!Base2` 搜尋,依此類推。" -#: ../../tutorial/classes.rst:651 +#: ../../tutorial/classes.rst:647 msgid "" "In fact, it is slightly more complex than that; the method resolution order " "changes dynamically to support cooperative calls to :func:`super`. This " @@ -984,7 +974,7 @@ msgstr "" "`super` 的合作呼叫。這個方式在其他的多重繼承語言中,稱為呼叫下一個方法 (call-" "next-method),且比在單一繼承語言中的 super call(超級呼叫)來得更強大。" -#: ../../tutorial/classes.rst:657 +#: ../../tutorial/classes.rst:653 msgid "" "Dynamic ordering is necessary because all cases of multiple inheritance " "exhibit one or more diamond relationships (where at least one of the parent " @@ -1008,11 +998,11 @@ msgstr "" "化),而不會影響其 parent 的搜尋優先順序)。總之,這些特性使設計出可靠又可擴" "充、具有多重繼承的 class 成為可能。更多資訊,請見 :ref:`python_2.3_mro`。" -#: ../../tutorial/classes.rst:674 +#: ../../tutorial/classes.rst:670 msgid "Private Variables" msgstr "私有變數" -#: ../../tutorial/classes.rst:676 +#: ../../tutorial/classes.rst:672 msgid "" "\"Private\" instance variables that cannot be accessed except from inside an " "object don't exist in Python. However, there is a convention that is " @@ -1027,7 +1017,7 @@ msgstr "" "(無論它是函式、方法或是資料成員)。這被視為一個實作細節,如有調整,亦不另行" "通知。" -#: ../../tutorial/classes.rst:686 +#: ../../tutorial/classes.rst:682 msgid "" "Since there is a valid use-case for class-private members (namely to avoid " "name clashes of names with names defined by subclasses), there is limited " @@ -1045,7 +1035,7 @@ msgstr "" "``classname`` 就是去掉前導下底線的當前 class 名稱。只要這個修飾是在 class 的" "定義之中發生,它就會在不考慮該物件名稱的語法位置的情況下完成。" -#: ../../tutorial/classes.rst:695 +#: ../../tutorial/classes.rst:691 msgid "" "Name mangling is helpful for letting subclasses override methods without " "breaking intraclass method calls. For example::" @@ -1055,7 +1045,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:717 +#: ../../tutorial/classes.rst:713 msgid "" "The above example would work even if ``MappingSubclass`` were to introduce a " "``__update`` identifier since it is replaced with ``_Mapping__update`` in " @@ -1066,7 +1056,7 @@ msgstr "" "作,因為在 ``Mapping`` class 中,它會被替換為 ``_Mapping__update``,而在 " "``MappingSubclass`` class 中,它會被替換為 ``_MappingSubclass__update``。" -#: ../../tutorial/classes.rst:722 +#: ../../tutorial/classes.rst:718 msgid "" "Note that the mangling rules are designed mostly to avoid accidents; it " "still is possible to access or modify a variable that is considered " @@ -1076,7 +1066,7 @@ msgstr "" "請注意,修飾規則是被設計來避免意外;它仍可能存取或修改一個被視為私有的變數。" "這在特殊情況下甚至可能很有用,例如在除錯器 (debugger)。" -#: ../../tutorial/classes.rst:726 +#: ../../tutorial/classes.rst:722 msgid "" "Notice that code passed to ``exec()`` or ``eval()`` does not consider the " "classname of the invoking class to be the current class; this is similar to " @@ -1090,11 +1080,11 @@ msgstr "" "組編譯後 (byte-compiled) 的程式碼。同樣的限制適用於 ``getattr()``," "``setattr()`` 和 ``delattr()``,以及直接參照 ``__dict__`` 時。" -#: ../../tutorial/classes.rst:737 +#: ../../tutorial/classes.rst:733 msgid "Odds and Ends" msgstr "補充說明" -#: ../../tutorial/classes.rst:739 +#: ../../tutorial/classes.rst:735 msgid "" "Sometimes it is useful to have a data type similar to the Pascal \"record\" " "or C \"struct\", bundling together a few named data items. The idiomatic " @@ -1106,7 +1096,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:759 +#: ../../tutorial/classes.rst:755 msgid "" "A piece of Python code that expects a particular abstract data type can " "often be passed a class that emulates the methods of that data type " @@ -1121,7 +1111,7 @@ msgstr "" "meth:`~io.TextIOBase.readline` method 的 class 作為替代方式,從字串緩衝區取得" "資料,並將其作為引數來傳遞。" -#: ../../tutorial/classes.rst:771 +#: ../../tutorial/classes.rst:767 msgid "" ":ref:`Instance method objects ` have attributes, too: :" "attr:`m.__self__ ` is the instance object with the method :" @@ -1133,11 +1123,11 @@ msgstr "" "__func__ ` 則是該 method 所對應的\\ :ref:`函式物件 `。" -#: ../../tutorial/classes.rst:781 +#: ../../tutorial/classes.rst:777 msgid "Iterators" msgstr "疊代器 (Iterator)" -#: ../../tutorial/classes.rst:783 +#: ../../tutorial/classes.rst:779 msgid "" "By now you have probably noticed that most container objects can be looped " "over using a :keyword:`for` statement::" @@ -1147,7 +1137,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:797 +#: ../../tutorial/classes.rst:793 msgid "" "This style of access is clear, concise, and convenient. The use of " "iterators pervades and unifies Python. Behind the scenes, the :keyword:" @@ -1169,7 +1159,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:822 +#: ../../tutorial/classes.rst:818 msgid "" "Having seen the mechanics behind the iterator protocol, it is easy to add " "iterator behavior to your classes. Define an :meth:`~container.__iter__` " @@ -1184,11 +1174,11 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:859 +#: ../../tutorial/classes.rst:855 msgid "Generators" msgstr "產生器 (Generator)" -#: ../../tutorial/classes.rst:861 +#: ../../tutorial/classes.rst:857 msgid "" ":term:`Generators ` are a simple and powerful tool for creating " "iterators. They are written like regular functions but use the :keyword:" @@ -1204,7 +1194,7 @@ msgstr "" "\n" "::" -#: ../../tutorial/classes.rst:882 +#: ../../tutorial/classes.rst:878 msgid "" "Anything that can be done with generators can also be done with class-based " "iterators as described in the previous section. What makes generators so " @@ -1215,7 +1205,7 @@ msgstr "" "描述。而讓產生器的程式碼更為精簡的原因是,:meth:`~iterator.__iter__` 和 :" "meth:`~generator.__next__` method 會自動被建立。" -#: ../../tutorial/classes.rst:887 +#: ../../tutorial/classes.rst:883 msgid "" "Another key feature is that the local variables and execution state are " "automatically saved between calls. This made the function easier to write " @@ -1226,7 +1216,7 @@ msgstr "" "函式比使用 ``self.index`` 和 ``self.data`` 這種實例變數的方式更容易編寫且更為" "清晰。" -#: ../../tutorial/classes.rst:892 +#: ../../tutorial/classes.rst:888 msgid "" "In addition to automatic method creation and saving program state, when " "generators terminate, they automatically raise :exc:`StopIteration`. In " @@ -1236,11 +1226,11 @@ msgstr "" "除了會自動建立 method 和儲存程式狀態,當產生器終止時,它們還會自動引發 :exc:" "`StopIteration`。這些特性結合在一起,使建立疊代器能與編寫常規函式一樣容易。" -#: ../../tutorial/classes.rst:901 +#: ../../tutorial/classes.rst:897 msgid "Generator Expressions" msgstr "產生器運算式" -#: ../../tutorial/classes.rst:903 +#: ../../tutorial/classes.rst:899 msgid "" "Some simple generators can be coded succinctly as expressions using a syntax " "similar to list comprehensions but with parentheses instead of square " @@ -1255,18 +1245,18 @@ msgstr "" "產生器定義相比,程式碼較精簡但功能較少,也比等效的 list comprehension 更為節" "省記憶體。" -#: ../../tutorial/classes.rst:910 +#: ../../tutorial/classes.rst:906 msgid "Examples::" msgstr "" "例如:\n" "\n" "::" -#: ../../tutorial/classes.rst:931 +#: ../../tutorial/classes.rst:927 msgid "Footnotes" msgstr "註解" -#: ../../tutorial/classes.rst:932 +#: ../../tutorial/classes.rst:928 msgid "" "Except for one thing. Module objects have a secret read-only attribute " "called :attr:`~object.__dict__` which returns the dictionary used to " @@ -1280,18 +1270,33 @@ msgstr "" "屬性但不是全域名稱。顯然,使用此屬性將違反命名空間實作的抽象化,而應該僅限用" "於事後除錯器 (post-mortem debugger) 之類的東西。" -#: ../../tutorial/classes.rst:347 +#: ../../tutorial/classes.rst:343 msgid "object" msgstr "object(物件)" -#: ../../tutorial/classes.rst:347 +#: ../../tutorial/classes.rst:343 msgid "method" msgstr "method(方法)" -#: ../../tutorial/classes.rst:683 +#: ../../tutorial/classes.rst:679 msgid "name" msgstr "name(名稱)" -#: ../../tutorial/classes.rst:683 +#: ../../tutorial/classes.rst:679 msgid "mangling" msgstr "mangling(修飾)" + +#~ msgid "" +#~ "The other kind of instance attribute reference is a *method*. A method is " +#~ "a function that \"belongs to\" an object. (In Python, the term method is " +#~ "not unique to class instances: other object types can have methods as " +#~ "well. For example, list objects have methods called append, insert, " +#~ "remove, sort, and so on. However, in the following discussion, we'll use " +#~ "the term method exclusively to mean methods of class instance objects, " +#~ "unless explicitly stated otherwise.)" +#~ msgstr "" +#~ "實例的另一種屬性參照是 *method*。Method 是一個「屬於」物件的函式。(在 " +#~ "Python 中,術語 method 並不是 class 實例所獨有的:其他物件型別也可以有 " +#~ "method。例如,list 物件具有稱為 append、insert、remove、sort 等 method。但" +#~ "是,在下面的討論中,我們將用術語 method 來專門表示 class 實例物件的 " +#~ "method,除非另有明確說明。)" From 0107b9e22269a6ebe42e4c4a2afbf63819a33e96 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 3 Jun 2024 00:05:14 +0000 Subject: [PATCH 09/13] sync with cpython 059be67b --- library/pathlib.po | 669 +++++++++++++++++++++++---------------------- library/typing.po | 378 +++++++++++++------------ 2 files changed, 545 insertions(+), 502 deletions(-) diff --git a/library/pathlib.po b/library/pathlib.po index abbe5b382c..a410acf9f6 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-12 00:03+0000\n" +"POT-Creation-Date: 2024-06-03 00:03+0000\n" "PO-Revision-Date: 2024-02-29 20:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -524,8 +524,8 @@ msgid "" "Set *case_sensitive* to ``True`` or ``False`` to override this behaviour." msgstr "將 *case_sensitive* 設定成 ``True`` 或 ``False`` 會覆蓋這個行為。" -#: ../../library/pathlib.rst:601 ../../library/pathlib.rst:948 -#: ../../library/pathlib.rst:1361 +#: ../../library/pathlib.rst:601 ../../library/pathlib.rst:1149 +#: ../../library/pathlib.rst:1428 msgid "The *case_sensitive* parameter was added." msgstr "新增 *case_sensitive* 參數。" @@ -655,19 +655,10 @@ msgstr "" "你的應用程式導致漏洞或故障): ::" #: ../../library/pathlib.rst:794 -msgid "Methods" -msgstr "方法" - -#: ../../library/pathlib.rst:796 -msgid "" -"Concrete paths provide the following methods in addition to pure paths " -"methods. Many of these methods can raise an :exc:`OSError` if a system call " -"fails (for example because the path doesn't exist)." +msgid "Querying file type and status" msgstr "" -"實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" -"存在),以下許多方法會引發 :exc:`OSError`。" -#: ../../library/pathlib.rst:802 +#: ../../library/pathlib.rst:798 msgid "" ":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" "meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." @@ -682,23 +673,7 @@ msgstr "" "is_fifo()`、:meth:`~Path.is_socket()` 遇到路徑包含 OS 層無法表示的字元時現在" "會回傳 ``False`` 而不是引發例外。" -#: ../../library/pathlib.rst:812 -msgid "" -"Return a new path object representing the current directory (as returned by :" -"func:`os.getcwd`)::" -msgstr "" -"回傳一個代表目前目錄的新的路徑物件(像 :func:`os.getcwd` 回傳的一樣): ::" - -#: ../../library/pathlib.rst:821 -msgid "" -"Return a new path object representing the user's home directory (as returned " -"by :func:`os.path.expanduser` with ``~`` construct). If the home directory " -"can't be resolved, :exc:`RuntimeError` is raised." -msgstr "" -"回傳一個代表使用者家目錄的新的路徑物件(像以 ``~`` 構成的 :func:`os.path." -"expanduser` 的回傳一樣)。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" - -#: ../../library/pathlib.rst:835 +#: ../../library/pathlib.rst:808 msgid "" "Return a :class:`os.stat_result` object containing information about this " "path, like :func:`os.stat`. The result is looked up at each call to this " @@ -707,7 +682,7 @@ msgstr "" "回傳一個包含該路徑資訊的 :class:`os.stat_result` 物件,像 :func:`os.stat` 一" "樣。每次呼叫此方法都會重新查詢結果。" -#: ../../library/pathlib.rst:838 +#: ../../library/pathlib.rst:811 msgid "" "This method normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :meth:`~Path.lstat`." @@ -715,29 +690,24 @@ msgstr "" "此方法通常會跟隨 (follow) 符號連結;想要取得符號連結的資訊,可以加上引數 " "``follow_symlinks=False`` 或使用 :meth:`~Path.lstat`。" -#: ../../library/pathlib.rst:849 ../../library/pathlib.rst:869 -#: ../../library/pathlib.rst:890 +#: ../../library/pathlib.rst:822 ../../library/pathlib.rst:850 +#: ../../library/pathlib.rst:1090 msgid "The *follow_symlinks* parameter was added." msgstr "新增 *follow_symlinks* 參數。" -#: ../../library/pathlib.rst:854 -msgid "Change the file mode and permissions, like :func:`os.chmod`." -msgstr "修改檔案模式 (file mode) 與權限,像 :func:`os.chmod` 一樣。" - -#: ../../library/pathlib.rst:856 +#: ../../library/pathlib.rst:828 msgid "" -"This method normally follows symlinks. Some Unix flavours support changing " -"permissions on the symlink itself; on these platforms you may add the " -"argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." +"Like :meth:`Path.stat` but, if the path points to a symbolic link, return " +"the symbolic link's information rather than its target's." msgstr "" -"此方法通常會跟隨符號連結。一些 Unix 類型支援修改符號連結本身的權限;在這些平" -"台上你可以加上引數 ``follow_symlinks=False`` 或使用 :meth:`~Path.lchmod`。" +"類似 :meth:`Path.stat`,但如果該路徑指向一個符號連結,則回傳符號連結的資訊而" +"不是其指向的目標。" -#: ../../library/pathlib.rst:874 +#: ../../library/pathlib.rst:834 msgid "Return ``True`` if the path points to an existing file or directory." msgstr "如果路徑指向存在的檔案或目錄則回傳 ``True``。" -#: ../../library/pathlib.rst:876 +#: ../../library/pathlib.rst:836 msgid "" "This method normally follows symlinks; to check if a symlink exists, add the " "argument ``follow_symlinks=False``." @@ -745,84 +715,25 @@ msgstr "" "此方法通常會跟隨符號連結;如果想檢查符號連結是否存在,可以加上引數 " "``follow_symlinks=False``。" -#: ../../library/pathlib.rst:895 -msgid "" -"Return a new path with expanded ``~`` and ``~user`` constructs, as returned " -"by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" -"`RuntimeError` is raised." -msgstr "" -"回傳一個展開 ``~`` 和 ``~user`` 構成的新路徑,像 :meth:`os.path.expanduser` " -"回傳的一樣。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" - -#: ../../library/pathlib.rst:910 -msgid "" -"Glob the given relative *pattern* in the directory represented by this path, " -"yielding all matching files (of any kind)::" -msgstr "" -"在該路徑表示的目錄裡,以 glob 方式比對所給定的相對 *pattern*,並 yield 所有比" -"對到的檔案(任意類型): ::" - -#: ../../library/pathlib.rst:918 -msgid "" -"Patterns are the same as for :mod:`fnmatch`, with the addition of \"``**``\" " -"which means \"this directory and all subdirectories, recursively\". In " -"other words, it enables recursive globbing::" -msgstr "" -"模式 (pattern) 和給 :mod:`fnmatch` 的一樣,加上 \"``**``\" 代表「目前目錄及所" -"有遞迴的子目錄」。也就是說它能夠做遞迴的 glob 比對: ::" - -#: ../../library/pathlib.rst:929 -msgid "" -"This method calls :meth:`Path.is_dir` on the top-level directory and " -"propagates any :exc:`OSError` exception that is raised. Subsequent :exc:" -"`OSError` exceptions from scanning directories are suppressed." -msgstr "" -"此方法在頂層目錄上呼叫 :meth:`Path.is_dir` 並傳遞引發的任何 :exc:`OSError` 例" -"外。將會抑制在目錄對於 :exc:`OSError` 例外的後續掃描。" - -#: ../../library/pathlib.rst:933 ../../library/pathlib.rst:1350 -msgid "" -"By default, or when the *case_sensitive* keyword-only argument is set to " -"``None``, this method matches paths using platform-specific casing rules: " -"typically, case-sensitive on POSIX, and case-insensitive on Windows. Set " -"*case_sensitive* to ``True`` or ``False`` to override this behaviour." -msgstr "" -"預設情況下,或者當 *case_sensitive* 僅限關鍵字引數被設定為 ``None`` 的時候," -"此方法會使用平台特定的大小寫規則來比對路徑;通常在 POSIX 上會區分大小寫,而" -"在 Windows 上不區分大小寫。將 *case_sensitive* 設成 ``True`` 或 ``False`` 會" -"覆寫這個行為。" - -#: ../../library/pathlib.rst:939 -msgid "" -"Using the \"``**``\" pattern in large directory trees may consume an " -"inordinate amount of time." -msgstr "在很大的目錄樹裡使用 \"``**``\" 可能會耗費過多的時間。" - -#: ../../library/pathlib.rst:942 -msgid "" -"Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " -"arguments ``self``, ``pattern``." -msgstr "" -"引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " -"``pathlib.Path.glob``。" - -#: ../../library/pathlib.rst:944 ../../library/pathlib.rst:1357 +#: ../../library/pathlib.rst:856 msgid "" -"Return only directories if *pattern* ends with a pathname components " -"separator (:data:`~os.sep` or :data:`~os.altsep`)." +"Return ``True`` if the path points to a regular file (or a symbolic link " +"pointing to a regular file), ``False`` if it points to another kind of file." msgstr "" -"如果 *pattern* 以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os." -"altsep`)作結尾則只會回傳目錄。" +"如果該路徑指向一個普通檔案(或者是一個指向普通檔案的符號連結)則回傳 " +"``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:954 +#: ../../library/pathlib.rst:859 ../../library/pathlib.rst:868 +#: ../../library/pathlib.rst:910 ../../library/pathlib.rst:919 +#: ../../library/pathlib.rst:928 ../../library/pathlib.rst:937 msgid "" -"Return the name of the group owning the file. :exc:`KeyError` is raised if " -"the file's gid isn't found in the system database." +"``False`` is also returned if the path doesn't exist or is a broken symlink; " +"other errors (such as permission errors) are propagated." msgstr "" -"回傳擁有該檔案的群組名稱。如果在系統資料庫裡找不到檔案的 gid 會引發 :exc:" -"`KeyError`。" +"如果路徑不存在或者是一個斷掉的符號連結則也會回傳 ``False``;其他錯誤(例如權" +"限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:960 +#: ../../library/pathlib.rst:865 msgid "" "Return ``True`` if the path points to a directory (or a symbolic link " "pointing to a directory), ``False`` if it points to another kind of file." @@ -830,25 +741,19 @@ msgstr "" "如果該路徑指向一個目錄(或者是一個指向目錄的符號連結)則回傳 ``True``,如果指" "向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:963 ../../library/pathlib.rst:972 -#: ../../library/pathlib.rst:1014 ../../library/pathlib.rst:1023 -#: ../../library/pathlib.rst:1032 ../../library/pathlib.rst:1041 +#: ../../library/pathlib.rst:874 msgid "" -"``False`` is also returned if the path doesn't exist or is a broken symlink; " -"other errors (such as permission errors) are propagated." -msgstr "" -"如果路徑不存在或者是一個斷掉的符號連結則也會回傳 ``False``;其他錯誤(例如權" -"限錯誤)則會傳遞出來。" +"Return ``True`` if the path points to a symbolic link, ``False`` otherwise." +msgstr "如果該路徑指向一個符號連結則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/pathlib.rst:969 +#: ../../library/pathlib.rst:876 msgid "" -"Return ``True`` if the path points to a regular file (or a symbolic link " -"pointing to a regular file), ``False`` if it points to another kind of file." +"``False`` is also returned if the path doesn't exist; other errors (such as " +"permission errors) are propagated." msgstr "" -"如果該路徑指向一個普通檔案(或者是一個指向普通檔案的符號連結)則回傳 " -"``True``,如果指向其他類型的檔案則回傳 ``False``。" +"如果該路徑不存在也會回傳 ``False``;其他錯誤(例如權限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:978 +#: ../../library/pathlib.rst:882 msgid "" "Return ``True`` if the path points to a junction, and ``False`` for any " "other type of file. Currently only Windows supports junctions." @@ -856,7 +761,7 @@ msgstr "" "如果該路徑指向一個連接點 (junction) 則回傳 ``True``,對其他類型的檔案則回傳 " "``False``。目前只有 Windows 支援連接點。" -#: ../../library/pathlib.rst:986 +#: ../../library/pathlib.rst:890 msgid "" "Return ``True`` if the path is a :dfn:`mount point`: a point in a file " "system where a different file system has been mounted. On POSIX, the " @@ -874,23 +779,11 @@ msgstr "" "Windows 上,一個掛載點被視為一個根磁碟機字母(例如 ``c:\\``)、一個 UNC share" "(例如 ``\\\\server\\share``)或是掛載的檔案系統目錄。" -#: ../../library/pathlib.rst:997 +#: ../../library/pathlib.rst:901 msgid "Windows support was added." msgstr "加入對 Windows 的支援。" -#: ../../library/pathlib.rst:1003 -msgid "" -"Return ``True`` if the path points to a symbolic link, ``False`` otherwise." -msgstr "如果該路徑指向一個符號連結則回傳 ``True``,否則回傳 ``False``。" - -#: ../../library/pathlib.rst:1005 -msgid "" -"``False`` is also returned if the path doesn't exist; other errors (such as " -"permission errors) are propagated." -msgstr "" -"如果該路徑不存在也會回傳 ``False``;其他錯誤(例如權限錯誤)則會傳遞出來。" - -#: ../../library/pathlib.rst:1011 +#: ../../library/pathlib.rst:907 msgid "" "Return ``True`` if the path points to a Unix socket (or a symbolic link " "pointing to a Unix socket), ``False`` if it points to another kind of file." @@ -898,7 +791,7 @@ msgstr "" "如果該路徑指向一個 Unix socket(或者是一個指向 Unix socket 的符號連結)則會回" "傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1020 +#: ../../library/pathlib.rst:916 msgid "" "Return ``True`` if the path points to a FIFO (or a symbolic link pointing to " "a FIFO), ``False`` if it points to another kind of file." @@ -906,7 +799,7 @@ msgstr "" "如果該路徑指向一個 FIFO(或者是一個指向 FIFO 的符號連結)則會回傳 ``True``," "如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1029 +#: ../../library/pathlib.rst:925 msgid "" "Return ``True`` if the path points to a block device (or a symbolic link " "pointing to a block device), ``False`` if it points to another kind of file." @@ -914,7 +807,7 @@ msgstr "" "如果該路徑指向一個區塊裝置 (block device)(或者是一個指向區塊裝置的符號連結)" "則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1038 +#: ../../library/pathlib.rst:934 msgid "" "Return ``True`` if the path points to a character device (or a symbolic link " "pointing to a character device), ``False`` if it points to another kind of " @@ -923,13 +816,200 @@ msgstr "" "如果該路徑指向一個字元裝置 (character device)(或者是一個指向字元裝置的符號連" "結)則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:1047 +#: ../../library/pathlib.rst:943 +msgid "" +"Return whether this path points to the same file as *other_path*, which can " +"be either a Path object, or a string. The semantics are similar to :func:" +"`os.path.samefile` and :func:`os.path.samestat`." +msgstr "" +"回傳此路徑是否指向與 *other_path* 相同的檔案,*other_path* 可以是路徑 (Path) " +"物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path." +"samestat`。" + +#: ../../library/pathlib.rst:947 +msgid "" +"An :exc:`OSError` can be raised if either file cannot be accessed for some " +"reason." +msgstr "若任何一個檔案因為某些原因無法存取,則引發 :exc:`OSError`。" + +#: ../../library/pathlib.rst:963 +msgid "Reading and writing files" +msgstr "" + +#: ../../library/pathlib.rst:968 +msgid "" +"Open the file pointed to by the path, like the built-in :func:`open` " +"function does::" +msgstr "開啟該路徑指向的檔案,像內建的 :func:`open` 函式做的一樣: ::" + +#: ../../library/pathlib.rst:980 +msgid "Return the decoded contents of the pointed-to file as a string::" +msgstr "將路徑指向的檔案的解碼內容以字串形式回傳: ::" + +#: ../../library/pathlib.rst:988 +msgid "" +"The file is opened and then closed. The optional parameters have the same " +"meaning as in :func:`open`." +msgstr "該檔案被打開並且隨後關閉。可選參數的含義與 :func:`open` 中的相同。" + +#: ../../library/pathlib.rst:996 +msgid "Return the binary contents of the pointed-to file as a bytes object::" +msgstr "將路徑指向的檔案的二進位內容以一個位元組物件回傳: ::" + +#: ../../library/pathlib.rst:1009 +msgid "" +"Open the file pointed to in text mode, write *data* to it, and close the " +"file::" +msgstr "以文字模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" + +#: ../../library/pathlib.rst:1018 +msgid "" +"An existing file of the same name is overwritten. The optional parameters " +"have the same meaning as in :func:`open`." +msgstr "" +"一個名稱相同的已存在檔案會被覆寫。可選參數和 :func:`open` 的參數有相同意義。" + +#: ../../library/pathlib.rst:1023 +msgid "The *newline* parameter was added." +msgstr "新增 *newline* 參數。" + +#: ../../library/pathlib.rst:1029 +msgid "" +"Open the file pointed to in bytes mode, write *data* to it, and close the " +"file::" +msgstr "以位元組模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" + +#: ../../library/pathlib.rst:1038 +msgid "An existing file of the same name is overwritten." +msgstr "一個名稱相同的已存在檔案會被覆寫。" + +#: ../../library/pathlib.rst:1044 +#, fuzzy +msgid "Other methods" +msgstr "方法" + +#: ../../library/pathlib.rst:1046 +#, fuzzy +msgid "" +"Many of these methods can raise an :exc:`OSError` if a system call fails " +"(for example because the path doesn't exist)." +msgstr "" +"實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" +"存在),以下許多方法會引發 :exc:`OSError`。" + +#: ../../library/pathlib.rst:1052 +msgid "" +"Return a new path object representing the current directory (as returned by :" +"func:`os.getcwd`)::" +msgstr "" +"回傳一個代表目前目錄的新的路徑物件(像 :func:`os.getcwd` 回傳的一樣): ::" + +#: ../../library/pathlib.rst:1061 +msgid "" +"Return a new path object representing the user's home directory (as returned " +"by :func:`os.path.expanduser` with ``~`` construct). If the home directory " +"can't be resolved, :exc:`RuntimeError` is raised." +msgstr "" +"回傳一個代表使用者家目錄的新的路徑物件(像以 ``~`` 構成的 :func:`os.path." +"expanduser` 的回傳一樣)。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" + +#: ../../library/pathlib.rst:1075 +msgid "Change the file mode and permissions, like :func:`os.chmod`." +msgstr "修改檔案模式 (file mode) 與權限,像 :func:`os.chmod` 一樣。" + +#: ../../library/pathlib.rst:1077 +msgid "" +"This method normally follows symlinks. Some Unix flavours support changing " +"permissions on the symlink itself; on these platforms you may add the " +"argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." +msgstr "" +"此方法通常會跟隨符號連結。一些 Unix 類型支援修改符號連結本身的權限;在這些平" +"台上你可以加上引數 ``follow_symlinks=False`` 或使用 :meth:`~Path.lchmod`。" + +#: ../../library/pathlib.rst:1096 +msgid "" +"Return a new path with expanded ``~`` and ``~user`` constructs, as returned " +"by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" +"`RuntimeError` is raised." +msgstr "" +"回傳一個展開 ``~`` 和 ``~user`` 構成的新路徑,像 :meth:`os.path.expanduser` " +"回傳的一樣。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" + +#: ../../library/pathlib.rst:1111 +msgid "" +"Glob the given relative *pattern* in the directory represented by this path, " +"yielding all matching files (of any kind)::" +msgstr "" +"在該路徑表示的目錄裡,以 glob 方式比對所給定的相對 *pattern*,並 yield 所有比" +"對到的檔案(任意類型): ::" + +#: ../../library/pathlib.rst:1119 +msgid "" +"Patterns are the same as for :mod:`fnmatch`, with the addition of \"``**``\" " +"which means \"this directory and all subdirectories, recursively\". In " +"other words, it enables recursive globbing::" +msgstr "" +"模式 (pattern) 和給 :mod:`fnmatch` 的一樣,加上 \"``**``\" 代表「目前目錄及所" +"有遞迴的子目錄」。也就是說它能夠做遞迴的 glob 比對: ::" + +#: ../../library/pathlib.rst:1130 +msgid "" +"This method calls :meth:`Path.is_dir` on the top-level directory and " +"propagates any :exc:`OSError` exception that is raised. Subsequent :exc:" +"`OSError` exceptions from scanning directories are suppressed." +msgstr "" +"此方法在頂層目錄上呼叫 :meth:`Path.is_dir` 並傳遞引發的任何 :exc:`OSError` 例" +"外。將會抑制在目錄對於 :exc:`OSError` 例外的後續掃描。" + +#: ../../library/pathlib.rst:1134 ../../library/pathlib.rst:1417 +msgid "" +"By default, or when the *case_sensitive* keyword-only argument is set to " +"``None``, this method matches paths using platform-specific casing rules: " +"typically, case-sensitive on POSIX, and case-insensitive on Windows. Set " +"*case_sensitive* to ``True`` or ``False`` to override this behaviour." +msgstr "" +"預設情況下,或者當 *case_sensitive* 僅限關鍵字引數被設定為 ``None`` 的時候," +"此方法會使用平台特定的大小寫規則來比對路徑;通常在 POSIX 上會區分大小寫,而" +"在 Windows 上不區分大小寫。將 *case_sensitive* 設成 ``True`` 或 ``False`` 會" +"覆寫這個行為。" + +#: ../../library/pathlib.rst:1140 +msgid "" +"Using the \"``**``\" pattern in large directory trees may consume an " +"inordinate amount of time." +msgstr "在很大的目錄樹裡使用 \"``**``\" 可能會耗費過多的時間。" + +#: ../../library/pathlib.rst:1143 +msgid "" +"Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " +"arguments ``self``, ``pattern``." +msgstr "" +"引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " +"``pathlib.Path.glob``。" + +#: ../../library/pathlib.rst:1145 ../../library/pathlib.rst:1424 +msgid "" +"Return only directories if *pattern* ends with a pathname components " +"separator (:data:`~os.sep` or :data:`~os.altsep`)." +msgstr "" +"如果 *pattern* 以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os." +"altsep`)作結尾則只會回傳目錄。" + +#: ../../library/pathlib.rst:1155 +msgid "" +"Return the name of the group owning the file. :exc:`KeyError` is raised if " +"the file's gid isn't found in the system database." +msgstr "" +"回傳擁有該檔案的群組名稱。如果在系統資料庫裡找不到檔案的 gid 會引發 :exc:" +"`KeyError`。" + +#: ../../library/pathlib.rst:1161 msgid "" "When the path points to a directory, yield path objects of the directory " "contents::" msgstr "當該路徑指向一個目錄,會 yield 目錄裡面的路徑物件: ::" -#: ../../library/pathlib.rst:1061 +#: ../../library/pathlib.rst:1175 msgid "" "The children are yielded in arbitrary order, and the special entries ``'.'`` " "and ``'..'`` are not included. If a file is removed from or added to the " @@ -940,13 +1020,13 @@ msgstr "" "檔案在建立這個疊代器之後加到該目錄或從目錄刪除,是否會包含這個檔案的路徑物件" "是不確定的。" -#: ../../library/pathlib.rst:1068 +#: ../../library/pathlib.rst:1182 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up." msgstr "透過由上而下或由下而上地走訪目錄樹產生目錄樹裡的檔案名稱。" -#: ../../library/pathlib.rst:1071 +#: ../../library/pathlib.rst:1185 msgid "" "For each directory in the directory tree rooted at *self* (including *self* " "but excluding '.' and '..'), the method yields a 3-tuple of ``(dirpath, " @@ -955,7 +1035,7 @@ msgstr "" "對每個以 *self* 為根且在目錄樹裡的目錄(包含 *self* 但不包含 '.' 和 '..' )," "此方法會 yield 一個 ``(dirpath, dirnames, filenames)`` 的三元素元組。" -#: ../../library/pathlib.rst:1075 +#: ../../library/pathlib.rst:1189 msgid "" "*dirpath* is a :class:`Path` to the directory currently being walked, " "*dirnames* is a list of strings for the names of subdirectories in *dirpath* " @@ -970,7 +1050,7 @@ msgstr "" "裡檔案或目錄的完整路徑(以 *self* 開頭),可以使用 ``dirpath / name``。會根據" "檔案系統來決定串列是否有排序。" -#: ../../library/pathlib.rst:1083 +#: ../../library/pathlib.rst:1197 msgid "" "If the optional argument *top_down* is true (which is the default), the " "triple for a directory is generated before the triples for any of its " @@ -986,7 +1066,7 @@ msgstr "" "不論 *top_down* 的值是什麼,子目錄的串列會在走訪該目錄及其子目錄的三元素元組" "之前取得。" -#: ../../library/pathlib.rst:1091 +#: ../../library/pathlib.rst:1205 msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " "(for example, using :keyword:`del` or slice assignment), and :meth:`Path." @@ -1006,7 +1086,7 @@ msgstr "" "*dirnames* 對 :meth:`Path.walk()` 的行為沒有影響,因為 *dirnames* 裡的目錄已" "經在 *dirnames* yield 給呼叫者之前被產生。" -#: ../../library/pathlib.rst:1101 +#: ../../library/pathlib.rst:1215 msgid "" "By default, errors from :func:`os.scandir` are ignored. If the optional " "argument *on_error* is specified, it should be a callable; it will be called " @@ -1019,7 +1099,7 @@ msgstr "" "這個可呼叫物件可以處理錯誤以繼續走訪,或者再次引發錯誤來停止走訪。注意,檔案" "名稱可以從例外物件的 ``filename`` 屬性來取得。" -#: ../../library/pathlib.rst:1107 +#: ../../library/pathlib.rst:1221 msgid "" "By default, :meth:`Path.walk` does not follow symbolic links, and instead " "adds them to the *filenames* list. Set *follow_symlinks* to true to resolve " @@ -1032,7 +1112,7 @@ msgstr "" "適當的 *dirnames* 和 *filenames*,而因此訪問到符號連結指向的目錄(在有支援符" "號連結的地方)。" -#: ../../library/pathlib.rst:1114 +#: ../../library/pathlib.rst:1228 msgid "" "Be aware that setting *follow_symlinks* to true can lead to infinite " "recursion if a link points to a parent directory of itself. :meth:`Path." @@ -1041,7 +1121,7 @@ msgstr "" "需要注意的是如果符號連結指向一個其本身的父目錄,則將 *follow_symlinks* 設定" "為 true 會導致無窮的遞迴。:meth:`Path.walk` 不會紀錄其已經訪問過的目錄。" -#: ../../library/pathlib.rst:1119 +#: ../../library/pathlib.rst:1233 msgid "" ":meth:`Path.walk` assumes the directories it walks are not modified during " "execution. For example, if a directory from *dirnames* has been replaced " @@ -1054,7 +1134,7 @@ msgstr "" "meth:`Path.walk` 依然會試著往下進入它。為了防止這樣的行為,可以從 *dirnames* " "適當地移除目錄。" -#: ../../library/pathlib.rst:1127 +#: ../../library/pathlib.rst:1241 msgid "" "Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in " "*filenames* if *follow_symlinks* is false." @@ -1062,7 +1142,7 @@ msgstr "" "如果 *follow_symlinks* 是 false,和 :func:`os.walk` 行為不同的是 :meth:`Path." "walk` 會將指向目錄的符號連結放在 *filenames* 串列。" -#: ../../library/pathlib.rst:1130 +#: ../../library/pathlib.rst:1244 msgid "" "This example displays the number of bytes used by all files in each " "directory, while ignoring ``__pycache__`` directories::" @@ -1070,7 +1150,7 @@ msgstr "" "這個範例會顯示在每個目錄裡所有檔案使用的位元組數量,同時間忽略 " "``__pycache__`` 目錄: ::" -#: ../../library/pathlib.rst:1146 +#: ../../library/pathlib.rst:1260 msgid "" "This next example is a simple implementation of :func:`shutil.rmtree`. " "Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow " @@ -1079,7 +1159,7 @@ msgstr "" "下一個範例是 :func:`shutil.rmtree` 的一個簡單的實作方式。由下而上走訪目錄樹是" "必要的,因為 :func:`rmdir` 不允許在目錄為空之前刪除它: ::" -#: ../../library/pathlib.rst:1163 +#: ../../library/pathlib.rst:1277 msgid "" "Like :meth:`Path.chmod` but, if the path points to a symbolic link, the " "symbolic link's mode is changed rather than its target's." @@ -1087,15 +1167,7 @@ msgstr "" "類似 :meth:`Path.chmod`,但如果該路徑指向一個符號連結,則符號連結的模式 " "(mode) 會被改變而不是其指向的目標。" -#: ../../library/pathlib.rst:1169 -msgid "" -"Like :meth:`Path.stat` but, if the path points to a symbolic link, return " -"the symbolic link's information rather than its target's." -msgstr "" -"類似 :meth:`Path.stat`,但如果該路徑指向一個符號連結,則回傳符號連結的資訊而" -"不是其指向的目標。" - -#: ../../library/pathlib.rst:1175 +#: ../../library/pathlib.rst:1283 msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process' ``umask`` value to determine the file mode and " @@ -1105,7 +1177,7 @@ msgstr "" "``umask`` 值來決定檔案模式與存取旗標 (access flag)。如果路徑已經存在,會引" "發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1180 +#: ../../library/pathlib.rst:1288 msgid "" "If *parents* is true, any missing parents of this path are created as " "needed; they are created with the default permissions without taking *mode* " @@ -1114,7 +1186,7 @@ msgstr "" "如果 *parents* 是 true,則任何缺少的父路徑都會依需要被建立;它們不考慮 " "*mode* 而會以預設的權限來建立(模仿 POSIX 的 ``mkdir -p`` 指令)。" -#: ../../library/pathlib.rst:1184 +#: ../../library/pathlib.rst:1292 msgid "" "If *parents* is false (the default), a missing parent raises :exc:" "`FileNotFoundError`." @@ -1122,7 +1194,7 @@ msgstr "" "如果 *parents* 是 false(預設值),缺少的父路徑會引發 :exc:" "`FileNotFoundError`。" -#: ../../library/pathlib.rst:1187 +#: ../../library/pathlib.rst:1295 msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." @@ -1130,7 +1202,7 @@ msgstr "" "如果 *exist_ok* 是 false(預設值),則當目標目錄已經存在的話會引發 :exc:" "`FileExistsError`。" -#: ../../library/pathlib.rst:1190 +#: ../../library/pathlib.rst:1298 msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " @@ -1139,17 +1211,11 @@ msgstr "" "如果 *exist_ok* 是 true,只有當最後的路徑組成不是一個已存在的非目錄檔案,:" "exc:`FileExistsError` 例外會被忽略(與 POSIX 的 ``mkdir -p`` 指令行為相同)。" -#: ../../library/pathlib.rst:1194 +#: ../../library/pathlib.rst:1302 msgid "The *exist_ok* parameter was added." msgstr "新增 *exist_ok* 參數。" -#: ../../library/pathlib.rst:1200 -msgid "" -"Open the file pointed to by the path, like the built-in :func:`open` " -"function does::" -msgstr "開啟該路徑指向的檔案,像內建的 :func:`open` 函式做的一樣: ::" - -#: ../../library/pathlib.rst:1212 +#: ../../library/pathlib.rst:1308 msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's uid isn't found in the system database." @@ -1157,27 +1223,13 @@ msgstr "" "回傳擁有該檔案的用戶名稱。如果在系統資料庫中找不到該檔案的 uid,則會引發 :" "exc:`KeyError`。" -#: ../../library/pathlib.rst:1218 -msgid "Return the binary contents of the pointed-to file as a bytes object::" -msgstr "將路徑指向的檔案的二進位內容以一個位元組物件回傳: ::" - -#: ../../library/pathlib.rst:1231 -msgid "Return the decoded contents of the pointed-to file as a string::" -msgstr "將路徑指向的檔案的解碼內容以字串形式回傳: ::" - -#: ../../library/pathlib.rst:1239 -msgid "" -"The file is opened and then closed. The optional parameters have the same " -"meaning as in :func:`open`." -msgstr "該檔案被打開並且隨後關閉。可選參數的含義與 :func:`open` 中的相同。" - -#: ../../library/pathlib.rst:1247 +#: ../../library/pathlib.rst:1314 msgid "" "Return the path to which the symbolic link points (as returned by :func:`os." "readlink`)::" msgstr "回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值): ::" -#: ../../library/pathlib.rst:1260 +#: ../../library/pathlib.rst:1327 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. On Unix, if *target* exists and is a file, " @@ -1190,7 +1242,7 @@ msgstr "" "則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則會引" "發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件: ::" -#: ../../library/pathlib.rst:1275 ../../library/pathlib.rst:1291 +#: ../../library/pathlib.rst:1342 ../../library/pathlib.rst:1358 msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the Path " @@ -1199,17 +1251,17 @@ msgstr "" "目標路徑可以是絕對路徑或相對路徑。相對路徑會相對於當前的工作目錄進行解釋,*而" "不是*\\ 相對於路徑物件所在的目錄。" -#: ../../library/pathlib.rst:1279 +#: ../../library/pathlib.rst:1346 msgid "" "It is implemented in terms of :func:`os.rename` and gives the same " "guarantees." msgstr "此功能是使用 :func:`os.rename` 實現的,並提供相同的保證。" -#: ../../library/pathlib.rst:1281 ../../library/pathlib.rst:1295 +#: ../../library/pathlib.rst:1348 ../../library/pathlib.rst:1362 msgid "Added return value, return the new Path instance." msgstr "新增了回傳值,回傳新的路徑 (Path) 物件。" -#: ../../library/pathlib.rst:1287 +#: ../../library/pathlib.rst:1354 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. If *target* points to an existing file or " @@ -1218,26 +1270,26 @@ msgstr "" "將此檔案或目錄重新命名為給定的 *target*,並回傳一個指向 *target* 的新路徑物" "件。如果 *target* 指向一個現有的檔案或空目錄,它將被無條件地取代。" -#: ../../library/pathlib.rst:1301 +#: ../../library/pathlib.rst:1368 msgid "" "Make the path absolute, without normalization or resolving symlinks. Returns " "a new path object::" msgstr "" "將路徑轉換為絕對路徑,不進行標準化或解析符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1313 +#: ../../library/pathlib.rst:1380 msgid "" "Make the path absolute, resolving any symlinks. A new path object is " "returned::" msgstr "將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1322 +#: ../../library/pathlib.rst:1389 msgid "" "\"``..``\" components are also eliminated (this is the only method to do " "so)::" msgstr "同時也會消除 \"``..``\" 的路徑組成(只有此方法這樣做): ::" -#: ../../library/pathlib.rst:1328 +#: ../../library/pathlib.rst:1395 msgid "" "If the path doesn't exist and *strict* is ``True``, :exc:`FileNotFoundError` " "is raised. If *strict* is ``False``, the path is resolved as far as " @@ -1249,11 +1301,11 @@ msgstr "" "*strict* 為 ``False``,則將盡可能解析該路徑,並將任何剩餘部分追加到路徑中,而" "不檢查其是否存在。如果在解析過程中遇到無窮迴圈,則引發 :exc:`RuntimeError`。" -#: ../../library/pathlib.rst:1334 +#: ../../library/pathlib.rst:1401 msgid "The *strict* parameter was added (pre-3.6 behavior is strict)." msgstr "新增 *strict* 參數(在 3.6 版本之前的行為是嚴格的)。" -#: ../../library/pathlib.rst:1339 +#: ../../library/pathlib.rst:1406 msgid "" "Glob the given relative *pattern* recursively. This is like calling :func:" "`Path.glob` with \"``**/``\" added in front of the *pattern*, where " @@ -1263,7 +1315,7 @@ msgstr "" "\"``**/``\" 並呼叫 :func:`Path.glob`,其中 *patterns* 和給 :mod:`fnmatch` 的" "相同: ::" -#: ../../library/pathlib.rst:1355 +#: ../../library/pathlib.rst:1422 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " "arguments ``self``, ``pattern``." @@ -1271,31 +1323,15 @@ msgstr "" "引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " "``pathlib.Path.rglob``。" -#: ../../library/pathlib.rst:1367 +#: ../../library/pathlib.rst:1434 msgid "Remove this directory. The directory must be empty." msgstr "移除此目錄。該目錄必須為空。" -#: ../../library/pathlib.rst:1372 -msgid "" -"Return whether this path points to the same file as *other_path*, which can " -"be either a Path object, or a string. The semantics are similar to :func:" -"`os.path.samefile` and :func:`os.path.samestat`." -msgstr "" -"回傳此路徑是否指向與 *other_path* 相同的檔案,*other_path* 可以是路徑 (Path) " -"物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path." -"samestat`。" - -#: ../../library/pathlib.rst:1376 -msgid "" -"An :exc:`OSError` can be raised if either file cannot be accessed for some " -"reason." -msgstr "若任何一個檔案因為某些原因無法存取,則引發 :exc:`OSError`。" - -#: ../../library/pathlib.rst:1393 +#: ../../library/pathlib.rst:1439 msgid "Make this path a symbolic link pointing to *target*." msgstr "使這個路徑成為一個指向 *target* 的符號連結。" -#: ../../library/pathlib.rst:1395 +#: ../../library/pathlib.rst:1441 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -1309,21 +1345,21 @@ msgstr "" "*target_is_directory* 是 ``True``,該符號連結會被建立成目錄,如果不是則建立成" "檔案(預設值)。在非 Windows 平台上,*target_is_directory* 會被忽略。" -#: ../../library/pathlib.rst:1413 +#: ../../library/pathlib.rst:1459 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "引數的順序 (link, target) 和 :func:`os.symlink` 相反。" -#: ../../library/pathlib.rst:1418 +#: ../../library/pathlib.rst:1464 msgid "Make this path a hard link to the same file as *target*." msgstr "使這個路徑成為與 *target* 相同檔案的一個硬連結 (hard link)。" -#: ../../library/pathlib.rst:1421 +#: ../../library/pathlib.rst:1467 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "引數的順序 (link, target) 和 :func:`os.link` 相反。" -#: ../../library/pathlib.rst:1429 +#: ../../library/pathlib.rst:1475 msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process' ``umask`` value to determine the file mode and access flags. " @@ -1335,13 +1371,13 @@ msgstr "" "合,以確定檔案模式和存取旗標。當檔案已經存在時,若 *exist_ok* 為 true 則函式" "不會失敗(其變更時間會被更新為當下時間),否則會引發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1438 +#: ../../library/pathlib.rst:1484 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "移除這個檔案或符號連結。如果路徑指向目錄,請改用 :func:`Path.rmdir`。" -#: ../../library/pathlib.rst:1441 +#: ../../library/pathlib.rst:1487 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." @@ -1349,7 +1385,7 @@ msgstr "" "如果 *missing_ok* 是 false(預設值),:exc:`FileNotFoundError` 會在路徑不存在" "時被引發。" -#: ../../library/pathlib.rst:1444 +#: ../../library/pathlib.rst:1490 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." @@ -1357,42 +1393,15 @@ msgstr "" "如果 *missing_ok* 是 true,:exc:`FileNotFoundError` 例外會被忽略(行為與 " "POSIX ``rm -f`` 指令相同)。" -#: ../../library/pathlib.rst:1447 +#: ../../library/pathlib.rst:1493 msgid "The *missing_ok* parameter was added." msgstr "新增 *missing_ok* 參數。" -#: ../../library/pathlib.rst:1453 -msgid "" -"Open the file pointed to in bytes mode, write *data* to it, and close the " -"file::" -msgstr "以位元組模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" - -#: ../../library/pathlib.rst:1462 -msgid "An existing file of the same name is overwritten." -msgstr "一個名稱相同的已存在檔案會被覆寫。" - -#: ../../library/pathlib.rst:1469 -msgid "" -"Open the file pointed to in text mode, write *data* to it, and close the " -"file::" -msgstr "以文字模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" - -#: ../../library/pathlib.rst:1478 -msgid "" -"An existing file of the same name is overwritten. The optional parameters " -"have the same meaning as in :func:`open`." -msgstr "" -"一個名稱相同的已存在檔案會被覆寫。可選參數和 :func:`open` 的參數有相同意義。" - -#: ../../library/pathlib.rst:1483 -msgid "The *newline* parameter was added." -msgstr "新增 *newline* 參數。" - -#: ../../library/pathlib.rst:1487 +#: ../../library/pathlib.rst:1498 msgid "Correspondence to tools in the :mod:`os` module" msgstr "與 :mod:`os` 模組裡的工具的對應關係" -#: ../../library/pathlib.rst:1489 +#: ../../library/pathlib.rst:1500 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." @@ -1400,7 +1409,7 @@ msgstr "" "以下是一張表格,對應許多 :mod:`os` 函式及其相符於 :class:`PurePath`/:class:" "`Path` 的項目。" -#: ../../library/pathlib.rst:1494 +#: ../../library/pathlib.rst:1505 msgid "" "Not all pairs of functions/methods below are equivalent. Some of them, " "despite having some overlapping use-cases, have different semantics. They " @@ -1411,239 +1420,239 @@ msgstr "" "意。它們包含 :func:`os.path.abspath` 和 :meth:`Path.absolute`、:func:`os." "path.relpath` 和 :meth:`PurePath.relative_to`。" -#: ../../library/pathlib.rst:1500 +#: ../../library/pathlib.rst:1511 msgid ":mod:`os` and :mod:`os.path`" msgstr ":mod:`os` 和 :mod:`os.path`" -#: ../../library/pathlib.rst:1500 +#: ../../library/pathlib.rst:1511 msgid ":mod:`pathlib`" msgstr ":mod:`pathlib`" -#: ../../library/pathlib.rst:1502 +#: ../../library/pathlib.rst:1513 msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" -#: ../../library/pathlib.rst:1502 +#: ../../library/pathlib.rst:1513 msgid ":meth:`Path.absolute` [#]_" msgstr ":meth:`Path.absolute` [#]_" -#: ../../library/pathlib.rst:1503 +#: ../../library/pathlib.rst:1514 msgid ":func:`os.path.realpath`" msgstr ":func:`os.path.realpath`" -#: ../../library/pathlib.rst:1503 +#: ../../library/pathlib.rst:1514 msgid ":meth:`Path.resolve`" msgstr ":meth:`Path.resolve`" -#: ../../library/pathlib.rst:1504 +#: ../../library/pathlib.rst:1515 msgid ":func:`os.chmod`" msgstr ":func:`os.chmod`" -#: ../../library/pathlib.rst:1504 +#: ../../library/pathlib.rst:1515 msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" -#: ../../library/pathlib.rst:1505 +#: ../../library/pathlib.rst:1516 msgid ":func:`os.mkdir`" msgstr ":func:`os.mkdir`" -#: ../../library/pathlib.rst:1505 ../../library/pathlib.rst:1506 +#: ../../library/pathlib.rst:1516 ../../library/pathlib.rst:1517 msgid ":meth:`Path.mkdir`" msgstr ":meth:`Path.mkdir`" -#: ../../library/pathlib.rst:1506 +#: ../../library/pathlib.rst:1517 msgid ":func:`os.makedirs`" msgstr ":func:`os.makedirs`" -#: ../../library/pathlib.rst:1507 +#: ../../library/pathlib.rst:1518 msgid ":func:`os.rename`" msgstr ":func:`os.rename`" -#: ../../library/pathlib.rst:1507 +#: ../../library/pathlib.rst:1518 msgid ":meth:`Path.rename`" msgstr ":meth:`Path.rename`" -#: ../../library/pathlib.rst:1508 +#: ../../library/pathlib.rst:1519 msgid ":func:`os.replace`" msgstr ":func:`os.replace`" -#: ../../library/pathlib.rst:1508 +#: ../../library/pathlib.rst:1519 msgid ":meth:`Path.replace`" msgstr ":meth:`Path.replace`" -#: ../../library/pathlib.rst:1509 +#: ../../library/pathlib.rst:1520 msgid ":func:`os.rmdir`" msgstr ":func:`os.rmdir`" -#: ../../library/pathlib.rst:1509 +#: ../../library/pathlib.rst:1520 msgid ":meth:`Path.rmdir`" msgstr ":meth:`Path.rmdir`" -#: ../../library/pathlib.rst:1510 +#: ../../library/pathlib.rst:1521 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr ":func:`os.remove`、:func:`os.unlink`" -#: ../../library/pathlib.rst:1510 +#: ../../library/pathlib.rst:1521 msgid ":meth:`Path.unlink`" msgstr ":meth:`Path.unlink`" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1522 msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1522 msgid ":func:`Path.cwd`" msgstr ":func:`Path.cwd`" -#: ../../library/pathlib.rst:1512 +#: ../../library/pathlib.rst:1523 msgid ":func:`os.path.exists`" msgstr ":func:`os.path.exists`" -#: ../../library/pathlib.rst:1512 +#: ../../library/pathlib.rst:1523 msgid ":meth:`Path.exists`" msgstr ":meth:`Path.exists`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1524 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1524 msgid ":meth:`Path.expanduser` and :meth:`Path.home`" msgstr ":meth:`Path.expanduser` 和 :meth:`Path.home`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1526 msgid ":func:`os.listdir`" msgstr ":func:`os.listdir`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1526 msgid ":meth:`Path.iterdir`" msgstr ":meth:`Path.iterdir`" -#: ../../library/pathlib.rst:1516 +#: ../../library/pathlib.rst:1527 msgid ":func:`os.walk`" msgstr ":func:`os.walk`" -#: ../../library/pathlib.rst:1516 +#: ../../library/pathlib.rst:1527 msgid ":meth:`Path.walk`" msgstr ":meth:`Path.walk`" -#: ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1528 msgid ":func:`os.path.isdir`" msgstr ":func:`os.path.isdir`" -#: ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1528 msgid ":meth:`Path.is_dir`" msgstr ":meth:`Path.is_dir`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1529 msgid ":func:`os.path.isfile`" msgstr ":func:`os.path.isfile`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1529 msgid ":meth:`Path.is_file`" msgstr ":meth:`Path.is_file`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1530 msgid ":func:`os.path.islink`" msgstr ":func:`os.path.islink`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1530 msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1531 msgid ":func:`os.link`" msgstr ":func:`os.link`" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1531 msgid ":meth:`Path.hardlink_to`" msgstr ":meth:`Path.hardlink_to`" -#: ../../library/pathlib.rst:1521 +#: ../../library/pathlib.rst:1532 msgid ":func:`os.symlink`" msgstr ":func:`os.symlink`" -#: ../../library/pathlib.rst:1521 +#: ../../library/pathlib.rst:1532 msgid ":meth:`Path.symlink_to`" msgstr ":meth:`Path.symlink_to`" -#: ../../library/pathlib.rst:1522 +#: ../../library/pathlib.rst:1533 msgid ":func:`os.readlink`" msgstr ":func:`os.readlink`" -#: ../../library/pathlib.rst:1522 +#: ../../library/pathlib.rst:1533 msgid ":meth:`Path.readlink`" msgstr ":meth:`Path.readlink`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1534 msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1534 msgid ":meth:`PurePath.relative_to` [#]_" msgstr ":meth:`PurePath.relative_to` [#]_" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1535 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1535 msgid ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" msgstr ":meth:`Path.stat`、:meth:`Path.owner`、:meth:`Path.group`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1538 msgid ":func:`os.path.isabs`" msgstr ":func:`os.path.isabs`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1538 msgid ":meth:`PurePath.is_absolute`" msgstr ":meth:`PurePath.is_absolute`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1539 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1539 msgid ":func:`PurePath.joinpath`" msgstr ":func:`PurePath.joinpath`" -#: ../../library/pathlib.rst:1529 +#: ../../library/pathlib.rst:1540 msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" -#: ../../library/pathlib.rst:1529 +#: ../../library/pathlib.rst:1540 msgid ":attr:`PurePath.name`" msgstr ":attr:`PurePath.name`" -#: ../../library/pathlib.rst:1530 +#: ../../library/pathlib.rst:1541 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" -#: ../../library/pathlib.rst:1530 +#: ../../library/pathlib.rst:1541 msgid ":attr:`PurePath.parent`" msgstr ":attr:`PurePath.parent`" -#: ../../library/pathlib.rst:1531 +#: ../../library/pathlib.rst:1542 msgid ":func:`os.path.samefile`" msgstr ":func:`os.path.samefile`" -#: ../../library/pathlib.rst:1531 +#: ../../library/pathlib.rst:1542 msgid ":meth:`Path.samefile`" msgstr ":meth:`Path.samefile`" -#: ../../library/pathlib.rst:1532 +#: ../../library/pathlib.rst:1543 msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" -#: ../../library/pathlib.rst:1532 +#: ../../library/pathlib.rst:1543 msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" msgstr ":attr:`PurePath.stem` 和 :attr:`PurePath.suffix`" -#: ../../library/pathlib.rst:1537 +#: ../../library/pathlib.rst:1548 msgid "Footnotes" msgstr "註解" -#: ../../library/pathlib.rst:1538 +#: ../../library/pathlib.rst:1549 msgid "" ":func:`os.path.abspath` normalizes the resulting path, which may change its " "meaning in the presence of symlinks, while :meth:`Path.absolute` does not." @@ -1651,7 +1660,7 @@ msgstr "" ":func:`os.path.abspath` 會標準化產生的路徑,因而當有符號連結的時候會改變其意" "義,但 :meth:`Path.absolute` 不會。" -#: ../../library/pathlib.rst:1539 +#: ../../library/pathlib.rst:1550 msgid "" ":meth:`PurePath.relative_to` requires ``self`` to be the subpath of the " "argument, but :func:`os.path.relpath` does not." diff --git a/library/typing.po b/library/typing.po index de3a35ebde..dff304a274 100644 --- a/library/typing.po +++ b/library/typing.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-06-03 00:03+0000\n" "PO-Revision-Date: 2024-03-26 11:30+0800\n" "Last-Translator: Li-Hung Wang \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -284,7 +284,7 @@ msgstr "" "為一個函式,可以接受一個型別為 :class:`int` 的引數,並回傳一個 :class:`str`。" #: ../../library/typing.rst:213 ../../library/typing.rst:2829 -#: ../../library/typing.rst:2973 +#: ../../library/typing.rst:2975 msgid "For example:" msgstr "舉例來說:" @@ -337,7 +337,7 @@ msgstr "" "``Callable[Concatenate[Arg1Type, Arg2Type, ..., ParamSpecVariable], " "ReturnType]`` 的形式。" -#: ../../library/typing.rst:283 ../../library/typing.rst:3499 +#: ../../library/typing.rst:283 ../../library/typing.rst:3501 msgid "" "``Callable`` now supports :class:`ParamSpec` and :data:`Concatenate`. See :" "pep:`612` for more details." @@ -1832,7 +1832,7 @@ msgid "Typed version of :func:`collections.namedtuple`." msgstr "" #: ../../library/typing.rst:1969 ../../library/typing.rst:2046 -#: ../../library/typing.rst:3013 +#: ../../library/typing.rst:3015 msgid "Usage::" msgstr "" @@ -2714,28 +2714,62 @@ msgstr "" #: ../../library/typing.rst:2886 msgid "" -"This is often the same as ``obj.__annotations__``. In addition, forward " -"references encoded as string literals are handled by evaluating them in " -"``globals``, ``locals`` and (where applicable) :ref:`type parameter ` namespaces. For a class ``C``, return a dictionary constructed by " -"merging all the ``__annotations__`` along ``C.__mro__`` in reverse order." +"This is often the same as ``obj.__annotations__``, but this function makes " +"the following changes to the annotations dictionary:" +msgstr "" + +#: ../../library/typing.rst:2889 +msgid "" +"Forward references encoded as string literals or :class:`ForwardRef` objects " +"are handled by evaluating them in *globalns*, *localns*, and (where " +"applicable) *obj*'s :ref:`type parameter ` namespace. If " +"*globalns* or *localns* is not given, appropriate namespace dictionaries are " +"inferred from *obj*." msgstr "" #: ../../library/typing.rst:2894 +msgid "``None`` is replaced with :class:`types.NoneType`." +msgstr "" + +#: ../../library/typing.rst:2895 +msgid "" +"If :func:`@no_type_check ` has been applied to *obj*, an " +"empty dictionary is returned." +msgstr "" + +#: ../../library/typing.rst:2897 +msgid "" +"If *obj* is a class ``C``, the function returns a dictionary that merges " +"annotations from ``C``'s base classes with those on ``C`` directly. This is " +"done by traversing ``C.__mro__`` and iteratively combining " +"``__annotations__`` dictionaries. Annotations on classes appearing earlier " +"in the :term:`method resolution order` always take precedence over " +"annotations on classes appearing later in the method resolution order." +msgstr "" + +#: ../../library/typing.rst:2903 +msgid "" +"The function recursively replaces all occurrences of ``Annotated[T, ...]`` " +"with ``T``, unless *include_extras* is set to ``True`` (see :class:" +"`Annotated` for more information)." +msgstr "" + +#: ../../library/typing.rst:2907 msgid "" -"The function recursively replaces all ``Annotated[T, ...]`` with ``T``, " -"unless ``include_extras`` is set to ``True`` (see :class:`Annotated` for " -"more information). For example:" +"See also :func:`inspect.get_annotations`, a lower-level function that " +"returns annotations more directly." msgstr "" -#: ../../library/typing.rst:2911 +#: ../../library/typing.rst:2912 msgid "" -":func:`get_type_hints` does not work with imported :ref:`type aliases ` that include forward references. Enabling postponed evaluation of " -"annotations (:pep:`563`) may remove the need for most forward references." +"If any forward references in the annotations of *obj* are not resolvable or " +"are not valid Python code, this function will raise an exception such as :" +"exc:`NameError`. For example, this can happen with imported :ref:`type " +"aliases ` that include forward references, or with names " +"imported under :data:`if TYPE_CHECKING `." msgstr "" -#: ../../library/typing.rst:2916 +#: ../../library/typing.rst:2918 msgid "" "Added ``include_extras`` parameter as part of :pep:`593`. See the " "documentation on :data:`Annotated` for more information." @@ -2743,20 +2777,20 @@ msgstr "" "新增 ``include_extras`` 參數(如 :pep:`593` 中所述)。更多資訊請見 :data:" "`Annotated` 的文件。" -#: ../../library/typing.rst:2920 +#: ../../library/typing.rst:2922 msgid "" "Previously, ``Optional[t]`` was added for function and method annotations if " "a default value equal to ``None`` was set. Now the annotation is returned " "unchanged." msgstr "" -#: ../../library/typing.rst:2927 +#: ../../library/typing.rst:2929 msgid "" "Get the unsubscripted version of a type: for a typing object of the form " "``X[Y, Z, ...]`` return ``X``." msgstr "" -#: ../../library/typing.rst:2930 +#: ../../library/typing.rst:2932 msgid "" "If ``X`` is a typing-module alias for a builtin or :mod:`collections` class, " "it will be normalized to the original class. If ``X`` is an instance of :" @@ -2764,17 +2798,17 @@ msgid "" "class:`ParamSpec`. Return ``None`` for unsupported objects." msgstr "" -#: ../../library/typing.rst:2936 ../../library/typing.rst:2959 +#: ../../library/typing.rst:2938 ../../library/typing.rst:2961 msgid "Examples:" msgstr "舉例:" -#: ../../library/typing.rst:2951 +#: ../../library/typing.rst:2953 msgid "" "Get type arguments with all substitutions performed: for a typing object of " "the form ``X[Y, Z, ...]`` return ``(Y, Z, ...)``." msgstr "" -#: ../../library/typing.rst:2954 +#: ../../library/typing.rst:2956 msgid "" "If ``X`` is a union or :class:`Literal` contained in another generic type, " "the order of ``(Y, Z, ...)`` may be different from the order of the original " @@ -2782,40 +2816,40 @@ msgid "" "objects." msgstr "" -#: ../../library/typing.rst:2971 +#: ../../library/typing.rst:2973 msgid "Check if a type is a :class:`TypedDict`." msgstr "" -#: ../../library/typing.rst:2992 +#: ../../library/typing.rst:2994 msgid "" "Class used for internal typing representation of string forward references." msgstr "" -#: ../../library/typing.rst:2994 +#: ../../library/typing.rst:2996 msgid "" "For example, ``List[\"SomeClass\"]`` is implicitly transformed into " "``List[ForwardRef(\"SomeClass\")]``. ``ForwardRef`` should not be " "instantiated by a user, but may be used by introspection tools." msgstr "" -#: ../../library/typing.rst:2999 +#: ../../library/typing.rst:3001 msgid "" ":pep:`585` generic types such as ``list[\"SomeClass\"]`` will not be " "implicitly transformed into ``list[ForwardRef(\"SomeClass\")]`` and thus " "will not automatically resolve to ``list[SomeClass]``." msgstr "" -#: ../../library/typing.rst:3006 +#: ../../library/typing.rst:3008 msgid "Constant" msgstr "常數" -#: ../../library/typing.rst:3010 +#: ../../library/typing.rst:3012 msgid "" "A special constant that is assumed to be ``True`` by 3rd party static type " "checkers. It is ``False`` at runtime." msgstr "" -#: ../../library/typing.rst:3021 +#: ../../library/typing.rst:3023 msgid "" "The first type annotation must be enclosed in quotes, making it a \"forward " "reference\", to hide the ``expensive_mod`` reference from the interpreter " @@ -2823,7 +2857,7 @@ msgid "" "second annotation does not need to be enclosed in quotes." msgstr "" -#: ../../library/typing.rst:3028 +#: ../../library/typing.rst:3030 msgid "" "If ``from __future__ import annotations`` is used, annotations are not " "evaluated at function definition time. Instead, they are stored as strings " @@ -2831,11 +2865,11 @@ msgid "" "annotation (see :pep:`563`)." msgstr "" -#: ../../library/typing.rst:3040 +#: ../../library/typing.rst:3042 msgid "Deprecated aliases" msgstr "棄用的別名" -#: ../../library/typing.rst:3042 +#: ../../library/typing.rst:3044 msgid "" "This module defines several deprecated aliases to pre-existing standard " "library classes. These were originally included in the typing module in " @@ -2844,7 +2878,7 @@ msgid "" "existing classes were enhanced to support ``[]`` (see :pep:`585`)." msgstr "" -#: ../../library/typing.rst:3049 +#: ../../library/typing.rst:3051 msgid "" "The redundant types are deprecated as of Python 3.9. However, while the " "aliases may be removed at some point, removal of these aliases is not " @@ -2852,7 +2886,7 @@ msgid "" "the interpreter for these aliases." msgstr "" -#: ../../library/typing.rst:3054 +#: ../../library/typing.rst:3056 msgid "" "If at some point it is decided to remove these deprecated aliases, a " "deprecation warning will be issued by the interpreter for at least two " @@ -2860,188 +2894,188 @@ msgid "" "typing module without deprecation warnings until at least Python 3.14." msgstr "" -#: ../../library/typing.rst:3059 +#: ../../library/typing.rst:3061 msgid "" "Type checkers are encouraged to flag uses of the deprecated types if the " "program they are checking targets a minimum Python version of 3.9 or newer." msgstr "" -#: ../../library/typing.rst:3065 +#: ../../library/typing.rst:3067 msgid "Aliases to built-in types" msgstr "內建型別的別名" -#: ../../library/typing.rst:3069 +#: ../../library/typing.rst:3071 msgid "Deprecated alias to :class:`dict`." msgstr "棄用 :class:`dict` 的別名。" -#: ../../library/typing.rst:3071 +#: ../../library/typing.rst:3073 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Mapping` rather than to use :class:`dict` " "or :class:`!typing.Dict`." msgstr "" -#: ../../library/typing.rst:3075 ../../library/typing.rst:3314 +#: ../../library/typing.rst:3077 ../../library/typing.rst:3316 msgid "This type can be used as follows::" msgstr "" -#: ../../library/typing.rst:3080 +#: ../../library/typing.rst:3082 msgid "" ":class:`builtins.dict ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3086 +#: ../../library/typing.rst:3088 msgid "Deprecated alias to :class:`list`." msgstr "棄用 :class:`list` 的別名。" -#: ../../library/typing.rst:3088 +#: ../../library/typing.rst:3090 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`Sequence` or :class:`Iterable` rather than " "to use :class:`list` or :class:`!typing.List`." msgstr "" -#: ../../library/typing.rst:3092 +#: ../../library/typing.rst:3094 msgid "This type may be used as follows::" msgstr "" -#: ../../library/typing.rst:3100 +#: ../../library/typing.rst:3102 msgid "" ":class:`builtins.list ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3106 +#: ../../library/typing.rst:3108 msgid "Deprecated alias to :class:`builtins.set `." msgstr "棄用 :class:`builtins.set ` 的別名。" -#: ../../library/typing.rst:3108 +#: ../../library/typing.rst:3110 msgid "" "Note that to annotate arguments, it is preferred to use an abstract " "collection type such as :class:`AbstractSet` rather than to use :class:`set` " "or :class:`!typing.Set`." msgstr "" -#: ../../library/typing.rst:3112 +#: ../../library/typing.rst:3114 msgid "" ":class:`builtins.set ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3118 +#: ../../library/typing.rst:3120 msgid "Deprecated alias to :class:`builtins.frozenset `." msgstr "棄用 :class:`builtins.frozenset ` 的別名。" -#: ../../library/typing.rst:3120 +#: ../../library/typing.rst:3122 msgid "" ":class:`builtins.frozenset ` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3127 +#: ../../library/typing.rst:3129 msgid "Deprecated alias for :class:`tuple`." msgstr "棄用 :class:`tuple` 的別名。" -#: ../../library/typing.rst:3129 +#: ../../library/typing.rst:3131 msgid "" ":class:`tuple` and ``Tuple`` are special-cased in the type system; see :ref:" "`annotating-tuples` for more details." msgstr "" -#: ../../library/typing.rst:3132 +#: ../../library/typing.rst:3134 msgid "" ":class:`builtins.tuple ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3138 +#: ../../library/typing.rst:3140 msgid "Deprecated alias to :class:`type`." msgstr "棄用 :class:`type` 的別名。" -#: ../../library/typing.rst:3140 +#: ../../library/typing.rst:3142 msgid "" "See :ref:`type-of-class-objects` for details on using :class:`type` or " "``typing.Type`` in type annotations." msgstr "" -#: ../../library/typing.rst:3145 +#: ../../library/typing.rst:3147 msgid "" ":class:`builtins.type ` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3152 +#: ../../library/typing.rst:3154 msgid "Aliases to types in :mod:`collections`" msgstr ":mod:`collections` 中型別的別名" -#: ../../library/typing.rst:3156 +#: ../../library/typing.rst:3158 msgid "Deprecated alias to :class:`collections.defaultdict`." msgstr "棄用 :class:`collections.defaultdict` 的別名。" -#: ../../library/typing.rst:3160 +#: ../../library/typing.rst:3162 msgid "" ":class:`collections.defaultdict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3166 +#: ../../library/typing.rst:3168 msgid "Deprecated alias to :class:`collections.OrderedDict`." msgstr "棄用 :class:`collections.OrderedDict` 的別名。" -#: ../../library/typing.rst:3170 +#: ../../library/typing.rst:3172 msgid "" ":class:`collections.OrderedDict` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3176 +#: ../../library/typing.rst:3178 msgid "Deprecated alias to :class:`collections.ChainMap`." msgstr "棄用 :class:`collections.ChainMap` 的別名。" -#: ../../library/typing.rst:3180 +#: ../../library/typing.rst:3182 msgid "" ":class:`collections.ChainMap` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3186 +#: ../../library/typing.rst:3188 msgid "Deprecated alias to :class:`collections.Counter`." msgstr "棄用 :class:`collections.Counter` 的別名。" -#: ../../library/typing.rst:3190 +#: ../../library/typing.rst:3192 msgid "" ":class:`collections.Counter` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3196 +#: ../../library/typing.rst:3198 msgid "Deprecated alias to :class:`collections.deque`." msgstr "棄用 :class:`collections.deque` 的別名。" -#: ../../library/typing.rst:3200 +#: ../../library/typing.rst:3202 msgid "" ":class:`collections.deque` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3207 +#: ../../library/typing.rst:3209 msgid "Aliases to other concrete types" msgstr "" -#: ../../library/typing.rst:3212 +#: ../../library/typing.rst:3214 msgid "" "The ``typing.io`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3216 +#: ../../library/typing.rst:3218 msgid "" "Deprecated aliases corresponding to the return types from :func:`re.compile` " "and :func:`re.match`." msgstr "" -#: ../../library/typing.rst:3219 +#: ../../library/typing.rst:3221 msgid "" "These types (and the corresponding functions) are generic over :data:" "`AnyStr`. ``Pattern`` can be specialised as ``Pattern[str]`` or " @@ -3049,391 +3083,391 @@ msgid "" "``Match[bytes]``." msgstr "" -#: ../../library/typing.rst:3227 +#: ../../library/typing.rst:3229 msgid "" "The ``typing.re`` namespace is deprecated and will be removed. These types " "should be directly imported from ``typing`` instead." msgstr "" -#: ../../library/typing.rst:3228 +#: ../../library/typing.rst:3230 msgid "" "Classes ``Pattern`` and ``Match`` from :mod:`re` now support ``[]``. See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3234 +#: ../../library/typing.rst:3236 msgid "Deprecated alias for :class:`str`." msgstr "棄用 :class:`str` 的別名。" -#: ../../library/typing.rst:3236 +#: ../../library/typing.rst:3238 msgid "" "``Text`` is provided to supply a forward compatible path for Python 2 code: " "in Python 2, ``Text`` is an alias for ``unicode``." msgstr "" -#: ../../library/typing.rst:3240 +#: ../../library/typing.rst:3242 msgid "" "Use ``Text`` to indicate that a value must contain a unicode string in a " "manner that is compatible with both Python 2 and Python 3::" msgstr "" -#: ../../library/typing.rst:3248 +#: ../../library/typing.rst:3250 msgid "" "Python 2 is no longer supported, and most type checkers also no longer " "support type checking Python 2 code. Removal of the alias is not currently " "planned, but users are encouraged to use :class:`str` instead of ``Text``." msgstr "" -#: ../../library/typing.rst:3258 +#: ../../library/typing.rst:3260 msgid "Aliases to container ABCs in :mod:`collections.abc`" msgstr ":mod:`collections.abc` 中容器 ABC 的別名" -#: ../../library/typing.rst:3262 +#: ../../library/typing.rst:3264 msgid "Deprecated alias to :class:`collections.abc.Set`." msgstr "棄用 :class:`collections.abc.Set` 的別名。" -#: ../../library/typing.rst:3264 +#: ../../library/typing.rst:3266 msgid "" ":class:`collections.abc.Set` now supports subscripting (``[]``). See :pep:" "`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3270 +#: ../../library/typing.rst:3272 msgid "" "This type represents the types :class:`bytes`, :class:`bytearray`, and :" "class:`memoryview` of byte sequences." msgstr "" -#: ../../library/typing.rst:3274 +#: ../../library/typing.rst:3276 msgid "" "Prefer :class:`collections.abc.Buffer`, or a union like ``bytes | bytearray " "| memoryview``." msgstr "" -#: ../../library/typing.rst:3278 +#: ../../library/typing.rst:3280 msgid "Deprecated alias to :class:`collections.abc.Collection`." msgstr "棄用 :class:`collections.abc.Collection` 的別名。" -#: ../../library/typing.rst:3282 +#: ../../library/typing.rst:3284 msgid "" ":class:`collections.abc.Collection` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3288 +#: ../../library/typing.rst:3290 msgid "Deprecated alias to :class:`collections.abc.Container`." msgstr "棄用 :class:`collections.abc.Container` 的別名。" -#: ../../library/typing.rst:3290 +#: ../../library/typing.rst:3292 msgid "" ":class:`collections.abc.Container` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3296 +#: ../../library/typing.rst:3298 msgid "Deprecated alias to :class:`collections.abc.ItemsView`." msgstr "棄用 :class:`collections.abc.ItemsView` 的別名。" -#: ../../library/typing.rst:3298 +#: ../../library/typing.rst:3300 msgid "" ":class:`collections.abc.ItemsView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3304 +#: ../../library/typing.rst:3306 msgid "Deprecated alias to :class:`collections.abc.KeysView`." msgstr "棄用 :class:`collections.abc.KeysView` 的別名。" -#: ../../library/typing.rst:3306 +#: ../../library/typing.rst:3308 msgid "" ":class:`collections.abc.KeysView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3312 +#: ../../library/typing.rst:3314 msgid "Deprecated alias to :class:`collections.abc.Mapping`." msgstr "棄用 :class:`collections.abc.Mapping` 的別名。" -#: ../../library/typing.rst:3319 +#: ../../library/typing.rst:3321 msgid "" ":class:`collections.abc.Mapping` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3325 +#: ../../library/typing.rst:3327 msgid "Deprecated alias to :class:`collections.abc.MappingView`." msgstr "棄用 :class:`collections.abc.MappingView` 的別名。" -#: ../../library/typing.rst:3327 +#: ../../library/typing.rst:3329 msgid "" ":class:`collections.abc.MappingView` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3333 +#: ../../library/typing.rst:3335 msgid "Deprecated alias to :class:`collections.abc.MutableMapping`." msgstr "棄用 :class:`collections.abc.MutableMapping` 的別名。" -#: ../../library/typing.rst:3335 +#: ../../library/typing.rst:3337 msgid "" ":class:`collections.abc.MutableMapping` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3342 +#: ../../library/typing.rst:3344 msgid "Deprecated alias to :class:`collections.abc.MutableSequence`." msgstr "棄用 :class:`collections.abc.MutableSequence` 的別名。" -#: ../../library/typing.rst:3344 +#: ../../library/typing.rst:3346 msgid "" ":class:`collections.abc.MutableSequence` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3351 +#: ../../library/typing.rst:3353 msgid "Deprecated alias to :class:`collections.abc.MutableSet`." msgstr "棄用 :class:`collections.abc.MutableSet` 的別名。" -#: ../../library/typing.rst:3353 +#: ../../library/typing.rst:3355 msgid "" ":class:`collections.abc.MutableSet` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3359 +#: ../../library/typing.rst:3361 msgid "Deprecated alias to :class:`collections.abc.Sequence`." msgstr "棄用 :class:`collections.abc.Sequence` 的別名。" -#: ../../library/typing.rst:3361 +#: ../../library/typing.rst:3363 msgid "" ":class:`collections.abc.Sequence` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3367 +#: ../../library/typing.rst:3369 msgid "Deprecated alias to :class:`collections.abc.ValuesView`." msgstr "棄用 :class:`collections.abc.ValuesView` 的別名。" -#: ../../library/typing.rst:3369 +#: ../../library/typing.rst:3371 msgid "" ":class:`collections.abc.ValuesView` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3376 +#: ../../library/typing.rst:3378 msgid "Aliases to asynchronous ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3380 +#: ../../library/typing.rst:3382 msgid "Deprecated alias to :class:`collections.abc.Coroutine`." msgstr "棄用 :class:`collections.abc.Coroutine` 的別名。" -#: ../../library/typing.rst:3382 +#: ../../library/typing.rst:3384 msgid "" "The variance and order of type variables correspond to those of :class:" "`Generator`, for example::" msgstr "" -#: ../../library/typing.rst:3393 +#: ../../library/typing.rst:3395 msgid "" ":class:`collections.abc.Coroutine` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3399 +#: ../../library/typing.rst:3401 msgid "Deprecated alias to :class:`collections.abc.AsyncGenerator`." msgstr "棄用 :class:`collections.abc.AsyncGenerator` 的別名。" -#: ../../library/typing.rst:3401 +#: ../../library/typing.rst:3403 msgid "" "An async generator can be annotated by the generic type " "``AsyncGenerator[YieldType, SendType]``. For example::" msgstr "" -#: ../../library/typing.rst:3410 +#: ../../library/typing.rst:3412 msgid "" "Unlike normal generators, async generators cannot return a value, so there " "is no ``ReturnType`` type parameter. As with :class:`Generator`, the " "``SendType`` behaves contravariantly." msgstr "" -#: ../../library/typing.rst:3414 +#: ../../library/typing.rst:3416 msgid "" "If your generator will only yield values, set the ``SendType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3422 +#: ../../library/typing.rst:3424 msgid "" "Alternatively, annotate your generator as having a return type of either " "``AsyncIterable[YieldType]`` or ``AsyncIterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3432 +#: ../../library/typing.rst:3434 msgid "" ":class:`collections.abc.AsyncGenerator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3439 +#: ../../library/typing.rst:3441 msgid "Deprecated alias to :class:`collections.abc.AsyncIterable`." msgstr "棄用 :class:`collections.abc.AsyncIterable` 的別名。" -#: ../../library/typing.rst:3443 +#: ../../library/typing.rst:3445 msgid "" ":class:`collections.abc.AsyncIterable` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3449 +#: ../../library/typing.rst:3451 msgid "Deprecated alias to :class:`collections.abc.AsyncIterator`." msgstr "棄用 :class:`collections.abc.AsyncIterator` 的別名。" -#: ../../library/typing.rst:3453 +#: ../../library/typing.rst:3455 msgid "" ":class:`collections.abc.AsyncIterator` now supports subscripting (``[]``). " "See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3459 +#: ../../library/typing.rst:3461 msgid "Deprecated alias to :class:`collections.abc.Awaitable`." msgstr "棄用 :class:`collections.abc.Awaitable` 的別名。" -#: ../../library/typing.rst:3463 +#: ../../library/typing.rst:3465 msgid "" ":class:`collections.abc.Awaitable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3470 +#: ../../library/typing.rst:3472 msgid "Aliases to other ABCs in :mod:`collections.abc`" msgstr "" -#: ../../library/typing.rst:3474 +#: ../../library/typing.rst:3476 msgid "Deprecated alias to :class:`collections.abc.Iterable`." msgstr "棄用 :class:`collections.abc.Iterable` 的別名。" -#: ../../library/typing.rst:3476 +#: ../../library/typing.rst:3478 msgid "" ":class:`collections.abc.Iterable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3482 +#: ../../library/typing.rst:3484 msgid "Deprecated alias to :class:`collections.abc.Iterator`." msgstr "棄用 :class:`collections.abc.Iterator` 的別名。" -#: ../../library/typing.rst:3484 +#: ../../library/typing.rst:3486 msgid "" ":class:`collections.abc.Iterator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3490 +#: ../../library/typing.rst:3492 msgid "Deprecated alias to :class:`collections.abc.Callable`." msgstr "棄用 :class:`collections.abc.Callable` 的別名。" -#: ../../library/typing.rst:3492 +#: ../../library/typing.rst:3494 msgid "" "See :ref:`annotating-callables` for details on how to use :class:" "`collections.abc.Callable` and ``typing.Callable`` in type annotations." msgstr "" -#: ../../library/typing.rst:3495 +#: ../../library/typing.rst:3497 msgid "" ":class:`collections.abc.Callable` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3505 +#: ../../library/typing.rst:3507 msgid "Deprecated alias to :class:`collections.abc.Generator`." msgstr "棄用 :class:`collections.abc.Generator` 的別名。" -#: ../../library/typing.rst:3507 +#: ../../library/typing.rst:3509 msgid "" "A generator can be annotated by the generic type ``Generator[YieldType, " "SendType, ReturnType]``. For example::" msgstr "" -#: ../../library/typing.rst:3516 +#: ../../library/typing.rst:3518 msgid "" "Note that unlike many other generics in the typing module, the ``SendType`` " "of :class:`Generator` behaves contravariantly, not covariantly or " "invariantly." msgstr "" -#: ../../library/typing.rst:3520 +#: ../../library/typing.rst:3522 msgid "" "If your generator will only yield values, set the ``SendType`` and " "``ReturnType`` to ``None``::" msgstr "" -#: ../../library/typing.rst:3528 +#: ../../library/typing.rst:3530 msgid "" "Alternatively, annotate your generator as having a return type of either " "``Iterable[YieldType]`` or ``Iterator[YieldType]``::" msgstr "" -#: ../../library/typing.rst:3536 +#: ../../library/typing.rst:3538 msgid "" ":class:`collections.abc.Generator` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3542 +#: ../../library/typing.rst:3544 msgid "Deprecated alias to :class:`collections.abc.Hashable`." msgstr "棄用 :class:`collections.abc.Hashable` 的別名。" -#: ../../library/typing.rst:3544 +#: ../../library/typing.rst:3546 msgid "Use :class:`collections.abc.Hashable` directly instead." msgstr "改為直接使用 :class:`collections.abc.Hashable`。" -#: ../../library/typing.rst:3549 +#: ../../library/typing.rst:3551 msgid "Deprecated alias to :class:`collections.abc.Reversible`." msgstr "棄用 :class:`collections.abc.Reversible` 的別名。" -#: ../../library/typing.rst:3551 +#: ../../library/typing.rst:3553 msgid "" ":class:`collections.abc.Reversible` now supports subscripting (``[]``). See :" "pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3557 +#: ../../library/typing.rst:3559 msgid "Deprecated alias to :class:`collections.abc.Sized`." msgstr "棄用 :class:`collections.abc.Sized` 的別名。" -#: ../../library/typing.rst:3559 +#: ../../library/typing.rst:3561 msgid "Use :class:`collections.abc.Sized` directly instead." msgstr "改為直接使用 :class:`collections.abc.Sized`。" -#: ../../library/typing.rst:3565 +#: ../../library/typing.rst:3567 msgid "Aliases to :mod:`contextlib` ABCs" msgstr ":mod:`contextlib` ABC 的別名" -#: ../../library/typing.rst:3569 +#: ../../library/typing.rst:3571 msgid "Deprecated alias to :class:`contextlib.AbstractContextManager`." msgstr "" -#: ../../library/typing.rst:3573 +#: ../../library/typing.rst:3575 msgid "" ":class:`contextlib.AbstractContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3580 +#: ../../library/typing.rst:3582 msgid "Deprecated alias to :class:`contextlib.AbstractAsyncContextManager`." msgstr "" -#: ../../library/typing.rst:3584 +#: ../../library/typing.rst:3586 msgid "" ":class:`contextlib.AbstractAsyncContextManager` now supports subscripting " "(``[]``). See :pep:`585` and :ref:`types-genericalias`." msgstr "" -#: ../../library/typing.rst:3590 +#: ../../library/typing.rst:3592 msgid "Deprecation Timeline of Major Features" msgstr "" -#: ../../library/typing.rst:3592 +#: ../../library/typing.rst:3594 msgid "" "Certain features in ``typing`` are deprecated and may be removed in a future " "version of Python. The following table summarizes major deprecations for " @@ -3441,100 +3475,100 @@ msgid "" "listed." msgstr "" -#: ../../library/typing.rst:3599 +#: ../../library/typing.rst:3601 msgid "Feature" msgstr "" -#: ../../library/typing.rst:3600 +#: ../../library/typing.rst:3602 msgid "Deprecated in" msgstr "棄用於" -#: ../../library/typing.rst:3601 +#: ../../library/typing.rst:3603 msgid "Projected removal" msgstr "" -#: ../../library/typing.rst:3602 +#: ../../library/typing.rst:3604 msgid "PEP/issue" msgstr "" -#: ../../library/typing.rst:3603 +#: ../../library/typing.rst:3605 msgid "``typing.io`` and ``typing.re`` submodules" msgstr "``typing.io`` 和 ``typing.re`` 子模組" -#: ../../library/typing.rst:3604 +#: ../../library/typing.rst:3606 msgid "3.8" msgstr "3.8" -#: ../../library/typing.rst:3605 +#: ../../library/typing.rst:3607 msgid "3.13" msgstr "3.13" -#: ../../library/typing.rst:3606 +#: ../../library/typing.rst:3608 msgid ":issue:`38291`" msgstr ":issue:`38291`" -#: ../../library/typing.rst:3607 +#: ../../library/typing.rst:3609 msgid "``typing`` versions of standard collections" msgstr "" -#: ../../library/typing.rst:3608 ../../library/typing.rst:3612 +#: ../../library/typing.rst:3610 ../../library/typing.rst:3614 msgid "3.9" msgstr "3.9" -#: ../../library/typing.rst:3609 +#: ../../library/typing.rst:3611 msgid "Undecided (see :ref:`deprecated-aliases` for more information)" msgstr "" -#: ../../library/typing.rst:3610 +#: ../../library/typing.rst:3612 msgid ":pep:`585`" msgstr ":pep:`585`" -#: ../../library/typing.rst:3611 +#: ../../library/typing.rst:3613 msgid ":class:`typing.ByteString`" msgstr ":class:`typing.ByteString`" -#: ../../library/typing.rst:3613 +#: ../../library/typing.rst:3615 msgid "3.14" msgstr "3.14" -#: ../../library/typing.rst:3614 +#: ../../library/typing.rst:3616 msgid ":gh:`91896`" msgstr ":gh:`91896`" -#: ../../library/typing.rst:3615 +#: ../../library/typing.rst:3617 msgid ":data:`typing.Text`" msgstr ":data:`typing.Text`" -#: ../../library/typing.rst:3616 +#: ../../library/typing.rst:3618 msgid "3.11" msgstr "3.11" -#: ../../library/typing.rst:3617 ../../library/typing.rst:3621 -#: ../../library/typing.rst:3625 +#: ../../library/typing.rst:3619 ../../library/typing.rst:3623 +#: ../../library/typing.rst:3627 msgid "Undecided" msgstr "" -#: ../../library/typing.rst:3618 +#: ../../library/typing.rst:3620 msgid ":gh:`92332`" msgstr ":gh:`92332`" -#: ../../library/typing.rst:3619 +#: ../../library/typing.rst:3621 msgid ":class:`typing.Hashable` and :class:`typing.Sized`" msgstr ":class:`typing.Hashable` 和 :class:`typing.Sized`" -#: ../../library/typing.rst:3620 ../../library/typing.rst:3624 +#: ../../library/typing.rst:3622 ../../library/typing.rst:3626 msgid "3.12" msgstr "" -#: ../../library/typing.rst:3622 +#: ../../library/typing.rst:3624 msgid ":gh:`94309`" msgstr ":gh:`94309`" -#: ../../library/typing.rst:3623 +#: ../../library/typing.rst:3625 msgid ":data:`typing.TypeAlias`" msgstr ":data:`typing.TypeAlias`" -#: ../../library/typing.rst:3626 +#: ../../library/typing.rst:3628 msgid ":pep:`695`" msgstr ":pep:`695`" From a49a2ee1c9fac6629f31963074010cbc8123ca11 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 6 Jun 2024 00:05:01 +0000 Subject: [PATCH 10/13] sync with cpython c5d1fbd4 --- library/contextlib.po | 201 +++++++++++++++++++++--------------------- library/exceptions.po | 21 ++--- 2 files changed, 112 insertions(+), 110 deletions(-) diff --git a/library/contextlib.po b/library/contextlib.po index 9825f7f2cc..269365cada 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-01 00:03+0000\n" +"POT-Creation-Date: 2024-06-06 00:03+0000\n" "PO-Revision-Date: 2018-05-23 14:41+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -263,38 +263,39 @@ msgstr "" msgid "This code is equivalent to::" msgstr "" -#: ../../library/contextlib.rst:313 ../../library/contextlib.rst:360 -#: ../../library/contextlib.rst:370 ../../library/contextlib.rst:387 +#: ../../library/contextlib.rst:313 ../../library/contextlib.rst:362 +#: ../../library/contextlib.rst:372 ../../library/contextlib.rst:389 msgid "This context manager is :ref:`reentrant `." msgstr "" #: ../../library/contextlib.rst:315 msgid "" "If the code within the :keyword:`!with` block raises a :exc:" -"`BaseExceptionGroup`, suppressed exceptions are removed from the group. If " -"any exceptions in the group are not suppressed, a group containing them is " -"re-raised." +"`BaseExceptionGroup`, suppressed exceptions are removed from the group. Any " +"exceptions of the group which are not suppressed are re-raised in a new " +"group which is created using the original group's :meth:`~BaseExceptionGroup." +"derive` method." msgstr "" -#: ../../library/contextlib.rst:321 +#: ../../library/contextlib.rst:323 msgid "" "``suppress`` now supports suppressing exceptions raised as part of an :exc:" "`BaseExceptionGroup`." msgstr "" -#: ../../library/contextlib.rst:327 +#: ../../library/contextlib.rst:329 msgid "" "Context manager for temporarily redirecting :data:`sys.stdout` to another " "file or file-like object." msgstr "" -#: ../../library/contextlib.rst:330 +#: ../../library/contextlib.rst:332 msgid "" "This tool adds flexibility to existing functions or classes whose output is " "hardwired to stdout." msgstr "" -#: ../../library/contextlib.rst:333 +#: ../../library/contextlib.rst:335 msgid "" "For example, the output of :func:`help` normally is sent to *sys.stdout*. " "You can capture that output in a string by redirecting the output to an :" @@ -303,17 +304,17 @@ msgid "" "`with` statement::" msgstr "" -#: ../../library/contextlib.rst:343 +#: ../../library/contextlib.rst:345 msgid "" "To send the output of :func:`help` to a file on disk, redirect the output to " "a regular file::" msgstr "" -#: ../../library/contextlib.rst:350 +#: ../../library/contextlib.rst:352 msgid "To send the output of :func:`help` to *sys.stderr*::" msgstr "" -#: ../../library/contextlib.rst:355 +#: ../../library/contextlib.rst:357 msgid "" "Note that the global side effect on :data:`sys.stdout` means that this " "context manager is not suitable for use in library code and most threaded " @@ -321,13 +322,13 @@ msgid "" "it is still a useful approach for many utility scripts." msgstr "" -#: ../../library/contextlib.rst:367 +#: ../../library/contextlib.rst:369 msgid "" "Similar to :func:`~contextlib.redirect_stdout` but redirecting :data:`sys." "stderr` to another file or file-like object." msgstr "" -#: ../../library/contextlib.rst:377 +#: ../../library/contextlib.rst:379 msgid "" "Non parallel-safe context manager to change the current working directory. " "As this changes a global state, the working directory, it is not suitable " @@ -337,63 +338,63 @@ msgid "" "when this context manager is active." msgstr "" -#: ../../library/contextlib.rst:384 +#: ../../library/contextlib.rst:386 msgid "" "This is a simple wrapper around :func:`~os.chdir`, it changes the current " "working directory upon entering and restores the old one on exit." msgstr "" -#: ../../library/contextlib.rst:394 +#: ../../library/contextlib.rst:396 msgid "" "A base class that enables a context manager to also be used as a decorator." msgstr "" -#: ../../library/contextlib.rst:396 +#: ../../library/contextlib.rst:398 msgid "" "Context managers inheriting from ``ContextDecorator`` have to implement " "``__enter__`` and ``__exit__`` as normal. ``__exit__`` retains its optional " "exception handling even when used as a decorator." msgstr "" -#: ../../library/contextlib.rst:400 +#: ../../library/contextlib.rst:402 msgid "" "``ContextDecorator`` is used by :func:`contextmanager`, so you get this " "functionality automatically." msgstr "" -#: ../../library/contextlib.rst:403 +#: ../../library/contextlib.rst:405 msgid "Example of ``ContextDecorator``::" msgstr "" "``ContextDecorator`` 範例:\n" "\n" "::" -#: ../../library/contextlib.rst:416 ../../library/contextlib.rst:488 +#: ../../library/contextlib.rst:418 ../../library/contextlib.rst:490 msgid "The class can then be used like this::" msgstr "" -#: ../../library/contextlib.rst:434 +#: ../../library/contextlib.rst:436 msgid "" "This change is just syntactic sugar for any construct of the following form::" msgstr "" -#: ../../library/contextlib.rst:440 +#: ../../library/contextlib.rst:442 msgid "``ContextDecorator`` lets you instead write::" msgstr "" -#: ../../library/contextlib.rst:446 +#: ../../library/contextlib.rst:448 msgid "" "It makes it clear that the ``cm`` applies to the whole function, rather than " "just a piece of it (and saving an indentation level is nice, too)." msgstr "" -#: ../../library/contextlib.rst:449 +#: ../../library/contextlib.rst:451 msgid "" "Existing context managers that already have a base class can be extended by " "using ``ContextDecorator`` as a mixin class::" msgstr "" -#: ../../library/contextlib.rst:462 +#: ../../library/contextlib.rst:464 msgid "" "As the decorated function must be able to be called multiple times, the " "underlying context manager must support use in multiple :keyword:`with` " @@ -401,38 +402,38 @@ msgid "" "explicit :keyword:`!with` statement inside the function should be used." msgstr "" -#: ../../library/contextlib.rst:472 +#: ../../library/contextlib.rst:474 msgid "" "Similar to :class:`ContextDecorator` but only for asynchronous functions." msgstr "" -#: ../../library/contextlib.rst:474 +#: ../../library/contextlib.rst:476 msgid "Example of ``AsyncContextDecorator``::" msgstr "" "``AsyncContextDecorator`` 範例:\n" "\n" "::" -#: ../../library/contextlib.rst:513 +#: ../../library/contextlib.rst:515 msgid "" "A context manager that is designed to make it easy to programmatically " "combine other context managers and cleanup functions, especially those that " "are optional or otherwise driven by input data." msgstr "" -#: ../../library/contextlib.rst:517 +#: ../../library/contextlib.rst:519 msgid "" "For example, a set of files may easily be handled in a single with statement " "as follows::" msgstr "" -#: ../../library/contextlib.rst:526 +#: ../../library/contextlib.rst:528 msgid "" "The :meth:`~object.__enter__` method returns the :class:`ExitStack` " "instance, and performs no additional operations." msgstr "" -#: ../../library/contextlib.rst:529 +#: ../../library/contextlib.rst:531 msgid "" "Each instance maintains a stack of registered callbacks that are called in " "reverse order when the instance is closed (either explicitly or implicitly " @@ -440,14 +441,14 @@ msgid "" "invoked implicitly when the context stack instance is garbage collected." msgstr "" -#: ../../library/contextlib.rst:534 +#: ../../library/contextlib.rst:536 msgid "" "This stack model is used so that context managers that acquire their " "resources in their ``__init__`` method (such as file objects) can be handled " "correctly." msgstr "" -#: ../../library/contextlib.rst:538 +#: ../../library/contextlib.rst:540 msgid "" "Since registered callbacks are invoked in the reverse order of registration, " "this ends up behaving as if multiple nested :keyword:`with` statements had " @@ -457,7 +458,7 @@ msgid "" "updated state." msgstr "" -#: ../../library/contextlib.rst:545 +#: ../../library/contextlib.rst:547 msgid "" "This is a relatively low level API that takes care of the details of " "correctly unwinding the stack of exit callbacks. It provides a suitable " @@ -465,76 +466,76 @@ msgid "" "in application specific ways." msgstr "" -#: ../../library/contextlib.rst:554 +#: ../../library/contextlib.rst:556 msgid "" "Enters a new context manager and adds its :meth:`~object.__exit__` method to " "the callback stack. The return value is the result of the context manager's " "own :meth:`~object.__enter__` method." msgstr "" -#: ../../library/contextlib.rst:558 +#: ../../library/contextlib.rst:560 msgid "" "These context managers may suppress exceptions just as they normally would " "if used directly as part of a :keyword:`with` statement." msgstr "" -#: ../../library/contextlib.rst:561 +#: ../../library/contextlib.rst:563 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not a " "context manager." msgstr "" -#: ../../library/contextlib.rst:567 +#: ../../library/contextlib.rst:569 msgid "" "Adds a context manager's :meth:`~object.__exit__` method to the callback " "stack." msgstr "" -#: ../../library/contextlib.rst:569 +#: ../../library/contextlib.rst:571 msgid "" "As ``__enter__`` is *not* invoked, this method can be used to cover part of " "an :meth:`~object.__enter__` implementation with a context manager's own :" "meth:`~object.__exit__` method." msgstr "" -#: ../../library/contextlib.rst:573 +#: ../../library/contextlib.rst:575 msgid "" "If passed an object that is not a context manager, this method assumes it is " "a callback with the same signature as a context manager's :meth:`~object." "__exit__` method and adds it directly to the callback stack." msgstr "" -#: ../../library/contextlib.rst:577 +#: ../../library/contextlib.rst:579 msgid "" "By returning true values, these callbacks can suppress exceptions the same " "way context manager :meth:`~object.__exit__` methods can." msgstr "" -#: ../../library/contextlib.rst:580 +#: ../../library/contextlib.rst:582 msgid "" "The passed in object is returned from the function, allowing this method to " "be used as a function decorator." msgstr "" -#: ../../library/contextlib.rst:585 +#: ../../library/contextlib.rst:587 msgid "" "Accepts an arbitrary callback function and arguments and adds it to the " "callback stack." msgstr "" -#: ../../library/contextlib.rst:588 +#: ../../library/contextlib.rst:590 msgid "" "Unlike the other methods, callbacks added this way cannot suppress " "exceptions (as they are never passed the exception details)." msgstr "" -#: ../../library/contextlib.rst:591 +#: ../../library/contextlib.rst:593 msgid "" "The passed in callback is returned from the function, allowing this method " "to be used as a function decorator." msgstr "" -#: ../../library/contextlib.rst:596 +#: ../../library/contextlib.rst:598 msgid "" "Transfers the callback stack to a fresh :class:`ExitStack` instance and " "returns it. No callbacks are invoked by this operation - instead, they will " @@ -542,77 +543,77 @@ msgid "" "at the end of a :keyword:`with` statement)." msgstr "" -#: ../../library/contextlib.rst:601 +#: ../../library/contextlib.rst:603 msgid "" "For example, a group of files can be opened as an \"all or nothing\" " "operation as follows::" msgstr "" -#: ../../library/contextlib.rst:615 +#: ../../library/contextlib.rst:617 msgid "" "Immediately unwinds the callback stack, invoking callbacks in the reverse " "order of registration. For any context managers and exit callbacks " "registered, the arguments passed in will indicate that no exception occurred." msgstr "" -#: ../../library/contextlib.rst:622 +#: ../../library/contextlib.rst:624 msgid "" "An :ref:`asynchronous context manager `, similar to :" "class:`ExitStack`, that supports combining both synchronous and asynchronous " "context managers, as well as having coroutines for cleanup logic." msgstr "" -#: ../../library/contextlib.rst:627 +#: ../../library/contextlib.rst:629 msgid "" "The :meth:`~ExitStack.close` method is not implemented; :meth:`aclose` must " "be used instead." msgstr "" -#: ../../library/contextlib.rst:632 +#: ../../library/contextlib.rst:634 msgid "" "Similar to :meth:`ExitStack.enter_context` but expects an asynchronous " "context manager." msgstr "" -#: ../../library/contextlib.rst:635 +#: ../../library/contextlib.rst:637 msgid "" "Raises :exc:`TypeError` instead of :exc:`AttributeError` if *cm* is not an " "asynchronous context manager." msgstr "" -#: ../../library/contextlib.rst:641 +#: ../../library/contextlib.rst:643 msgid "" "Similar to :meth:`ExitStack.push` but expects either an asynchronous context " "manager or a coroutine function." msgstr "" -#: ../../library/contextlib.rst:646 +#: ../../library/contextlib.rst:648 msgid "Similar to :meth:`ExitStack.callback` but expects a coroutine function." msgstr "" -#: ../../library/contextlib.rst:650 +#: ../../library/contextlib.rst:652 msgid "Similar to :meth:`ExitStack.close` but properly handles awaitables." msgstr "" -#: ../../library/contextlib.rst:652 +#: ../../library/contextlib.rst:654 msgid "Continuing the example for :func:`asynccontextmanager`::" msgstr "" -#: ../../library/contextlib.rst:664 +#: ../../library/contextlib.rst:666 msgid "Examples and Recipes" msgstr "" -#: ../../library/contextlib.rst:666 +#: ../../library/contextlib.rst:668 msgid "" "This section describes some examples and recipes for making effective use of " "the tools provided by :mod:`contextlib`." msgstr "" -#: ../../library/contextlib.rst:671 +#: ../../library/contextlib.rst:673 msgid "Supporting a variable number of context managers" msgstr "" -#: ../../library/contextlib.rst:673 +#: ../../library/contextlib.rst:675 msgid "" "The primary use case for :class:`ExitStack` is the one given in the class " "documentation: supporting a variable number of context managers and other " @@ -622,18 +623,18 @@ msgid "" "of the context managers being optional::" msgstr "" -#: ../../library/contextlib.rst:688 +#: ../../library/contextlib.rst:690 msgid "" "As shown, :class:`ExitStack` also makes it quite easy to use :keyword:`with` " "statements to manage arbitrary resources that don't natively support the " "context management protocol." msgstr "" -#: ../../library/contextlib.rst:694 +#: ../../library/contextlib.rst:696 msgid "Catching exceptions from ``__enter__`` methods" msgstr "" -#: ../../library/contextlib.rst:696 +#: ../../library/contextlib.rst:698 msgid "" "It is occasionally desirable to catch exceptions from an ``__enter__`` " "method implementation, *without* inadvertently catching exceptions from the :" @@ -642,7 +643,7 @@ msgid "" "be separated slightly in order to allow this::" msgstr "" -#: ../../library/contextlib.rst:711 +#: ../../library/contextlib.rst:713 msgid "" "Actually needing to do this is likely to indicate that the underlying API " "should be providing a direct resource management interface for use with :" @@ -653,29 +654,29 @@ msgid "" "`with` statement." msgstr "" -#: ../../library/contextlib.rst:721 +#: ../../library/contextlib.rst:723 msgid "Cleaning up in an ``__enter__`` implementation" msgstr "" -#: ../../library/contextlib.rst:723 +#: ../../library/contextlib.rst:725 msgid "" "As noted in the documentation of :meth:`ExitStack.push`, this method can be " "useful in cleaning up an already allocated resource if later steps in the :" "meth:`~object.__enter__` implementation fail." msgstr "" -#: ../../library/contextlib.rst:727 +#: ../../library/contextlib.rst:729 msgid "" "Here's an example of doing this for a context manager that accepts resource " "acquisition and release functions, along with an optional validation " "function, and maps them to the context management protocol::" msgstr "" -#: ../../library/contextlib.rst:767 +#: ../../library/contextlib.rst:769 msgid "Replacing any use of ``try-finally`` and flag variables" msgstr "" -#: ../../library/contextlib.rst:769 +#: ../../library/contextlib.rst:771 msgid "" "A pattern you will sometimes see is a ``try-finally`` statement with a flag " "variable to indicate whether or not the body of the ``finally`` clause " @@ -683,57 +684,57 @@ msgid "" "by using an ``except`` clause instead), it looks something like this::" msgstr "" -#: ../../library/contextlib.rst:783 +#: ../../library/contextlib.rst:785 msgid "" "As with any ``try`` statement based code, this can cause problems for " "development and review, because the setup code and the cleanup code can end " "up being separated by arbitrarily long sections of code." msgstr "" -#: ../../library/contextlib.rst:787 +#: ../../library/contextlib.rst:789 msgid "" ":class:`ExitStack` makes it possible to instead register a callback for " "execution at the end of a ``with`` statement, and then later decide to skip " "executing that callback::" msgstr "" -#: ../../library/contextlib.rst:799 +#: ../../library/contextlib.rst:801 msgid "" "This allows the intended cleanup behaviour to be made explicit up front, " "rather than requiring a separate flag variable." msgstr "" -#: ../../library/contextlib.rst:802 +#: ../../library/contextlib.rst:804 msgid "" "If a particular application uses this pattern a lot, it can be simplified " "even further by means of a small helper class::" msgstr "" -#: ../../library/contextlib.rst:820 +#: ../../library/contextlib.rst:822 msgid "" "If the resource cleanup isn't already neatly bundled into a standalone " "function, then it is still possible to use the decorator form of :meth:" "`ExitStack.callback` to declare the resource cleanup in advance::" msgstr "" -#: ../../library/contextlib.rst:835 +#: ../../library/contextlib.rst:837 msgid "" "Due to the way the decorator protocol works, a callback function declared " "this way cannot take any parameters. Instead, any resources to be released " "must be accessed as closure variables." msgstr "" -#: ../../library/contextlib.rst:841 +#: ../../library/contextlib.rst:843 msgid "Using a context manager as a function decorator" msgstr "" -#: ../../library/contextlib.rst:843 +#: ../../library/contextlib.rst:845 msgid "" ":class:`ContextDecorator` makes it possible to use a context manager in both " "an ordinary ``with`` statement and also as a function decorator." msgstr "" -#: ../../library/contextlib.rst:846 +#: ../../library/contextlib.rst:848 msgid "" "For example, it is sometimes useful to wrap functions or groups of " "statements with a logger that can track the time of entry and time of exit. " @@ -742,15 +743,15 @@ msgid "" "in a single definition::" msgstr "" -#: ../../library/contextlib.rst:867 +#: ../../library/contextlib.rst:869 msgid "Instances of this class can be used as both a context manager::" msgstr "" -#: ../../library/contextlib.rst:873 +#: ../../library/contextlib.rst:875 msgid "And also as a function decorator::" msgstr "" -#: ../../library/contextlib.rst:880 +#: ../../library/contextlib.rst:882 msgid "" "Note that there is one additional limitation when using context managers as " "function decorators: there's no way to access the return value of :meth:" @@ -758,21 +759,21 @@ msgid "" "use an explicit ``with`` statement." msgstr "" -#: ../../library/contextlib.rst:887 +#: ../../library/contextlib.rst:889 msgid ":pep:`343` - The \"with\" statement" msgstr ":pep:`343` - \"with\" 陳述式" -#: ../../library/contextlib.rst:888 +#: ../../library/contextlib.rst:890 msgid "" "The specification, background, and examples for the Python :keyword:`with` " "statement." msgstr "" -#: ../../library/contextlib.rst:894 +#: ../../library/contextlib.rst:896 msgid "Single use, reusable and reentrant context managers" msgstr "" -#: ../../library/contextlib.rst:896 +#: ../../library/contextlib.rst:898 msgid "" "Most context managers are written in a way that means they can only be used " "effectively in a :keyword:`with` statement once. These single use context " @@ -780,32 +781,32 @@ msgid "" "them a second time will trigger an exception or otherwise not work correctly." msgstr "" -#: ../../library/contextlib.rst:902 +#: ../../library/contextlib.rst:904 msgid "" "This common limitation means that it is generally advisable to create " "context managers directly in the header of the :keyword:`with` statement " "where they are used (as shown in all of the usage examples above)." msgstr "" -#: ../../library/contextlib.rst:906 +#: ../../library/contextlib.rst:908 msgid "" "Files are an example of effectively single use context managers, since the " "first :keyword:`with` statement will close the file, preventing any further " "IO operations using that file object." msgstr "" -#: ../../library/contextlib.rst:910 +#: ../../library/contextlib.rst:912 msgid "" "Context managers created using :func:`contextmanager` are also single use " "context managers, and will complain about the underlying generator failing " "to yield if an attempt is made to use them a second time::" msgstr "" -#: ../../library/contextlib.rst:938 +#: ../../library/contextlib.rst:940 msgid "Reentrant context managers" msgstr "" -#: ../../library/contextlib.rst:940 +#: ../../library/contextlib.rst:942 msgid "" "More sophisticated context managers may be \"reentrant\". These context " "managers can not only be used in multiple :keyword:`with` statements, but " @@ -813,21 +814,21 @@ msgid "" "the same context manager." msgstr "" -#: ../../library/contextlib.rst:945 +#: ../../library/contextlib.rst:947 msgid "" ":class:`threading.RLock` is an example of a reentrant context manager, as " "are :func:`suppress`, :func:`redirect_stdout`, and :func:`chdir`. Here's a " "very simple example of reentrant use::" msgstr "" -#: ../../library/contextlib.rst:964 +#: ../../library/contextlib.rst:966 msgid "" "Real world examples of reentrancy are more likely to involve multiple " "functions calling each other and hence be far more complicated than this " "example." msgstr "" -#: ../../library/contextlib.rst:968 +#: ../../library/contextlib.rst:970 msgid "" "Note also that being reentrant is *not* the same thing as being thread " "safe. :func:`redirect_stdout`, for example, is definitely not thread safe, " @@ -835,11 +836,11 @@ msgid "" "stdout` to a different stream." msgstr "" -#: ../../library/contextlib.rst:977 +#: ../../library/contextlib.rst:979 msgid "Reusable context managers" msgstr "" -#: ../../library/contextlib.rst:979 +#: ../../library/contextlib.rst:981 msgid "" "Distinct from both single use and reentrant context managers are " "\"reusable\" context managers (or, to be completely explicit, \"reusable, " @@ -849,21 +850,21 @@ msgid "" "manager instance has already been used in a containing with statement." msgstr "" -#: ../../library/contextlib.rst:986 +#: ../../library/contextlib.rst:988 msgid "" ":class:`threading.Lock` is an example of a reusable, but not reentrant, " "context manager (for a reentrant lock, it is necessary to use :class:" "`threading.RLock` instead)." msgstr "" -#: ../../library/contextlib.rst:990 +#: ../../library/contextlib.rst:992 msgid "" "Another example of a reusable, but not reentrant, context manager is :class:" "`ExitStack`, as it invokes *all* currently registered callbacks when leaving " "any with statement, regardless of where those callbacks were added::" msgstr "" -#: ../../library/contextlib.rst:1021 +#: ../../library/contextlib.rst:1023 msgid "" "As the output from the example shows, reusing a single stack object across " "multiple with statements works correctly, but attempting to nest them will " @@ -871,7 +872,7 @@ msgid "" "which is unlikely to be desirable behaviour." msgstr "" -#: ../../library/contextlib.rst:1026 +#: ../../library/contextlib.rst:1028 msgid "" "Using separate :class:`ExitStack` instances instead of reusing a single " "instance avoids that problem::" diff --git a/library/exceptions.po b/library/exceptions.po index adc0059ac4..f76ca76a44 100644 --- a/library/exceptions.po +++ b/library/exceptions.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-03-01 00:03+0000\n" +"POT-Creation-Date: 2024-06-06 00:03+0000\n" "PO-Revision-Date: 2024-03-12 20:57+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -487,8 +487,8 @@ msgstr "" #: ../../library/exceptions.rst:347 msgid "" "This exception is raised when a system function returns a system-related " -"error, including I/O failures such as \"file not found\" or \"disk full\" " -"(not for illegal argument types or other incidental errors)." +"error, including I/O failures such as \"file not found\" or \"disk " +"full\" (not for illegal argument types or other incidental errors)." msgstr "" #: ../../library/exceptions.rst:351 @@ -1199,12 +1199,13 @@ msgstr "" #: ../../library/exceptions.rst:970 msgid "" -"This method is used by :meth:`subgroup` and :meth:`split`. A subclass needs " -"to override it in order to make :meth:`subgroup` and :meth:`split` return " +"This method is used by :meth:`subgroup` and :meth:`split`, which are used in " +"various contexts to break up an exception group. A subclass needs to " +"override it in order to make :meth:`subgroup` and :meth:`split` return " "instances of the subclass rather than :exc:`ExceptionGroup`." msgstr "" -#: ../../library/exceptions.rst:975 +#: ../../library/exceptions.rst:976 msgid "" ":meth:`subgroup` and :meth:`split` copy the :attr:`~BaseException." "__traceback__`, :attr:`~BaseException.__cause__`, :attr:`~BaseException." @@ -1213,7 +1214,7 @@ msgid "" "not need to be updated by :meth:`derive`." msgstr "" -#: ../../library/exceptions.rst:1008 +#: ../../library/exceptions.rst:1009 msgid "" "Note that :exc:`BaseExceptionGroup` defines :meth:`~object.__new__`, so " "subclasses that need a different constructor signature need to override that " @@ -1222,18 +1223,18 @@ msgid "" "group's message from it. ::" msgstr "" -#: ../../library/exceptions.rst:1023 +#: ../../library/exceptions.rst:1024 msgid "" "Like :exc:`ExceptionGroup`, any subclass of :exc:`BaseExceptionGroup` which " "is also a subclass of :exc:`Exception` can only wrap instances of :exc:" "`Exception`." msgstr "" -#: ../../library/exceptions.rst:1031 +#: ../../library/exceptions.rst:1032 msgid "Exception hierarchy" msgstr "例外階層" -#: ../../library/exceptions.rst:1033 +#: ../../library/exceptions.rst:1034 msgid "The class hierarchy for built-in exceptions is:" msgstr "內建例外的類別階層如下:" From 218281919fe67619ac778ee796b21d7eca1c3758 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 8 Jun 2024 00:04:50 +0000 Subject: [PATCH 11/13] sync with cpython 1e7903d5 --- library/functions.po | 248 ++++++++++----------- library/pathlib.po | 468 ++++++++++++++++++++-------------------- tutorial/inputoutput.po | 88 ++++---- 3 files changed, 410 insertions(+), 394 deletions(-) diff --git a/library/functions.po b/library/functions.po index 23758c277b..1473138050 100644 --- a/library/functions.po +++ b/library/functions.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-31 00:03+0000\n" +"POT-Creation-Date: 2024-06-08 00:03+0000\n" "PO-Revision-Date: 2024-05-06 17:06+0800\n" "Last-Translator: KNChiu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -2448,10 +2448,12 @@ msgid "" "2)`` returns ``100``, but ``pow(10, -2)`` returns ``0.01``. For a negative " "base of type :class:`int` or :class:`float` and a non-integral exponent, a " "complex result is delivered. For example, ``pow(-9, 0.5)`` returns a value " -"close to ``3j``." +"close to ``3j``. Whereas, for a negative base of type :class:`int` or :class:" +"`float` with an integral exponent, a float result is delivered. For example, " +"``pow(-9, 2.0)`` returns ``81.0``." msgstr "" -#: ../../library/functions.rst:1501 +#: ../../library/functions.rst:1503 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 " @@ -2460,29 +2462,29 @@ msgid "" "*base* modulo *mod*." msgstr "" -#: ../../library/functions.rst:1507 +#: ../../library/functions.rst:1509 msgid "Here's an example of computing an inverse for ``38`` modulo ``97``::" msgstr "" -#: ../../library/functions.rst:1514 +#: ../../library/functions.rst:1516 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:1519 +#: ../../library/functions.rst:1521 msgid "" "Allow keyword arguments. Formerly, only positional arguments were supported." msgstr "" -#: ../../library/functions.rst:1526 +#: ../../library/functions.rst:1528 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:1530 +#: ../../library/functions.rst:1532 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* " @@ -2491,7 +2493,7 @@ msgid "" "*end*." msgstr "" -#: ../../library/functions.rst:1536 +#: ../../library/functions.rst:1538 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 " @@ -2499,38 +2501,38 @@ msgid "" "binary mode file objects. For these, use ``file.write(...)`` instead." msgstr "" -#: ../../library/functions.rst:1541 +#: ../../library/functions.rst:1543 msgid "" "Output buffering is usually determined by *file*. However, if *flush* is " "true, the stream is forcibly flushed." msgstr "" -#: ../../library/functions.rst:1545 +#: ../../library/functions.rst:1547 msgid "Added the *flush* keyword argument." msgstr "增加了 *flush* 關鍵字引數。" -#: ../../library/functions.rst:1551 +#: ../../library/functions.rst:1553 msgid "Return a property attribute." msgstr "回傳 property 屬性。" -#: ../../library/functions.rst:1553 +#: ../../library/functions.rst:1555 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:1557 +#: ../../library/functions.rst:1559 msgid "A typical use is to define a managed attribute ``x``::" msgstr "" -#: ../../library/functions.rst:1574 +#: ../../library/functions.rst:1576 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:1577 +#: ../../library/functions.rst:1579 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 " @@ -2538,14 +2540,14 @@ msgid "" "term:`decorator`::" msgstr "" -#: ../../library/functions.rst:1590 +#: ../../library/functions.rst:1592 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:1598 +#: ../../library/functions.rst:1600 msgid "" "A property object has ``getter``, ``setter``, and ``deleter`` methods usable " "as decorators that create a copy of the property with the corresponding " @@ -2553,30 +2555,30 @@ msgid "" "with an example:" msgstr "" -#: ../../library/functions.rst:1622 +#: ../../library/functions.rst:1624 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:1626 +#: ../../library/functions.rst:1628 msgid "" "The returned property object also has the attributes ``fget``, ``fset``, and " "``fdel`` corresponding to the constructor arguments." msgstr "" -#: ../../library/functions.rst:1629 +#: ../../library/functions.rst:1631 msgid "The docstrings of property objects are now writeable." msgstr "" -#: ../../library/functions.rst:1638 +#: ../../library/functions.rst:1640 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:1644 +#: ../../library/functions.rst:1646 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 " @@ -2589,11 +2591,11 @@ msgid "" "raise :exc:`RuntimeError`." msgstr "" -#: ../../library/functions.rst:1655 +#: ../../library/functions.rst:1657 msgid "This class has a custom representation that can be evaluated::" msgstr "" -#: ../../library/functions.rst:1668 +#: ../../library/functions.rst:1670 msgid "" "Return a reverse :term:`iterator`. *seq* must be an object which has a :" "meth:`~object.__reversed__` method or supports the sequence protocol (the :" @@ -2601,14 +2603,14 @@ msgid "" "with integer arguments starting at ``0``)." msgstr "" -#: ../../library/functions.rst:1676 +#: ../../library/functions.rst:1678 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:1680 +#: ../../library/functions.rst:1682 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 " @@ -2619,13 +2621,13 @@ msgid "" "``None``. Otherwise, the return value has the same type as *number*." msgstr "" -#: ../../library/functions.rst:1689 +#: ../../library/functions.rst:1691 msgid "" "For a general Python object ``number``, ``round`` delegates to ``number." "__round__``." msgstr "" -#: ../../library/functions.rst:1694 +#: ../../library/functions.rst:1696 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 " @@ -2634,21 +2636,21 @@ msgid "" "information." msgstr "" -#: ../../library/functions.rst:1706 +#: ../../library/functions.rst:1708 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:1710 +#: ../../library/functions.rst:1712 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:1717 +#: ../../library/functions.rst:1719 msgid "" "This is the counterpart of :func:`getattr`. The arguments are an object, a " "string, and an arbitrary value. The string may name an existing attribute " @@ -2657,7 +2659,7 @@ msgid "" "is equivalent to ``x.foobar = 123``." msgstr "" -#: ../../library/functions.rst:1723 +#: ../../library/functions.rst:1725 msgid "" "*name* need not be a Python identifier as defined in :ref:`identifiers` " "unless the object chooses to enforce that, for example in a custom :meth:" @@ -2666,21 +2668,21 @@ msgid "" "notation, but is accessible through :func:`getattr` etc.." msgstr "" -#: ../../library/functions.rst:1731 +#: ../../library/functions.rst:1733 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:1740 +#: ../../library/functions.rst:1742 msgid "" "Return a :term:`slice` object representing the set of indices specified by " "``range(start, stop, step)``. The *start* and *step* arguments default to " "``None``." msgstr "" -#: ../../library/functions.rst:1748 +#: ../../library/functions.rst:1750 msgid "" "Slice objects have read-only data attributes :attr:`!start`, :attr:`!stop`, " "and :attr:`!step` which merely return the argument values (or their " @@ -2688,48 +2690,48 @@ msgid "" "by NumPy and other third-party packages." msgstr "" -#: ../../library/functions.rst:1753 +#: ../../library/functions.rst:1755 msgid "" "Slice objects are also generated when extended indexing syntax is used. For " "example: ``a[start:stop:step]`` or ``a[start:stop, i]``. See :func:" "`itertools.islice` for an alternate version that returns an :term:`iterator`." msgstr "" -#: ../../library/functions.rst:1758 +#: ../../library/functions.rst:1760 msgid "" "Slice objects are now :term:`hashable` (provided :attr:`~slice.start`, :attr:" "`~slice.stop`, and :attr:`~slice.step` are hashable)." msgstr "" -#: ../../library/functions.rst:1764 +#: ../../library/functions.rst:1766 msgid "Return a new sorted list from the items in *iterable*." msgstr "" -#: ../../library/functions.rst:1766 +#: ../../library/functions.rst:1768 msgid "" "Has two optional arguments which must be specified as keyword arguments." msgstr "有兩個選擇性引數,只能使用關鍵字引數來指定。" -#: ../../library/functions.rst:1768 +#: ../../library/functions.rst:1770 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:1772 +#: ../../library/functions.rst:1774 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:1775 +#: ../../library/functions.rst:1777 msgid "" "Use :func:`functools.cmp_to_key` to convert an old-style *cmp* function to a " "*key* function." msgstr "" -#: ../../library/functions.rst:1778 +#: ../../library/functions.rst:1780 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 " @@ -2737,7 +2739,7 @@ msgid "" "example, sort by department, then by salary grade)." msgstr "" -#: ../../library/functions.rst:1783 +#: ../../library/functions.rst:1785 msgid "" "The sort algorithm uses only ``<`` comparisons between items. While " "defining an :meth:`~object.__lt__` method will suffice for sorting, :PEP:`8` " @@ -2749,22 +2751,22 @@ msgid "" "method." msgstr "" -#: ../../library/functions.rst:1792 +#: ../../library/functions.rst:1794 msgid "" "For sorting examples and a brief sorting tutorial, see :ref:`sortinghowto`." msgstr "" -#: ../../library/functions.rst:1796 +#: ../../library/functions.rst:1798 msgid "Transform a method into a static method." msgstr "" -#: ../../library/functions.rst:1798 +#: ../../library/functions.rst:1800 msgid "" "A static method does not receive an implicit first argument. To declare a " "static method, use this idiom::" msgstr "" -#: ../../library/functions.rst:1805 +#: ../../library/functions.rst:1807 msgid "" "The ``@staticmethod`` form is a function :term:`decorator` -- see :ref:" "`function` for details." @@ -2772,7 +2774,7 @@ msgstr "" "``@staticmethod`` 語法是一個函式 :term:`decorator` - 參見 :ref:`function` 中" "的詳細介紹。" -#: ../../library/functions.rst:1808 +#: ../../library/functions.rst:1810 msgid "" "A static method can be called either on the class (such as ``C.f()``) or on " "an instance (such as ``C().f()``). Moreover, the static method :term:" @@ -2780,14 +2782,14 @@ msgid "" "(such as ``f()``)." msgstr "" -#: ../../library/functions.rst:1813 +#: ../../library/functions.rst:1815 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:1817 +#: ../../library/functions.rst:1819 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 " @@ -2796,36 +2798,36 @@ msgid "" "cases, use this idiom::" msgstr "" -#: ../../library/functions.rst:1829 +#: ../../library/functions.rst:1831 msgid "For more information on static methods, see :ref:`types`." msgstr "關於 static method 的更多資訊,請參考 :ref:`types`。" -#: ../../library/functions.rst:1831 +#: ../../library/functions.rst:1833 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:1846 +#: ../../library/functions.rst:1848 msgid "" "Return a :class:`str` version of *object*. See :func:`str` for details." msgstr "" -#: ../../library/functions.rst:1848 +#: ../../library/functions.rst:1850 msgid "" "``str`` is the built-in string :term:`class`. For general information about " "strings, see :ref:`textseq`." msgstr "" -#: ../../library/functions.rst:1854 +#: ../../library/functions.rst:1856 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:1858 +#: ../../library/functions.rst:1860 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 ``''." @@ -2834,37 +2836,37 @@ msgid "" "using :func:`itertools.chain`." msgstr "" -#: ../../library/functions.rst:1864 +#: ../../library/functions.rst:1866 msgid "The *start* parameter can be specified as a keyword argument." msgstr "*start* 參數可被指定為關鍵字引數。" -#: ../../library/functions.rst:1867 +#: ../../library/functions.rst:1869 msgid "" "Summation of floats switched to an algorithm that gives higher accuracy on " "most builds." msgstr "" -#: ../../library/functions.rst:1874 +#: ../../library/functions.rst:1876 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:1878 +#: ../../library/functions.rst:1880 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:1882 +#: ../../library/functions.rst:1884 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:1886 +#: ../../library/functions.rst:1888 msgid "" "The :attr:`~class.__mro__` attribute of the *object_or_type* lists the " "method resolution search order used by both :func:`getattr` and :func:" @@ -2872,7 +2874,7 @@ msgid "" "hierarchy is updated." msgstr "" -#: ../../library/functions.rst:1891 +#: ../../library/functions.rst:1893 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. " @@ -2880,7 +2882,7 @@ msgid "" "(this is useful for classmethods)." msgstr "" -#: ../../library/functions.rst:1896 +#: ../../library/functions.rst:1898 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 " @@ -2888,7 +2890,7 @@ msgid "" "closely parallels the use of *super* in other programming languages." msgstr "" -#: ../../library/functions.rst:1901 +#: ../../library/functions.rst:1903 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 " @@ -2901,18 +2903,18 @@ msgid "" "classes that are unknown prior to runtime)." msgstr "" -#: ../../library/functions.rst:1911 +#: ../../library/functions.rst:1913 msgid "For both use cases, a typical superclass call looks like this::" msgstr "" -#: ../../library/functions.rst:1918 +#: ../../library/functions.rst:1920 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:1922 +#: ../../library/functions.rst:1924 msgid "" "Note that :func:`super` is implemented as part of the binding process for " "explicit dotted attribute lookups such as ``super().__getitem__(name)``. It " @@ -2922,7 +2924,7 @@ msgid "" "using statements or operators such as ``super()[name]``." msgstr "" -#: ../../library/functions.rst:1930 +#: ../../library/functions.rst:1932 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 " @@ -2932,33 +2934,33 @@ msgid "" "accessing the current instance for ordinary methods." msgstr "" -#: ../../library/functions.rst:1937 +#: ../../library/functions.rst:1939 msgid "" "For practical suggestions on how to design cooperative classes using :func:" "`super`, see `guide to using super() `_." msgstr "" -#: ../../library/functions.rst:1947 +#: ../../library/functions.rst:1949 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:1956 +#: ../../library/functions.rst:1958 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:1960 +#: ../../library/functions.rst:1962 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:1964 +#: ../../library/functions.rst:1966 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 " @@ -2971,11 +2973,11 @@ msgid "" "identical :class:`type` objects:" msgstr "" -#: ../../library/functions.rst:1979 +#: ../../library/functions.rst:1981 msgid "See also :ref:`bltin-type-objects`." msgstr "另請參閱 :ref:`bltin-type-objects`。" -#: ../../library/functions.rst:1981 +#: ../../library/functions.rst:1983 msgid "" "Keyword arguments provided to the three argument form are passed to the " "appropriate metaclass machinery (usually :meth:`~object.__init_subclass__`) " @@ -2983,23 +2985,23 @@ msgid "" "would." msgstr "" -#: ../../library/functions.rst:1986 +#: ../../library/functions.rst:1988 msgid "See also :ref:`class-customization`." msgstr "另請參閱 :ref:`class-customization`。" -#: ../../library/functions.rst:1988 +#: ../../library/functions.rst:1990 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:1995 +#: ../../library/functions.rst:1997 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:1998 +#: ../../library/functions.rst:2000 msgid "" "Objects such as modules and instances have an updateable :attr:`~object." "__dict__` attribute; however, other objects may have write restrictions on " @@ -3007,54 +3009,54 @@ msgid "" "`types.MappingProxyType` to prevent direct dictionary updates)." msgstr "" -#: ../../library/functions.rst:2003 +#: ../../library/functions.rst:2005 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:2007 +#: ../../library/functions.rst:2009 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:2013 +#: ../../library/functions.rst:2015 msgid "" "Iterate over several iterables in parallel, producing tuples with an item " "from each one." msgstr "" -#: ../../library/functions.rst:2016 +#: ../../library/functions.rst:2018 msgid "Example::" msgstr "" "例如:\n" "\n" "::" -#: ../../library/functions.rst:2025 +#: ../../library/functions.rst:2027 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:2028 +#: ../../library/functions.rst:2030 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:2032 +#: ../../library/functions.rst:2034 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:2036 +#: ../../library/functions.rst:2038 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 " @@ -3062,51 +3064,51 @@ msgid "" "approaches to dealing with this issue:" msgstr "" -#: ../../library/functions.rst:2041 +#: ../../library/functions.rst:2043 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:2048 +#: ../../library/functions.rst:2050 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:2055 +#: ../../library/functions.rst:2057 msgid "" "Unlike the default behavior, it raises a :exc:`ValueError` if one iterable " "is exhausted before the others:" msgstr "" -#: ../../library/functions.rst:2073 +#: ../../library/functions.rst:2075 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:2077 +#: ../../library/functions.rst:2079 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:2081 +#: ../../library/functions.rst:2083 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:2084 +#: ../../library/functions.rst:2086 msgid "Tips and tricks:" msgstr "" -#: ../../library/functions.rst:2086 +#: ../../library/functions.rst:2088 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 " @@ -3115,23 +3117,23 @@ msgid "" "iterator. This has the effect of dividing the input into n-length chunks." msgstr "" -#: ../../library/functions.rst:2092 +#: ../../library/functions.rst:2094 msgid "" ":func:`zip` in conjunction with the ``*`` operator can be used to unzip a " "list::" msgstr "" -#: ../../library/functions.rst:2103 +#: ../../library/functions.rst:2105 msgid "Added the ``strict`` argument." msgstr "增加了 ``strict`` 引數。" -#: ../../library/functions.rst:2115 +#: ../../library/functions.rst:2117 msgid "" "This is an advanced function that is not needed in everyday Python " "programming, unlike :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2118 +#: ../../library/functions.rst:2120 msgid "" "This function is invoked by the :keyword:`import` statement. It can be " "replaced (by importing the :mod:`builtins` module and assigning to " @@ -3143,7 +3145,7 @@ msgid "" "discouraged in favor of :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2127 +#: ../../library/functions.rst:2129 msgid "" "The function imports the module *name*, potentially using the given " "*globals* and *locals* to determine how to interpret the name in a package " @@ -3153,7 +3155,7 @@ msgid "" "determine the package context of the :keyword:`import` statement." msgstr "" -#: ../../library/functions.rst:2134 +#: ../../library/functions.rst:2136 msgid "" "*level* specifies whether to use absolute or relative imports. ``0`` (the " "default) means only perform absolute imports. Positive values for *level* " @@ -3162,7 +3164,7 @@ msgid "" "details)." msgstr "" -#: ../../library/functions.rst:2140 +#: ../../library/functions.rst:2142 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 " @@ -3170,58 +3172,58 @@ msgid "" "given, the module named by *name* is returned." msgstr "" -#: ../../library/functions.rst:2145 +#: ../../library/functions.rst:2147 msgid "" "For example, the statement ``import spam`` results in bytecode resembling " "the following code::" msgstr "" -#: ../../library/functions.rst:2150 +#: ../../library/functions.rst:2152 msgid "The statement ``import spam.ham`` results in this call::" msgstr "" -#: ../../library/functions.rst:2154 +#: ../../library/functions.rst:2156 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:2157 +#: ../../library/functions.rst:2159 msgid "" "On the other hand, the statement ``from spam.ham import eggs, sausage as " "saus`` results in ::" msgstr "" -#: ../../library/functions.rst:2164 +#: ../../library/functions.rst:2166 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:2168 +#: ../../library/functions.rst:2170 msgid "" "If you simply want to import a module (potentially within a package) by " "name, use :func:`importlib.import_module`." msgstr "" -#: ../../library/functions.rst:2171 +#: ../../library/functions.rst:2173 msgid "" "Negative values for *level* are no longer supported (which also changes the " "default value to 0)." msgstr "" -#: ../../library/functions.rst:2175 +#: ../../library/functions.rst:2177 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:2180 +#: ../../library/functions.rst:2182 msgid "Footnotes" msgstr "註解" -#: ../../library/functions.rst:2181 +#: ../../library/functions.rst:2183 msgid "" "Note that the parser only accepts the Unix-style end of line convention. If " "you are reading the code from a file, make sure to use newline conversion " @@ -3234,7 +3236,7 @@ msgstr "" msgid "Boolean" msgstr "Boolean(布林值)" -#: ../../library/functions.rst:154 ../../library/functions.rst:1954 +#: ../../library/functions.rst:154 ../../library/functions.rst:1956 msgid "type" msgstr "type(型別)" @@ -3258,7 +3260,7 @@ msgstr "Infinity(無窮)" msgid "__format__" msgstr "__format__" -#: ../../library/functions.rst:781 ../../library/functions.rst:1838 +#: ../../library/functions.rst:781 ../../library/functions.rst:1840 msgid "string" msgstr "string(字串)" @@ -3310,7 +3312,7 @@ msgstr "buffering(緩衝)" msgid "text mode" msgstr "text mode(文字模式)" -#: ../../library/functions.rst:1430 ../../library/functions.rst:2109 +#: ../../library/functions.rst:1430 ../../library/functions.rst:2111 msgid "module" msgstr "module(模組)" @@ -3318,23 +3320,23 @@ msgstr "module(模組)" msgid "sys" msgstr "sys" -#: ../../library/functions.rst:1838 +#: ../../library/functions.rst:1840 msgid "str() (built-in function)" msgstr "str() (內建函式)" -#: ../../library/functions.rst:1954 +#: ../../library/functions.rst:1956 msgid "object" msgstr "object(物件)" -#: ../../library/functions.rst:2109 +#: ../../library/functions.rst:2111 msgid "statement" msgstr "statement(陳述式)" -#: ../../library/functions.rst:2109 +#: ../../library/functions.rst:2111 msgid "import" msgstr "import(引入)" -#: ../../library/functions.rst:2109 +#: ../../library/functions.rst:2111 msgid "builtins" msgstr "builtins(內建)" diff --git a/library/pathlib.po b/library/pathlib.po index a410acf9f6..301436b534 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-03 00:03+0000\n" +"POT-Creation-Date: 2024-06-08 00:03+0000\n" "PO-Revision-Date: 2024-02-29 20:49+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -524,8 +524,8 @@ msgid "" "Set *case_sensitive* to ``True`` or ``False`` to override this behaviour." msgstr "將 *case_sensitive* 設定成 ``True`` 或 ``False`` 會覆蓋這個行為。" -#: ../../library/pathlib.rst:601 ../../library/pathlib.rst:1149 -#: ../../library/pathlib.rst:1428 +#: ../../library/pathlib.rst:601 ../../library/pathlib.rst:1113 +#: ../../library/pathlib.rst:1141 msgid "The *case_sensitive* parameter was added." msgstr "新增 *case_sensitive* 參數。" @@ -654,11 +654,20 @@ msgstr "" "你只能實例化對應你的系統的類別類型(允許在不相容的路徑類型上做系統呼叫可能在" "你的應用程式導致漏洞或故障): ::" -#: ../../library/pathlib.rst:794 +#: ../../library/pathlib.rst:792 +#, fuzzy +msgid "" +"Some concrete path methods can raise an :exc:`OSError` if a system call " +"fails (for example because the path doesn't exist)." +msgstr "" +"實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" +"存在),以下許多方法會引發 :exc:`OSError`。" + +#: ../../library/pathlib.rst:797 msgid "Querying file type and status" msgstr "" -#: ../../library/pathlib.rst:798 +#: ../../library/pathlib.rst:801 msgid "" ":meth:`~Path.exists()`, :meth:`~Path.is_dir()`, :meth:`~Path.is_file()`, :" "meth:`~Path.is_mount()`, :meth:`~Path.is_symlink()`, :meth:`~Path." @@ -673,7 +682,7 @@ msgstr "" "is_fifo()`、:meth:`~Path.is_socket()` 遇到路徑包含 OS 層無法表示的字元時現在" "會回傳 ``False`` 而不是引發例外。" -#: ../../library/pathlib.rst:808 +#: ../../library/pathlib.rst:811 msgid "" "Return a :class:`os.stat_result` object containing information about this " "path, like :func:`os.stat`. The result is looked up at each call to this " @@ -682,7 +691,7 @@ msgstr "" "回傳一個包含該路徑資訊的 :class:`os.stat_result` 物件,像 :func:`os.stat` 一" "樣。每次呼叫此方法都會重新查詢結果。" -#: ../../library/pathlib.rst:811 +#: ../../library/pathlib.rst:814 msgid "" "This method normally follows symlinks; to stat a symlink add the argument " "``follow_symlinks=False``, or use :meth:`~Path.lstat`." @@ -690,12 +699,12 @@ msgstr "" "此方法通常會跟隨 (follow) 符號連結;想要取得符號連結的資訊,可以加上引數 " "``follow_symlinks=False`` 或使用 :meth:`~Path.lstat`。" -#: ../../library/pathlib.rst:822 ../../library/pathlib.rst:850 -#: ../../library/pathlib.rst:1090 +#: ../../library/pathlib.rst:825 ../../library/pathlib.rst:853 +#: ../../library/pathlib.rst:1284 msgid "The *follow_symlinks* parameter was added." msgstr "新增 *follow_symlinks* 參數。" -#: ../../library/pathlib.rst:828 +#: ../../library/pathlib.rst:831 msgid "" "Like :meth:`Path.stat` but, if the path points to a symbolic link, return " "the symbolic link's information rather than its target's." @@ -703,11 +712,11 @@ msgstr "" "類似 :meth:`Path.stat`,但如果該路徑指向一個符號連結,則回傳符號連結的資訊而" "不是其指向的目標。" -#: ../../library/pathlib.rst:834 +#: ../../library/pathlib.rst:837 msgid "Return ``True`` if the path points to an existing file or directory." msgstr "如果路徑指向存在的檔案或目錄則回傳 ``True``。" -#: ../../library/pathlib.rst:836 +#: ../../library/pathlib.rst:839 msgid "" "This method normally follows symlinks; to check if a symlink exists, add the " "argument ``follow_symlinks=False``." @@ -715,7 +724,7 @@ msgstr "" "此方法通常會跟隨符號連結;如果想檢查符號連結是否存在,可以加上引數 " "``follow_symlinks=False``。" -#: ../../library/pathlib.rst:856 +#: ../../library/pathlib.rst:859 msgid "" "Return ``True`` if the path points to a regular file (or a symbolic link " "pointing to a regular file), ``False`` if it points to another kind of file." @@ -723,9 +732,9 @@ msgstr "" "如果該路徑指向一個普通檔案(或者是一個指向普通檔案的符號連結)則回傳 " "``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:859 ../../library/pathlib.rst:868 -#: ../../library/pathlib.rst:910 ../../library/pathlib.rst:919 -#: ../../library/pathlib.rst:928 ../../library/pathlib.rst:937 +#: ../../library/pathlib.rst:862 ../../library/pathlib.rst:871 +#: ../../library/pathlib.rst:913 ../../library/pathlib.rst:922 +#: ../../library/pathlib.rst:931 ../../library/pathlib.rst:940 msgid "" "``False`` is also returned if the path doesn't exist or is a broken symlink; " "other errors (such as permission errors) are propagated." @@ -733,7 +742,7 @@ msgstr "" "如果路徑不存在或者是一個斷掉的符號連結則也會回傳 ``False``;其他錯誤(例如權" "限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:865 +#: ../../library/pathlib.rst:868 msgid "" "Return ``True`` if the path points to a directory (or a symbolic link " "pointing to a directory), ``False`` if it points to another kind of file." @@ -741,19 +750,19 @@ msgstr "" "如果該路徑指向一個目錄(或者是一個指向目錄的符號連結)則回傳 ``True``,如果指" "向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:874 +#: ../../library/pathlib.rst:877 msgid "" "Return ``True`` if the path points to a symbolic link, ``False`` otherwise." msgstr "如果該路徑指向一個符號連結則回傳 ``True``,否則回傳 ``False``。" -#: ../../library/pathlib.rst:876 +#: ../../library/pathlib.rst:879 msgid "" "``False`` is also returned if the path doesn't exist; other errors (such as " "permission errors) are propagated." msgstr "" "如果該路徑不存在也會回傳 ``False``;其他錯誤(例如權限錯誤)則會傳遞出來。" -#: ../../library/pathlib.rst:882 +#: ../../library/pathlib.rst:885 msgid "" "Return ``True`` if the path points to a junction, and ``False`` for any " "other type of file. Currently only Windows supports junctions." @@ -761,7 +770,7 @@ msgstr "" "如果該路徑指向一個連接點 (junction) 則回傳 ``True``,對其他類型的檔案則回傳 " "``False``。目前只有 Windows 支援連接點。" -#: ../../library/pathlib.rst:890 +#: ../../library/pathlib.rst:893 msgid "" "Return ``True`` if the path is a :dfn:`mount point`: a point in a file " "system where a different file system has been mounted. On POSIX, the " @@ -779,11 +788,11 @@ msgstr "" "Windows 上,一個掛載點被視為一個根磁碟機字母(例如 ``c:\\``)、一個 UNC share" "(例如 ``\\\\server\\share``)或是掛載的檔案系統目錄。" -#: ../../library/pathlib.rst:901 +#: ../../library/pathlib.rst:904 msgid "Windows support was added." msgstr "加入對 Windows 的支援。" -#: ../../library/pathlib.rst:907 +#: ../../library/pathlib.rst:910 msgid "" "Return ``True`` if the path points to a Unix socket (or a symbolic link " "pointing to a Unix socket), ``False`` if it points to another kind of file." @@ -791,7 +800,7 @@ msgstr "" "如果該路徑指向一個 Unix socket(或者是一個指向 Unix socket 的符號連結)則會回" "傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:916 +#: ../../library/pathlib.rst:919 msgid "" "Return ``True`` if the path points to a FIFO (or a symbolic link pointing to " "a FIFO), ``False`` if it points to another kind of file." @@ -799,7 +808,7 @@ msgstr "" "如果該路徑指向一個 FIFO(或者是一個指向 FIFO 的符號連結)則會回傳 ``True``," "如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:925 +#: ../../library/pathlib.rst:928 msgid "" "Return ``True`` if the path points to a block device (or a symbolic link " "pointing to a block device), ``False`` if it points to another kind of file." @@ -807,7 +816,7 @@ msgstr "" "如果該路徑指向一個區塊裝置 (block device)(或者是一個指向區塊裝置的符號連結)" "則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:934 +#: ../../library/pathlib.rst:937 msgid "" "Return ``True`` if the path points to a character device (or a symbolic link " "pointing to a character device), ``False`` if it points to another kind of " @@ -816,7 +825,7 @@ msgstr "" "如果該路徑指向一個字元裝置 (character device)(或者是一個指向字元裝置的符號連" "結)則會回傳 ``True``,如果指向其他類型的檔案則回傳 ``False``。" -#: ../../library/pathlib.rst:943 +#: ../../library/pathlib.rst:946 msgid "" "Return whether this path points to the same file as *other_path*, which can " "be either a Path object, or a string. The semantics are similar to :func:" @@ -826,116 +835,93 @@ msgstr "" "物件或字串。其語義類似於 :func:`os.path.samefile` 和 :func:`os.path." "samestat`。" -#: ../../library/pathlib.rst:947 +#: ../../library/pathlib.rst:950 msgid "" "An :exc:`OSError` can be raised if either file cannot be accessed for some " "reason." msgstr "若任何一個檔案因為某些原因無法存取,則引發 :exc:`OSError`。" -#: ../../library/pathlib.rst:963 +#: ../../library/pathlib.rst:966 msgid "Reading and writing files" msgstr "" -#: ../../library/pathlib.rst:968 +#: ../../library/pathlib.rst:971 msgid "" "Open the file pointed to by the path, like the built-in :func:`open` " "function does::" msgstr "開啟該路徑指向的檔案,像內建的 :func:`open` 函式做的一樣: ::" -#: ../../library/pathlib.rst:980 +#: ../../library/pathlib.rst:983 msgid "Return the decoded contents of the pointed-to file as a string::" msgstr "將路徑指向的檔案的解碼內容以字串形式回傳: ::" -#: ../../library/pathlib.rst:988 +#: ../../library/pathlib.rst:991 msgid "" "The file is opened and then closed. The optional parameters have the same " "meaning as in :func:`open`." msgstr "該檔案被打開並且隨後關閉。可選參數的含義與 :func:`open` 中的相同。" -#: ../../library/pathlib.rst:996 +#: ../../library/pathlib.rst:999 msgid "Return the binary contents of the pointed-to file as a bytes object::" msgstr "將路徑指向的檔案的二進位內容以一個位元組物件回傳: ::" -#: ../../library/pathlib.rst:1009 +#: ../../library/pathlib.rst:1012 msgid "" "Open the file pointed to in text mode, write *data* to it, and close the " "file::" msgstr "以文字模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" -#: ../../library/pathlib.rst:1018 +#: ../../library/pathlib.rst:1021 msgid "" "An existing file of the same name is overwritten. The optional parameters " "have the same meaning as in :func:`open`." msgstr "" "一個名稱相同的已存在檔案會被覆寫。可選參數和 :func:`open` 的參數有相同意義。" -#: ../../library/pathlib.rst:1023 +#: ../../library/pathlib.rst:1026 msgid "The *newline* parameter was added." msgstr "新增 *newline* 參數。" -#: ../../library/pathlib.rst:1029 +#: ../../library/pathlib.rst:1032 msgid "" "Open the file pointed to in bytes mode, write *data* to it, and close the " "file::" msgstr "以位元組模式開啟指向的檔案,將 *data* 寫到檔案,並關閉檔案:: :" -#: ../../library/pathlib.rst:1038 +#: ../../library/pathlib.rst:1041 msgid "An existing file of the same name is overwritten." msgstr "一個名稱相同的已存在檔案會被覆寫。" -#: ../../library/pathlib.rst:1044 +#: ../../library/pathlib.rst:1047 #, fuzzy -msgid "Other methods" -msgstr "方法" +msgid "Reading directories" +msgstr "列出子目錄: ::" -#: ../../library/pathlib.rst:1046 -#, fuzzy +#: ../../library/pathlib.rst:1051 msgid "" -"Many of these methods can raise an :exc:`OSError` if a system call fails " -"(for example because the path doesn't exist)." -msgstr "" -"實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" -"存在),以下許多方法會引發 :exc:`OSError`。" +"When the path points to a directory, yield path objects of the directory " +"contents::" +msgstr "當該路徑指向一個目錄,會 yield 目錄裡面的路徑物件: ::" -#: ../../library/pathlib.rst:1052 +#: ../../library/pathlib.rst:1065 +#, fuzzy msgid "" -"Return a new path object representing the current directory (as returned by :" -"func:`os.getcwd`)::" +"The children are yielded in arbitrary order, and the special entries ``'.'`` " +"and ``'..'`` are not included. If a file is removed from or added to the " +"directory after creating the iterator, it is unspecified whether a path " +"object for that file is included." msgstr "" -"回傳一個代表目前目錄的新的路徑物件(像 :func:`os.getcwd` 回傳的一樣): ::" +"子路徑會以任意順序被 yield,且不會包含特殊項目 ``'.'`` 和 ``'..'``。如果一個" +"檔案在建立這個疊代器之後加到該目錄或從目錄刪除,是否會包含這個檔案的路徑物件" +"是不確定的。" -#: ../../library/pathlib.rst:1061 +#: ../../library/pathlib.rst:1070 msgid "" -"Return a new path object representing the user's home directory (as returned " -"by :func:`os.path.expanduser` with ``~`` construct). If the home directory " -"can't be resolved, :exc:`RuntimeError` is raised." +"If the path is not a directory or otherwise inaccessible, :exc:`OSError` is " +"raised." msgstr "" -"回傳一個代表使用者家目錄的新的路徑物件(像以 ``~`` 構成的 :func:`os.path." -"expanduser` 的回傳一樣)。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" #: ../../library/pathlib.rst:1075 -msgid "Change the file mode and permissions, like :func:`os.chmod`." -msgstr "修改檔案模式 (file mode) 與權限,像 :func:`os.chmod` 一樣。" - -#: ../../library/pathlib.rst:1077 -msgid "" -"This method normally follows symlinks. Some Unix flavours support changing " -"permissions on the symlink itself; on these platforms you may add the " -"argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." -msgstr "" -"此方法通常會跟隨符號連結。一些 Unix 類型支援修改符號連結本身的權限;在這些平" -"台上你可以加上引數 ``follow_symlinks=False`` 或使用 :meth:`~Path.lchmod`。" - -#: ../../library/pathlib.rst:1096 -msgid "" -"Return a new path with expanded ``~`` and ``~user`` constructs, as returned " -"by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" -"`RuntimeError` is raised." -msgstr "" -"回傳一個展開 ``~`` 和 ``~user`` 構成的新路徑,像 :meth:`os.path.expanduser` " -"回傳的一樣。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" - -#: ../../library/pathlib.rst:1111 msgid "" "Glob the given relative *pattern* in the directory represented by this path, " "yielding all matching files (of any kind)::" @@ -943,7 +929,7 @@ msgstr "" "在該路徑表示的目錄裡,以 glob 方式比對所給定的相對 *pattern*,並 yield 所有比" "對到的檔案(任意類型): ::" -#: ../../library/pathlib.rst:1119 +#: ../../library/pathlib.rst:1083 msgid "" "Patterns are the same as for :mod:`fnmatch`, with the addition of \"``**``\" " "which means \"this directory and all subdirectories, recursively\". In " @@ -952,7 +938,7 @@ msgstr "" "模式 (pattern) 和給 :mod:`fnmatch` 的一樣,加上 \"``**``\" 代表「目前目錄及所" "有遞迴的子目錄」。也就是說它能夠做遞迴的 glob 比對: ::" -#: ../../library/pathlib.rst:1130 +#: ../../library/pathlib.rst:1094 msgid "" "This method calls :meth:`Path.is_dir` on the top-level directory and " "propagates any :exc:`OSError` exception that is raised. Subsequent :exc:" @@ -961,7 +947,7 @@ msgstr "" "此方法在頂層目錄上呼叫 :meth:`Path.is_dir` 並傳遞引發的任何 :exc:`OSError` 例" "外。將會抑制在目錄對於 :exc:`OSError` 例外的後續掃描。" -#: ../../library/pathlib.rst:1134 ../../library/pathlib.rst:1417 +#: ../../library/pathlib.rst:1098 ../../library/pathlib.rst:1130 msgid "" "By default, or when the *case_sensitive* keyword-only argument is set to " "``None``, this method matches paths using platform-specific casing rules: " @@ -973,13 +959,13 @@ msgstr "" "在 Windows 上不區分大小寫。將 *case_sensitive* 設成 ``True`` 或 ``False`` 會" "覆寫這個行為。" -#: ../../library/pathlib.rst:1140 +#: ../../library/pathlib.rst:1104 msgid "" "Using the \"``**``\" pattern in large directory trees may consume an " "inordinate amount of time." msgstr "在很大的目錄樹裡使用 \"``**``\" 可能會耗費過多的時間。" -#: ../../library/pathlib.rst:1143 +#: ../../library/pathlib.rst:1107 msgid "" "Raises an :ref:`auditing event ` ``pathlib.Path.glob`` with " "arguments ``self``, ``pattern``." @@ -987,7 +973,7 @@ msgstr "" "引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " "``pathlib.Path.glob``。" -#: ../../library/pathlib.rst:1145 ../../library/pathlib.rst:1424 +#: ../../library/pathlib.rst:1109 ../../library/pathlib.rst:1137 msgid "" "Return only directories if *pattern* ends with a pathname components " "separator (:data:`~os.sep` or :data:`~os.altsep`)." @@ -995,38 +981,31 @@ msgstr "" "如果 *pattern* 以路徑名稱組成的分隔符號(:data:`~os.sep` 或 :data:`~os." "altsep`)作結尾則只會回傳目錄。" -#: ../../library/pathlib.rst:1155 +#: ../../library/pathlib.rst:1119 msgid "" -"Return the name of the group owning the file. :exc:`KeyError` is raised if " -"the file's gid isn't found in the system database." +"Glob the given relative *pattern* recursively. This is like calling :func:" +"`Path.glob` with \"``**/``\" added in front of the *pattern*, where " +"*patterns* are the same as for :mod:`fnmatch`::" msgstr "" -"回傳擁有該檔案的群組名稱。如果在系統資料庫裡找不到檔案的 gid 會引發 :exc:" -"`KeyError`。" - -#: ../../library/pathlib.rst:1161 -msgid "" -"When the path points to a directory, yield path objects of the directory " -"contents::" -msgstr "當該路徑指向一個目錄,會 yield 目錄裡面的路徑物件: ::" +"遞迴地 glob 給定的相對 *pattern*。這相當於在給定的相對 *pattern* 前面加上 " +"\"``**/``\" 並呼叫 :func:`Path.glob`,其中 *patterns* 和給 :mod:`fnmatch` 的" +"相同: ::" -#: ../../library/pathlib.rst:1175 +#: ../../library/pathlib.rst:1135 msgid "" -"The children are yielded in arbitrary order, and the special entries ``'.'`` " -"and ``'..'`` are not included. If a file is removed from or added to the " -"directory after creating the iterator, whether a path object for that file " -"be included is unspecified." +"Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " +"arguments ``self``, ``pattern``." msgstr "" -"子路徑會以任意順序被 yield,且不會包含特殊項目 ``'.'`` 和 ``'..'``。如果一個" -"檔案在建立這個疊代器之後加到該目錄或從目錄刪除,是否會包含這個檔案的路徑物件" -"是不確定的。" +"引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " +"``pathlib.Path.rglob``。" -#: ../../library/pathlib.rst:1182 +#: ../../library/pathlib.rst:1147 msgid "" "Generate the file names in a directory tree by walking the tree either top-" "down or bottom-up." msgstr "透過由上而下或由下而上地走訪目錄樹產生目錄樹裡的檔案名稱。" -#: ../../library/pathlib.rst:1185 +#: ../../library/pathlib.rst:1150 msgid "" "For each directory in the directory tree rooted at *self* (including *self* " "but excluding '.' and '..'), the method yields a 3-tuple of ``(dirpath, " @@ -1035,7 +1014,7 @@ msgstr "" "對每個以 *self* 為根且在目錄樹裡的目錄(包含 *self* 但不包含 '.' 和 '..' )," "此方法會 yield 一個 ``(dirpath, dirnames, filenames)`` 的三元素元組。" -#: ../../library/pathlib.rst:1189 +#: ../../library/pathlib.rst:1154 msgid "" "*dirpath* is a :class:`Path` to the directory currently being walked, " "*dirnames* is a list of strings for the names of subdirectories in *dirpath* " @@ -1050,7 +1029,7 @@ msgstr "" "裡檔案或目錄的完整路徑(以 *self* 開頭),可以使用 ``dirpath / name``。會根據" "檔案系統來決定串列是否有排序。" -#: ../../library/pathlib.rst:1197 +#: ../../library/pathlib.rst:1162 msgid "" "If the optional argument *top_down* is true (which is the default), the " "triple for a directory is generated before the triples for any of its " @@ -1066,7 +1045,7 @@ msgstr "" "不論 *top_down* 的值是什麼,子目錄的串列會在走訪該目錄及其子目錄的三元素元組" "之前取得。" -#: ../../library/pathlib.rst:1205 +#: ../../library/pathlib.rst:1170 msgid "" "When *top_down* is true, the caller can modify the *dirnames* list in-place " "(for example, using :keyword:`del` or slice assignment), and :meth:`Path." @@ -1086,7 +1065,7 @@ msgstr "" "*dirnames* 對 :meth:`Path.walk()` 的行為沒有影響,因為 *dirnames* 裡的目錄已" "經在 *dirnames* yield 給呼叫者之前被產生。" -#: ../../library/pathlib.rst:1215 +#: ../../library/pathlib.rst:1180 msgid "" "By default, errors from :func:`os.scandir` are ignored. If the optional " "argument *on_error* is specified, it should be a callable; it will be called " @@ -1099,7 +1078,7 @@ msgstr "" "這個可呼叫物件可以處理錯誤以繼續走訪,或者再次引發錯誤來停止走訪。注意,檔案" "名稱可以從例外物件的 ``filename`` 屬性來取得。" -#: ../../library/pathlib.rst:1221 +#: ../../library/pathlib.rst:1186 msgid "" "By default, :meth:`Path.walk` does not follow symbolic links, and instead " "adds them to the *filenames* list. Set *follow_symlinks* to true to resolve " @@ -1112,7 +1091,7 @@ msgstr "" "適當的 *dirnames* 和 *filenames*,而因此訪問到符號連結指向的目錄(在有支援符" "號連結的地方)。" -#: ../../library/pathlib.rst:1228 +#: ../../library/pathlib.rst:1193 msgid "" "Be aware that setting *follow_symlinks* to true can lead to infinite " "recursion if a link points to a parent directory of itself. :meth:`Path." @@ -1121,7 +1100,7 @@ msgstr "" "需要注意的是如果符號連結指向一個其本身的父目錄,則將 *follow_symlinks* 設定" "為 true 會導致無窮的遞迴。:meth:`Path.walk` 不會紀錄其已經訪問過的目錄。" -#: ../../library/pathlib.rst:1233 +#: ../../library/pathlib.rst:1198 msgid "" ":meth:`Path.walk` assumes the directories it walks are not modified during " "execution. For example, if a directory from *dirnames* has been replaced " @@ -1134,7 +1113,7 @@ msgstr "" "meth:`Path.walk` 依然會試著往下進入它。為了防止這樣的行為,可以從 *dirnames* " "適當地移除目錄。" -#: ../../library/pathlib.rst:1241 +#: ../../library/pathlib.rst:1206 msgid "" "Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in " "*filenames* if *follow_symlinks* is false." @@ -1142,7 +1121,7 @@ msgstr "" "如果 *follow_symlinks* 是 false,和 :func:`os.walk` 行為不同的是 :meth:`Path." "walk` 會將指向目錄的符號連結放在 *filenames* 串列。" -#: ../../library/pathlib.rst:1244 +#: ../../library/pathlib.rst:1209 msgid "" "This example displays the number of bytes used by all files in each " "directory, while ignoring ``__pycache__`` directories::" @@ -1150,7 +1129,7 @@ msgstr "" "這個範例會顯示在每個目錄裡所有檔案使用的位元組數量,同時間忽略 " "``__pycache__`` 目錄: ::" -#: ../../library/pathlib.rst:1260 +#: ../../library/pathlib.rst:1225 msgid "" "This next example is a simple implementation of :func:`shutil.rmtree`. " "Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow " @@ -1159,7 +1138,58 @@ msgstr "" "下一個範例是 :func:`shutil.rmtree` 的一個簡單的實作方式。由下而上走訪目錄樹是" "必要的,因為 :func:`rmdir` 不允許在目錄為空之前刪除它: ::" -#: ../../library/pathlib.rst:1277 +#: ../../library/pathlib.rst:1242 +#, fuzzy +msgid "Other methods" +msgstr "方法" + +#: ../../library/pathlib.rst:1246 +msgid "" +"Return a new path object representing the current directory (as returned by :" +"func:`os.getcwd`)::" +msgstr "" +"回傳一個代表目前目錄的新的路徑物件(像 :func:`os.getcwd` 回傳的一樣): ::" + +#: ../../library/pathlib.rst:1255 +msgid "" +"Return a new path object representing the user's home directory (as returned " +"by :func:`os.path.expanduser` with ``~`` construct). If the home directory " +"can't be resolved, :exc:`RuntimeError` is raised." +msgstr "" +"回傳一個代表使用者家目錄的新的路徑物件(像以 ``~`` 構成的 :func:`os.path." +"expanduser` 的回傳一樣)。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" + +#: ../../library/pathlib.rst:1269 +msgid "Change the file mode and permissions, like :func:`os.chmod`." +msgstr "修改檔案模式 (file mode) 與權限,像 :func:`os.chmod` 一樣。" + +#: ../../library/pathlib.rst:1271 +msgid "" +"This method normally follows symlinks. Some Unix flavours support changing " +"permissions on the symlink itself; on these platforms you may add the " +"argument ``follow_symlinks=False``, or use :meth:`~Path.lchmod`." +msgstr "" +"此方法通常會跟隨符號連結。一些 Unix 類型支援修改符號連結本身的權限;在這些平" +"台上你可以加上引數 ``follow_symlinks=False`` 或使用 :meth:`~Path.lchmod`。" + +#: ../../library/pathlib.rst:1290 +msgid "" +"Return a new path with expanded ``~`` and ``~user`` constructs, as returned " +"by :meth:`os.path.expanduser`. If a home directory can't be resolved, :exc:" +"`RuntimeError` is raised." +msgstr "" +"回傳一個展開 ``~`` 和 ``~user`` 構成的新路徑,像 :meth:`os.path.expanduser` " +"回傳的一樣。如果無法解析家目錄,會引發 :exc:`RuntimeError`。" + +#: ../../library/pathlib.rst:1305 +msgid "" +"Return the name of the group owning the file. :exc:`KeyError` is raised if " +"the file's gid isn't found in the system database." +msgstr "" +"回傳擁有該檔案的群組名稱。如果在系統資料庫裡找不到檔案的 gid 會引發 :exc:" +"`KeyError`。" + +#: ../../library/pathlib.rst:1311 msgid "" "Like :meth:`Path.chmod` but, if the path points to a symbolic link, the " "symbolic link's mode is changed rather than its target's." @@ -1167,7 +1197,7 @@ msgstr "" "類似 :meth:`Path.chmod`,但如果該路徑指向一個符號連結,則符號連結的模式 " "(mode) 會被改變而不是其指向的目標。" -#: ../../library/pathlib.rst:1283 +#: ../../library/pathlib.rst:1317 msgid "" "Create a new directory at this given path. If *mode* is given, it is " "combined with the process' ``umask`` value to determine the file mode and " @@ -1177,7 +1207,7 @@ msgstr "" "``umask`` 值來決定檔案模式與存取旗標 (access flag)。如果路徑已經存在,會引" "發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1288 +#: ../../library/pathlib.rst:1322 msgid "" "If *parents* is true, any missing parents of this path are created as " "needed; they are created with the default permissions without taking *mode* " @@ -1186,7 +1216,7 @@ msgstr "" "如果 *parents* 是 true,則任何缺少的父路徑都會依需要被建立;它們不考慮 " "*mode* 而會以預設的權限來建立(模仿 POSIX 的 ``mkdir -p`` 指令)。" -#: ../../library/pathlib.rst:1292 +#: ../../library/pathlib.rst:1326 msgid "" "If *parents* is false (the default), a missing parent raises :exc:" "`FileNotFoundError`." @@ -1194,7 +1224,7 @@ msgstr "" "如果 *parents* 是 false(預設值),缺少的父路徑會引發 :exc:" "`FileNotFoundError`。" -#: ../../library/pathlib.rst:1295 +#: ../../library/pathlib.rst:1329 msgid "" "If *exist_ok* is false (the default), :exc:`FileExistsError` is raised if " "the target directory already exists." @@ -1202,7 +1232,7 @@ msgstr "" "如果 *exist_ok* 是 false(預設值),則當目標目錄已經存在的話會引發 :exc:" "`FileExistsError`。" -#: ../../library/pathlib.rst:1298 +#: ../../library/pathlib.rst:1332 msgid "" "If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the " "given path already exists in the file system and is not a directory (same " @@ -1211,11 +1241,11 @@ msgstr "" "如果 *exist_ok* 是 true,只有當最後的路徑組成不是一個已存在的非目錄檔案,:" "exc:`FileExistsError` 例外會被忽略(與 POSIX 的 ``mkdir -p`` 指令行為相同)。" -#: ../../library/pathlib.rst:1302 +#: ../../library/pathlib.rst:1336 msgid "The *exist_ok* parameter was added." msgstr "新增 *exist_ok* 參數。" -#: ../../library/pathlib.rst:1308 +#: ../../library/pathlib.rst:1342 msgid "" "Return the name of the user owning the file. :exc:`KeyError` is raised if " "the file's uid isn't found in the system database." @@ -1223,13 +1253,13 @@ msgstr "" "回傳擁有該檔案的用戶名稱。如果在系統資料庫中找不到該檔案的 uid,則會引發 :" "exc:`KeyError`。" -#: ../../library/pathlib.rst:1314 +#: ../../library/pathlib.rst:1348 msgid "" "Return the path to which the symbolic link points (as returned by :func:`os." "readlink`)::" msgstr "回傳符號連結指向的路徑(如 :func:`os.readlink` 的回傳值): ::" -#: ../../library/pathlib.rst:1327 +#: ../../library/pathlib.rst:1361 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. On Unix, if *target* exists and is a file, " @@ -1242,7 +1272,7 @@ msgstr "" "則會在不顯示訊息的情況下進行取代。在 Windows 系統上,若 *target* 存在,則會引" "發 :exc:`FileExistsError` 錯誤。*target* 可以是字串或另一個路徑物件: ::" -#: ../../library/pathlib.rst:1342 ../../library/pathlib.rst:1358 +#: ../../library/pathlib.rst:1376 ../../library/pathlib.rst:1392 msgid "" "The target path may be absolute or relative. Relative paths are interpreted " "relative to the current working directory, *not* the directory of the Path " @@ -1251,17 +1281,17 @@ msgstr "" "目標路徑可以是絕對路徑或相對路徑。相對路徑會相對於當前的工作目錄進行解釋,*而" "不是*\\ 相對於路徑物件所在的目錄。" -#: ../../library/pathlib.rst:1346 +#: ../../library/pathlib.rst:1380 msgid "" "It is implemented in terms of :func:`os.rename` and gives the same " "guarantees." msgstr "此功能是使用 :func:`os.rename` 實現的,並提供相同的保證。" -#: ../../library/pathlib.rst:1348 ../../library/pathlib.rst:1362 +#: ../../library/pathlib.rst:1382 ../../library/pathlib.rst:1396 msgid "Added return value, return the new Path instance." msgstr "新增了回傳值,回傳新的路徑 (Path) 物件。" -#: ../../library/pathlib.rst:1354 +#: ../../library/pathlib.rst:1388 msgid "" "Rename this file or directory to the given *target*, and return a new Path " "instance pointing to *target*. If *target* points to an existing file or " @@ -1270,26 +1300,26 @@ msgstr "" "將此檔案或目錄重新命名為給定的 *target*,並回傳一個指向 *target* 的新路徑物" "件。如果 *target* 指向一個現有的檔案或空目錄,它將被無條件地取代。" -#: ../../library/pathlib.rst:1368 +#: ../../library/pathlib.rst:1402 msgid "" "Make the path absolute, without normalization or resolving symlinks. Returns " "a new path object::" msgstr "" "將路徑轉換為絕對路徑,不進行標準化或解析符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1380 +#: ../../library/pathlib.rst:1414 msgid "" "Make the path absolute, resolving any symlinks. A new path object is " "returned::" msgstr "將路徑轉換為絕對路徑,解析所有符號連結。回傳一個新的路徑物件: ::" -#: ../../library/pathlib.rst:1389 +#: ../../library/pathlib.rst:1423 msgid "" "\"``..``\" components are also eliminated (this is the only method to do " "so)::" msgstr "同時也會消除 \"``..``\" 的路徑組成(只有此方法這樣做): ::" -#: ../../library/pathlib.rst:1395 +#: ../../library/pathlib.rst:1429 msgid "" "If the path doesn't exist and *strict* is ``True``, :exc:`FileNotFoundError` " "is raised. If *strict* is ``False``, the path is resolved as far as " @@ -1301,37 +1331,19 @@ msgstr "" "*strict* 為 ``False``,則將盡可能解析該路徑,並將任何剩餘部分追加到路徑中,而" "不檢查其是否存在。如果在解析過程中遇到無窮迴圈,則引發 :exc:`RuntimeError`。" -#: ../../library/pathlib.rst:1401 +#: ../../library/pathlib.rst:1435 msgid "The *strict* parameter was added (pre-3.6 behavior is strict)." msgstr "新增 *strict* 參數(在 3.6 版本之前的行為是嚴格的)。" -#: ../../library/pathlib.rst:1406 -msgid "" -"Glob the given relative *pattern* recursively. This is like calling :func:" -"`Path.glob` with \"``**/``\" added in front of the *pattern*, where " -"*patterns* are the same as for :mod:`fnmatch`::" -msgstr "" -"遞迴地 glob 給定的相對 *pattern*。這相當於在給定的相對 *pattern* 前面加上 " -"\"``**/``\" 並呼叫 :func:`Path.glob`,其中 *patterns* 和給 :mod:`fnmatch` 的" -"相同: ::" - -#: ../../library/pathlib.rst:1422 -msgid "" -"Raises an :ref:`auditing event ` ``pathlib.Path.rglob`` with " -"arguments ``self``, ``pattern``." -msgstr "" -"引發一個附帶引數 ``self``、``pattern`` 的\\ :ref:`稽核事件 ` " -"``pathlib.Path.rglob``。" - -#: ../../library/pathlib.rst:1434 +#: ../../library/pathlib.rst:1441 msgid "Remove this directory. The directory must be empty." msgstr "移除此目錄。該目錄必須為空。" -#: ../../library/pathlib.rst:1439 +#: ../../library/pathlib.rst:1446 msgid "Make this path a symbolic link pointing to *target*." msgstr "使這個路徑成為一個指向 *target* 的符號連結。" -#: ../../library/pathlib.rst:1441 +#: ../../library/pathlib.rst:1448 msgid "" "On Windows, a symlink represents either a file or a directory, and does not " "morph to the target dynamically. If the target is present, the type of the " @@ -1345,21 +1357,21 @@ msgstr "" "*target_is_directory* 是 ``True``,該符號連結會被建立成目錄,如果不是則建立成" "檔案(預設值)。在非 Windows 平台上,*target_is_directory* 會被忽略。" -#: ../../library/pathlib.rst:1459 +#: ../../library/pathlib.rst:1466 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.symlink`'s." msgstr "引數的順序 (link, target) 和 :func:`os.symlink` 相反。" -#: ../../library/pathlib.rst:1464 +#: ../../library/pathlib.rst:1471 msgid "Make this path a hard link to the same file as *target*." msgstr "使這個路徑成為與 *target* 相同檔案的一個硬連結 (hard link)。" -#: ../../library/pathlib.rst:1467 +#: ../../library/pathlib.rst:1474 msgid "" "The order of arguments (link, target) is the reverse of :func:`os.link`'s." msgstr "引數的順序 (link, target) 和 :func:`os.link` 相反。" -#: ../../library/pathlib.rst:1475 +#: ../../library/pathlib.rst:1482 msgid "" "Create a file at this given path. If *mode* is given, it is combined with " "the process' ``umask`` value to determine the file mode and access flags. " @@ -1371,13 +1383,13 @@ msgstr "" "合,以確定檔案模式和存取旗標。當檔案已經存在時,若 *exist_ok* 為 true 則函式" "不會失敗(其變更時間會被更新為當下時間),否則會引發 :exc:`FileExistsError`。" -#: ../../library/pathlib.rst:1484 +#: ../../library/pathlib.rst:1491 msgid "" "Remove this file or symbolic link. If the path points to a directory, use :" "func:`Path.rmdir` instead." msgstr "移除這個檔案或符號連結。如果路徑指向目錄,請改用 :func:`Path.rmdir`。" -#: ../../library/pathlib.rst:1487 +#: ../../library/pathlib.rst:1494 msgid "" "If *missing_ok* is false (the default), :exc:`FileNotFoundError` is raised " "if the path does not exist." @@ -1385,7 +1397,7 @@ msgstr "" "如果 *missing_ok* 是 false(預設值),:exc:`FileNotFoundError` 會在路徑不存在" "時被引發。" -#: ../../library/pathlib.rst:1490 +#: ../../library/pathlib.rst:1497 msgid "" "If *missing_ok* is true, :exc:`FileNotFoundError` exceptions will be ignored " "(same behavior as the POSIX ``rm -f`` command)." @@ -1393,15 +1405,15 @@ msgstr "" "如果 *missing_ok* 是 true,:exc:`FileNotFoundError` 例外會被忽略(行為與 " "POSIX ``rm -f`` 指令相同)。" -#: ../../library/pathlib.rst:1493 +#: ../../library/pathlib.rst:1500 msgid "The *missing_ok* parameter was added." msgstr "新增 *missing_ok* 參數。" -#: ../../library/pathlib.rst:1498 +#: ../../library/pathlib.rst:1505 msgid "Correspondence to tools in the :mod:`os` module" msgstr "與 :mod:`os` 模組裡的工具的對應關係" -#: ../../library/pathlib.rst:1500 +#: ../../library/pathlib.rst:1507 msgid "" "Below is a table mapping various :mod:`os` functions to their corresponding :" "class:`PurePath`/:class:`Path` equivalent." @@ -1409,7 +1421,7 @@ msgstr "" "以下是一張表格,對應許多 :mod:`os` 函式及其相符於 :class:`PurePath`/:class:" "`Path` 的項目。" -#: ../../library/pathlib.rst:1505 +#: ../../library/pathlib.rst:1512 msgid "" "Not all pairs of functions/methods below are equivalent. Some of them, " "despite having some overlapping use-cases, have different semantics. They " @@ -1420,239 +1432,239 @@ msgstr "" "意。它們包含 :func:`os.path.abspath` 和 :meth:`Path.absolute`、:func:`os." "path.relpath` 和 :meth:`PurePath.relative_to`。" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1518 msgid ":mod:`os` and :mod:`os.path`" msgstr ":mod:`os` 和 :mod:`os.path`" -#: ../../library/pathlib.rst:1511 +#: ../../library/pathlib.rst:1518 msgid ":mod:`pathlib`" msgstr ":mod:`pathlib`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1520 msgid ":func:`os.path.abspath`" msgstr ":func:`os.path.abspath`" -#: ../../library/pathlib.rst:1513 +#: ../../library/pathlib.rst:1520 msgid ":meth:`Path.absolute` [#]_" msgstr ":meth:`Path.absolute` [#]_" -#: ../../library/pathlib.rst:1514 +#: ../../library/pathlib.rst:1521 msgid ":func:`os.path.realpath`" msgstr ":func:`os.path.realpath`" -#: ../../library/pathlib.rst:1514 +#: ../../library/pathlib.rst:1521 msgid ":meth:`Path.resolve`" msgstr ":meth:`Path.resolve`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1522 msgid ":func:`os.chmod`" msgstr ":func:`os.chmod`" -#: ../../library/pathlib.rst:1515 +#: ../../library/pathlib.rst:1522 msgid ":meth:`Path.chmod`" msgstr ":meth:`Path.chmod`" -#: ../../library/pathlib.rst:1516 +#: ../../library/pathlib.rst:1523 msgid ":func:`os.mkdir`" msgstr ":func:`os.mkdir`" -#: ../../library/pathlib.rst:1516 ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1523 ../../library/pathlib.rst:1524 msgid ":meth:`Path.mkdir`" msgstr ":meth:`Path.mkdir`" -#: ../../library/pathlib.rst:1517 +#: ../../library/pathlib.rst:1524 msgid ":func:`os.makedirs`" msgstr ":func:`os.makedirs`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1525 msgid ":func:`os.rename`" msgstr ":func:`os.rename`" -#: ../../library/pathlib.rst:1518 +#: ../../library/pathlib.rst:1525 msgid ":meth:`Path.rename`" msgstr ":meth:`Path.rename`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1526 msgid ":func:`os.replace`" msgstr ":func:`os.replace`" -#: ../../library/pathlib.rst:1519 +#: ../../library/pathlib.rst:1526 msgid ":meth:`Path.replace`" msgstr ":meth:`Path.replace`" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1527 msgid ":func:`os.rmdir`" msgstr ":func:`os.rmdir`" -#: ../../library/pathlib.rst:1520 +#: ../../library/pathlib.rst:1527 msgid ":meth:`Path.rmdir`" msgstr ":meth:`Path.rmdir`" -#: ../../library/pathlib.rst:1521 +#: ../../library/pathlib.rst:1528 msgid ":func:`os.remove`, :func:`os.unlink`" msgstr ":func:`os.remove`、:func:`os.unlink`" -#: ../../library/pathlib.rst:1521 +#: ../../library/pathlib.rst:1528 msgid ":meth:`Path.unlink`" msgstr ":meth:`Path.unlink`" -#: ../../library/pathlib.rst:1522 +#: ../../library/pathlib.rst:1529 msgid ":func:`os.getcwd`" msgstr ":func:`os.getcwd`" -#: ../../library/pathlib.rst:1522 +#: ../../library/pathlib.rst:1529 msgid ":func:`Path.cwd`" msgstr ":func:`Path.cwd`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1530 msgid ":func:`os.path.exists`" msgstr ":func:`os.path.exists`" -#: ../../library/pathlib.rst:1523 +#: ../../library/pathlib.rst:1530 msgid ":meth:`Path.exists`" msgstr ":meth:`Path.exists`" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1531 msgid ":func:`os.path.expanduser`" msgstr ":func:`os.path.expanduser`" -#: ../../library/pathlib.rst:1524 +#: ../../library/pathlib.rst:1531 msgid ":meth:`Path.expanduser` and :meth:`Path.home`" msgstr ":meth:`Path.expanduser` 和 :meth:`Path.home`" -#: ../../library/pathlib.rst:1526 +#: ../../library/pathlib.rst:1533 msgid ":func:`os.listdir`" msgstr ":func:`os.listdir`" -#: ../../library/pathlib.rst:1526 +#: ../../library/pathlib.rst:1533 msgid ":meth:`Path.iterdir`" msgstr ":meth:`Path.iterdir`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1534 msgid ":func:`os.walk`" msgstr ":func:`os.walk`" -#: ../../library/pathlib.rst:1527 +#: ../../library/pathlib.rst:1534 msgid ":meth:`Path.walk`" msgstr ":meth:`Path.walk`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1535 msgid ":func:`os.path.isdir`" msgstr ":func:`os.path.isdir`" -#: ../../library/pathlib.rst:1528 +#: ../../library/pathlib.rst:1535 msgid ":meth:`Path.is_dir`" msgstr ":meth:`Path.is_dir`" -#: ../../library/pathlib.rst:1529 +#: ../../library/pathlib.rst:1536 msgid ":func:`os.path.isfile`" msgstr ":func:`os.path.isfile`" -#: ../../library/pathlib.rst:1529 +#: ../../library/pathlib.rst:1536 msgid ":meth:`Path.is_file`" msgstr ":meth:`Path.is_file`" -#: ../../library/pathlib.rst:1530 +#: ../../library/pathlib.rst:1537 msgid ":func:`os.path.islink`" msgstr ":func:`os.path.islink`" -#: ../../library/pathlib.rst:1530 +#: ../../library/pathlib.rst:1537 msgid ":meth:`Path.is_symlink`" msgstr ":meth:`Path.is_symlink`" -#: ../../library/pathlib.rst:1531 +#: ../../library/pathlib.rst:1538 msgid ":func:`os.link`" msgstr ":func:`os.link`" -#: ../../library/pathlib.rst:1531 +#: ../../library/pathlib.rst:1538 msgid ":meth:`Path.hardlink_to`" msgstr ":meth:`Path.hardlink_to`" -#: ../../library/pathlib.rst:1532 +#: ../../library/pathlib.rst:1539 msgid ":func:`os.symlink`" msgstr ":func:`os.symlink`" -#: ../../library/pathlib.rst:1532 +#: ../../library/pathlib.rst:1539 msgid ":meth:`Path.symlink_to`" msgstr ":meth:`Path.symlink_to`" -#: ../../library/pathlib.rst:1533 +#: ../../library/pathlib.rst:1540 msgid ":func:`os.readlink`" msgstr ":func:`os.readlink`" -#: ../../library/pathlib.rst:1533 +#: ../../library/pathlib.rst:1540 msgid ":meth:`Path.readlink`" msgstr ":meth:`Path.readlink`" -#: ../../library/pathlib.rst:1534 +#: ../../library/pathlib.rst:1541 msgid ":func:`os.path.relpath`" msgstr ":func:`os.path.relpath`" -#: ../../library/pathlib.rst:1534 +#: ../../library/pathlib.rst:1541 msgid ":meth:`PurePath.relative_to` [#]_" msgstr ":meth:`PurePath.relative_to` [#]_" -#: ../../library/pathlib.rst:1535 +#: ../../library/pathlib.rst:1542 msgid ":func:`os.stat`" msgstr ":func:`os.stat`" -#: ../../library/pathlib.rst:1535 +#: ../../library/pathlib.rst:1542 msgid ":meth:`Path.stat`, :meth:`Path.owner`, :meth:`Path.group`" msgstr ":meth:`Path.stat`、:meth:`Path.owner`、:meth:`Path.group`" -#: ../../library/pathlib.rst:1538 +#: ../../library/pathlib.rst:1545 msgid ":func:`os.path.isabs`" msgstr ":func:`os.path.isabs`" -#: ../../library/pathlib.rst:1538 +#: ../../library/pathlib.rst:1545 msgid ":meth:`PurePath.is_absolute`" msgstr ":meth:`PurePath.is_absolute`" -#: ../../library/pathlib.rst:1539 +#: ../../library/pathlib.rst:1546 msgid ":func:`os.path.join`" msgstr ":func:`os.path.join`" -#: ../../library/pathlib.rst:1539 +#: ../../library/pathlib.rst:1546 msgid ":func:`PurePath.joinpath`" msgstr ":func:`PurePath.joinpath`" -#: ../../library/pathlib.rst:1540 +#: ../../library/pathlib.rst:1547 msgid ":func:`os.path.basename`" msgstr ":func:`os.path.basename`" -#: ../../library/pathlib.rst:1540 +#: ../../library/pathlib.rst:1547 msgid ":attr:`PurePath.name`" msgstr ":attr:`PurePath.name`" -#: ../../library/pathlib.rst:1541 +#: ../../library/pathlib.rst:1548 msgid ":func:`os.path.dirname`" msgstr ":func:`os.path.dirname`" -#: ../../library/pathlib.rst:1541 +#: ../../library/pathlib.rst:1548 msgid ":attr:`PurePath.parent`" msgstr ":attr:`PurePath.parent`" -#: ../../library/pathlib.rst:1542 +#: ../../library/pathlib.rst:1549 msgid ":func:`os.path.samefile`" msgstr ":func:`os.path.samefile`" -#: ../../library/pathlib.rst:1542 +#: ../../library/pathlib.rst:1549 msgid ":meth:`Path.samefile`" msgstr ":meth:`Path.samefile`" -#: ../../library/pathlib.rst:1543 +#: ../../library/pathlib.rst:1550 msgid ":func:`os.path.splitext`" msgstr ":func:`os.path.splitext`" -#: ../../library/pathlib.rst:1543 +#: ../../library/pathlib.rst:1550 msgid ":attr:`PurePath.stem` and :attr:`PurePath.suffix`" msgstr ":attr:`PurePath.stem` 和 :attr:`PurePath.suffix`" -#: ../../library/pathlib.rst:1548 +#: ../../library/pathlib.rst:1555 msgid "Footnotes" msgstr "註解" -#: ../../library/pathlib.rst:1549 +#: ../../library/pathlib.rst:1556 msgid "" ":func:`os.path.abspath` normalizes the resulting path, which may change its " "meaning in the presence of symlinks, while :meth:`Path.absolute` does not." @@ -1660,7 +1672,7 @@ msgstr "" ":func:`os.path.abspath` 會標準化產生的路徑,因而當有符號連結的時候會改變其意" "義,但 :meth:`Path.absolute` 不會。" -#: ../../library/pathlib.rst:1550 +#: ../../library/pathlib.rst:1557 msgid "" ":meth:`PurePath.relative_to` requires ``self`` to be the subpath of the " "argument, but :func:`os.path.relpath` does not." diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index d93bb6e41b..10e390065f 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-22 00:03+0000\n" +"POT-Creation-Date: 2024-06-08 00:03+0000\n" "PO-Revision-Date: 2022-10-05 10:26+0800\n" "Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -326,26 +326,28 @@ msgid "Old string formatting" msgstr "格式化字串的舊方法" #: ../../tutorial/inputoutput.rst:282 +#, fuzzy msgid "" "The % operator (modulo) can also be used for string formatting. Given " -"``'string' % values``, instances of ``%`` in ``string`` are replaced with " -"zero or more elements of ``values``. This operation is commonly known as " -"string interpolation. For example::" +"``format % values`` (where *format* is a string), ``%`` conversion " +"specifications in *format* are replaced with zero or more elements of " +"*values*. This operation is commonly known as string interpolation. For " +"example::" msgstr "" "% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中," "``string`` 中所有的 ``%`` 會被 ``values`` 的零個或多個元素所取代。此運算常被" "稱為字串插值 (string interpolation)。例如: ::" -#: ../../tutorial/inputoutput.rst:291 +#: ../../tutorial/inputoutput.rst:293 msgid "" "More information can be found in the :ref:`old-string-formatting` section." msgstr "更多資訊請見 :ref:`old-string-formatting`\\ 小節。" -#: ../../tutorial/inputoutput.rst:297 +#: ../../tutorial/inputoutput.rst:299 msgid "Reading and Writing Files" msgstr "讀寫檔案" -#: ../../tutorial/inputoutput.rst:303 +#: ../../tutorial/inputoutput.rst:305 msgid "" ":func:`open` returns a :term:`file object`, and is most commonly used with " "two positional arguments and one keyword argument: ``open(filename, mode, " @@ -354,7 +356,7 @@ msgstr "" ":func:`open` 回傳一個 :term:`file object`,而它最常使用的兩個位置引數和一個關" "鍵字引數是:``open(filename, mode, encoding=None)``" -#: ../../tutorial/inputoutput.rst:316 +#: ../../tutorial/inputoutput.rst:318 msgid "" "The first argument is a string containing the filename. The second argument " "is another string containing a few characters describing the way in which " @@ -371,7 +373,7 @@ msgstr "" "內容為目的開啟檔案,任何寫入檔案的資料會自動被加入到檔案的結尾。``'r+'`` 可以" "開啟檔案並進行讀取和寫入。*mode* 引數是選擇性的,若省略時會預設為 ``'r'``。" -#: ../../tutorial/inputoutput.rst:325 +#: ../../tutorial/inputoutput.rst:327 msgid "" "Normally, files are opened in :dfn:`text mode`, that means, you read and " "write strings from and to the file, which are encoded in a specific " @@ -389,7 +391,7 @@ msgstr "" "mode`\\ (二進制模式)開啟檔案,二進制模式資料以 :class:`bytes` 物件的形式被" "讀寫。以二進制模式開啟檔案時不可以指定 *encoding*。" -#: ../../tutorial/inputoutput.rst:335 +#: ../../tutorial/inputoutput.rst:337 msgid "" "In text mode, the default when reading is to convert platform-specific line " "endings (``\\n`` on Unix, ``\\r\\n`` on Windows) to just ``\\n``. When " @@ -405,7 +407,7 @@ msgstr "" "文字檔案來說沒有問題,但會毀壞像是 :file:`JPEG` 或 :file:`EXE` 檔案中的二進制" "資料。在讀寫此類檔案時,注意一定要使用二進制模式。" -#: ../../tutorial/inputoutput.rst:343 +#: ../../tutorial/inputoutput.rst:345 msgid "" "It is good practice to use the :keyword:`with` keyword when dealing with " "file objects. The advantage is that the file is properly closed after its " @@ -417,7 +419,7 @@ msgstr "" "束後,即使在某個時刻引發了例外,檔案仍會正確地被關閉。使用 :keyword:`!with` " "也比寫等效的 :keyword:`try`\\ -\\ :keyword:`finally` 區塊,來得簡短許多: ::" -#: ../../tutorial/inputoutput.rst:356 +#: ../../tutorial/inputoutput.rst:358 msgid "" "If you're not using the :keyword:`with` keyword, then you should call ``f." "close()`` to close the file and immediately free up any system resources " @@ -426,7 +428,7 @@ msgstr "" "如果你沒有使用 :keyword:`with` 關鍵字,則應呼叫 ``f.close()`` 關閉檔案,可以" "立即釋放被它所使用的系統資源。" -#: ../../tutorial/inputoutput.rst:361 +#: ../../tutorial/inputoutput.rst:363 msgid "" "Calling ``f.write()`` without using the :keyword:`!with` keyword or calling " "``f.close()`` **might** result in the arguments of ``f.write()`` not being " @@ -436,7 +438,7 @@ msgstr "" "即使程式成功退出,也\\ **可能**\\ 導致 ``f.write()`` 的引數沒有被完全寫入硬" "碟。" -#: ../../tutorial/inputoutput.rst:369 +#: ../../tutorial/inputoutput.rst:371 msgid "" "After a file object is closed, either by a :keyword:`with` statement or by " "calling ``f.close()``, attempts to use the file object will automatically " @@ -445,17 +447,17 @@ msgstr "" "不論是透過 :keyword:`with` 陳述式,或呼叫 ``f.close()`` 關閉一個檔案物件之" "後,嘗試使用該檔案物件將會自動失效。 ::" -#: ../../tutorial/inputoutput.rst:383 +#: ../../tutorial/inputoutput.rst:385 msgid "Methods of File Objects" msgstr "檔案物件的 method" -#: ../../tutorial/inputoutput.rst:385 +#: ../../tutorial/inputoutput.rst:387 msgid "" "The rest of the examples in this section will assume that a file object " "called ``f`` has already been created." msgstr "本節其餘的範例皆假設一個名為 ``f`` 的檔案物件已被建立。" -#: ../../tutorial/inputoutput.rst:388 +#: ../../tutorial/inputoutput.rst:390 msgid "" "To read a file's contents, call ``f.read(size)``, which reads some quantity " "of data and returns it as a string (in text mode) or bytes object (in binary " @@ -473,7 +475,7 @@ msgstr "" "字模式)或 *size* 數量的位元組串(二進制模式)會被讀取及回傳。如果之前已經到" "達檔案的末端,``f.read()`` 會回傳空字串(``''``)。 ::" -#: ../../tutorial/inputoutput.rst:402 +#: ../../tutorial/inputoutput.rst:404 msgid "" "``f.readline()`` reads a single line from the file; a newline character " "(``\\n``) is left at the end of the string, and is only omitted on the last " @@ -487,7 +489,7 @@ msgstr "" "傳值清晰明確;只要 ``f.readline()`` 回傳一個空字串,就表示已經到達了檔案末" "端,而空白行的表示法是 ``'\\n'``,也就是只含一個換行字元的字串。 ::" -#: ../../tutorial/inputoutput.rst:416 +#: ../../tutorial/inputoutput.rst:418 msgid "" "For reading lines from a file, you can loop over the file object. This is " "memory efficient, fast, and leads to simple code::" @@ -495,7 +497,7 @@ msgstr "" "想從檔案中讀取多行時,可以對檔案物件進行迴圈。這種方法能有效地使用記憶體、快" "速,且程式碼簡潔: ::" -#: ../../tutorial/inputoutput.rst:425 +#: ../../tutorial/inputoutput.rst:427 msgid "" "If you want to read all the lines of a file in a list you can also use " "``list(f)`` or ``f.readlines()``." @@ -503,14 +505,14 @@ msgstr "" "如果你想把一個檔案的所有行讀進一個 list 裡,可以用 ``list(f)`` 或 ``f." "readlines()``。" -#: ../../tutorial/inputoutput.rst:428 +#: ../../tutorial/inputoutput.rst:430 msgid "" "``f.write(string)`` writes the contents of *string* to the file, returning " "the number of characters written. ::" msgstr "" "``f.write(string)`` 把 *string* 的內容寫入檔案,並回傳寫入的字元數。 ::" -#: ../../tutorial/inputoutput.rst:434 +#: ../../tutorial/inputoutput.rst:436 msgid "" "Other types of objects need to be converted -- either to a string (in text " "mode) or a bytes object (in binary mode) -- before writing them::" @@ -518,7 +520,7 @@ msgstr "" "寫入其他類型的物件之前,要先把它們轉換為字串(文字模式)或位元組串物件(二進" "制模式): ::" -#: ../../tutorial/inputoutput.rst:442 +#: ../../tutorial/inputoutput.rst:444 msgid "" "``f.tell()`` returns an integer giving the file object's current position in " "the file represented as number of bytes from the beginning of the file when " @@ -527,7 +529,7 @@ msgstr "" "``f.tell()`` 回傳一個整數,它給出檔案物件在檔案中的當前位置,在二進制模式下表" "示為檔案開始至今的位元組數,在文字模式下表示為一個意義不明的數字。" -#: ../../tutorial/inputoutput.rst:446 +#: ../../tutorial/inputoutput.rst:448 msgid "" "To change the file object's position, use ``f.seek(offset, whence)``. The " "position is computed from adding *offset* to a reference point; the " @@ -542,7 +544,7 @@ msgstr "" "為 0 時,表示使用檔案開頭,1 表示使用當前的檔案位置,2 表示使用檔案末端作為參" "考點。*whence* 可省略,其預設值為 0,即以檔案開頭作為參考點。 ::" -#: ../../tutorial/inputoutput.rst:465 +#: ../../tutorial/inputoutput.rst:467 msgid "" "In text files (those opened without a ``b`` in the mode string), only seeks " "relative to the beginning of the file are allowed (the exception being " @@ -555,7 +557,7 @@ msgstr "" "的值,或是 0,才是有效的 *offset* 值。其他任何 *offset* 值都會產生未定義的行" "為。" -#: ../../tutorial/inputoutput.rst:471 +#: ../../tutorial/inputoutput.rst:473 msgid "" "File objects have some additional methods, such as :meth:`~io.IOBase.isatty` " "and :meth:`~io.IOBase.truncate` which are less frequently used; consult the " @@ -564,11 +566,11 @@ msgstr "" "檔案物件還有一些附加的 method,像是較不常使用的 :meth:`~io.IOBase.isatty` " "和 :meth:`~io.IOBase.truncate`;檔案物件的完整指南詳見程式庫參考手冊。" -#: ../../tutorial/inputoutput.rst:479 +#: ../../tutorial/inputoutput.rst:481 msgid "Saving structured data with :mod:`json`" msgstr "使用 :mod:`json` 儲存結構化資料" -#: ../../tutorial/inputoutput.rst:483 +#: ../../tutorial/inputoutput.rst:485 msgid "" "Strings can easily be written to and read from a file. Numbers take a bit " "more effort, since the :meth:`~io.TextIOBase.read` method only returns " @@ -583,7 +585,7 @@ msgstr "" "dictionary(字典)等複雜的資料類型時,手動剖析 (parsing) 和序列化 " "(serializing) 就變得複雜。" -#: ../../tutorial/inputoutput.rst:490 +#: ../../tutorial/inputoutput.rst:492 msgid "" "Rather than having users constantly writing and debugging code to save " "complicated data types to files, Python allows you to use the popular data " @@ -602,7 +604,7 @@ msgstr "" "則稱為 :dfn:`deserializing`\\ (反序列化)。在序列化和反序列化之間,表示物件" "的字串可以被儲存在檔案或資料中,或通過網路連接發送到遠端的機器。" -#: ../../tutorial/inputoutput.rst:501 +#: ../../tutorial/inputoutput.rst:503 msgid "" "The JSON format is commonly used by modern applications to allow for data " "exchange. Many programmers are already familiar with it, which makes it a " @@ -611,14 +613,14 @@ msgstr "" "JSON 格式經常地使用於現代應用程式的資料交換。許多程序設計師早已對它耳熟能詳," "使它成為提升互操作性 (interoperability) 的好選擇。" -#: ../../tutorial/inputoutput.rst:505 +#: ../../tutorial/inputoutput.rst:507 msgid "" "If you have an object ``x``, you can view its JSON string representation " "with a simple line of code::" msgstr "" "如果你有一個物件 ``x``,只需一行簡單的程式碼即可檢視它的 JSON 字串表示法: ::" -#: ../../tutorial/inputoutput.rst:513 +#: ../../tutorial/inputoutput.rst:515 msgid "" "Another variant of the :func:`~json.dumps` function, called :func:`~json." "dump`, simply serializes the object to a :term:`text file`. So if ``f`` is " @@ -628,7 +630,7 @@ msgstr "" "列化為 :term:`text file`。因此,如果 ``f`` 是一個為了寫入而開啟的 :term:" "`text file` 物件,我們可以這樣做: ::" -#: ../../tutorial/inputoutput.rst:519 +#: ../../tutorial/inputoutput.rst:521 msgid "" "To decode the object again, if ``f`` is a :term:`binary file` or :term:`text " "file` object which has been opened for reading::" @@ -636,7 +638,7 @@ msgstr "" "若 ``f`` 是一個已開啟、可讀取的 :term:`binary file` 或 :term:`text file` 物" "件,要再次解碼物件的話: ::" -#: ../../tutorial/inputoutput.rst:525 +#: ../../tutorial/inputoutput.rst:527 msgid "" "JSON files must be encoded in UTF-8. Use ``encoding=\"utf-8\"`` when opening " "JSON file as a :term:`text file` for both of reading and writing." @@ -644,7 +646,7 @@ msgstr "" "JSON 檔案必須以 UTF-8 格式編碼。在開啟 JSON 檔案以作為一個可讀取與寫入的 :" "term:`text file` 時,要用 ``encoding=\"utf-8\"``。" -#: ../../tutorial/inputoutput.rst:528 +#: ../../tutorial/inputoutput.rst:530 msgid "" "This simple serialization technique can handle lists and dictionaries, but " "serializing arbitrary class instances in JSON requires a bit of extra " @@ -655,11 +657,11 @@ msgstr "" "class(類別)實例,則需要一些額外的工作。:mod:`json` 模組的參考資料包含對此的" "說明。" -#: ../../tutorial/inputoutput.rst:534 +#: ../../tutorial/inputoutput.rst:536 msgid ":mod:`pickle` - the pickle module" msgstr ":mod:`pickle` - pickle 模組" -#: ../../tutorial/inputoutput.rst:536 +#: ../../tutorial/inputoutput.rst:538 msgid "" "Contrary to :ref:`JSON `, *pickle* is a protocol which allows the " "serialization of arbitrarily complex Python objects. As such, it is " @@ -673,26 +675,26 @@ msgstr "" "通。在預設情況,它也是不安全的:如果資料是由手段高明的攻擊者精心設計,將這段" "來自於不受信任來源的 pickle 資料反序列化,可以執行任意的程式碼。" -#: ../../tutorial/inputoutput.rst:299 +#: ../../tutorial/inputoutput.rst:301 msgid "built-in function" msgstr "built-in function(內建函式)" -#: ../../tutorial/inputoutput.rst:299 +#: ../../tutorial/inputoutput.rst:301 msgid "open" msgstr "open" -#: ../../tutorial/inputoutput.rst:299 +#: ../../tutorial/inputoutput.rst:301 msgid "object" msgstr "object(物件)" -#: ../../tutorial/inputoutput.rst:299 +#: ../../tutorial/inputoutput.rst:301 msgid "file" msgstr "file(檔案)" -#: ../../tutorial/inputoutput.rst:481 +#: ../../tutorial/inputoutput.rst:483 msgid "module" msgstr "module(模組)" -#: ../../tutorial/inputoutput.rst:481 +#: ../../tutorial/inputoutput.rst:483 msgid "json" msgstr "json" From cc4801436845914829f3615c3e08942d0b66ed5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 9 Jun 2024 00:05:56 +0000 Subject: [PATCH 12/13] sync with cpython b134f475 --- library/email.header.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/email.header.po b/library/email.header.po index da16ba5188..8ba9cf3024 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-05-09 00:03+0000\n" +"POT-Creation-Date: 2024-06-09 00:04+0000\n" "PO-Revision-Date: 2018-05-23 14:44+0000\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" @@ -116,7 +116,7 @@ msgid "" "The maximum line length can be specified explicitly via *maxlinelen*. For " "splitting the first line to a shorter value (to account for the field header " "which isn't included in *s*, e.g. :mailheader:`Subject`) pass in the name of " -"the field in *header_name*. The default *maxlinelen* is 76, and the default " +"the field in *header_name*. The default *maxlinelen* is 78, and the default " "value for *header_name* is ``None``, meaning it is not taken into account " "for the first line of a long, split header." msgstr "" From 57d7efca8f11bdbf305829173b9ff7eb97f181e0 Mon Sep 17 00:00:00 2001 From: Matt Wang Date: Sun, 9 Jun 2024 14:57:55 +0800 Subject: [PATCH 13/13] fix: resolve fuzzy entries --- .scripts/poetry.lock | 12 +- bugs.po | 8 +- c-api/apiabiversion.po | 20 +- c-api/arg.po | 3 +- c-api/bytearray.po | 2 +- c-api/call.po | 9 +- c-api/contextvars.po | 2 +- c-api/coro.po | 6 +- c-api/descriptor.po | 3 +- c-api/dict.po | 5 +- c-api/exceptions.po | 5 +- c-api/file.po | 4 +- c-api/import.po | 2 +- c-api/init.po | 2 +- c-api/init_config.po | 31 +- c-api/intro.po | 16 +- c-api/module.po | 7 +- c-api/reflection.po | 2 +- c-api/typehints.po | 5 +- extending/extending.po | 5 +- extending/index.po | 16 +- extending/newtypes.po | 10 +- faq/design.po | 127 ++------- faq/extending.po | 2 +- faq/general.po | 18 +- faq/gui.po | 3 +- faq/library.po | 4 +- faq/programming.po | 460 +++++++----------------------- faq/windows.po | 8 +- glossary.po | 51 ++-- howto/annotations.po | 6 +- howto/functional.po | 5 +- howto/logging.po | 5 +- howto/sockets.po | 17 +- howto/sorting.po | 8 +- howto/urllib2.po | 2 +- installing/index.po | 35 +-- library/argparse.po | 5 +- library/array.po | 2 +- library/asyncio-api-index.po | 8 +- library/asyncio-dev.po | 54 +--- library/asyncio-future.po | 56 ++-- library/asyncio-llapi-index.po | 2 +- library/asyncio-platforms.po | 18 +- library/asyncio-protocol.po | 4 +- library/asyncio-queue.po | 33 ++- library/asyncio-runner.po | 5 +- library/asyncio-subprocess.po | 6 +- library/asyncio-sync.po | 81 +++--- library/asyncio-task.po | 10 +- library/base64.po | 3 +- library/builtins.po | 10 +- library/cmath.po | 8 +- library/collections.po | 177 +++++------- library/compileall.po | 4 +- library/concurrent.futures.po | 15 +- library/contextlib.po | 25 +- library/contextvars.po | 7 +- library/copy.po | 8 +- library/crypto.po | 2 +- library/csv.po | 6 +- library/ctypes.po | 5 +- library/datetime.po | 43 +-- library/dialog.po | 2 +- library/difflib.po | 12 +- library/doctest.po | 5 +- library/email.compat32-message.po | 5 +- library/email.generator.po | 2 +- library/email.header.po | 7 +- library/email.headerregistry.po | 5 +- library/email.message.po | 5 +- library/email.mime.po | 18 +- library/email.policy.po | 2 +- library/ensurepip.po | 9 +- library/enum.po | 2 +- library/fcntl.po | 5 +- library/fileinput.po | 2 +- library/functions.po | 156 +++------- library/functools.po | 10 +- library/gc.po | 8 +- library/getpass.po | 5 +- library/gettext.po | 7 +- library/glob.po | 2 +- library/graphlib.po | 19 +- library/hashlib.po | 2 +- library/hmac.po | 20 +- library/html.parser.po | 42 +-- library/http.client.po | 4 +- library/http.cookiejar.po | 2 +- library/http.po | 5 +- library/imaplib.po | 5 +- library/imghdr.po | 5 +- library/intro.po | 4 +- library/io.po | 37 +-- library/itertools.po | 17 +- library/json.po | 12 +- library/linecache.po | 5 +- library/locale.po | 5 +- library/logging.config.po | 5 +- library/logging.handlers.po | 2 +- library/logging.po | 2 +- library/marshal.po | 18 +- library/mimetypes.po | 5 +- library/multiprocessing.po | 12 +- library/nntplib.po | 2 +- library/numbers.po | 21 +- library/operator.po | 31 +- library/optparse.po | 17 +- library/os.po | 14 +- library/ossaudiodev.po | 10 +- library/pathlib.po | 15 +- library/pipes.po | 7 +- library/pkgutil.po | 5 +- library/platform.po | 12 +- library/posix.po | 9 +- library/queue.po | 9 +- library/random.po | 4 +- library/re.po | 12 +- library/resource.po | 5 +- library/rlcompleter.po | 5 +- library/sched.po | 5 +- library/shutil.po | 2 +- library/signal.po | 12 +- library/smtplib.po | 2 +- library/socket.po | 14 +- library/ssl.po | 21 +- library/stat.po | 5 +- library/stdtypes.po | 31 +- library/string.po | 5 +- library/sunau.po | 24 +- library/symtable.po | 5 +- library/sys.po | 12 +- library/sysconfig.po | 5 +- library/syslog.po | 5 +- library/tempfile.po | 9 +- library/textwrap.po | 5 +- library/threading.po | 10 +- library/time.po | 12 +- library/tkinter.po | 10 +- library/tokenize.po | 5 +- library/tomllib.po | 4 +- library/tracemalloc.po | 18 +- library/turtle.po | 2 +- library/typing.po | 24 +- library/unittest.mock-examples.po | 2 +- library/unittest.mock.po | 36 ++- library/unittest.po | 86 ++---- library/urllib.request.po | 47 ++- library/urllib.robotparser.po | 13 +- library/uu.po | 2 +- library/uuid.po | 9 +- library/venv.po | 2 +- library/webbrowser.po | 5 +- library/winsound.po | 5 +- library/wsgiref.po | 5 +- library/xml.dom.pulldom.po | 5 +- library/xmlrpc.server.po | 5 +- reference/compound_stmts.po | 26 +- reference/datamodel.po | 6 +- reference/import.po | 2 +- reference/index.po | 2 +- reference/simple_stmts.po | 5 +- tutorial/appendix.po | 12 +- tutorial/appetite.po | 4 +- tutorial/classes.po | 122 +++----- tutorial/controlflow.po | 275 +++++------------- tutorial/errors.po | 8 +- tutorial/floatingpoint.po | 48 +--- tutorial/inputoutput.po | 10 +- tutorial/interactive.po | 22 +- tutorial/interpreter.po | 63 ++-- tutorial/introduction.po | 18 +- tutorial/modules.po | 51 +--- tutorial/stdlib.po | 67 ++--- tutorial/stdlib2.po | 89 ++---- tutorial/venv.po | 1 - using/cmdline.po | 4 +- using/mac.po | 5 +- using/unix.po | 25 +- using/windows.po | 7 +- whatsnew/2.3.po | 12 +- whatsnew/2.4.po | 1 - whatsnew/2.5.po | 6 +- whatsnew/2.6.po | 1 - whatsnew/2.7.po | 26 +- whatsnew/3.0.po | 1 - whatsnew/3.1.po | 1 - whatsnew/3.10.po | 20 +- whatsnew/3.11.po | 48 ++-- whatsnew/3.2.po | 4 +- whatsnew/3.3.po | 21 +- whatsnew/3.4.po | 1 - whatsnew/3.5.po | 18 +- whatsnew/3.6.po | 1 - whatsnew/3.7.po | 8 +- whatsnew/3.8.po | 23 +- whatsnew/3.9.po | 4 +- whatsnew/changelog.po | 1 - whatsnew/index.po | 1 - 199 files changed, 1168 insertions(+), 2569 deletions(-) diff --git a/.scripts/poetry.lock b/.scripts/poetry.lock index b89fa8168a..79717e7837 100644 --- a/.scripts/poetry.lock +++ b/.scripts/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "certifi" -version = "2024.2.2" +version = "2024.6.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, + {file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"}, + {file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"}, ] [[package]] @@ -173,13 +173,13 @@ files = [ [[package]] name = "hstspreload" -version = "2024.5.1" +version = "2024.6.1" description = "Chromium HSTS Preload list as a Python package" optional = false python-versions = ">=3.6" files = [ - {file = "hstspreload-2024.5.1-py3-none-any.whl", hash = "sha256:937520fa094804c2e66cffab7eb33ae543edb2e05db845bcbb4ac578ce7cddb8"}, - {file = "hstspreload-2024.5.1.tar.gz", hash = "sha256:b16c79acc0bd1dc345e4e70c975591ff1ad8ebda3da4356af571b86810c7e0dd"}, + {file = "hstspreload-2024.6.1-py3-none-any.whl", hash = "sha256:561e2382ca0a2faf789709c3e5a6b5f482bfece996fb1963a7cfe5d812e4bd04"}, + {file = "hstspreload-2024.6.1.tar.gz", hash = "sha256:64be485ffe18b83680b2ddf82214937e87e76c458599dde99f2d81459f7be7de"}, ] [[package]] diff --git a/bugs.po b/bugs.po index fdac9fd89b..67de6f1e46 100644 --- a/bugs.po +++ b/bugs.po @@ -59,8 +59,8 @@ msgid "" "tracker>`. If you have a suggestion on how to fix it, include that as well." msgstr "" "如果您在這份說明文件中發現了錯誤並想要幫助我們改進,請將錯誤報告提交到\\ :" -"ref:`追蹤系統 (tracker) `\\ 。如果您有相應的修正建議,請一" -"併提交。(譯者註:如果是繁體中文說明文件翻譯相關的錯誤,請提交到 https://" +"ref:`追蹤系統 (tracker) `。如果您有相應的修正建議,請一併" +"提交。(譯者註:如果是繁體中文說明文件翻譯相關的錯誤,請提交到 https://" "github.com/python/python-docs-zh-tw/issues。)" #: ../../bugs.rst:22 @@ -261,5 +261,5 @@ msgid "" msgstr "" "除了只是回報您所發現的錯誤之外,同樣也歡迎您提交修正它們的修補程式 (patch)。" "您可以在 `Python 開發者指南`_\\ 中找到如何開始修補 Python 的更多資訊。如果您" -"有任何問題,\\ `核心導師郵寄清單`_\\ 是一個友善的地方,您可以在那裡得到,關" -"於 Python 修正錯誤的過程中,所有問題的答案。" +"有任何問題,`核心導師郵寄清單`_\\ 是一個友善的地方,您可以在那裡得到,關於 " +"Python 修正錯誤的過程中,所有問題的答案。" diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index 066e019e9c..62558d43f5 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -36,31 +36,31 @@ msgstr "" #: ../../c-api/apiabiversion.rst:13 msgid "" "See :ref:`stable` for a discussion of API and ABI stability across versions." -msgstr "關於跨版本 API 和 ABI 穩定性的討論,請見 :ref:`stable`\\ 。" +msgstr "關於跨版本 API 和 ABI 穩定性的討論,請見 :ref:`stable`。" #: ../../c-api/apiabiversion.rst:17 msgid "The ``3`` in ``3.4.1a2``." -msgstr "在 ``3.4.1a2`` 中的 ``3``\\ 。" +msgstr "在 ``3.4.1a2`` 中的 ``3``。" #: ../../c-api/apiabiversion.rst:21 msgid "The ``4`` in ``3.4.1a2``." -msgstr "在 ``3.4.1a2`` 中的 ``4``\\ 。" +msgstr "在 ``3.4.1a2`` 中的 ``4``。" #: ../../c-api/apiabiversion.rst:25 msgid "The ``1`` in ``3.4.1a2``." -msgstr "在 ``3.4.1a2`` 中的 ``1``\\ 。" +msgstr "在 ``3.4.1a2`` 中的 ``1``。" #: ../../c-api/apiabiversion.rst:29 msgid "" "The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " "``0xC`` for release candidate or ``0xF`` for final." msgstr "" -"在 ``3.4.1a2`` 中的 ``a``\\ 。\\ ``0xA`` 代表 alpha 版本、\\ ``0xB`` 代表 " -"beta 版本、\\ ``0xC`` 為發布候選版本、\\ ``0xF`` 則為最終版。" +"在 ``3.4.1a2`` 中的 ``a``。``0xA`` 代表 alpha 版本、``0xB`` 代表 beta 版本、" +"``0xC`` 為發布候選版本、``0xF`` 則為最終版。" #: ../../c-api/apiabiversion.rst:35 msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." -msgstr "在 ``3.4.1a2`` 中的 ``2``\\ 。零則為最終發布版本。" +msgstr "在 ``3.4.1a2`` 中的 ``2``。零則為最終發布版本。" #: ../../c-api/apiabiversion.rst:39 msgid "The Python version number encoded in a single integer." @@ -169,8 +169,8 @@ msgid "" "Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " "``0x030a00f0``." msgstr "" -"因此 ``3.4.1a2`` 代表 hexversion ``0x030401a2``\\ 、\\ ``3.10.0`` 代表 " -"hexversion ``0x030a00f0``\\ 。" +"因此 ``3.4.1a2`` 代表 hexversion ``0x030401a2``、``3.10.0`` 代表 hexversion " +"``0x030a00f0``。" #: ../../c-api/apiabiversion.rst:61 msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``." @@ -191,4 +191,4 @@ msgstr "" #: ../../c-api/apiabiversion.rst:73 msgid "All the given macros are defined in :source:`Include/patchlevel.h`." -msgstr "所有提到的巨集都定義在 :source:`Include/patchlevel.h`\\ 。" +msgstr "所有提到的巨集都定義在 :source:`Include/patchlevel.h`。" diff --git a/c-api/arg.po b/c-api/arg.po index e4ce6b4a56..1b009dd683 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -192,8 +192,7 @@ msgstr "" msgid "" "``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" msgstr "" -"``z*``\\ (:class:`str`\\ 、\\ :term:`bytes-like object` 或 ``None``)" -"[Py_buffer]" +"``z*``\\ (:class:`str`、:term:`bytes-like object` 或 ``None``)[Py_buffer]" #: ../../c-api/arg.rst:118 msgid "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index 3c910625df..0ea4c7be73 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -66,7 +66,7 @@ msgid "" "`buffer protocol `." msgstr "" "由任意物件 *o* 回傳一個新的位元組陣列物件,並實作了\\ :ref:`緩衝協議 (buffer " -"protocol) `\\ 。" +"protocol) `。" #: ../../c-api/bytearray.rst:48 msgid "" diff --git a/c-api/call.po b/c-api/call.po index 356c6d6d30..881a5a11ca 100644 --- a/c-api/call.po +++ b/c-api/call.po @@ -39,9 +39,7 @@ msgid "" "callable. The signature of the slot is::" msgstr "" "設定 :c:member:`~PyTypeObject.tp_call` 的類別之實例都是可呼叫的。該擴充槽 " -"(slot) 的簽章為:\n" -"\n" -"::" +"(slot) 的簽章為: ::" #: ../../c-api/call.rst:19 msgid "" @@ -273,10 +271,7 @@ msgstr "Vectorcall 支援 API" msgid "" "Given a vectorcall *nargsf* argument, return the actual number of arguments. " "Currently equivalent to::" -msgstr "" -"給定一個 vectorcall *nargsf* 引數,回傳引數的實際數量。目前等同於:\n" -"\n" -"::" +msgstr "給定一個 vectorcall *nargsf* 引數,回傳引數的實際數量。目前等同於: ::" #: ../../c-api/call.rst:155 msgid "" diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 64f74cd8d0..5dc8f790aa 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -28,7 +28,7 @@ msgstr "" #: ../../c-api/contextvars.rst:26 msgid "See :issue:`34762` for more details." -msgstr "更多細節請見 :issue:`34762`\\ 。" +msgstr "更多細節請見 :issue:`34762`。" #: ../../c-api/contextvars.rst:29 msgid "" diff --git a/c-api/coro.po b/c-api/coro.po index f28ce0295f..5d375aa714 100644 --- a/c-api/coro.po +++ b/c-api/coro.po @@ -45,8 +45,8 @@ msgid "" "Return true if *ob*'s type is :c:type:`PyCoro_Type`; *ob* must not be " "``NULL``. This function always succeeds." msgstr "" -"如果 *ob* 的型別是 :c:type:`PyCoro_Type` 則回傳真值;*ob* 必須不為 " -"``NULL``\\ 。此函式總是會執行成功。" +"如果 *ob* 的型別是 :c:type:`PyCoro_Type` 則回傳真值;*ob* 必須不為 ``NULL``。" +"此函式總是會執行成功。" #: ../../c-api/coro.rst:32 msgid "" @@ -57,4 +57,4 @@ msgid "" msgstr "" "基於 *frame* 物件來建立並回傳一個新的 coroutine 物件,其中 ``__name__`` 和 " "``__qualname__`` 被設為 *name* 和 *qualname*。此函式會取得一個對 *frame* 的參" -"照 (reference)。\\ *frame* 引數必須不為 ``NULL``\\ 。" +"照 (reference)。*frame* 引數必須不為 ``NULL``。" diff --git a/c-api/descriptor.po b/c-api/descriptor.po index 5e0aefbe0f..4a8d94a8d2 100644 --- a/c-api/descriptor.po +++ b/c-api/descriptor.po @@ -45,5 +45,4 @@ msgid "" "object; there is no error checking." msgstr "" "如果 descriptor 物件 *descr* 描述的是一個資料屬性則回傳非零值,或者如果它描述" -"的是一個方法則返回 ``0``\\ 。\\ *descr* 必須為一個 descriptor 物件;沒有錯誤" -"檢查。" +"的是一個方法則返回 ``0``。*descr* 必須為一個 descriptor 物件;沒有錯誤檢查。" diff --git a/c-api/dict.po b/c-api/dict.po index f2083a7490..aa8c1d9f8d 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -198,10 +198,7 @@ msgstr "" #: ../../c-api/dict.rst:179 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../c-api/dict.rst:189 msgid "" diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 3b4dbe2ec6..80bf8b2dbb 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -1462,12 +1462,11 @@ msgstr "" #: ../../c-api/exceptions.rst:1133 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." -msgstr "" -":c:data:`PyExc_StopAsyncIteration` 和 :c:data:`PyExc_RecursionError`\\ 。" +msgstr ":c:data:`PyExc_StopAsyncIteration` 和 :c:data:`PyExc_RecursionError`。" #: ../../c-api/exceptions.rst:1136 msgid ":c:data:`PyExc_ModuleNotFoundError`." -msgstr ":c:data:`PyExc_ModuleNotFoundError`\\ 。" +msgstr ":c:data:`PyExc_ModuleNotFoundError`。" #: ../../c-api/exceptions.rst:1139 msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" diff --git a/c-api/file.po b/c-api/file.po index cd700213b2..e70cc9d24f 100644 --- a/c-api/file.po +++ b/c-api/file.po @@ -180,8 +180,8 @@ msgid "" "Write string *s* to file object *p*. Return ``0`` on success or ``-1`` on " "failure; the appropriate exception will be set." msgstr "" -"寫入字串 *s* 到 檔案物件 *p*\\ 。當成功時回傳 0,而當失敗時回傳 -1,並會設定" -"合適的例外狀況。" +"寫入字串 *s* 到 檔案物件 *p*。當成功時回傳 0,而當失敗時回傳 -1,並會設定合適" +"的例外狀況。" #: ../../c-api/file.rst:8 msgid "object" diff --git a/c-api/import.po b/c-api/import.po index 9ed586449a..fbc29ff313 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -181,7 +181,7 @@ msgstr "" #: ../../c-api/import.rst:152 msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." -msgstr "也請見 :c:func:`PyImport_ExecCodeModuleWithPathnames`\\ 。" +msgstr "也請見 :c:func:`PyImport_ExecCodeModuleWithPathnames`。" #: ../../c-api/import.rst:157 msgid "" diff --git a/c-api/init.po b/c-api/init.po index 646de32363..17b5138a1d 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -1479,7 +1479,7 @@ msgstr "" #: ../../c-api/init.rst:1277 msgid "See also :c:func:`PyEval_GetFrame`." -msgstr "也請見 :c:func:`PyEval_GetFrame`\\ 。" +msgstr "也請見 :c:func:`PyEval_GetFrame`。" #: ../../c-api/init.rst:1279 ../../c-api/init.rst:1288 #: ../../c-api/init.rst:1297 diff --git a/c-api/init_config.po b/c-api/init_config.po index e6d9ab090c..196f80e713 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -207,10 +207,7 @@ msgstr "" #: ../../c-api/init_config.rst:189 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../c-api/init_config.rst:213 msgid "PyPreConfig" @@ -289,11 +286,11 @@ msgstr "" #: ../../c-api/init_config.rst:261 msgid "See :ref:`Memory Management `." -msgstr "請見\\ :ref:`記憶體管理 `\\ 。" +msgstr "請見\\ :ref:`記憶體管理 `。" #: ../../c-api/init_config.rst:263 msgid "Default: ``PYMEM_ALLOCATOR_NOT_SET``." -msgstr "預設:\\ ``PYMEM_ALLOCATOR_NOT_SET``\\ 。" +msgstr "預設:``PYMEM_ALLOCATOR_NOT_SET``。" #: ../../c-api/init_config.rst:267 msgid "Set the LC_CTYPE locale to the user preferred locale." @@ -307,7 +304,7 @@ msgstr "" #: ../../c-api/init_config.rst:272 ../../c-api/init_config.rst:283 msgid "See the :term:`locale encoding`." -msgstr "請見 :term:`locale encoding`\\ 。" +msgstr "請見 :term:`locale encoding`。" #: ../../c-api/init_config.rst:274 ../../c-api/init_config.rst:329 #: ../../c-api/init_config.rst:684 @@ -356,15 +353,15 @@ msgstr "如果不為 0:" #: ../../c-api/init_config.rst:310 msgid "Set :c:member:`PyPreConfig.utf8_mode` to ``0``," -msgstr "將 :c:member:`PyPreConfig.utf8_mode` 設為 ``0``\\ 、" +msgstr "將 :c:member:`PyPreConfig.utf8_mode` 設為 ``0``、" #: ../../c-api/init_config.rst:311 msgid "Set :c:member:`PyConfig.filesystem_encoding` to ``\"mbcs\"``," -msgstr "將 :c:member:`PyConfig.filesystem_encoding` 設為 ``\"mbcs\"``\\ 、" +msgstr "將 :c:member:`PyConfig.filesystem_encoding` 設為 ``\"mbcs\"``、" #: ../../c-api/init_config.rst:312 msgid "Set :c:member:`PyConfig.filesystem_errors` to ``\"replace\"``." -msgstr "將 :c:member:`PyConfig.filesystem_errors` 設為 ``\"replace\"``\\ 。" +msgstr "將 :c:member:`PyConfig.filesystem_errors` 設為 ``\"replace\"``。" #: ../../c-api/init_config.rst:314 msgid "" @@ -387,7 +384,7 @@ msgstr "" #: ../../c-api/init_config.rst:1123 ../../c-api/init_config.rst:1152 #: ../../c-api/init_config.rst:1239 msgid "Default: ``0``." -msgstr "預設:\\ ``0``。" +msgstr "預設:``0``。" #: ../../c-api/init_config.rst:324 msgid "" @@ -685,7 +682,7 @@ msgstr "" #: ../../c-api/init_config.rst:1074 ../../c-api/init_config.rst:1091 #: ../../c-api/init_config.rst:1104 ../../c-api/init_config.rst:1112 msgid "Default: ``NULL``." -msgstr "預設值:\\ ``NULL``\\ 。" +msgstr "預設值:``NULL``。" #: ../../c-api/init_config.rst:560 msgid "See also the :c:member:`~PyConfig.orig_argv` member." @@ -727,7 +724,7 @@ msgstr "" #: ../../c-api/init_config.rst:583 msgid ":data:`sys.base_exec_prefix`." -msgstr ":data:`sys.base_exec_prefix`\\ 。" +msgstr ":data:`sys.base_exec_prefix`。" #: ../../c-api/init_config.rst:587 ../../c-api/init_config.rst:599 #: ../../c-api/init_config.rst:607 ../../c-api/init_config.rst:715 @@ -750,7 +747,7 @@ msgstr "" #: ../../c-api/init_config.rst:603 msgid ":data:`sys.base_prefix`." -msgstr ":data:`sys.base_prefix`\\ 。" +msgstr ":data:`sys.base_prefix`。" #: ../../c-api/init_config.rst:611 msgid "" @@ -771,7 +768,7 @@ msgstr "" #: ../../c-api/init_config.rst:619 ../../c-api/init_config.rst:652 #: ../../c-api/init_config.rst:1140 ../../c-api/init_config.rst:1271 msgid "Default: ``1``." -msgstr "預設值:\\ ``1``\\ 。" +msgstr "預設值:``1``。" #: ../../c-api/init_config.rst:623 msgid "" @@ -837,7 +834,7 @@ msgstr "" #: ../../c-api/init_config.rst:669 msgid "Default: ``L\"default\"``." -msgstr "預設:\\ ``L\"default\"``。" +msgstr "預設:``L\"default\"``。" #: ../../c-api/init_config.rst:671 msgid "See also :pep:`552` \"Deterministic pycs\"." @@ -2119,4 +2116,4 @@ msgid "" msgstr "" #~ msgid "See also :c:member:`PyPreConfig.isolated`." -#~ msgstr "也請見 :c:member:`PyPreConfig.isolated`\\ 。" +#~ msgstr "也請見 :c:member:`PyPreConfig.isolated`。" diff --git a/c-api/intro.po b/c-api/intro.po index 0463eb9446..46d3a7a73a 100644 --- a/c-api/intro.po +++ b/c-api/intro.po @@ -465,7 +465,7 @@ msgstr "" "變數。當一個物件的最後一個\\ :term:`強參照 `\\ 被釋放時(即" "其的參照計數變為零),該物件將被解除配置 (deallocated)。如果它包含對其他物件" "的參照,則它們的參照會被釋放。如果這樣的釋放使得再也沒有任何對於它們的參照," -"則可以依次為那些其他物件解除配置,依此類推。 (此處相互參照物件的存在是個明顯" +"則可以依次為那些其他物件解除配置,依此類推。(此處相互參照物件的存在是個明顯" "的問題;目前,解決方案是「就不要那樣做」。)" #: ../../c-api/intro.rst:331 @@ -653,9 +653,7 @@ msgstr "" "但是在實際操作中你很少會使用這些方法來建立和增加 tuple 和 list。有一個通用函" "式 :c:func:`Py_BuildValue` 可以從 C 值建立最常見的物件,由 :dfn:`format " "string` 引導。例如上面的兩個程式碼可以用以下程式碼替換(它還負責了錯誤檢" -"查):\n" -"\n" -"::" +"查): ::" #: ../../c-api/intro.rst:446 msgid "" @@ -713,9 +711,7 @@ msgid "" "and once using :c:func:`PySequence_GetItem`. ::" msgstr "" "以下是一個範例,說明如何編寫函式來計算一個整數 list 中項目的總和;一次使用 :" -"c:func:`PyList_GetItem`,一次使用 :c:func:`PySequence_GetItem`:\n" -"\n" -"::" +"c:func:`PyList_GetItem`,一次使用 :c:func:`PySequence_GetItem`: ::" #: ../../c-api/intro.rst:561 msgid "Types" @@ -868,9 +864,7 @@ msgid "" msgstr "" "上面的 :c:func:`!sum_sequence` 範例展示了一個檢測例外並將其繼續傳遞的例子。碰" "巧這個例子在檢測到錯誤時不需要清理任何擁有的參照。以下範例函式展示了一些錯誤" -"清理。首先,為了提醒你為什麼喜歡 Python,我們展示了等效的 Python 程式碼:\n" -"\n" -"::" +"清理。首先,為了提醒你為什麼喜歡 Python,我們展示了等效的 Python 程式碼: ::" #: ../../c-api/intro.rst:664 msgid "Here is the corresponding C code, in all its glory::" @@ -961,7 +955,7 @@ msgid "" "in front of the standard path by setting :envvar:`PYTHONPATH`." msgstr "" "例如,如果在 :file:`/usr/local/bin/python` 中找到 Python 可執行檔案,它將假定" -"函式庫位於 :file:`/usr/local/lib/python{X.Y}` 中。 (事實上這個特定的路徑也是" +"函式庫位於 :file:`/usr/local/lib/python{X.Y}` 中。(事實上這個特定的路徑也是" "「後備 (fallback)」位置,當在 :envvar:`PATH` 中找不到名為 :file:`python` 的可" "執行檔案時使用。)使用者可以透過設定環境變數來覆蓋此行為 :envvar:" "`PYTHONHOME`,或者透過設定 :envvar:`PYTHONPATH` 在標準路徑前面插入額外的目" diff --git a/c-api/module.po b/c-api/module.po index e0ceacc0f2..8b7a946404 100644 --- a/c-api/module.po +++ b/c-api/module.po @@ -191,7 +191,7 @@ msgstr "" #: ../../c-api/module.rst:177 msgid "See :PEP:`3121` for more details." -msgstr "更多詳情請見 :pep:`3121`\\ 。" +msgstr "更多詳情請見 :pep:`3121`。" #: ../../c-api/module.rst:181 msgid "" @@ -555,10 +555,7 @@ msgstr "" #: ../../c-api/module.rst:492 ../../c-api/module.rst:541 msgid "Example usage::" -msgstr "" -"用法範例:\n" -"\n" -"::" +msgstr "用法範例: ::" #: ../../c-api/module.rst:506 ../../c-api/module.rst:559 msgid "" diff --git a/c-api/reflection.po b/c-api/reflection.po index 4e79dfcc6d..38e3cc09e9 100644 --- a/c-api/reflection.po +++ b/c-api/reflection.po @@ -48,7 +48,7 @@ msgstr "" #: ../../c-api/reflection.rst:31 msgid "See also :c:func:`PyThreadState_GetFrame`." -msgstr "另請見 :c:func:`PyThreadState_GetFrame`\\ 。" +msgstr "另請見 :c:func:`PyThreadState_GetFrame`。" #: ../../c-api/reflection.rst:36 msgid "" diff --git a/c-api/typehints.po b/c-api/typehints.po index 5c064a160f..a7843a65f7 100644 --- a/c-api/typehints.po +++ b/c-api/typehints.po @@ -59,10 +59,7 @@ msgstr "" #: ../../c-api/typehints.rst:28 msgid "Here's an example of how to make an extension type generic::" -msgstr "" -"以下是個讓一個擴充型別泛用化 (generic) 的例子:\n" -"\n" -"::" +msgstr "以下是個讓一個擴充型別泛用化 (generic) 的例子: ::" #: ../../c-api/typehints.rst:38 msgid "The data model method :meth:`~object.__class_getitem__`." diff --git a/extending/extending.po b/extending/extending.po index 485f4863c9..5d61182de3 100644 --- a/extending/extending.po +++ b/extending/extending.po @@ -663,10 +663,7 @@ msgstr "" #: ../../extending/extending.rst:650 msgid "Some example calls::" -msgstr "" -"一些呼叫範例:\n" -"\n" -"::" +msgstr "一些呼叫範例: ::" #: ../../extending/extending.rst:720 msgid "Keyword Parameters for Extension Functions" diff --git a/extending/index.po b/extending/index.po index 113566b730..50975d87e3 100644 --- a/extending/index.po +++ b/extending/index.po @@ -49,16 +49,15 @@ msgid "" "and written in Python) that give the language its wide application range." msgstr "" "這份說明文件假設您具備 Python 的基礎知識。關於此語言的非正式介紹,請參閱 :" -"ref:`tutorial-index`\\ 。\\ :ref:`reference-index`\\ 給予此語言更為正式的定" -"義。\\ :ref:`library-index` 記錄了賦予此語言廣泛應用範圍的物件型別、函式與" -"(內建的和以 Python 編寫的)模組。" +"ref:`tutorial-index`。:ref:`reference-index`\\ 給予此語言更為正式的定義。:" +"ref:`library-index` 記錄了賦予此語言廣泛應用範圍的物件型別、函式與(內建的和" +"以 Python 編寫的)模組。" #: ../../extending/index.rst:21 msgid "" "For a detailed description of the whole Python/C API, see the separate :ref:" "`c-api-index`." -msgstr "" -"關於完整的 Python/C API 詳細介紹,請參閱另外一份 :ref:`c-api-index`\\ 。" +msgstr "關於完整的 Python/C API 詳細介紹,請參閱另外一份 :ref:`c-api-index`。" #: ../../extending/index.rst:26 msgid "Recommended third party tools" @@ -73,10 +72,9 @@ msgid "" "more sophisticated approaches to creating C and C++ extensions for Python." msgstr "" "這份指南僅涵蓋了此 CPython 版本所提供的、用以建立擴充的基本工具。第三方工具," -"例如 `Cython `_\\ 、\\ `cffi `_\\ 、\\ `SWIG `_ 和 `Numba `_\\ ,提供了更為簡單及更為複雜的多種方法,來為 Python 建立 C 和 C ++ 擴" -"充。" +"例如 `Cython `_、`cffi `_、" +"`SWIG `_ 和 `Numba `_,提供" +"了更為簡單及更為複雜的多種方法,來為 Python 建立 C 和 C ++ 擴充。" #: ../../extending/index.rst:37 msgid "" diff --git a/extending/newtypes.po b/extending/newtypes.po index 870c2b3775..2b2971580d 100644 --- a/extending/newtypes.po +++ b/extending/newtypes.po @@ -176,10 +176,7 @@ msgstr "" #: ../../extending/newtypes.rst:188 msgid "Here is a simple example::" -msgstr "" -"以下是個簡單的範例:\n" -"\n" -"::" +msgstr "以下是個簡單的範例: ::" #: ../../extending/newtypes.rst:200 msgid "Attribute Management" @@ -334,10 +331,7 @@ msgstr "" #: ../../extending/newtypes.rst:329 msgid "Here is an example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../extending/newtypes.rst:345 msgid "" diff --git a/faq/design.po b/faq/design.po index 333c79fcbf..3645b9db97 100644 --- a/faq/design.po +++ b/faq/design.po @@ -51,9 +51,7 @@ msgid "" "programmers will encounter a fragment of code like this::" msgstr "" "因為沒有開始/結束括號,因此剖析器和人類讀者感知到的分組就不存在分歧。偶爾 C " -"語言的程式設計師會遇到這樣的程式碼片段:\n" -"\n" -"::" +"語言的程式設計師會遇到這樣的程式碼片段: ::" #: ../../faq/design.rst:26 msgid "" @@ -63,7 +61,7 @@ msgid "" "decremented even for ``x > y``." msgstr "" "如果條件為真,只有 ``x++`` 陳述式會被執行,但縮排會讓很多人對他有不同的理解。" -"即使是資深的 C 語言開發者有時也會盯著他許久,思考為何即便 ``x > y``\\ ,但 " +"即使是資深的 C 語言開發者有時也會盯著他許久,思考為何即便 ``x > y``,但 " "``y`` 還是減少了。" #: ../../faq/design.rst:31 @@ -108,10 +106,7 @@ msgstr "為何浮點數運算如此不精確?" #: ../../faq/design.rst:56 msgid "Users are often surprised by results like this::" -msgstr "" -"使用者時常對這樣的結果感到驚訝:\n" -"\n" -"::" +msgstr "使用者時常對這樣的結果感到驚訝: ::" #: ../../faq/design.rst:61 msgid "" @@ -142,9 +137,7 @@ msgid "" "expressed exactly in binary floating-point. For example, after::" msgstr "" "很多數字可以簡單地寫成十進位表示,但卻無法簡單地變成二進制表示。比方說,在以" -"下程式碼執行後:\n" -"\n" -"::" +"下程式碼執行後: ::" #: ../../faq/design.rst:77 msgid "" @@ -153,16 +146,11 @@ msgid "" "actual stored value is::" msgstr "" "``x`` 裡的值是一個(很接近)1.2 的估計值,但並非精確地等於 1.2。以一般的電腦" -"來說,他實際儲存的值是:\n" -"\n" -"::" +"來說,他實際儲存的值是: ::" #: ../../faq/design.rst:83 msgid "which is exactly::" -msgstr "" -"而這個值正是:\n" -"\n" -"::" +msgstr "而這個值正是: ::" #: ../../faq/design.rst:87 msgid "" @@ -291,14 +279,11 @@ msgstr "從 Python 3.8 開始,你可以這麼做了!" msgid "" "Assignment expressions using the walrus operator ``:=`` assign a variable in " "an expression::" -msgstr "" -"指派運算式使用海象運算子 ``:=`` 來在運算式中指派變數值:\n" -"\n" -"::" +msgstr "指派運算式使用海象運算子 ``:=`` 來在運算式中指派變數值: ::" #: ../../faq/design.rst:164 msgid "See :pep:`572` for more information." -msgstr "更多資訊請見 :pep:`572`\\ 。" +msgstr "更多資訊請見 :pep:`572`。" #: ../../faq/design.rst:169 msgid "" @@ -361,16 +346,11 @@ msgid "" msgstr "" "自 Python 1.6 之後,字串變得很像其他標準的型別,也在此時,一些可以和字串模組" "的函式有相同功能的方法也被加入。大多數的新方法都被廣泛接受,但有一個方法似乎" -"讓一些程式人員不舒服:\n" -"\n" -"::" +"讓一些程式人員不舒服: ::" #: ../../faq/design.rst:203 msgid "which gives the result::" -msgstr "" -"結果是:\n" -"\n" -"::" +msgstr "結果是: ::" #: ../../faq/design.rst:207 msgid "There are two common arguments against this usage." @@ -397,9 +377,7 @@ msgid "" msgstr "" "第二個反對意見通常是:「我是在叫一個序列把它的成員用一個字串常數連接起來」。" "但很遺憾地,你並不是在這樣做。因為某種原因,把 :meth:`~str.split` 當成字串方" -"法比較簡單,因為這樣我們可以輕易地看到:\n" -"\n" -"::" +"法比較簡單,因為這樣我們可以輕易地看到: ::" #: ../../faq/design.rst:222 msgid "" @@ -433,9 +411,7 @@ msgid "" msgstr "" "如果沒有例外被丟出,一個 :keyword:`try`/:keyword:`except` 區塊是非常有效率" "的。事實上,抓捕例外要付出昂貴的代價。在 Python 2.0 以前,這樣使用是相當常見" -"的:\n" -"\n" -"::" +"的: ::" #: ../../faq/design.rst:246 msgid "" @@ -443,9 +419,7 @@ msgid "" "the time. If that wasn't the case, you coded it like this::" msgstr "" "這只有在你預料這個字典大多數時候都有鍵的時候才合理。如果並非如此,你應該寫" -"成:\n" -"\n" -"::" +"成: ::" #: ../../faq/design.rst:254 msgid "" @@ -475,10 +449,7 @@ msgid "" "For cases where you need to choose from a very large number of " "possibilities, you can create a dictionary mapping case values to functions " "to call. For example::" -msgstr "" -"如果可能性很多,你可以用字典去映射要呼叫的函式。舉例來說:\n" -"\n" -"::" +msgstr "如果可能性很多,你可以用字典去映射要呼叫的函式。舉例來說: ::" #: ../../faq/design.rst:279 msgid "" @@ -486,9 +457,7 @@ msgid "" "func:`getattr` built-in to retrieve methods with a particular name::" msgstr "" "對於呼叫物件裡的方法,你可以利用內建用來找尋特定方法的函式 :func:`getattr` 來" -"做進一步的簡化:\n" -"\n" -"::" +"做進一步的簡化: ::" #: ../../faq/design.rst:291 msgid "" @@ -615,9 +584,7 @@ msgid "" "CPython) will probably run out of file descriptors::" msgstr "" "在一些 Python 實作中,下面這段程式碼(在 CPython 可以正常運作)可能會把檔案描" -"述子 (file descriptor) 用盡:\n" -"\n" -"::" +"述子 (file descriptor) 用盡: ::" #: ../../faq/design.rst:360 msgid "" @@ -638,9 +605,7 @@ msgid "" msgstr "" "如果你希望你的程式碼在任何 Python 實作版本中都可以運作,那你應該清楚地關閉檔" "案或是使用 :keyword:`with` 陳述式,如此一來,不用管記憶體管理的方法,他也會正" -"常運作:\n" -"\n" -"::" +"常運作: ::" #: ../../faq/design.rst:375 msgid "Why doesn't CPython use a more traditional garbage collection scheme?" @@ -850,9 +815,7 @@ msgid "" "construct a new list with the same value it won't be found; e.g.::" msgstr "" "用串列的記憶體位址(物件 id)來雜湊。這不會成功,因為你如果用同樣的值建立一個" -"新的串列,是找不到的。舉例來說:\n" -"\n" -"::" +"新的串列,是找不到的。舉例來說: ::" #: ../../faq/design.rst:486 msgid "" @@ -972,9 +935,7 @@ msgid "" msgstr "" "如果你想要他回傳新的串列,那可以改用內建的 :func:`sorted`。他會用提供的可疊代" "物件 (iterable) 來排序建立新串列,並回傳之。例如,以下這個範例會說明如何有序" -"地疊代字典的鍵:\n" -"\n" -"::" +"地疊代字典的鍵: ::" #: ../../faq/design.rst:564 msgid "How do you specify and enforce an interface spec in Python?" @@ -1087,9 +1048,7 @@ msgid "" msgstr "" "我們也可以用例外來做「結構化的 goto」,這甚至可以跨函式呼叫。很多人覺得例外可" "以方便地模擬在 C、Fortran 和其他語言裡各種合理使用的 ``go`` 和 ``goto``。例" -"如:\n" -"\n" -"::" +"如: ::" #: ../../faq/design.rst:630 msgid "" @@ -1130,17 +1089,12 @@ msgid "" "If you're trying to build Windows pathnames, note that all Windows system " "calls accept forward slashes too::" msgstr "" -"如果你嘗試建立 Windows 的路徑名稱,請注意 Windows 系統指令也接受一般斜線:\n" -"\n" -"::" +"如果你嘗試建立 Windows 的路徑名稱,請注意 Windows 系統指令也接受一般斜線: ::" #: ../../faq/design.rst:653 msgid "" "If you're trying to build a pathname for a DOS command, try e.g. one of ::" -msgstr "" -"如果你嘗試建立 DOS 指令的路徑名稱,試試看使用以下的範例:\n" -"\n" -"::" +msgstr "如果你嘗試建立 DOS 指令的路徑名稱,試試看使用以下的範例: ::" #: ../../faq/design.rst:661 msgid "Why doesn't Python have a \"with\" statement for attribute assignments?" @@ -1153,9 +1107,7 @@ msgid "" "construct that looks like this::" msgstr "" "Python 的 :keyword:`with` 陳述式包裝了一區塊程式的執行,在進入和離開該區塊時" -"執行程式碼。一些語言會有像如下的結構:\n" -"\n" -"::" +"執行程式碼。一些語言會有像如下的結構: ::" #: ../../faq/design.rst:671 msgid "In Python, such a construct would be ambiguous." @@ -1186,10 +1138,7 @@ msgstr "" #: ../../faq/design.rst:684 msgid "For instance, take the following incomplete snippet::" -msgstr "" -"以下列不完整的程式碼為例:\n" -"\n" -"::" +msgstr "以下列不完整的程式碼為例: ::" #: ../../faq/design.rst:690 msgid "" @@ -1211,16 +1160,11 @@ msgid "" "assignment. Instead of::" msgstr "" "然而 :keyword:`with` 陳述式或類似的語言特性(減少程式碼量)的主要好處可以透過" -"賦值來達成。相較於這樣寫:\n" -"\n" -"::" +"賦值來達成。相較於這樣寫: ::" #: ../../faq/design.rst:703 msgid "write this::" -msgstr "" -"應該寫成這樣:\n" -"\n" -"::" +msgstr "應該寫成這樣: ::" #: ../../faq/design.rst:710 msgid "" @@ -1267,16 +1211,11 @@ msgid "" "The colon is required primarily to enhance readability (one of the results " "of the experimental ABC language). Consider this::" msgstr "" -"需要冒號主要是為了增加可讀性(由 ABC 語言的實驗得知)。試想如下範例:\n" -"\n" -"::" +"需要冒號主要是為了增加可讀性(由 ABC 語言的實驗得知)。試想如下範例: ::" #: ../../faq/design.rst:738 msgid "versus ::" -msgstr "" -"以及:\n" -"\n" -"::" +msgstr "以及: ::" #: ../../faq/design.rst:743 msgid "" @@ -1305,10 +1244,7 @@ msgstr "為何 Python 允許在串列和元組末端加上逗號?" msgid "" "Python lets you add a trailing comma at the end of lists, tuples, and " "dictionaries::" -msgstr "" -"Python 允許你在串列、元組和字典的結尾加上逗號:\n" -"\n" -"::" +msgstr "Python 允許你在串列、元組和字典的結尾加上逗號: ::" #: ../../faq/design.rst:765 msgid "There are several reasons to allow this." @@ -1328,10 +1264,7 @@ msgstr "" msgid "" "Accidentally omitting the comma can lead to errors that are hard to " "diagnose. For example::" -msgstr "" -"不小心遺漏了逗號會導致難以發現的錯誤,例如:\n" -"\n" -"::" +msgstr "不小心遺漏了逗號會導致難以發現的錯誤,例如: ::" #: ../../faq/design.rst:782 msgid "" diff --git a/faq/extending.po b/faq/extending.po index bb23c222dc..401085b9b9 100644 --- a/faq/extending.po +++ b/faq/extending.po @@ -340,7 +340,7 @@ msgid "" "fails. (Fixing this requires some ugly shell script hackery, and this bug " "is so minor that it doesn't seem worth the effort.)" msgstr "" -"安裝程式必須以換行符結尾,如果那裡沒有換行符,構建過程將失敗。 (解決這個問題" +"安裝程式必須以換行符結尾,如果那裡沒有換行符,構建過程將失敗。(解決這個問題" "需要一些醜陋的 shell 腳本 hackery,而且這個錯誤很小,似乎不值得付出努力。)" #: ../../faq/extending.rst:224 diff --git a/faq/general.po b/faq/general.po index 05ad154172..2b07fdbcf0 100644 --- a/faq/general.po +++ b/faq/general.po @@ -425,10 +425,10 @@ msgid "" "lang.python` is high-traffic, receiving hundreds of postings every day, and " "Usenet readers are often more able to cope with this volume." msgstr "" -"有一個新聞群組 (newsgroup),\\ :newsgroup:`comp.lang.python`,也有一個郵件討" -"論群 (mailing list),`python-list `_。新聞群組和郵件討論群是彼此相通的——如果你能閱讀新聞,則無需加" -"入郵件討論群。\\ :newsgroup:`comp.lang.python` 的流量很高,每天會收到數百篇文" +"入郵件討論群。:newsgroup:`comp.lang.python` 的流量很高,每天會收到數百篇文" "章,而 Usenet 的讀者通常較能夠處理這樣的文章數量。" #: ../../faq/general.rst:217 @@ -729,9 +729,9 @@ msgid "" "changed. :pep:`5` describes the procedure followed for introducing backward-" "incompatible changes while minimizing disruption for users." msgstr "" -"如果一項功能必須被變更,那麼一定要提供逐步升級的路徑。\\ :pep:`5` 描述了要引" -"進反向不相容 (backward-incompatible) 的變更,同時也要對使用者的擾亂最小化,所" -"需遵循的程序。" +"如果一項功能必須被變更,那麼一定要提供逐步升級的路徑。:pep:`5` 描述了要引進反" +"向不相容 (backward-incompatible) 的變更,同時也要對使用者的擾亂最小化,所需遵" +"循的程序。" #: ../../faq/general.rst:376 msgid "Is Python a good language for beginning programmers?" @@ -805,9 +805,7 @@ msgid "" msgstr "" "Python 的互動式直譯器使學生能夠在程式設計時測試語言的功能。他們可以開著一個運" "行直譯器的視窗,同時在另一個視窗中輸入他們的程式原始碼。如果他們不記得 list" -"(串列)的 method(方法),他們可以像這樣做:\n" -"\n" -"::" +"(串列)的 method(方法),他們可以像這樣做: ::" #: ../../faq/general.rst:436 msgid "" @@ -847,5 +845,5 @@ msgstr "" #~ "See also the documentation for :data:`sys.version`, :data:`sys." #~ "hexversion`, and :data:`sys.version_info`." #~ msgstr "" -#~ "另請參閱 :data:`sys.version`、\\ :data:`sys.hexversion` 和 :data:`sys." +#~ "另請參閱 :data:`sys.version`、:data:`sys.hexversion` 和 :data:`sys." #~ "version_info` 的說明文件。" diff --git a/faq/gui.po b/faq/gui.po index 8526ae7277..c3f53a6d87 100644 --- a/faq/gui.po +++ b/faq/gui.po @@ -50,8 +50,7 @@ msgstr "" "為 :ref:`tkinter `。這可能是最容易安裝(因為它已包含在 Python 的大多" "數\\ `二進制發行版本 `_\\ 中)和使用的。有" "關 Tk 的詳細資訊(包含指向原始碼的指標),請參閱 `Tcl/Tk 首頁 `_\\ 。Tcl/Tk 在 macOS、Windows 和 Unix 平台上是完全可攜 (portable) " -"的。" +"tcl.tk>`_。Tcl/Tk 在 macOS、Windows 和 Unix 平台上是完全可攜 (portable) 的。" #: ../../faq/gui.rst:28 msgid "" diff --git a/faq/library.po b/faq/library.po index e22a9e883d..5044972444 100644 --- a/faq/library.po +++ b/faq/library.po @@ -186,8 +186,8 @@ msgid "" "distribution -- there is no curses module for Windows.)" msgstr "" "對於 Unix 變體:標準 Python 源程式碼分發版在 :source:`Modules` 子目錄中附帶一" -"個 curses 模組,但預設情況下未編譯它。 (請注意,這在 Windows 發行版中不可用" -"——沒有適用於 Windows 的 curses 模組。)" +"個 curses 模組,但預設情況下未編譯它。(請注意,這在 Windows 發行版中不可用——" +"沒有適用於 Windows 的 curses 模組。)" #: ../../faq/library.rst:103 #, fuzzy diff --git a/faq/programming.po b/faq/programming.po index 7e9d70b92a..7b20f672d4 100644 --- a/faq/programming.po +++ b/faq/programming.po @@ -359,9 +359,7 @@ msgid "" "Assume you use a for loop to define a few different lambdas (or even plain " "functions), e.g.::" msgstr "" -"假設你使用 for 循環來定義幾個不同的 lambda(甚至是普通函式),例如:\n" -"\n" -"::" +"假設你使用 for 循環來定義幾個不同的 lambda(甚至是普通函式),例如: ::" #: ../../faq/programming.rst:217 #, fuzzy @@ -373,9 +371,7 @@ msgid "" msgstr "" "這為你提供了一個包含 5 個計算 ``x**2`` 的 lambda 的list。你可能期望,當被呼叫" "時,它們會分別回傳 ``0``、``1``、``4``、``9`` 和 ``16``。然而,當你實際嘗試" -"時,你會發現它們都回傳 ``16``:\n" -"\n" -"::" +"時,你會發現它們都回傳 ``16``: ::" #: ../../faq/programming.rst:227 #, fuzzy @@ -389,9 +385,7 @@ msgstr "" "發生這種情況是因為 ``x`` 不是 lambda 的局部變數,而是在外部作用域中定義的,並" "且在呼叫 lambda 時存取它——而不是在定義時存取它。在循環結束時,``x`` 的值為 " "``4``,因此所有函式現在都回傳 ``4**2``,即 ``16``。你還可以透過更改 ``x`` 的" -"值來驗證這一點,並查看 lambda 運算式的結果如何變化:\n" -"\n" -"::" +"值來驗證這一點,並查看 lambda 運算式的結果如何變化: ::" #: ../../faq/programming.rst:237 #, fuzzy @@ -400,9 +394,7 @@ msgid "" "the lambdas, so that they don't rely on the value of the global ``x``::" msgstr "" "為了避免這種情況,你需要將值保存在 lambda 的局部變數中,這樣它們就不會依賴於" -"全域 ``x`` 的值:\n" -"\n" -"::" +"全域 ``x`` 的值: ::" #: ../../faq/programming.rst:244 #, fuzzy @@ -416,9 +408,7 @@ msgstr "" "在這裡,``n=x`` 建立了一個新變數 ``n`` 局部於 lambda 並在定義 lambda 時計算," "因此它具有與 ``x`` 在循環中的那個點相同的值。這意味著 ``n`` 的值在第一個 " "lambda 中為 ``0`` ,在第二個中為 ``1`` ,在第三個中為 ``2`` ,依此類推。因此" -"每個 lambda 現在將回傳正確的結果:\n" -"\n" -"::" +"每個 lambda 現在將回傳正確的結果: ::" #: ../../faq/programming.rst:255 msgid "" @@ -447,24 +437,15 @@ msgstr "" #: ../../faq/programming.rst:268 msgid "config.py::" -msgstr "" -"config.py:\n" -"\n" -"::" +msgstr "config.py: ::" #: ../../faq/programming.rst:272 msgid "mod.py::" -msgstr "" -"mod.py:\n" -"\n" -"::" +msgstr "mod.py: ::" #: ../../faq/programming.rst:277 msgid "main.py::" -msgstr "" -"main.py:\n" -"\n" -"::" +msgstr "main.py: ::" #: ../../faq/programming.rst:283 #, fuzzy @@ -602,10 +583,7 @@ msgstr "為什麼物件之間共享預設值?" msgid "" "This type of bug commonly bites neophyte programmers. Consider this " "function::" -msgstr "" -"這種型別的錯誤通常會困擾新手程式員。考慮這個功能:\n" -"\n" -"::" +msgstr "這種型別的錯誤通常會困擾新手程式員。考慮這個功能: ::" #: ../../faq/programming.rst:347 #, fuzzy @@ -650,16 +628,11 @@ msgid "" msgstr "" "由於這個特性,不使用可變物件作為預設值是一個很好的編程習慣。相反,使用 " "``None`` 作為預設值並在函式內部檢查參數是否為 ``None`` 並建立一個新的list/字" -"典/無論是否是。例如,不要寫:\n" -"\n" -"::" +"典/無論是否是。例如,不要寫: ::" #: ../../faq/programming.rst:368 msgid "but::" -msgstr "" -"但是:\n" -"\n" -"::" +msgstr "但是: ::" #: ../../faq/programming.rst:374 #, fuzzy @@ -672,9 +645,7 @@ msgid "" msgstr "" "此功能可能很有用。當你有一個計算起來很耗時的函式時,一種常用的技術是快取參數" "和每次呼叫該函式的結果值,並在再次請求相同的值時回傳快取的值。這稱為「記憶" -"化」,可以像這樣實作:\n" -"\n" -"::" +"化」,可以像這樣實作: ::" #: ../../faq/programming.rst:389 #, fuzzy @@ -699,9 +670,7 @@ msgid "" msgstr "" "在函式的引數list中使用``*`` 和``**`` 說明符收集參數;這為你提供了作為元組的位" "置引數和作為字典的關鍵字引數。然後,你可以在使用 ``*`` 和 ``**`` 呼叫另一個函" -"式時傳遞這些引數:\n" -"\n" -"::" +"式時傳遞這些引數: ::" #: ../../faq/programming.rst:415 msgid "What is the difference between arguments and parameters?" @@ -718,9 +687,7 @@ msgid "" msgstr "" ":term:`參數 `\\ 由出現在函式定義中的名稱定義,而\\ :term:`引數 " "`\\ 是呼叫函式時實際傳遞給函式的值。參數定義函式可以接受的\\ :term:" -"引數種類 `。例如,給定函式定義:\n" -"\n" -"::" +"引數種類 `。例如,給定函式定義: ::" #: ../../faq/programming.rst:426 msgid "" @@ -728,9 +695,7 @@ msgid "" "``func``, for example::" msgstr "" "*foo*、*bar* 和 *kwargs* 是 ``func`` 的參數。然而,當呼叫 ``func`` 時,例" -"如:\n" -"\n" -"::" +"如: ::" #: ../../faq/programming.rst:431 msgid "the values ``42``, ``314``, and ``somevar`` are arguments." @@ -742,10 +707,7 @@ msgstr "為什麼更改 list 'y' 也會更改 list 'x'?" #: ../../faq/programming.rst:437 msgid "If you wrote code like::" -msgstr "" -"如果你寫了像這樣的程式碼:\n" -"\n" -"::" +msgstr "如果你寫了像這樣的程式碼: ::" #: ../../faq/programming.rst:447 msgid "" @@ -786,10 +748,7 @@ msgstr "" #: ../../faq/programming.rst:461 #, fuzzy msgid "If we instead assign an immutable object to ``x``::" -msgstr "" -"如果我們改為將不可變物件分配給 ``x``:\n" -"\n" -"::" +msgstr "如果我們改為將不可變物件分配給 ``x``: ::" #: ../../faq/programming.rst:471 #, fuzzy @@ -897,10 +856,7 @@ msgstr "" #: ../../faq/programming.rst:517 #, fuzzy msgid "By returning a tuple of the results::" -msgstr "" -"透過回傳結果的元組:\n" -"\n" -"::" +msgstr "透過回傳結果的元組: ::" #: ../../faq/programming.rst:528 #, fuzzy @@ -916,26 +872,17 @@ msgstr "透過使用全域變數。這不是執行緒安全的,不推薦。" #: ../../faq/programming.rst:532 #, fuzzy msgid "By passing a mutable (changeable in-place) object::" -msgstr "" -"透過傳遞一個可變的(原地可變的)物件:\n" -"\n" -"::" +msgstr "透過傳遞一個可變的(原地可變的)物件: ::" #: ../../faq/programming.rst:543 #, fuzzy msgid "By passing in a dictionary that gets mutated::" -msgstr "" -"透過傳入一個發生變異的字典:\n" -"\n" -"::" +msgstr "透過傳入一個發生變異的字典: ::" #: ../../faq/programming.rst:554 #, fuzzy msgid "Or bundle up values in a class instance::" -msgstr "" -"或者在類別實例中捆綁值:\n" -"\n" -"::" +msgstr "或者在類別實例中捆綁值: ::" #: ../../faq/programming.rst:571 #, fuzzy @@ -961,24 +908,16 @@ msgid "" "scopes::" msgstr "" "你有兩種選擇:可以使用巢狀作用域,也可以使用可呼叫物件。例如,假設你想定義 " -"linear(a,b) ,它回傳一個計算值 a*x+b 的函式 f(x) 。使用嵌套範圍:\n" -"\n" -"::" +"linear(a,b) ,它回傳一個計算值 a*x+b 的函式 f(x) 。使用嵌套範圍: ::" #: ../../faq/programming.rst:588 msgid "Or using a callable object::" -msgstr "" -"或者使用可呼叫物件:\n" -"\n" -"::" +msgstr "或者使用可呼叫物件: ::" #: ../../faq/programming.rst:598 #, fuzzy msgid "In both cases, ::" -msgstr "" -"在這兩種情況下:\n" -"\n" -"::" +msgstr "在這兩種情況下: ::" #: ../../faq/programming.rst:602 #, fuzzy @@ -993,16 +932,11 @@ msgid "" "callables can share their signature via inheritance::" msgstr "" "可呼叫物件方法的缺點是它有點慢並且導致程式碼稍長。但是,請注意,可呼叫集合可" -"以透過繼承共享它們的簽名:\n" -"\n" -"::" +"以透過繼承共享它們的簽名: ::" #: ../../faq/programming.rst:613 msgid "Object can encapsulate state for several methods::" -msgstr "" -"物件可以封裝多個方法的狀態:\n" -"\n" -"::" +msgstr "物件可以封裝多個方法的狀態: ::" #: ../../faq/programming.rst:631 msgid "" @@ -1029,17 +963,11 @@ msgstr "" msgid "" "Some objects can be copied more easily. Dictionaries have a :meth:`~dict." "copy` method::" -msgstr "" -"可以更輕鬆地複製某些物件。字典有一個 :meth:`~dict.copy` 方法:\n" -"\n" -"::" +msgstr "可以更輕鬆地複製某些物件。字典有一個 :meth:`~dict.copy` 方法: ::" #: ../../faq/programming.rst:646 msgid "Sequences can be copied by slicing::" -msgstr "" -"序列可以透過切片 (slicing) 複製:\n" -"\n" -"::" +msgstr "序列可以透過切片 (slicing) 複製: ::" #: ../../faq/programming.rst:652 msgid "How can I find the methods or attributes of an object?" @@ -1069,9 +997,7 @@ msgid "" msgstr "" "一般來說,它不能,因為物件並沒有真正的名字。本質上,賦值總是將名稱綁定到值; " "``def`` 和 ``class`` 陳述式也是如此,但在那種情況下,值是可呼叫的。考慮以下程" -"式碼:\n" -"\n" -"::" +"式碼: ::" #: ../../faq/programming.rst:678 #, fuzzy @@ -1129,10 +1055,7 @@ msgstr "逗號運算子的優先級是怎麼回事?" #: ../../faq/programming.rst:703 #, fuzzy msgid "Comma is not an operator in Python. Consider this session::" -msgstr "" -"逗號不是 Python 中的運算子。考慮這個會話:\n" -"\n" -"::" +msgstr "逗號不是 Python 中的運算子。考慮這個會話: ::" #: ../../faq/programming.rst:708 #, fuzzy @@ -1141,17 +1064,12 @@ msgid "" "above is evaluated as if you had entered::" msgstr "" "由於逗號不是運算子,而是運算式之間的分隔符,因此上面的計算就像你輸入的那" -"樣:\n" -"\n" -"::" +"樣: ::" #: ../../faq/programming.rst:713 #, fuzzy msgid "not::" -msgstr "" -"不是:\n" -"\n" -"::" +msgstr "不是: ::" #: ../../faq/programming.rst:717 #, fuzzy @@ -1169,10 +1087,7 @@ msgstr "是否有等效於 C 的 \"?:\" 三元運算子?" #: ../../faq/programming.rst:724 msgid "Yes, there is. The syntax is as follows::" -msgstr "" -"有的,語法如下:\n" -"\n" -"::" +msgstr "有的,語法如下: ::" #: ../../faq/programming.rst:731 #, fuzzy @@ -1180,9 +1095,7 @@ msgid "" "Before this syntax was introduced in Python 2.5, a common idiom was to use " "logical operators::" msgstr "" -"在 Python 2.5 中引入此語法之前,一個常見的習慣用法是使用邏輯運算子:\n" -"\n" -"::" +"在 Python 2.5 中引入此語法之前,一個常見的習慣用法是使用邏輯運算子: ::" #: ../../faq/programming.rst:736 #, fuzzy @@ -1207,9 +1120,7 @@ msgid "" "Bartelt::" msgstr "" "是的。通常這是透過在 :keyword:`!lambda` 中嵌套 :keyword:`lambda` 來完成的。請" -"參閱以下三個示例,稍微改編自 Ulf Bartelt:\n" -"\n" -"::" +"參閱以下三個示例,稍微改編自 Ulf Bartelt: ::" #: ../../faq/programming.rst:771 msgid "Don't try this at home, kids!" @@ -1232,9 +1143,7 @@ msgid "" msgstr "" "函式引數list中的斜杠表示它前面的參數是位置參數。僅位置參數是沒有外部可用名稱" "的參數。在呼叫接受僅位置參數的函式時,參數僅根據其位置映射到參數。例如,:" -"func:`divmod` 是一個只接受位置參數的函式。它的文檔看起來像這樣:\n" -"\n" -"::" +"func:`divmod` 是一個只接受位置參數的函式。它的文檔看起來像這樣: ::" #: ../../faq/programming.rst:792 #, fuzzy @@ -1244,9 +1153,7 @@ msgid "" "lead to an error::" msgstr "" "參數list末尾的斜杠表示兩個參數都是位置參數。因此,使用關鍵字引數呼叫 :func:" -"`divmod` 會導致錯誤:\n" -"\n" -"::" +"`divmod` 會導致錯誤: ::" #: ../../faq/programming.rst:803 msgid "Numbers and strings" @@ -1264,9 +1171,7 @@ msgid "" "octal value \"10\" (8 in decimal), type::" msgstr "" "要指定八進位數字,請在八進位值前面加上零,然後是小寫或大寫的 \"o\" 。例如,要" -"將變數 \"a\" 設定為八進位值 \"10\" (十進位為 8),請鍵入:\n" -"\n" -"::" +"將變數 \"a\" 設定為八進位值 \"10\" (十進位為 8),請鍵入: ::" #: ../../faq/programming.rst:816 #, fuzzy @@ -1276,9 +1181,7 @@ msgid "" "specified in lower or uppercase. For example, in the Python interpreter::" msgstr "" "十六進位也很容易。只需在十六進位數前面加上一個零,然後是一個小寫或大寫的 " -"\"x\" 。可以用小寫或大寫形式指定十六進位數字。例如,在 Python 直譯器中:\n" -"\n" -"::" +"\"x\" 。可以用小寫或大寫形式指定十六進位數字。例如,在 Python 直譯器中: ::" #: ../../faq/programming.rst:829 msgid "Why does -22 // 10 return -3?" @@ -1291,9 +1194,7 @@ msgid "" "``j``. If you want that, and also want::" msgstr "" "它主要是由希望 ``i % j`` 與 ``j`` 具有相同的符號驅動的。如果你想要那個,也想" -"要:\n" -"\n" -"::" +"要: ::" #: ../../faq/programming.rst:836 msgid "" @@ -1330,9 +1231,7 @@ msgid "" "exc:`SyntaxError` because the period is seen as a decimal point::" msgstr "" "嘗試以正常方式查詢 ``int`` 文字屬性會給出一個 SyntaxError ,因為句點被視為小" -"數點:\n" -"\n" -"::" +"數點: ::" #: ../../faq/programming.rst:859 #, fuzzy @@ -1432,9 +1331,7 @@ msgid "" msgstr "" "你不能,因為字串是不可變的。在大多數情況下,你應該簡單地從要組裝的各個部分構" "造一個新字串。但是,如果你需要一個能夠修改原地 unicode 資料的物件,請嘗試使" -"用 :class:`io.StringIO` 物件或 :mod:`array` 模組:\n" -"\n" -"::" +"用 :class:`io.StringIO` 物件或 :mod:`array` 模組: ::" #: ../../faq/programming.rst:938 #, fuzzy @@ -1455,17 +1352,12 @@ msgid "" "a case construct::" msgstr "" "最好的方法是使用將字串映射到函式的字典。這種技術的主要優點是字串不需要與函式" -"名稱相匹配。這也是用於模擬案例構造的主要技術:\n" -"\n" -"::" +"名稱相匹配。這也是用於模擬案例構造的主要技術: ::" #: ../../faq/programming.rst:957 #, fuzzy msgid "Use the built-in function :func:`getattr`::" -msgstr "" -"使用內置函式 :func:`getattr`:\n" -"\n" -"::" +msgstr "使用內置函式 :func:`getattr`: ::" #: ../../faq/programming.rst:962 #, fuzzy @@ -1477,18 +1369,12 @@ msgstr "請注意:func:`getattr` 適用於任何物件,包括類別、類別 #: ../../faq/programming.rst:965 #, fuzzy msgid "This is used in several places in the standard library, like this::" -msgstr "" -"這在標準函式庫中的幾個地方使用,如下所示:\n" -"\n" -"::" +msgstr "這在標準函式庫中的幾個地方使用,如下所示: ::" #: ../../faq/programming.rst:978 #, fuzzy msgid "Use :func:`locals` to resolve the function name::" -msgstr "" -"使用 :func:`locals` 解析函式名:\n" -"\n" -"::" +msgstr "使用 :func:`locals` 解析函式名: ::" #: ../../faq/programming.rst:990 #, fuzzy @@ -1566,40 +1452,28 @@ msgstr "我可以用奇數個反斜杠結束原始字串嗎?" msgid "" "A raw string ending with an odd number of backslashes will escape the " "string's quote::" -msgstr "" -"以奇數個反斜杠結尾的原始字串將轉義字串的引號:\n" -"\n" -"::" +msgstr "以奇數個反斜杠結尾的原始字串將轉義字串的引號: ::" #: ../../faq/programming.rst:1042 #, fuzzy msgid "" "There are several workarounds for this. One is to use regular strings and " "double the backslashes::" -msgstr "" -"有幾種解決方法。一種是使用常規字串並加倍反斜杠:\n" -"\n" -"::" +msgstr "有幾種解決方法。一種是使用常規字串並加倍反斜杠: ::" #: ../../faq/programming.rst:1048 #, fuzzy msgid "" "Another is to concatenate a regular string containing an escaped backslash " "to the raw string::" -msgstr "" -"另一種方法是將包含轉義反斜杠的常規字串連接到原始字串:\n" -"\n" -"::" +msgstr "另一種方法是將包含轉義反斜杠的常規字串連接到原始字串: ::" #: ../../faq/programming.rst:1054 #, fuzzy msgid "" "It is also possible to use :func:`os.path.join` to append a backslash on " "Windows::" -msgstr "" -"也可以使用 :func:`os.path.join` 在 Windows 上附加反斜杠:\n" -"\n" -"::" +msgstr "也可以使用 :func:`os.path.join` 在 Windows 上附加反斜杠: ::" #: ../../faq/programming.rst:1059 #, fuzzy @@ -1610,9 +1484,7 @@ msgid "" "value of the raw string::" msgstr "" "請注意,雖然為了確定原始字串的結束位置而使用反斜杠「跳脫」引號,但在解釋原始" -"字串的值時不會發生轉義。也就是說,反斜杠仍然存在於原始字串的值中:\n" -"\n" -"::" +"字串的值時不會發生轉義。也就是說,反斜杠仍然存在於原始字串的值中: ::" #: ../../faq/programming.rst:1067 #, fuzzy @@ -1786,9 +1658,7 @@ msgid "" "them into a list and call :meth:`str.join` at the end::" msgstr "" "要累積許多 :class:`str` 物件,推薦的習慣用法是將它們放入list中並在末尾呼叫 :" -"meth:`str.join`:\n" -"\n" -"::" +"meth:`str.join`: ::" #: ../../faq/programming.rst:1146 #, fuzzy @@ -1803,9 +1673,7 @@ msgid "" "operator)::" msgstr "" "要累積許多 :class:`bytes` 物件,推薦的習慣用法是使用原地連接(``+=`` 運算子)" -"擴充一個 :class:`bytearray` 物件:\n" -"\n" -"::" +"擴充一個 :class:`bytearray` 物件: ::" #: ../../faq/programming.rst:1157 #, fuzzy @@ -1887,10 +1755,7 @@ msgstr "如何以相反的順序疊代序列?" #: ../../faq/programming.rst:1192 #, fuzzy msgid "Use the :func:`reversed` built-in function::" -msgstr "" -"使用 :func:`reversed` 內置函式:\n" -"\n" -"::" +msgstr "使用 :func:`reversed` 內置函式: ::" #: ../../faq/programming.rst:1197 #, fuzzy @@ -1920,9 +1785,7 @@ msgid "" "the list, deleting duplicates as you go::" msgstr "" "如果你不介意重新排序list,請對其進行排序,然後從list末尾開始掃描,同時刪除重" -"複項:\n" -"\n" -"::" +"複項: ::" #: ../../faq/programming.rst:1220 #, fuzzy @@ -1931,9 +1794,7 @@ msgid "" "`hashable`) this is often faster ::" msgstr "" "如果list的所有元素都可以用作集合鍵(即它們都是 :term:`hashable`),這通常會更" -"快:\n" -"\n" -"::" +"快: ::" #: ../../faq/programming.rst:1225 #, fuzzy @@ -1956,9 +1817,7 @@ msgid "" "variations.::" msgstr "" "與刪除重複項一樣,使用刪除條件顯式反向疊代是一種可能性。但是,透過隱式或顯式" -"前向疊代使用切片替換更容易和更快。這是三種變體:\n" -"\n" -"::" +"前向疊代使用切片替換更容易和更快。這是三種變體: ::" #: ../../faq/programming.rst:1241 #, fuzzy @@ -1973,10 +1832,7 @@ msgstr "你如何在 Python 中建立數組?" #: ../../faq/programming.rst:1247 #, fuzzy msgid "Use a list::" -msgstr "" -"使用 list:\n" -"\n" -"::" +msgstr "使用 list: ::" #: ../../faq/programming.rst:1251 #, fuzzy @@ -2004,10 +1860,7 @@ msgstr "" #, fuzzy msgid "" "To get Lisp-style linked lists, you can emulate *cons cells* using tuples::" -msgstr "" -"要獲得 Lisp 風格的鍊錶,你可以使用元組模擬 *cons cells*:\n" -"\n" -"::" +msgstr "要獲得 Lisp 風格的鍊錶,你可以使用元組模擬 *cons cells*: ::" #: ../../faq/programming.rst:1264 #, fuzzy @@ -2029,10 +1882,7 @@ msgstr "如何建立多維list?" #: ../../faq/programming.rst:1275 #, fuzzy msgid "You probably tried to make a multidimensional array like this::" -msgstr "" -"你可能嘗試製作這樣的多維數組:\n" -"\n" -"::" +msgstr "你可能嘗試製作這樣的多維數組: ::" #: ../../faq/programming.rst:1279 #, fuzzy @@ -2061,10 +1911,7 @@ msgstr "" msgid "" "The suggested approach is to create a list of the desired length first and " "then fill in each element with a newly created list::" -msgstr "" -"建議的方法是先建立所需長度的list,然後用新建立的list填充每個元素:\n" -"\n" -"::" +msgstr "建議的方法是先建立所需長度的list,然後用新建立的list填充每個元素: ::" #: ../../faq/programming.rst:1314 #, fuzzy @@ -2072,9 +1919,7 @@ msgid "" "This generates a list containing 3 different lists of length two. You can " "also use a list comprehension::" msgstr "" -"這會生成一個包含 3 個長度為 2 的不同list的list。你還可以使用list推導:\n" -"\n" -"::" +"這會生成一個包含 3 個長度為 2 的不同list的list。你還可以使用list推導: ::" #: ../../faq/programming.rst:1320 #, fuzzy @@ -2097,19 +1942,14 @@ msgid "" "term:`list comprehension` is an elegant solution::" msgstr "" "呼叫一個方法或函式並累積回傳值是一個list,一個 :term:`list comprehension` 是" -"一個優雅的解決方案:\n" -"\n" -"::" +"一個優雅的解決方案: ::" #: ../../faq/programming.rst:1334 #, fuzzy msgid "" "To just run the method or function without saving the return values, a " "plain :keyword:`for` loop will suffice::" -msgstr "" -"要只運行方法或函式而不保存回傳值,一個普通的 for 循環就足夠了:\n" -"\n" -"::" +msgstr "要只運行方法或函式而不保存回傳值,一個普通的 for 循環就足夠了: ::" #: ../../faq/programming.rst:1346 #, fuzzy @@ -2140,10 +1980,7 @@ msgstr "" #: ../../faq/programming.rst:1356 #, fuzzy msgid "If you wrote::" -msgstr "" -"如果你寫了:\n" -"\n" -"::" +msgstr "如果你寫了: ::" #: ../../faq/programming.rst:1364 #, fuzzy @@ -2163,10 +2000,7 @@ msgstr "" msgid "" "Under the covers, what this augmented assignment statement is doing is " "approximately this::" -msgstr "" -"在幕後,這個擴充賦值陳述式所做的大致是這樣的:\n" -"\n" -"::" +msgstr "在幕後,這個擴充賦值陳述式所做的大致是這樣的: ::" #: ../../faq/programming.rst:1379 #, fuzzy @@ -2178,20 +2012,14 @@ msgstr "產生錯誤的是操作的賦值部分,因為元組是不可變的。 #: ../../faq/programming.rst:1382 #, fuzzy msgid "When you write something like::" -msgstr "" -"當你寫這樣的東西時:\n" -"\n" -"::" +msgstr "當你寫這樣的東西時: ::" #: ../../faq/programming.rst:1390 #, fuzzy msgid "" "The exception is a bit more surprising, and even more surprising is the fact " "that even though there was an error, the append worked::" -msgstr "" -"這個例外有點令人驚訝,更令人驚訝的是即使出現錯誤,追加仍然有效:\n" -"\n" -"::" +msgstr "這個例外有點令人驚訝,更令人驚訝的是即使出現錯誤,追加仍然有效: ::" #: ../../faq/programming.rst:1396 #, fuzzy @@ -2207,16 +2035,11 @@ msgstr "" "`~object.__iadd__` 魔術方法,它會在執行 ``+=`` 增廣賦值時被呼叫,並且它的回傳" "value 是賦值陳述式中使用的值; (b) 對於list,:meth:`!__iadd__` 相當於在list上" "呼叫 :meth:`!extend` 並回傳list。這就是為什麼我們說對於list,``+=`` 是 :meth:" -"`!list.extend` 的「簡寫」:\n" -"\n" -"::" +"`!list.extend` 的「簡寫」: ::" #: ../../faq/programming.rst:1409 msgid "This is equivalent to::" -msgstr "" -"這等價於:\n" -"\n" -"::" +msgstr "這等價於: ::" #: ../../faq/programming.rst:1414 #, fuzzy @@ -2233,10 +2056,7 @@ msgstr "" #: ../../faq/programming.rst:1419 #, fuzzy msgid "Thus, in our tuple example what is happening is equivalent to::" -msgstr "" -"因此,在我們的元組示例中,發生的事情等同於:\n" -"\n" -"::" +msgstr "因此,在我們的元組示例中,發生的事情等同於: ::" #: ../../faq/programming.rst:1427 #, fuzzy @@ -2267,9 +2087,7 @@ msgid "" msgstr "" "該技術歸功於 Perl 社區的 Randal Schwartz,它透過將每個元素映射到其「排序值」" "的度量對list的元素進行排序。在 Python 中,對 :meth:`list.sort` 方法使用 " -"``key`` 引數:\n" -"\n" -"::" +"``key`` 引數: ::" #: ../../faq/programming.rst:1444 #, fuzzy @@ -2283,9 +2101,7 @@ msgid "" "pick out the element you want. ::" msgstr "" "將它們合併到一個元組疊代器中,對結果list進行排序,然後挑選出你想要的元" -"素。:\n" -"\n" -"::" +"素。: ::" #: ../../faq/programming.rst:1461 msgid "Objects" @@ -2333,9 +2149,7 @@ msgid "" "definition::" msgstr "" "方法是一些物件 ``x`` 上的函式,你通常將其稱為 ``x.name(arguments...)`` 。方法" -"在類別定義中被定義為函式:\n" -"\n" -"::" +"在類別定義中被定義為函式: ::" #: ../../faq/programming.rst:1491 #, fuzzy @@ -2356,7 +2170,7 @@ msgstr "" #: ../../faq/programming.rst:1498 msgid "See also :ref:`why-self`." -msgstr "另請參閱 :ref:`why-self`\\ 。" +msgstr "另請參閱 :ref:`why-self`。" #: ../../faq/programming.rst:1502 #, fuzzy @@ -2405,19 +2219,14 @@ msgid "" msgstr "" "請注意,大多數程式不會經常在使用者定義的類別上使用 :func:`isinstance`。如果你" "自己開發類別,更合適的面向物件風格是在封裝特定行為的類別上定義方法,而不是檢" -"查物件的類別並根據它是什麼類別做不同的事情。例如,如果你有一個函式做某事:\n" -"\n" -"::" +"查物件的類別並根據它是什麼類別做不同的事情。例如,如果你有一個函式做某事: ::" #: ../../faq/programming.rst:1560 #, fuzzy msgid "" "A better approach is to define a ``search()`` method on all the classes and " "just call it::" -msgstr "" -"更好的方法是在所有類別上定義一個 ``search()`` 方法,然後呼叫它:\n" -"\n" -"::" +msgstr "更好的方法是在所有類別上定義一個 ``search()`` 方法,然後呼叫它: ::" #: ../../faq/programming.rst:1575 #, fuzzy @@ -2445,9 +2254,7 @@ msgid "" "written data to uppercase::" msgstr "" "Python 程式員可以輕鬆實作委託。例如,下面的類別實作了一個行為類似於檔案但將所" -"有寫入資料轉換為大寫的類別:\n" -"\n" -"::" +"有寫入資料轉換為大寫的類別: ::" #: ../../faq/programming.rst:1598 #, fuzzy @@ -2475,9 +2282,7 @@ msgid "" msgstr "" "請注意,對於更一般的情況,委託可能會變得更加棘手。當必須設定和檢索屬性時,該" "類別也必須定義一個 :meth:`~object.__setattr__` 方法,而且必須小心謹慎。 :" -"meth:`!__setattr__` 的基本實作大致等同於以下:\n" -"\n" -"::" +"meth:`!__setattr__` 的基本實作大致等同於以下: ::" #: ../../faq/programming.rst:1616 #, fuzzy @@ -2499,10 +2304,7 @@ msgstr "如何從擴充它的衍生類別呼叫基底類別中定義的方法? #: ../../faq/programming.rst:1624 #, fuzzy msgid "Use the built-in :func:`super` function::" -msgstr "" -"使用內置的 :func:`super` 函式:\n" -"\n" -"::" +msgstr "使用內置的 :func:`super` 函式: ::" #: ../../faq/programming.rst:1630 #, fuzzy @@ -2530,9 +2332,7 @@ msgid "" msgstr "" "你可以將基底類別分配給別名並從別名衍生。然後,你只需更改分配給別名的值。順便" "說一句,如果你想動態決定(例如,取決於資源的可用性)使用哪個基底類別,這個技" -"巧也很方便。例子:\n" -"\n" -"::" +"巧也很方便。例子: ::" #: ../../faq/programming.rst:1654 #, fuzzy @@ -2553,9 +2353,7 @@ msgid "" "the attribute, you have to explicitly use the class name in the assignment::" msgstr "" "對於靜態資料,只需定義一個類別屬性即可。要為屬性分配新值,你必須在分配中顯式" -"使用類別名:\n" -"\n" -"::" +"使用類別名: ::" #: ../../faq/programming.rst:1671 #, fuzzy @@ -2578,17 +2376,12 @@ msgid "" msgstr "" "注意:在 C 的方法中,像 self.count = 42 這樣的賦值會在 self 自己的字典中建立" "一個名為 \"count\" 的新的不相關實例。類別靜態資料名稱的重新綁定必須始終指定類" -"別是否在方法內:\n" -"\n" -"::" +"別是否在方法內: ::" #: ../../faq/programming.rst:1682 #, fuzzy msgid "Static methods are possible::" -msgstr "" -"靜態方法是可能的:\n" -"\n" -"::" +msgstr "靜態方法是可能的: ::" #: ../../faq/programming.rst:1690 #, fuzzy @@ -2596,9 +2389,7 @@ msgid "" "However, a far more straightforward way to get the effect of a static method " "is via a simple module-level function::" msgstr "" -"然而,獲得靜態方法效果的一種更直接的方法是透過一個簡單的模組級函式:\n" -"\n" -"::" +"然而,獲得靜態方法效果的一種更直接的方法是透過一個簡單的模組級函式: ::" #: ../../faq/programming.rst:1696 #, fuzzy @@ -2633,9 +2424,7 @@ msgid "" "In Python you have to write a single constructor that catches all cases " "using default arguments. For example::" msgstr "" -"在 Python 中,你必須編寫一個構造函式來捕獲所有使用預設引數的情況。例如:\n" -"\n" -"::" +"在 Python 中,你必須編寫一個構造函式來捕獲所有使用預設引數的情況。例如: ::" #: ../../faq/programming.rst:1725 #, fuzzy @@ -2645,10 +2434,7 @@ msgstr "這並不完全等價,但在實踐中足夠接近。" #: ../../faq/programming.rst:1727 #, fuzzy msgid "You could also try a variable-length argument list, e.g. ::" -msgstr "" -"你也可以嘗試可變長度引數list,例如:\n" -"\n" -"::" +msgstr "你也可以嘗試可變長度引數list,例如: ::" #: ../../faq/programming.rst:1732 #, fuzzy @@ -2836,8 +2622,8 @@ msgid "" "object identity is assured. Generally, there are three circumstances where " "identity is guaranteed:" msgstr "" -"然而,\\* 只有\\* 當物件識別性得到保證時,識別性測試才能代替相等性測試。一般" -"來說,保證識別性的情況有以下三種:" +"然而,*只有*\\ 當物件識別性得到保證時,識別性測試才能代替相等性測試。一般來" +"說,保證識別性的情況有以下三種:" #: ../../faq/programming.rst:1843 msgid "" @@ -2874,17 +2660,12 @@ msgid "" "guaranteed to be singletons::" msgstr "" "在大多數其他情況下,識別性測試是不可取的,相等性測試是首選。特別是,識別性測" -"試不應用於檢查常數,例如不能保證是單例的 :class:`int` 和 :class:`str`:\n" -"\n" -"::" +"試不應用於檢查常數,例如不能保證是單例的 :class:`int` 和 :class:`str`: ::" #: ../../faq/programming.rst:1871 #, fuzzy msgid "Likewise, new instances of mutable containers are never identical::" -msgstr "" -"同樣,可變容器的新實例永遠不會相同:\n" -"\n" -"::" +msgstr "同樣,可變容器的新實例永遠不會相同: ::" #: ../../faq/programming.rst:1878 msgid "" @@ -2912,9 +2693,7 @@ msgid "" msgstr "" "2)當 ``None`` 是有效輸入值時,檢測可選引數可能會很棘手。在這些情況下,你可以" "建立一個保證與其他物件不同的單例哨兵物件。例如,這裡是如何實作一個行為類似" -"於 :meth:`dict.pop` 的方法:\n" -"\n" -"::" +"於 :meth:`dict.pop` 的方法: ::" #: ../../faq/programming.rst:1901 msgid "" @@ -3018,10 +2797,7 @@ msgstr "" #: ../../faq/programming.rst:1991 #, fuzzy msgid "This example shows the various techniques::" -msgstr "" -"這個例子展示了各種技術:\n" -"\n" -"::" +msgstr "這個例子展示了各種技術: ::" #: ../../faq/programming.rst:2015 #, fuzzy @@ -3042,9 +2818,7 @@ msgid "" msgstr "" "要在 *station_id* 可變時使 *lru_cache* 方法起作用,該類別需要定義 :meth:" "`~object.__eq__` 和 :meth:`~object.__hash__` 方法,以便快取可以檢測相關屬性更" -"新:\n" -"\n" -"::" +"新: ::" #: ../../faq/programming.rst:2046 msgid "Modules" @@ -3069,7 +2843,7 @@ msgstr "" "第一次引入模組時(或者源檔案自建立當前編譯檔案後發生更改時)應在 " "``__pycache__`` 的子目錄中建立包含編譯程式碼的 ``.pyc`` 檔案包含 .py 檔案的目" "錄。 ``.pyc`` 檔案的檔案名以與``.py`` 檔案相同的名稱開頭,以``.pyc`` 結尾,中" -"間部分依賴於特定的``python `` 建立它的二進製檔案。 (有關詳細資訊,請參閱 :" +"間部分依賴於特定的``python `` 建立它的二進製檔案。(有關詳細資訊,請參閱 :" "pep:`3147`。)" #: ../../faq/programming.rst:2059 @@ -3130,9 +2904,7 @@ msgid "" "use the ``compile()`` function in that module interactively::" msgstr "" ":mod:`py_compile` 模組可以手動編譯任何模組。一種方法是在該模組中以交互方式使" -"用 ``compile()`` 函式:\n" -"\n" -"::" +"用 ``compile()`` 函式: ::" #: ../../faq/programming.rst:2086 #, fuzzy @@ -3153,9 +2925,7 @@ msgid "" "Python files to compile::" msgstr "" "你還可以使用 :mod:`compileall` 模組自動編譯目錄中的所有檔案。你可以在 shell " -"提示符下運行 ``compileall.py`` 並提供包含要編譯的 Python 檔案的目錄路徑:\n" -"\n" -"::" +"提示符下運行 ``compileall.py`` 並提供包含要編譯的 Python 檔案的目錄路徑: ::" #: ../../faq/programming.rst:2099 #, fuzzy @@ -3173,9 +2943,7 @@ msgid "" msgstr "" "模組可以透過查看預定義的全域變數 ``__name__`` 來找出自己的模組名稱。如果它的" "值為``'__main__'``,則該程式作為腳本運行。許多通常透過引入使用的模組還提供命" -"令行界面或自檢,只有在檢查 ``__name__`` 後才執行此程式碼:\n" -"\n" -"::" +"令行界面或自檢,只有在檢查 ``__name__`` 後才執行此程式碼: ::" #: ../../faq/programming.rst:2116 #, fuzzy @@ -3189,17 +2957,11 @@ msgstr "假設你有以下模組:" #: ../../faq/programming.rst:2120 msgid ":file:`foo.py`::" -msgstr "" -":file:`foo.py`:\n" -"\n" -"::" +msgstr ":file:`foo.py`: ::" #: ../../faq/programming.rst:2125 msgid ":file:`bar.py`::" -msgstr "" -":file:`bar.py`:\n" -"\n" -"::" +msgstr ":file:`bar.py`: ::" #: ../../faq/programming.rst:2130 #, fuzzy @@ -3337,9 +3099,7 @@ msgid "" "from :mod:`importlib` instead::" msgstr "" "考慮使用來自 :mod:`importlib` 的便利函式 :func:`~importlib.import_module` 代" -"替:\n" -"\n" -"::" +"替: ::" #: ../../faq/programming.rst:2180 msgid "" @@ -3358,19 +3118,14 @@ msgid "" msgstr "" "出於效率和一致性的原因,Python 僅在第一次引入模組時讀取模組檔案。如果沒有,在" "一個由許多模組組成的程式中,每個模組都引入相同的基本模組,基本模組將被解析和" -"重新解析很多次。要強制重新讀取已更改的模組,請執行以下操作:\n" -"\n" -"::" +"重新解析很多次。要強制重新讀取已更改的模組,請執行以下操作: ::" #: ../../faq/programming.rst:2192 #, fuzzy msgid "" "Warning: this technique is not 100% fool-proof. In particular, modules " "containing statements like ::" -msgstr "" -"警告:此技術並非 100% 萬無一失。尤其是,包含像這樣的陳述式的模組:\n" -"\n" -"::" +msgstr "警告:此技術並非 100% 萬無一失。尤其是,包含像這樣的陳述式的模組: ::" #: ../../faq/programming.rst:2197 #, fuzzy @@ -3381,18 +3136,13 @@ msgid "" "paradoxical behaviour::" msgstr "" "將繼續使用舊版本的引入物件。如果模組包含類別定義,現有的類別實例將*不會*更新" -"為使用新的類別定義。這可能會導致以下自相矛盾的行為:\n" -"\n" -"::" +"為使用新的類別定義。這可能會導致以下自相矛盾的行為: ::" #: ../../faq/programming.rst:2210 msgid "" "The nature of the problem is made clear if you print out the \"identity\" of " "the class objects::" -msgstr "" -"如果印出類別物件的「識別性」,問題的本質就很清楚了:\n" -"\n" -"::" +msgstr "如果印出類別物件的「識別性」,問題的本質就很清楚了: ::" #: ../../faq/programming.rst:408 msgid "argument" diff --git a/faq/windows.po b/faq/windows.po index 7e32a903c7..84065e0718 100644 --- a/faq/windows.po +++ b/faq/windows.po @@ -147,9 +147,7 @@ msgstr "" "現在我們知道 ``py`` 命令已被識別,而你可以將你的 Python 腳本提供給它。你必須" "為 Python 腳本給定絕對路徑或相對路徑。假設你的 Python 腳本位於桌面上,並被命" "名為 ``hello.py``,且你的命令提示字元在你的家目錄 (home directory) 中順利地被" -"開啟,那麼你就會看到類似以下的內容:\n" -"\n" -"::" +"開啟,那麼你就會看到類似以下的內容: ::" #: ../../faq/windows.rst:106 msgid "" @@ -157,9 +155,7 @@ msgid "" "``py`` followed by your script path::" msgstr "" "因此,現在你將透過鍵入 ``py`` 加上腳本路徑,來使用 ``py`` 命令將你的腳本提供" -"給 Python:\n" -"\n" -"::" +"給 Python: ::" #: ../../faq/windows.rst:114 msgid "How do I make Python scripts executable?" diff --git a/glossary.po b/glossary.po index 12282b1e18..8084a0eca4 100644 --- a/glossary.po +++ b/glossary.po @@ -161,9 +161,9 @@ msgid "" "by ``**``. For example, ``3`` and ``5`` are both keyword arguments in the " "following calls to :func:`complex`::" msgstr "" -":dfn:`關鍵字引數 (keyword argument)`\\ :在函式呼叫中,以識別字(identifier," -"例如 ``name=``\\ )開頭的引數,或是以 ``**`` 後面 dictionary(字典)內的值被" -"傳遞的引數。例如,``3`` 和 ``5`` 都是以下 :func:`complex` 呼叫中的關鍵字引" +":dfn:`關鍵字引數 (keyword argument)`:在函式呼叫中,以識別字(identifier,例" +"如 ``name=``\\ )開頭的引數,或是以 ``**`` 後面 dictionary(字典)內的值被傳" +"遞的引數。例如,``3`` 和 ``5`` 都是以下 :func:`complex` 呼叫中的關鍵字引" "數: ::" #: ../../glossary.rst:75 @@ -173,9 +173,9 @@ msgid "" "be passed as elements of an :term:`iterable` preceded by ``*``. For example, " "``3`` and ``5`` are both positional arguments in the following calls::" msgstr "" -":dfn:`位置引數 (positional argument)`\\ :不是關鍵字引數的引數。位置引數可在" -"一個引數列表的起始處出現,和(或)作為 ``*`` 之後的 :term:`iterable`\\ (可疊" -"代物件)中的元素被傳遞。例如,``3`` 和 ``5`` 都是以下呼叫中的位置引數: ::" +":dfn:`位置引數 (positional argument)`:不是關鍵字引數的引數。位置引數可在一個" +"引數列表的起始處出現,和(或)作為 ``*`` 之後的 :term:`iterable`\\ (可疊代物" +"件)中的元素被傳遞。例如,``3`` 和 ``5`` 都是以下呼叫中的位置引數: ::" #: ../../glossary.rst:84 msgid "" @@ -969,21 +969,18 @@ msgstr "" "一個物件,它會嘗試為正在被 import 的模組尋找 :term:`loader`\\ (載入器)。" #: ../../glossary.rst:436 -#, fuzzy msgid "" "There are two types of finder: :term:`meta path finders ` " "for use with :data:`sys.meta_path`, and :term:`path entry finders ` for use with :data:`sys.path_hooks`." msgstr "" -"從 Python 3.3 開始,有兩種類型的尋檢器:\\ :term:`元路徑尋檢器 (meta path " -"finder) ` 會使用 :data:`sys.meta_path`,而\\ :term:`路徑項" -"目尋檢器 (path entry finder) ` 會使用 :data:`sys." -"path_hooks`。" +"有兩種類型的尋檢器::term:`元路徑尋檢器 (meta path finder) ` 會使用 :data:`sys.meta_path`,而\\ :term:`路徑項目尋檢器 (path " +"entry finder) ` 會使用 :data:`sys.path_hooks`。" #: ../../glossary.rst:440 -#, fuzzy msgid "See :ref:`importsystem` and :mod:`importlib` for much more detail." -msgstr "請參閱 :pep:`302`、:pep:`420` 和 :pep:`451` 以了解更多細節。" +msgstr "請參閱 :ref:`importsystem` 和 :mod:`importlib` 以了解更多細節。" #: ../../glossary.rst:441 msgid "floor division" @@ -1015,8 +1012,8 @@ msgid "" msgstr "" "一連串的陳述式,它能夠向呼叫者回傳一些值。它也可以被傳遞零個或多個\\ :term:`" "引數 `,這些引數可被使用於函式本體的執行。另請參閱 :term:" -"`parameter`\\ (參數)、\\ :term:`method`\\ (方法),以及\\ :ref:" -"`function`\\ 章節。" +"`parameter`\\ (參數)、:term:`method`\\ (方法),以及\\ :ref:`function`\\ " +"章節。" #: ../../glossary.rst:454 msgid "function annotation" @@ -1032,8 +1029,8 @@ msgid "" "for example, this function is expected to take two :class:`int` arguments " "and is also expected to have an :class:`int` return value::" msgstr "" -"函式註釋通常被使用於\\ :term:`型別提示 `\\ :例如,這個函式預期會" -"得到兩個 :class:`int` 引數,並會有一個 :class:`int` 回傳值: ::" +"函式註釋通常被使用於\\ :term:`型別提示 `:例如,這個函式預期會得到" +"兩個 :class:`int` 引數,並會有一個 :class:`int` 回傳值: ::" #: ../../glossary.rst:466 msgid "Function annotation syntax is explained in section :ref:`function`." @@ -1062,9 +1059,9 @@ msgid "" "feature was first added to the language and when it will (or did) become the " "default::" msgstr "" -":ref:`future 陳述式 `\\ :``from __future__ import ``,會指" -"示編譯器使用那些在 Python 未來的發布版本中將成為標準的語法或語義,來編譯當前" -"的模組。而 :mod:`__future__` 模組則記錄了 *feature(功能)*\\ 可能的值。透過 " +":ref:`future 陳述式 `:``from __future__ import ``,會指示編" +"譯器使用那些在 Python 未來的發布版本中將成為標準的語法或語義,來編譯當前的模" +"組。而 :mod:`__future__` 模組則記錄了 *feature(功能)*\\ 可能的值。透過 " "import 此模組並對其變數求值,你可以看見一個新的功能是何時首次被新增到此語言" "中,以及它何時將會(或已經)成為預設的功能: ::" @@ -1160,8 +1157,8 @@ msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." msgstr "" -"另請參閱 :term:`single dispatch`\\ (單一調度)術語表條目、\\ :func:" -"`functools.singledispatch` 裝飾器和 :pep:`443`。" +"另請參閱 :term:`single dispatch`\\ (單一調度)術語表條目、:func:`functools." +"singledispatch` 裝飾器和 :pep:`443`。" #: ../../glossary.rst:531 msgid "generic type" @@ -1519,8 +1516,8 @@ msgid "" "produce a sort key that is aware of locale specific sort conventions." msgstr "" "鍵函式或理序函式 (collation function) 是一個可呼叫 (callable) 函式,它會回傳" -"一個用於排序 (sorting) 或定序 (ordering) 的值。例如,\\ :func:`locale." -"strxfrm` 被用來產生一個了解區域特定排序慣例的排序鍵。" +"一個用於排序 (sorting) 或定序 (ordering) 的值。例如,:func:`locale.strxfrm` " +"被用來產生一個了解區域特定排序慣例的排序鍵。" #: ../../glossary.rst:695 msgid "" @@ -2305,8 +2302,8 @@ msgid "" "dotted path to the module, including any parent packages, e.g. ``email.mime." "text``::" msgstr "" -"當用於引用模組時,\\ *完全限定名稱 (fully qualified name)* 是表示該模組的完整" -"點分隔路徑,包括任何的父套件,例如 ``email.mime.text``: ::" +"當用於引用模組時,*完全限定名稱 (fully qualified name)* 是表示該模組的完整點" +"分隔路徑,包括任何的父套件,例如 ``email.mime.text``: ::" #: ../../glossary.rst:1069 msgid "reference count" @@ -2560,7 +2557,7 @@ msgstr "" "一個能夠讀取和寫入 :class:`str` 物件的一個 :term:`file object`\\ (檔案物" "件)。通常,文字檔案實際上是存取位元組導向的資料流 (byte-oriented " "datastream) 並會自動處理 :term:`text encoding`\\ (文字編碼)。文字檔案的例子" -"有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、\\ :data:`sys.stdin`、:data:" +"有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、:data:`sys.stdin`、:data:" "`sys.stdout` 以及 :class:`io.StringIO` 的實例。" #: ../../glossary.rst:1181 diff --git a/howto/annotations.po b/howto/annotations.po index ef69eb9192..f4dd9ba9f3 100644 --- a/howto/annotations.po +++ b/howto/annotations.po @@ -247,7 +247,7 @@ msgid "" "func:`eval`." msgstr "" "如果 ``o`` 是一個模組,則在呼叫 :func:`eval` 時使用 ``o.__dict__`` 作為\\ ``" -"全域變數``\\ 。" +"全域變數``。" #: ../../howto/annotations.rst:148 msgid "" @@ -256,8 +256,8 @@ msgid "" "`eval`." msgstr "" "如果 ``o`` 是一個類別,當呼叫 :func:`eval` 時,則使用 ``sys.modules[o." -"__module__].__dict__`` 作為\\ ``全域變數``\\ ,使用 ``dict(vars(o))`` 作為\\ " -"``區域變數``\\ 。" +"__module__].__dict__`` 作為\\ ``全域變數``,使用 ``dict(vars(o))`` 作為\\ ``" +"區域變數``。" #: ../../howto/annotations.rst:151 msgid "" diff --git a/howto/functional.po b/howto/functional.po index cd1722c4e9..8e9b7a7529 100644 --- a/howto/functional.po +++ b/howto/functional.po @@ -1073,10 +1073,7 @@ msgstr "" #: ../../howto/functional.rst:1013 msgid "Here's a small but realistic example::" -msgstr "" -"以下是個很小但實際的範例:\n" -"\n" -"::" +msgstr "以下是個很小但實際的範例: ::" #: ../../howto/functional.rst:1025 msgid "" diff --git a/howto/logging.po b/howto/logging.po index 8c35a9d66c..25bd64c3e4 100644 --- a/howto/logging.po +++ b/howto/logging.po @@ -219,10 +219,7 @@ msgstr "一個簡單範例" #: ../../howto/logging.rst:109 msgid "A very simple example is::" -msgstr "" -"一個非常簡單的例子是:\n" -"\n" -"::" +msgstr "一個非常簡單的例子是: ::" #: ../../howto/logging.rst:115 msgid "If you type these lines into a script and run it, you'll see:" diff --git a/howto/sockets.po b/howto/sockets.po index 6b44616a44..362aa5710a 100644 --- a/howto/sockets.po +++ b/howto/sockets.po @@ -124,9 +124,7 @@ msgid "" "Roughly speaking, when you clicked on the link that brought you to this " "page, your browser did something like the following::" msgstr "" -"大致上來說,當你點擊了帶你來到這個頁面的連結時,你的瀏覽器做了以下的操作:\n" -"\n" -"::" +"大致上來說,當你點擊了帶你來到這個頁面的連結時,你的瀏覽器做了以下的操作: ::" #: ../../howto/sockets.rst:64 msgid "" @@ -145,9 +143,7 @@ msgid "" "creates a \"server socket\"::" msgstr "" "網路伺服器 (web server) 的運作就稍微複雜一點。首先,網路伺服器會建立一個「伺" -"服器端 socket」:\n" -"\n" -"::" +"服器端 socket」: ::" #: ../../howto/sockets.rst:80 msgid "" @@ -189,9 +185,7 @@ msgid "" "mainloop of the web server::" msgstr "" "現在我們有一個監聽 80 連接埠的「伺服器端」socket 了,我們可以進入網路伺服器的" -"主迴圈了:\n" -"\n" -"::" +"主迴圈了: ::" #: ../../howto/sockets.rst:106 msgid "" @@ -343,10 +337,7 @@ msgstr "" msgid "" "Assuming you don't want to end the connection, the simplest solution is a " "fixed length message::" -msgstr "" -"假設你不想結束連線,最簡單的方式就是使用固定長度的訊息:\n" -"\n" -"::" +msgstr "假設你不想結束連線,最簡單的方式就是使用固定長度的訊息: ::" #: ../../howto/sockets.rst:217 msgid "" diff --git a/howto/sorting.po b/howto/sorting.po index 9f807932b3..03271d26a5 100644 --- a/howto/sorting.po +++ b/howto/sorting.po @@ -184,8 +184,8 @@ msgid "" "the same key, their original order is preserved." msgstr "" "排序保證是\\ `穩定的 `_\\ ,意思是當有多筆資料有相同的鍵,它們會維持原" -"來的順序。" +"Sorting_algorithm#Stability>`_,意思是當有多筆資料有相同的鍵,它們會維持原來" +"的順序。" #: ../../howto/sorting.rst:180 msgid "" @@ -293,8 +293,8 @@ msgid "" "popularized it among Perl programmers." msgstr "" "這個用語的另一個名字是 `Schwartzian transform `_\\ ,是由於 Randal L. Schwartz 讓這個方法在 Perl 程式" -"設計師間普及。" +"Schwartzian_transform>`_,是由於 Randal L. Schwartz 讓這個方法在 Perl 程式設" +"計師間普及。" #: ../../howto/sorting.rst:250 msgid "" diff --git a/howto/urllib2.po b/howto/urllib2.po index 025c0e0f44..d912c08590 100644 --- a/howto/urllib2.po +++ b/howto/urllib2.po @@ -600,4 +600,4 @@ msgstr "" #~ msgstr "" #~ "這份指南出自於早期版本的法文翻譯 `urllib2 - Le Manuel manquant `_\\ 。" +#~ "articles/urllib2_francais.shtml>`_。" diff --git a/installing/index.po b/installing/index.po index 8d490a1b4c..7029017624 100644 --- a/installing/index.po +++ b/installing/index.po @@ -178,9 +178,7 @@ msgid "" "dependencies from the Python Package Index::" msgstr "" "以下指令將從 Python 套件索引安裝一個模組的最新版本及其依賴套件 " -"(dependencies):\n" -"\n" -"::" +"(dependencies): ::" #: ../../installing/index.rst:88 msgid "" @@ -188,7 +186,7 @@ msgid "" "guide assume the use of a :term:`virtual environment`." msgstr "" "對於 POSIX 使用者(包括 macOS 和 Linux 使用者),本指南中的範例皆假設有使用 :" -"term:`virtual environment`\\ 。" +"term:`virtual environment`。" #: ../../installing/index.rst:91 msgid "" @@ -208,9 +206,7 @@ msgid "" msgstr "" "在命令列中直接指定一個明確的或最小的版本也是可行的。當使用像是 ``>``、``<`` " "的比較運算子,或某些可被 shell 所解釋的其他特殊字元時,套件名稱與版本編號應該" -"要放在雙引號內:\n" -"\n" -"::" +"要放在雙引號內: ::" #: ../../installing/index.rst:103 msgid "" @@ -219,9 +215,7 @@ msgid "" "explicitly::" msgstr "" "通常,如果一個合適的模組已被安裝,嘗試再次安裝它將不會有任何效果。要升級現有" -"的模組就必須明確地請求:\n" -"\n" -"::" +"的模組就必須明確地請求: ::" #: ../../installing/index.rst:109 msgid "" @@ -266,8 +260,8 @@ msgid "" "``pip`` needs to be \"bootstrapped\" as described in the Python Packaging " "User Guide." msgstr "" -"Python 是從 Python 3.4 才開始綁定 ``pip`` 的。對於更早的版本,\\ ``pip`` 需要" -"被「自助安裝 (bootstrapped)」,請參考 Python 封裝使用者指南中的說明。" +"Python 是從 Python 3.4 才開始綁定 ``pip`` 的。對於更早的版本,``pip`` 需要被" +"「自助安裝 (bootstrapped)」,請參考 Python 封裝使用者指南中的說明。" #: ../../installing/index.rst:136 msgid "" @@ -324,9 +318,7 @@ msgid "" "``pip``::" msgstr "" "在 Linux、macOS 以及其他 POSIX 系統中,使用帶有版本編號的 Python 指令並結合 " -"``-m`` 開關參數 (switch),來運行 ``pip`` 的適當副本:\n" -"\n" -"::" +"``-m`` 開關參數 (switch),來運行 ``pip`` 的適當副本: ::" #: ../../installing/index.rst:176 msgid "Appropriately versioned ``pip`` commands may also be available." @@ -338,9 +330,7 @@ msgid "" "switch::" msgstr "" "在 Windows 中,使用 Python 啟動指令 ``py`` 並結合 ``-m`` 開關參數 " -"(switch):\n" -"\n" -"::" +"(switch): ::" #: ../../installing/index.rst:195 msgid "Common installation issues" @@ -378,10 +368,7 @@ msgstr "未安裝 pip" msgid "" "It is possible that ``pip`` does not get installed by default. One potential " "fix is::" -msgstr "" -"``pip`` 沒有預設被安裝也是有可能的。一個潛在的解法是:\n" -"\n" -"::" +msgstr "``pip`` 沒有預設被安裝也是有可能的。一個潛在的解法是: ::" #: ../../installing/index.rst:217 msgid "" @@ -426,8 +413,8 @@ msgid "" "to build them locally." msgstr "" "有一些解決方案,可用來安裝那些還無法以預建置的 ``wheel`` 檔案被使用的\\ `科學" -"軟體 `__\\ ,這些方案也有助於取得其他" -"的二進制擴充,且無需在本機對它們進行建置。" +"軟體 `__,這些方案也有助於取得其他的二" +"進制擴充,且無需在本機對它們進行建置。" #: ../../installing/index.rst:241 msgid "" diff --git a/library/argparse.po b/library/argparse.po index 2d1e351b83..01c35dd98c 100644 --- a/library/argparse.po +++ b/library/argparse.po @@ -1619,10 +1619,7 @@ msgstr "" #: ../../library/argparse.rst:1760 msgid "Some example usage::" -msgstr "" -"一些使用範例:\n" -"\n" -"::" +msgstr "一些使用範例: ::" #: ../../library/argparse.rst:1781 msgid "" diff --git a/library/array.po b/library/array.po index 2442667791..724cf87fe8 100644 --- a/library/array.po +++ b/library/array.po @@ -326,7 +326,7 @@ msgid "" msgstr "" "當使用來自 C 或 C++ 程式碼(這是唯一使得這個資訊有效的途徑)的陣列物件時,更" "適當的做法是使用陣列物件支援的緩衝區介面。這個方法維護了向後兼容性,並應該在" -"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`\\ 。" +"新的程式碼中避免。關於緩衝區介面的文件在\\ :ref:`bufferobjects`。" #: ../../library/array.rst:135 msgid "" diff --git a/library/asyncio-api-index.po b/library/asyncio-api-index.po index 2bbc23dab8..a69cf76a68 100644 --- a/library/asyncio-api-index.po +++ b/library/asyncio-api-index.po @@ -341,7 +341,7 @@ msgstr "傳送網路資料的高階 async/await 物件。" #: ../../library/asyncio-api-index.rst:170 msgid ":ref:`Example TCP client `." -msgstr ":ref:`TCP 客戶端範例 `\\ 。" +msgstr ":ref:`TCP 客戶端範例 `。" #: ../../library/asyncio-api-index.rst:172 msgid "See also the :ref:`streams APIs ` documentation." @@ -427,7 +427,7 @@ msgstr ":exc:`asyncio.CancelledError`" #: ../../library/asyncio-api-index.rst:223 msgid "Raised when a Task is cancelled. See also :meth:`Task.cancel`." -msgstr "當一 Task 物件被取消時被引發。請參閱 :meth:`Task.cancel`\\ 。" +msgstr "當一 Task 物件被取消時被引發。請參閱 :meth:`Task.cancel`。" #: ../../library/asyncio-api-index.rst:225 msgid ":exc:`asyncio.BrokenBarrierError`" @@ -443,7 +443,7 @@ msgid "" "`." msgstr "" ":ref:`在取消請求發生的程式中處理 CancelledError 例外 " -"`\\ 。" +"`。" #: ../../library/asyncio-api-index.rst:234 msgid "" @@ -457,4 +457,4 @@ msgstr "請參閱 :ref:`asyncio 專用例外 `\\ 完整列 #~ "`TimeoutError` exception." #~ msgstr "" #~ "在像是 :func:`wait_for` 等函式超時的時候被引發。請注意 ``asyncio." -#~ "TimeoutError`` 與內建例外 :exc:`TimeoutError` **無關**\\ 。" +#~ "TimeoutError`` 與內建例外 :exc:`TimeoutError` **無關**。" diff --git a/library/asyncio-dev.po b/library/asyncio-dev.po index 7509085757..bd3b23dc6b 100644 --- a/library/asyncio-dev.po +++ b/library/asyncio-dev.po @@ -47,7 +47,7 @@ msgid "" "development asyncio has a *debug mode*." msgstr "" "在預設情況下 asyncio 以正式生產模式 (production mode) 執行。為了讓開發更輕" -"鬆,asyncio 還有一種\\ *除錯模式 (debug mode)*\\ 。" +"鬆,asyncio 還有一種\\ *除錯模式 (debug mode)*。" #: ../../library/asyncio-dev.rst:24 msgid "There are several ways to enable asyncio debug mode:" @@ -80,9 +80,7 @@ msgid "" "at startup of the application::" msgstr "" "將 :ref:`asyncio logger(日誌記錄器) `\\ 的日誌級别設置為 :" -"py:const:`logging.DEBUG`,例如下面的程式片段可以在應用程式啟動時運行:\n" -"\n" -"::" +"py:const:`logging.DEBUG`,例如下面的程式片段可以在應用程式啟動時運行: ::" #: ../../library/asyncio-dev.rst:42 msgid "" @@ -157,9 +155,7 @@ msgid "" "call_soon_threadsafe` method should be used. Example::" msgstr "" "要從不同的 OS 執行緒為一個 :term:`callback` 排程,應該使用 :meth:`loop." -"call_soon_threadsafe` 方法。例如:\n" -"\n" -"::" +"call_soon_threadsafe` 方法。例如: ::" #: ../../library/asyncio-dev.rst:81 msgid "" @@ -170,9 +166,7 @@ msgid "" msgstr "" "幾乎所有 asyncio 物件都不支援執行緒安全 (thread safe),這通常不是問題,除非" "在 Task 或回呼函式之外有程式需要和它們一起運作。如果需要這樣的程式來呼叫低階 " -"asyncio API,應該使用 :meth:`loop.call_soon_threadsafe` 方法,例如:\n" -"\n" -"::" +"asyncio API,應該使用 :meth:`loop.call_soon_threadsafe` 方法,例如: ::" #: ../../library/asyncio-dev.rst:89 msgid "" @@ -182,9 +176,7 @@ msgid "" msgstr "" "要從不同的 OS 執行緒為一個協程物件排程,應該使用 :func:" "`run_coroutine_threadsafe` 函式。它會回傳一個 :class:`concurrent.futures." -"Future` 以存取結果:\n" -"\n" -"::" +"Future` 以存取結果: ::" #: ../../library/asyncio-dev.rst:102 msgid "To handle signals the event loop must be run in the main thread." @@ -214,8 +206,8 @@ msgid "" "different process." msgstr "" "目前沒有什麼辦法能直接從另一個行程(例如透過 :mod:`multiprocessing` 啟動的程" -"序)來為協程或回呼排程。\\ :ref:`asyncio-event-loop-methods`\\ 小節列出了可以" -"從 pipes(管道)讀取並監視 file descriptor(檔案描述器)而不會阻塞事件迴圈的 " +"序)來為協程或回呼排程。:ref:`asyncio-event-loop-methods`\\ 小節列出了可以從 " +"pipes(管道)讀取並監視 file descriptor(檔案描述器)而不會阻塞事件迴圈的 " "API。此外,asyncio 的\\ :ref:`子行程 ` API 提供了一種啟動" "行程並從事件迴圈與其通訊的辦法。最後,之前提到的 :meth:`loop." "run_in_executor` 方法也可和 :class:`concurrent.futures.ProcessPoolExecutor` " @@ -260,10 +252,7 @@ msgstr "" msgid "" "The default log level is :py:const:`logging.INFO`, which can be easily " "adjusted::" -msgstr "" -"日誌級別被預設為 :py:const:`logging.INFO`,它可以很容易地被調整:\n" -"\n" -"::" +msgstr "日誌級別被預設為 :py:const:`logging.INFO`,它可以很容易地被調整: ::" #: ../../library/asyncio-dev.rst:151 msgid "" @@ -286,32 +275,22 @@ msgid "" msgstr "" "當協程函式被呼叫而不是被等待時(即執行 ``coro()`` 而不是 ``await coro()``)或" "者協程沒有透過 :meth:`asyncio.create_task` 被排程,asyncio 將會發出 :exc:" -"`RuntimeWarning`:\n" -"\n" -"::" +"`RuntimeWarning`: ::" #: ../../library/asyncio-dev.rst:176 ../../library/asyncio-dev.rst:221 msgid "Output::" -msgstr "" -"輸出:\n" -"\n" -"::" +msgstr "輸出: ::" #: ../../library/asyncio-dev.rst:181 ../../library/asyncio-dev.rst:237 msgid "Output in debug mode::" -msgstr "" -"除錯模式中的輸出:\n" -"\n" -"::" +msgstr "除錯模式中的輸出: ::" #: ../../library/asyncio-dev.rst:194 msgid "" "The usual fix is to either await the coroutine or call the :meth:`asyncio." "create_task` function::" msgstr "" -"常用的修復方法是去等待協程或者呼叫 :meth:`asyncio.create_task` 函式:\n" -"\n" -"::" +"常用的修復方法是去等待協程或者呼叫 :meth:`asyncio.create_task` 函式: ::" #: ../../library/asyncio-dev.rst:202 msgid "Detect never-retrieved exceptions" @@ -330,10 +309,7 @@ msgstr "" #: ../../library/asyncio-dev.rst:209 msgid "Example of an unhandled exception::" -msgstr "" -"未處理例外的例子:\n" -"\n" -"::" +msgstr "未處理例外的例子: ::" #: ../../library/asyncio-dev.rst:232 msgid "" @@ -341,6 +317,4 @@ msgid "" "the task was created::" msgstr "" ":ref:`啟用除錯模式 `\\ 以取得任務建立處的追蹤資訊 " -"(traceback):\n" -"\n" -"::" +"(traceback): ::" diff --git a/library/asyncio-future.po b/library/asyncio-future.po index 38c2d3aef9..c0a2b9830a 100644 --- a/library/asyncio-future.po +++ b/library/asyncio-future.po @@ -27,7 +27,7 @@ msgid "" "**Source code:** :source:`Lib/asyncio/futures.py`, :source:`Lib/asyncio/" "base_futures.py`" msgstr "" -"**原始碼:**\\ :source:`Lib/asyncio/futures.py`\\ 、\\ :source:`Lib/asyncio/" +"**原始碼:**\\ :source:`Lib/asyncio/futures.py、source:`Lib/asyncio/" "base_futures.py`" #: ../../library/asyncio-future.rst:15 @@ -43,7 +43,7 @@ msgstr "Future 函式" #: ../../library/asyncio-future.rst:24 msgid "Return ``True`` if *obj* is either of:" -msgstr "如果 *obj* 為下面任意物件,回傳 ``True``\\ :" +msgstr "如果 *obj* 為下面任意物件,回傳 ``True``:" #: ../../library/asyncio-future.rst:26 msgid "an instance of :class:`asyncio.Future`," @@ -67,8 +67,8 @@ msgid "" "*obj* argument as is, if *obj* is a :class:`Future`, a :class:`Task`, or a " "Future-like object (:func:`isfuture` is used for the test.)" msgstr "" -"*obj* 引數會保持原樣,\\ *obj* 須為 :class:`Future`\\ 、\\ :class:`Task` 或" -"類 Future 物件(可以用 :func:`isfuture` 來進行檢查。)" +"*obj* 引數會保持原樣,*obj* 須為 :class:`Future`、:class:`Task` 或類 Future " +"物件(可以用 :func:`isfuture` 來進行檢查。)" #: ../../library/asyncio-future.rst:42 msgid "" @@ -85,8 +85,8 @@ msgid "" "a :class:`Task` object that would await on *obj*, if *obj* is an awaitable (:" "func:`inspect.isawaitable` is used for the test.)" msgstr "" -"一個會等待 *obj* 的 :class:`Task` 物件,\\ *obj* 須為一個可等待物件(\\ :" -"func:`inspect.isawaitable` 用於測試。)" +"一個會等待 *obj* 的 :class:`Task` 物件,*obj* 須為一個可等待物件(\\ :func:" +"`inspect.isawaitable` 用於測試。)" #: ../../library/asyncio-future.rst:50 msgid "If *obj* is neither of the above a :exc:`TypeError` is raised." @@ -200,8 +200,8 @@ msgid "" "If the Future is *done* and has an exception set by the :meth:" "`set_exception` method, this method raises the exception." msgstr "" -"如果 Future 狀態為 *done*\\ ,並擁有 :meth:`set_exception` 方法設定的一個例" -"外,那麼這個方法會引發該例外。" +"如果 Future 狀態為 *done*,並擁有 :meth:`set_exception` 方法設定的一個例外," +"那麼這個方法會引發該例外。" #: ../../library/asyncio-future.rst:119 ../../library/asyncio-future.rst:207 msgid "" @@ -233,28 +233,26 @@ msgstr "將 Future 標記為 *done* 並設定一個例外。" #: ../../library/asyncio-future.rst:141 msgid "Return ``True`` if the Future is *done*." -msgstr "如果 Future 已為 *done* 則回傳 ``True``\\ 。" +msgstr "如果 Future 已為 *done* 則回傳 ``True``。" #: ../../library/asyncio-future.rst:143 msgid "" "A Future is *done* if it was *cancelled* or if it has a result or an " "exception set with :meth:`set_result` or :meth:`set_exception` calls." msgstr "" -"如果 Future 有被 *cancelled*\\ 、\\ :meth:`set_result` 有被呼叫來為其設定結" -"果、或 :meth:`set_exception` 有被呼叫為其設定例外,那麼它就是 *done*\\ 。" +"如果 Future 有被 *cancelled*、:meth:`set_result` 有被呼叫來為其設定結果、或 :" +"meth:`set_exception` 有被呼叫為其設定例外,那麼它就是 *done*。" #: ../../library/asyncio-future.rst:149 msgid "Return ``True`` if the Future was *cancelled*." -msgstr "如果 Future 已經被 *cancelled* 則回傳 ``True``\\ 。" +msgstr "如果 Future 已經被 *cancelled* 則回傳 ``True``。" #: ../../library/asyncio-future.rst:151 msgid "" "The method is usually used to check if a Future is not *cancelled* before " "setting a result or an exception for it::" msgstr "" -"這個方法通常在為 Future 設定結果或例外前用來確認它還沒被 *cancelled*\\ :\n" -"\n" -"::" +"這個方法通常在為 Future 設定結果或例外前用來確認它還沒被 *cancelled*: ::" #: ../../library/asyncio-future.rst:159 msgid "Add a callback to be run when the Future is *done*." @@ -269,8 +267,8 @@ msgid "" "If the Future is already *done* when this method is called, the callback is " "scheduled with :meth:`loop.call_soon`." msgstr "" -"如果呼叫這個方法時 Future 已經為 *done*\\ ,回呼函式會被 :meth:`loop." -"call_soon` 排程。" +"如果呼叫這個方法時 Future 已經為 *done*,回呼函式會被 :meth:`loop.call_soon` " +"排程。" #: ../../library/asyncio-future.rst:167 msgid "" @@ -279,26 +277,23 @@ msgid "" "context is used when no *context* is provided." msgstr "" "可選僅限關鍵字引數 *context* 用來指定一個讓 *callback* 執行於其中的客製化 :" -"class:`contextvars.Context` 物件。如果沒有提供 *context*\\ ,則使用當前情境。" +"class:`contextvars.Context` 物件。如果沒有提供 *context*,則使用當前情境。" #: ../../library/asyncio-future.rst:171 msgid "" ":func:`functools.partial` can be used to pass parameters to the callback, e." "g.::" -msgstr "" -"可以用 :func:`functools.partial` 傳遞引數給回呼函式,例如:\n" -"\n" -"::" +msgstr "可以用 :func:`functools.partial` 傳遞引數給回呼函式,例如: ::" #: ../../library/asyncio-future.rst:178 msgid "" "The *context* keyword-only parameter was added. See :pep:`567` for more " "details." -msgstr "加入僅限關鍵字參數 *context*\\ 。更多細節請參閱 :pep:`567`\\ 。" +msgstr "加入僅限關鍵字參數 *context*。更多細節請參閱 :pep:`567`。" #: ../../library/asyncio-future.rst:184 msgid "Remove *callback* from the callbacks list." -msgstr "從回呼列表中移除 *callback*\\ 。" +msgstr "從回呼列表中移除 *callback*。" #: ../../library/asyncio-future.rst:186 msgid "" @@ -316,8 +311,8 @@ msgid "" "change the Future's state to *cancelled*, schedule the callbacks, and return " "``True``." msgstr "" -"如果 Future 已經是 *done* 或 *cancelled*\\ ,回傳 ``False``\\ 。否則將 " -"Future 狀態改為 *cancelled* 並在為回呼函式排程後回傳 ``True``\\ 。" +"如果 Future 已經是 *done* 或 *cancelled*,回傳 ``False``。否則將 Future 狀態" +"改為 *cancelled* 並在為回呼函式排程後回傳 ``True``。" #: ../../library/asyncio-future.rst:197 msgid "Added the *msg* parameter." @@ -339,8 +334,7 @@ msgid "" "If the Future isn't *done* yet, this method raises an :exc:" "`InvalidStateError` exception." msgstr "" -"如果 Future 還不為 *done*\\ ,此方法會引發一個 :exc:`InvalidStateError` 例" -"外。" +"如果 Future 還不為 *done*,此方法會引發一個 :exc:`InvalidStateError` 例外。" #: ../../library/asyncio-future.rst:215 msgid "Return the event loop the Future object is bound to." @@ -352,9 +346,7 @@ msgid "" "Task to set result for the Future, and waits until the Future has a result::" msgstr "" "這個例子建立一個 Future 物件,建立一個非同步 Task 並為其排程以設定 Future 結" -"果,然後等待 Future 結果出現:\n" -"\n" -"::" +"果,然後等待 Future 結果出現: ::" #: ../../library/asyncio-future.rst:257 msgid "" @@ -369,7 +361,7 @@ msgid "" "unlike asyncio Futures, :class:`concurrent.futures.Future` instances cannot " "be awaited." msgstr "" -"與 asyncio 的 Future 不同,\\ :class:`concurrent.futures.Future` 實例不可被等" +"與 asyncio 的 Future 不同,:class:`concurrent.futures.Future` 實例不可被等" "待。" #: ../../library/asyncio-future.rst:263 diff --git a/library/asyncio-llapi-index.po b/library/asyncio-llapi-index.po index b073cb620a..cfdae9bb4d 100644 --- a/library/asyncio-llapi-index.po +++ b/library/asyncio-llapi-index.po @@ -878,7 +878,7 @@ msgstr "協定" #: ../../library/asyncio-llapi-index.rst:422 msgid "Protocol classes can implement the following **callback methods**:" -msgstr "協定類別可以實作以下\\ **回呼方法**\\ :" +msgstr "協定類別可以實作以下\\ **回呼方法**:" #: ../../library/asyncio-llapi-index.rst:428 msgid "``callback`` :meth:`connection_made() `" diff --git a/library/asyncio-platforms.po b/library/asyncio-platforms.po index c650699e29..f501b2bf97 100644 --- a/library/asyncio-platforms.po +++ b/library/asyncio-platforms.po @@ -54,8 +54,8 @@ msgid "" "**Source code:** :source:`Lib/asyncio/proactor_events.py`, :source:`Lib/" "asyncio/windows_events.py`, :source:`Lib/asyncio/windows_utils.py`" msgstr "" -"**原始碼:**\\ :source:`Lib/asyncio/proactor_events.py`\\ 、\\ :source:`Lib/" -"asyncio/windows_events.py`\\ 、\\ :source:`Lib/asyncio/windows_utils.py`" +"**原始碼:**\\ :source:`Lib/asyncio/proactor_events.py、source:`Lib/asyncio/" +"windows_events.py、source:`Lib/asyncio/windows_utils.py`" #: ../../library/asyncio-platforms.rst:34 msgid "On Windows, :class:`ProactorEventLoop` is now the default event loop." @@ -116,7 +116,7 @@ msgid "" "subprocess_exec` and :meth:`loop.subprocess_shell` methods are not " "implemented." msgstr "" -"不支援\\ :ref:`子行程 (subprocess) `\\ ,也就是說 :meth:" +"不支援\\ :ref:`子行程 (subprocess) `,也就是說 :meth:" "`loop.subprocess_exec` 和 :meth:`loop.subprocess_shell` method 沒有被實作出" "來。" @@ -160,8 +160,8 @@ msgid "" "`ProactorEventLoop` has a different mechanism to watch child processes." msgstr "" "也不支援 :meth:`policy.set_child_watcher() ` 函式,\\ :class:`ProactorEventLoop` 在監視子行程上有不同" -"的機制。" +"set_child_watcher>` 函式,:class:`ProactorEventLoop` 在監視子行程上有不同的機" +"制。" #: ../../library/asyncio-platforms.rst:87 msgid "macOS" @@ -184,9 +184,7 @@ msgid "" "support character devices on these older versions of macOS. Example::" msgstr "" "在 macOS 10.6、10.7 和 10.8 上,預設的事件迴圈是使用 :class:`selectors." -"KqueueSelector`\\ ,在這些版本上它並不支援字元裝置 (character device)。可以手" -"工設置 :class:`SelectorEventLoop` 來使用 :class:`~selectors.SelectSelector` " +"KqueueSelector`,在這些版本上它並不支援字元裝置 (character device)。可以手工" +"設置 :class:`SelectorEventLoop` 來使用 :class:`~selectors.SelectSelector` " "或 :class:`~selectors.PollSelector` 以在這些舊版 macOS 上支援字元裝置。例" -"如:\n" -"\n" -"::" +"如: ::" diff --git a/library/asyncio-protocol.po b/library/asyncio-protocol.po index 546c256586..ab5b077f76 100644 --- a/library/asyncio-protocol.po +++ b/library/asyncio-protocol.po @@ -554,7 +554,7 @@ msgstr "" #: ../../library/asyncio-protocol.rst:409 msgid "See also :meth:`subprocess.Popen.kill`." -msgstr "另請參閱 :meth:`subprocess.Popen.kill`\\ 。" +msgstr "另請參閱 :meth:`subprocess.Popen.kill`。" #: ../../library/asyncio-protocol.rst:413 msgid "" @@ -575,7 +575,7 @@ msgstr "" #: ../../library/asyncio-protocol.rst:424 msgid "See also :meth:`subprocess.Popen.terminate`." -msgstr "另請參閱 :meth:`subprocess.Popen.terminate`\\ 。" +msgstr "另請參閱 :meth:`subprocess.Popen.terminate`。" #: ../../library/asyncio-protocol.rst:428 msgid "Kill the subprocess by calling the :meth:`kill` method." diff --git a/library/asyncio-queue.po b/library/asyncio-queue.po index f179622621..f71dc3f7fd 100644 --- a/library/asyncio-queue.po +++ b/library/asyncio-queue.po @@ -47,7 +47,7 @@ msgstr "" #: ../../library/asyncio-queue.rst:21 msgid "See also the `Examples`_ section below." -msgstr "另請參閱下方 `Examples`_\\ 。" +msgstr "另請參閱下方 `Examples`_。" #: ../../library/asyncio-queue.rst:24 msgid "Queue" @@ -64,16 +64,16 @@ msgid "" "queue reaches *maxsize* until an item is removed by :meth:`get`." msgstr "" "如果 *maxsize* 小於或等於零,則佇列尺寸是無限制的。如果是大於 ``0`` 的整數," -"則當佇列達到 *maxsize* 時,\\ ``await put()`` 將會阻塞 (block),直到某個元素" -"被 :meth:`get` 取出。" +"則當佇列達到 *maxsize* 時,``await put()`` 將會阻塞 (block),直到某個元素被 :" +"meth:`get` 取出。" #: ../../library/asyncio-queue.rst:35 msgid "" "Unlike the standard library threading :mod:`queue`, the size of the queue is " "always known and can be returned by calling the :meth:`qsize` method." msgstr "" -"不像標準函式庫中執行緒類型的 :mod:`queue`\\ ,佇列的尺寸一直是已知的,可以透" -"過呼叫 :meth:`qsize` 方法回傳。" +"不像標準函式庫中執行緒類型的 :mod:`queue`,佇列的尺寸一直是已知的,可以透過呼" +"叫 :meth:`qsize` 方法回傳。" #: ../../library/asyncio-queue.rst:39 msgid "Removed the *loop* parameter." @@ -81,7 +81,7 @@ msgstr "移除 *loop* 參數。" #: ../../library/asyncio-queue.rst:43 msgid "This class is :ref:`not thread safe `." -msgstr "這個類別是\\ :ref:`不支援執行緒安全的 `\\ 。" +msgstr "這個類別是\\ :ref:`不支援執行緒安全的 `。" #: ../../library/asyncio-queue.rst:47 msgid "Number of items allowed in the queue." @@ -89,11 +89,11 @@ msgstr "佇列中可存放的元素數量。" #: ../../library/asyncio-queue.rst:51 msgid "Return ``True`` if the queue is empty, ``False`` otherwise." -msgstr "如果佇列為空則回傳 ``True``\\ ,否則回傳 ``False``\\ 。" +msgstr "如果佇列為空則回傳 ``True``,否則回傳 ``False``。" #: ../../library/asyncio-queue.rst:55 msgid "Return ``True`` if there are :attr:`maxsize` items in the queue." -msgstr "如果有 :attr:`maxsize` 個條目在佇列中,則回傳 ``True``\\ 。" +msgstr "如果有 :attr:`maxsize` 個條目在佇列中,則回傳 ``True``。" #: ../../library/asyncio-queue.rst:57 msgid "" @@ -101,7 +101,7 @@ msgid "" "`full()` never returns ``True``." msgstr "" "如果佇列用 ``maxsize=0`` (預設)初始化,則 :meth:`full()` 永遠不會回傳 " -"``True``\\ 。" +"``True``。" #: ../../library/asyncio-queue.rst:62 msgid "" @@ -112,7 +112,7 @@ msgstr "從佇列中刪除並回傳一個元素。如果佇列為空,則持續 #: ../../library/asyncio-queue.rst:67 msgid "" "Return an item if one is immediately available, else raise :exc:`QueueEmpty`." -msgstr "如果佇列內有值則立即回傳佇列中的元素,否則引發 :exc:`QueueEmpty`\\ 。" +msgstr "如果佇列內有值則立即回傳佇列中的元素,否則引發 :exc:`QueueEmpty`。" #: ../../library/asyncio-queue.rst:72 msgid "Block until all items in the queue have been received and processed." @@ -127,9 +127,9 @@ msgid "" "unblocks." msgstr "" "當條目新增到佇列的時候,未完成任務的計數就會增加。每當一個消耗者 (consumer) " -"協程呼叫 :meth:`task_done`\\ ,表示這個條目已經被取回且被它包含的所有工作都已" -"完成,未完成任務計數就會減少。當未完成計數降到零的時候,\\ :meth:`join` 阻塞" -"會被解除 (unblock)。" +"協程呼叫 :meth:`task_done`,表示這個條目已經被取回且被它包含的所有工作都已完" +"成,未完成任務計數就會減少。當未完成計數降到零的時候,:meth:`join` 阻塞會被解" +"除 (unblock)。" #: ../../library/asyncio-queue.rst:82 msgid "" @@ -145,7 +145,7 @@ msgstr "不阻塞地將一個元素放入佇列。" #: ../../library/asyncio-queue.rst:89 msgid "If no free slot is immediately available, raise :exc:`QueueFull`." -msgstr "如果沒有立即可用的空閒插槽,引發 :exc:`QueueFull`\\ 。" +msgstr "如果沒有立即可用的空閒插槽,引發 :exc:`QueueFull`。" #: ../../library/asyncio-queue.rst:93 msgid "Return the number of items in the queue." @@ -161,7 +161,7 @@ msgid "" "subsequent call to :meth:`task_done` tells the queue that the processing on " "the task is complete." msgstr "" -"由佇列消耗者使用。對於每個用於獲取一個任務的 :meth:`~Queue.get`\\ ,接續的 :" +"由佇列消耗者使用。對於每個用於獲取一個任務的 :meth:`~Queue.get`,接續的 :" "meth:`task_done` 呼叫會告訴佇列這個任務的處理已經完成。" #: ../../library/asyncio-queue.rst:103 @@ -177,8 +177,7 @@ msgstr "" msgid "" "Raises :exc:`ValueError` if called more times than there were items placed " "in the queue." -msgstr "" -"如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`\\ 。" +msgstr "如果被呼叫的次數多於放入佇列中的項目數量,將引發 :exc:`ValueError`。" #: ../../library/asyncio-queue.rst:113 msgid "Priority Queue" diff --git a/library/asyncio-runner.po b/library/asyncio-runner.po index 32a75ab7f5..4d864c92fd 100644 --- a/library/asyncio-runner.po +++ b/library/asyncio-runner.po @@ -92,10 +92,7 @@ msgstr "" #: ../../library/asyncio-runner.rst:50 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/asyncio-runner.rst:60 msgid "Updated to use :meth:`loop.shutdown_default_executor`." diff --git a/library/asyncio-subprocess.po b/library/asyncio-subprocess.po index e87d715cb8..c6edc40a89 100644 --- a/library/asyncio-subprocess.po +++ b/library/asyncio-subprocess.po @@ -28,8 +28,8 @@ msgid "" "**Source code:** :source:`Lib/asyncio/subprocess.py`, :source:`Lib/asyncio/" "base_subprocess.py`" msgstr "" -"**原始碼:**\\ :source:`Lib/asyncio/subprocess.py`\\ 、\\ :source:`Lib/" -"asyncio/base_subprocess.py`" +"**原始碼:**\\ :source:`Lib/asyncio/subprocess.py`、:source:`Lib/asyncio/" +"base_subprocess.py`" #: ../../library/asyncio-subprocess.rst:14 msgid "" @@ -57,7 +57,7 @@ msgstr "" #: ../../library/asyncio-subprocess.rst:58 msgid "See also the `Examples`_ subsection." -msgstr "另請參閱\\ `Examples`_\\ 。" +msgstr "另請參閱\\ `Examples`_。" #: ../../library/asyncio-subprocess.rst:62 msgid "Creating Subprocesses" diff --git a/library/asyncio-sync.po b/library/asyncio-sync.po index b38a5d8d26..1aafed5bf7 100644 --- a/library/asyncio-sync.po +++ b/library/asyncio-sync.po @@ -97,18 +97,12 @@ msgstr "一個 asyncio 的鎖可以用來確保一個共享資源的存取權被 #: ../../library/asyncio-sync.rst:47 msgid "The preferred way to use a Lock is an :keyword:`async with` statement::" -msgstr "" -"使用 Lock 的推薦方式是透過 :keyword:`async with` 陳述式:\n" -"\n" -"::" +msgstr "使用 Lock 的推薦方式是透過 :keyword:`async with` 陳述式: ::" #: ../../library/asyncio-sync.rst:56 ../../library/asyncio-sync.rst:199 #: ../../library/asyncio-sync.rst:298 msgid "which is equivalent to::" -msgstr "" -"這等價於:\n" -"\n" -"::" +msgstr "這等價於: ::" #: ../../library/asyncio-sync.rst:67 ../../library/asyncio-sync.rst:112 #: ../../library/asyncio-sync.rst:187 ../../library/asyncio-sync.rst:286 @@ -125,8 +119,8 @@ msgid "" "This method waits until the lock is *unlocked*, sets it to *locked* and " "returns ``True``." msgstr "" -"此方法會持續等待直到鎖的狀態成為 *unlocked*\\ ,並將其設置為 *locked* 和回傳 " -"``True``\\ 。" +"此方法會持續等待直到鎖的狀態成為 *unlocked*,並將其設置為 *locked* 和回傳 " +"``True``。" #: ../../library/asyncio-sync.rst:77 msgid "" @@ -157,7 +151,7 @@ msgstr "如果鎖的狀態為 *unlocked* 則 :exc:`RuntimeError` 會被引發。 #: ../../library/asyncio-sync.rst:94 msgid "Return ``True`` if the lock is *locked*." -msgstr "如果鎖的狀態為 *locked* 則回傳 ``True``\\ 。" +msgstr "如果鎖的狀態為 *locked* 則回傳 ``True``。" #: ../../library/asyncio-sync.rst:98 msgid "Event" @@ -182,16 +176,13 @@ msgid "" "*true*. The flag is set to *false* initially." msgstr "" "一個 Event 物件會管理一個內部旗標 (flag),它可以透過 :meth:`~Event.set` 方法" -"來被設為 *true* 並透過 :meth:`clear` 方法來重置為 *false*\\ 。\\ :meth:" -"`~Event.wait` 方法會被阻塞 (block) 直到該旗標被設為 *true*\\ 。該旗標初始設置" -"為 *false*\\ 。" +"來被設為 *true* 並透過 :meth:`clear` 方法來重置為 *false*。:meth:`~Event." +"wait` 方法會被阻塞 (block) 直到該旗標被設為 *true*。該旗標初始設置為 " +"*false*。" #: ../../library/asyncio-sync.rst:117 ../../library/asyncio-sync.rst:365 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/asyncio-sync.rst:142 msgid "Wait until the event is set." @@ -202,8 +193,8 @@ msgid "" "If the event is set, return ``True`` immediately. Otherwise block until " "another task calls :meth:`~Event.set`." msgstr "" -"如果事件有被設置則立刻回傳 ``True``\\ 。否則持續阻塞直到另一個任務呼叫 :meth:" -"`~Event.set`\\ 。" +"如果事件有被設置則立刻回傳 ``True``。否則持續阻塞直到另一個任務呼叫 :meth:" +"`~Event.set`。" #: ../../library/asyncio-sync.rst:149 msgid "Set the event." @@ -227,7 +218,7 @@ msgstr "" #: ../../library/asyncio-sync.rst:163 msgid "Return ``True`` if the event is set." -msgstr "如果事件有被設置則回傳 ``True``\\ 。" +msgstr "如果事件有被設置則回傳 ``True``。" #: ../../library/asyncio-sync.rst:167 msgid "Condition" @@ -262,16 +253,13 @@ msgid "" "The optional *lock* argument must be a :class:`Lock` object or ``None``. In " "the latter case a new Lock object is created automatically." msgstr "" -"可選的 *lock* 引數必須是一個 :class:`Lock` 物件或者為 ``None``\\ 。如為後者則" -"一個新的 Lock 物件會被自動建立。" +"可選的 *lock* 引數必須是一個 :class:`Lock` 物件或者為 ``None``。如為後者則一" +"個新的 Lock 物件會被自動建立。" #: ../../library/asyncio-sync.rst:190 msgid "" "The preferred way to use a Condition is an :keyword:`async with` statement::" -msgstr "" -"使用 Condition 的推薦方式是透過 :keyword:`async with` 陳述式:\n" -"\n" -"::" +msgstr "使用 Condition 的推薦方式是透過 :keyword:`async with` 陳述式: ::" #: ../../library/asyncio-sync.rst:212 msgid "Acquire the underlying lock." @@ -282,8 +270,8 @@ msgid "" "This method waits until the underlying lock is *unlocked*, sets it to " "*locked* and returns ``True``." msgstr "" -"此方法會持續等待直到底層的鎖為 *unlocked*\\ ,並將其設為 *locked* 並回傳 " -"``True``\\ 。" +"此方法會持續等待直到底層的鎖為 *unlocked*,並將其設為 *locked* 並回傳 " +"``True``。" #: ../../library/asyncio-sync.rst:219 msgid "" @@ -304,7 +292,7 @@ msgstr "" #: ../../library/asyncio-sync.rst:228 msgid "Return ``True`` if the underlying lock is acquired." -msgstr "如果已獲取底層的鎖則回傳 ``True``\\ 。" +msgstr "如果已獲取底層的鎖則回傳 ``True``。" #: ../../library/asyncio-sync.rst:232 msgid "Wake up all tasks waiting on this condition." @@ -312,7 +300,7 @@ msgstr "喚醒所有正在等待此條件的任務。" #: ../../library/asyncio-sync.rst:234 msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks." -msgstr "這個方法的行為就像 :meth:`notify`\\ ,但會喚醒所有正在等待的任務。" +msgstr "這個方法的行為就像 :meth:`notify`,但會喚醒所有正在等待的任務。" #: ../../library/asyncio-sync.rst:243 msgid "Release the underlying lock." @@ -320,7 +308,7 @@ msgstr "釋放底層的鎖。" #: ../../library/asyncio-sync.rst:245 msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised." -msgstr "當調用於一個未被解開的鎖之上時,會引發一個 :exc:`RuntimeError`\\ 。" +msgstr "當調用於一個未被解開的鎖之上時,會引發一個 :exc:`RuntimeError`。" #: ../../library/asyncio-sync.rst:250 msgid "Wait until notified." @@ -331,8 +319,8 @@ msgid "" "If the calling task has not acquired the lock when this method is called, a :" "exc:`RuntimeError` is raised." msgstr "" -"當此方法被呼叫時,如果呼叫它的任務還沒有獲取鎖的話,\\ :exc:`RuntimeError` 會" -"被引發。" +"當此方法被呼叫時,如果呼叫它的任務還沒有獲取鎖的話,:exc:`RuntimeError` 會被" +"引發。" #: ../../library/asyncio-sync.rst:255 msgid "" @@ -342,11 +330,11 @@ msgid "" msgstr "" "此方法會釋放底層的鎖,然後持續阻塞直到被 :meth:`notify` 或 :meth:" "`notify_all` 的呼叫所喚醒。一但被喚醒,Condition 會重新獲取該鎖且此方法會回" -"傳 ``True``\\ 。" +"傳 ``True``。" #: ../../library/asyncio-sync.rst:262 msgid "Wait until a predicate becomes *true*." -msgstr "持續等待直到謂語 (predicate) 成為 *true*\\ 。" +msgstr "持續等待直到謂語 (predicate) 成為 *true*。" #: ../../library/asyncio-sync.rst:264 msgid "" @@ -373,7 +361,7 @@ msgid "" msgstr "" "一個旗號物件會管理一個內部計數器,會在每次呼叫 :meth:`acquire` 時減少一、每次" "呼叫 :meth:`release` 時增加一。此計數器永遠不會少於零;當 :meth:`acquire` 發" -"現它是零時,它會持續阻塞並等待某任務呼叫 :meth:`release`\\ 。" +"現它是零時,它會持續阻塞並等待某任務呼叫 :meth:`release`。" #: ../../library/asyncio-sync.rst:282 msgid "" @@ -387,10 +375,7 @@ msgstr "" #: ../../library/asyncio-sync.rst:289 msgid "" "The preferred way to use a Semaphore is an :keyword:`async with` statement::" -msgstr "" -"使用 Semaphore 的推薦方式是透過 :keyword:`async with` 陳述式:\n" -"\n" -"::" +msgstr "使用 Semaphore 的推薦方式是透過 :keyword:`async with` 陳述式: ::" #: ../../library/asyncio-sync.rst:311 msgid "Acquire a semaphore." @@ -402,12 +387,12 @@ msgid "" "``True`` immediately. If it is zero, wait until a :meth:`release` is called " "and return ``True``." msgstr "" -"如果內部計數器大於零,將其減一並立刻回傳 ``True``\\ 。如果為零,則持續等待直" -"到 :meth:`release` 被呼叫,並回傳 ``True``\\ 。" +"如果內部計數器大於零,將其減一並立刻回傳 ``True``。如果為零,則持續等待直到 :" +"meth:`release` 被呼叫,並回傳 ``True``。" #: ../../library/asyncio-sync.rst:319 msgid "Returns ``True`` if semaphore can not be acquired immediately." -msgstr "如果旗號無法立即被取得則回傳 ``True``\\ 。" +msgstr "如果旗號無法立即被取得則回傳 ``True``。" #: ../../library/asyncio-sync.rst:323 msgid "" @@ -422,8 +407,8 @@ msgid "" "Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more " "``release()`` calls than ``acquire()`` calls." msgstr "" -"和 :class:`BoundedSemaphore` 不同,\\ :class:`Semaphore` 允許 ``release()`` " -"的呼叫次數多於 ``acquire()``\\ 。" +"和 :class:`BoundedSemaphore` 不同,:class:`Semaphore` 允許 ``release()`` 的呼" +"叫次數多於 ``acquire()``。" #: ../../library/asyncio-sync.rst:331 msgid "BoundedSemaphore" @@ -440,7 +425,7 @@ msgid "" "counter above the initial *value*." msgstr "" "Bounded Semaphore 是 :class:`Semaphore` 的另一版本,如果其內部的計數器數值增" -"加至大於初始 *value* 值的話,\\ :exc:`ValueError` 會在 :meth:`~Semaphore." +"加至大於初始 *value* 值的話,:exc:`ValueError` 會在 :meth:`~Semaphore." "release` 時被引發。" #: ../../library/asyncio-sync.rst:346 @@ -546,4 +531,4 @@ msgid "" msgstr "" "透過 ``await lock`` 或 ``yield from lock`` 和/或 :keyword:`with` 陳述式 " "(``with await lock``, ``with (yield from lock)``) 來獲取鎖的方式已被移除。請" -"改用 ``async with lock``\\ 。" +"改用 ``async with lock``。" diff --git a/library/asyncio-task.po b/library/asyncio-task.po index 03ca89272b..84133b14cc 100644 --- a/library/asyncio-task.po +++ b/library/asyncio-task.po @@ -307,10 +307,7 @@ msgstr "" #: ../../library/asyncio-task.rst:729 ../../library/asyncio-task.rst:769 #: ../../library/asyncio-task.rst:868 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/asyncio-task.rst:346 msgid "" @@ -752,10 +749,7 @@ msgstr "" #: ../../library/asyncio-task.rst:814 msgid "Usage::" -msgstr "" -"用法:\n" -"\n" -"::" +msgstr "用法: ::" #: ../../library/asyncio-task.rst:818 msgid "" diff --git a/library/base64.po b/library/base64.po index d16ab07b1c..928ccb5b37 100644 --- a/library/base64.po +++ b/library/base64.po @@ -315,14 +315,13 @@ msgstr "" "支援。" #: ../../library/base64.rst:194 -#, fuzzy msgid "" "*wrapcol* controls whether the output should have newline (``b'\\n'``) " "characters added to it. If this is non-zero, each output line will be at " "most this many characters long, excluding the trailing newline." msgstr "" "*wrapcol* 控制輸出是否應該包含換行字元 (``b'\\n'``) 。如果這個值不為零,每行" -"輸出的長度將不超過這個字元長度。" +"輸出的長度將不超過這個字元長度(不包含後面的換行符號)。" #: ../../library/base64.rst:198 msgid "" diff --git a/library/builtins.po b/library/builtins.po index 6bbd869710..4605aa63de 100644 --- a/library/builtins.po +++ b/library/builtins.po @@ -45,9 +45,7 @@ msgid "" msgstr "" "大多數應用程式通常不會顯式地存取此模組,但在提供與內建值同名之物件的模組中可" "能很有用,不過其中還會需要內建該名稱。例如,在一個將內建 :func:`open` 包裝起" -"來以實現另一版本 :func:`open` 函式的模組中,這個模組可以直接被使用:\n" -"\n" -"::" +"來以實現另一版本 :func:`open` 函式的模組中,這個模組可以直接被使用: ::" #: ../../library/builtins.rst:38 msgid "" @@ -58,6 +56,6 @@ msgid "" "used by alternate implementations of Python." msgstr "" "有個實作細節是,大多數模組都將名稱 ``__builtins__`` 作為其全域性變數的一部分" -"以提使用。\\ ``__builtins__`` 的值通常是這個模組或者這個模組的 :attr:" -"`~object.__dict__` 屬性值。由於這是一個實作細節,因此 Python 的其他實作可能不" -"會使用它。" +"以提使用。``__builtins__`` 的值通常是這個模組或者這個模組的 :attr:`~object." +"__dict__` 屬性值。由於這是一個實作細節,因此 Python 的其他實作可能不會使用" +"它。" diff --git a/library/cmath.po b/library/cmath.po index 01ba53a37b..f77646f1ee 100644 --- a/library/cmath.po +++ b/library/cmath.po @@ -76,14 +76,13 @@ msgid "Conversions to and from polar coordinates" msgstr "轉換到極座標和從極座標做轉換" #: ../../library/cmath.rst:44 -#, fuzzy msgid "" "A Python complex number ``z`` is stored internally using *rectangular* or " "*Cartesian* coordinates. It is completely determined by its *real part* ``z." "real`` and its *imaginary part* ``z.imag``." msgstr "" "Python 複數 ``z`` 是用 *直角坐標* 或 *笛卡爾坐標* 儲存在內部的。它完全是由其 " -"*實部* ``z.real`` 和 *虛部* ``z.imag`` 所決定。換句話說: ::" +"*實部* ``z.real`` 和 *虛部* ``z.imag`` 所決定。" #: ../../library/cmath.rst:48 msgid "" @@ -136,13 +135,12 @@ msgstr "" "值, *phi* 是 *x* 的相位角。 ``polar(x)`` 相當於 ``(abs(x), phase(x))``。" #: ../../library/cmath.rst:89 -#, fuzzy msgid "" "Return the complex number *x* with polar coordinates *r* and *phi*. " "Equivalent to ``complex(r * math.cos(phi), r * math.sin(phi))``." msgstr "" -"透過極座標 *r* 和 *phi* 回傳複數 *x*。相當於 ``r * (math.cos(phi) + math." -"sin(phi)*1j)``。" +"透過極座標 *r* 和 *phi* 回傳複數 *x*。相當於 ``complex(r * math.cos(phi), r " +"* math.sin(phi))``。" #: ../../library/cmath.rst:94 msgid "Power and logarithmic functions" diff --git a/library/collections.po b/library/collections.po index 88b1906f21..d7360eb812 100644 --- a/library/collections.po +++ b/library/collections.po @@ -37,8 +37,8 @@ msgid "" "`dict`, :class:`list`, :class:`set`, and :class:`tuple`." msgstr "" "這個模組實作了一些特別的容器資料型態,用來替代 Python 一般內建的容器,例如 :" -"class:`dict`\\ (字典)、\\ :class:`list`\\ (串列)、\\ :class:`set`\\ (集" -"合)和 :class:`tuple`\\ (元組)。" +"class:`dict`\\ (字典)、:class:`list`\\ (串列)、:class:`set`\\ (集合)" +"和 :class:`tuple`\\ (元組)。" #: ../../library/collections.rst:25 msgid ":func:`namedtuple`" @@ -209,7 +209,7 @@ msgstr "" #: ../../library/collections.rst:86 msgid "The optional ``m`` parameter was added." -msgstr "加入可選參數 ``m``\\ 。" +msgstr "加入可選參數 ``m``。" #: ../../library/collections.rst:89 msgid "Keyword arguments support was added." @@ -234,18 +234,13 @@ msgid "" "Note, the iteration order of a :class:`ChainMap()` is determined by scanning " "the mappings last to first::" msgstr "" -"注意,一個 :class:`ChainMap()` 的疊代順序是透過由後往前掃描對映而定:\n" -"\n" -"::" +"注意,一個 :class:`ChainMap()` 的疊代順序是透過由後往前掃描對映而定: ::" #: ../../library/collections.rst:110 msgid "" "This gives the same ordering as a series of :meth:`dict.update` calls " "starting with the last mapping::" -msgstr "" -"這和呼叫 :meth:`dict.update` 結果的順序一樣是從最後一個對映開始:\n" -"\n" -"::" +msgstr "這和呼叫 :meth:`dict.update` 結果的順序一樣是從最後一個對映開始: ::" #: ../../library/collections.rst:118 msgid "Added support for ``|`` and ``|=`` operators, specified in :pep:`584`." @@ -304,29 +299,20 @@ msgstr "此章節提供了多種操作 ChainMap 的案例。" #: ../../library/collections.rst:151 msgid "Example of simulating Python's internal lookup chain::" -msgstr "" -"模擬 Python 內部檢索鏈結的例子:\n" -"\n" -"::" +msgstr "模擬 Python 內部檢索鏈結的例子: ::" #: ../../library/collections.rst:156 msgid "" "Example of letting user specified command-line arguments take precedence " "over environment variables which in turn take precedence over default " "values::" -msgstr "" -"讓使用者指定的命令列引數優先於環境變數、再優先於預設值的範例:\n" -"\n" -"::" +msgstr "讓使用者指定的命令列引數優先於環境變數、再優先於預設值的範例: ::" #: ../../library/collections.rst:173 msgid "" "Example patterns for using the :class:`ChainMap` class to simulate nested " "contexts::" -msgstr "" -"用 :class:`ChainMap` 類別模擬巢狀上下文的範例模式:\n" -"\n" -"::" +msgstr "用 :class:`ChainMap` 類別模擬巢狀上下文的範例模式: ::" #: ../../library/collections.rst:192 msgid "" @@ -336,9 +322,7 @@ msgid "" "subclass that updates keys found deeper in the chain::" msgstr "" ":class:`ChainMap` 類別只對鏈結中第一個對映來做寫入或刪除,但檢索則會掃過整個" -"鏈結。但如果需要對更深層的鍵寫入或刪除,透過定義一個子類別來實作也不困難:\n" -"\n" -"::" +"鏈結。但如果需要對更深層的鍵寫入或刪除,透過定義一個子類別來實作也不困難: ::" #: ../../library/collections.rst:223 msgid ":class:`Counter` objects" @@ -348,10 +332,7 @@ msgstr ":class:`Counter` 物件" msgid "" "A counter tool is provided to support convenient and rapid tallies. For " "example::" -msgstr "" -"提供一個支援方便且快速計數的計數器工具,例如:\n" -"\n" -"::" +msgstr "提供一個支援方便且快速計數的計數器工具,例如: ::" #: ../../library/collections.rst:245 msgid "" @@ -398,9 +379,9 @@ msgid "" "encountered in the left operand and then by the order encountered in the " "right operand." msgstr "" -"作為 :class:`dict` 的子類別,\\ :class:`Counter` 繼承了記憶插入順序的功能。" -"對 *Counter* 做數學運算後同樣保留順序性,其結果是依照各個元素在運算元左邊出現" -"的時間先後、再按照運算元右邊出現的時間先後來排列。" +"作為 :class:`dict` 的子類別,:class:`Counter` 繼承了記憶插入順序的功能。對 " +"*Counter* 做數學運算後同樣保留順序性,其結果是依照各個元素在運算元左邊出現的" +"時間先後、再按照運算元右邊出現的時間先後來排列。" #: ../../library/collections.rst:280 msgid "" @@ -415,8 +396,8 @@ msgid "" "is less than one, :meth:`elements` will ignore it." msgstr "" "回傳每個元素都重複出現計算次數的 iterator(疊代器)物件,其中元素的回傳順序是" -"依照各元素首次出現的時間先後。如果元素的出現次數小於 1,\\ :meth:`elements` " -"方法會忽略這些元素。" +"依照各元素首次出現的時間先後。如果元素的出現次數小於 1,:meth:`elements` 方法" +"會忽略這些元素。" #: ../../library/collections.rst:295 msgid "" @@ -426,8 +407,8 @@ msgid "" "ordered in the order first encountered:" msgstr "" "回傳一個 list,包含出現最多次的 *n* 個元素及其出現次數,並按照出現次數排序。" -"如果 *n* 被省略或者為 ``None``\\ ,\\ :meth:`most_common` 會回傳\\ *所有* " -"counter 中的元素。出現次數相同的元素會按照首次出現的時間先後來排列:" +"如果 *n* 被省略或者為 ``None``,:meth:`most_common` 會回傳\\ *所有* counter " +"中的元素。出現次數相同的元素會按照首次出現的時間先後來排列:" #: ../../library/collections.rst:305 msgid "" @@ -463,7 +444,7 @@ msgid "" "sequence of ``(key, value)`` pairs." msgstr "" "加上自一個 *iterable* 計算出的計數或加上另一個 *mapping*\\ (或 Counter)中的" -"計數,行為類似 :meth:`dict.update` 但是是為了加上計數而非取代其值。另外,\\ " +"計數,行為類似 :meth:`dict.update` 但是是為了加上計數而非取代其值。另外," "*iterable* 需要是一串將被計算個數元素的序列,而非元素為 ``(key, value)`` 形式" "的序列。" @@ -493,10 +474,7 @@ msgstr "" #: ../../library/collections.rst:354 msgid "Common patterns for working with :class:`Counter` objects::" -msgstr "" -"使用 :class:`Counter` 物件的常見使用模式:\n" -"\n" -"::" +msgstr "使用 :class:`Counter` 物件的常見使用模式: ::" #: ../../library/collections.rst:366 msgid "" @@ -560,7 +538,7 @@ msgid "" "zero values for both inputs and outputs." msgstr "" "像是 ``c[key] += 1`` 的原地操作中,其值之型別只必須支援加減,所以分數、浮點" -"數、十進位數與其負值都可以使用。同理,\\ :meth:`~Counter.update` 和 :meth:" +"數、十進位數與其負值都可以使用。同理,:meth:`~Counter.update` 和 :meth:" "`~Counter.subtract` 也都允許 0 或負值為輸入或輸出。" #: ../../library/collections.rst:422 @@ -585,7 +563,7 @@ msgid "" "html>`_ in Smalltalk." msgstr "" "Smalltalk 中的 `Bag class `_\\ 。" +"base/html_node/Bag.html>`_。" #: ../../library/collections.rst:435 msgid "" @@ -608,7 +586,7 @@ msgid "" "19*." msgstr "" "Multiset 的數學運算及其使用時機,參考 *Knuth, Donald. The Art of Computer " -"Programming Volume II, Section 4.6.3, Exercise 19*\\ 。" +"Programming Volume II, Section 4.6.3, Exercise 19*。" #: ../../library/collections.rst:444 msgid "" @@ -616,9 +594,7 @@ msgid "" "elements, see :func:`itertools.combinations_with_replacement`::" msgstr "" "若要根據給定的元素集合來列舉出所有不重複且擁有指定元素數量的 multiset,請見 :" -"func:`itertools.combinations_with_replacement`\\ :\n" -"\n" -"::" +"func:`itertools.combinations_with_replacement`: ::" #: ../../library/collections.rst:451 msgid ":class:`deque` objects" @@ -718,11 +694,11 @@ msgid "" "if not found." msgstr "" "回傳 deque 中 *x* 的位置(或在索引 *start* 之後、索引 *stop* 之前的位置)。回" -"傳第一個匹配的位置,如果沒找到就引發 :exc:`ValueError`\\ 。" +"傳第一個匹配的位置,如果沒找到就引發 :exc:`ValueError`。" #: ../../library/collections.rst:533 msgid "Insert *x* into the deque at position *i*." -msgstr "在 deque 位置 *i* 中插入 *x*\\ 。" +msgstr "在 deque 位置 *i* 中插入 *x*。" #: ../../library/collections.rst:535 msgid "" @@ -738,7 +714,7 @@ msgid "" "elements are present, raises an :exc:`IndexError`." msgstr "" "移除並回傳 deque 的最右側元素,若本來就沒有任何元素,則會引發 :exc:" -"`IndexError`\\ 。" +"`IndexError`。" #: ../../library/collections.rst:549 msgid "" @@ -746,18 +722,17 @@ msgid "" "are present, raises an :exc:`IndexError`." msgstr "" "移除並回傳 deque 的最左側元素,若本來就沒有任何元素,則會引發 :exc:" -"`IndexError`\\ 。" +"`IndexError`。" #: ../../library/collections.rst:555 msgid "" "Remove the first occurrence of *value*. If not found, raises a :exc:" "`ValueError`." -msgstr "" -"移除第一個出現的 *value*\\ ,如果沒找到的話就引發一個 :exc:`ValueError`\\ 。" +msgstr "移除第一個出現的 *value*,如果沒找到的話就引發一個 :exc:`ValueError`。" #: ../../library/collections.rst:561 msgid "Reverse the elements of the deque in-place and then return ``None``." -msgstr "將 deque 中的元素原地 (in-place) 倒序排列並回傳 ``None``\\ 。" +msgstr "將 deque 中的元素原地 (in-place) 倒序排列並回傳 ``None``。" #: ../../library/collections.rst:568 msgid "" @@ -772,7 +747,7 @@ msgid "" "to ``d.append(d.popleft())``." msgstr "" "當 deque 不是空的,向右輪轉一步和 ``d.appendleft(d.pop())`` 有相同意義,而向" -"左輪轉亦等價於 ``d.append(d.popleft())``\\ 。" +"左輪轉亦等價於 ``d.append(d.popleft())``。" #: ../../library/collections.rst:576 msgid "Deque objects also provide one read-only attribute:" @@ -780,7 +755,7 @@ msgstr "Deque 物件也提供了一個唯讀屬性:" #: ../../library/collections.rst:580 msgid "Maximum size of a deque or ``None`` if unbounded." -msgstr "Deque 的最大長度,如果不限制長度的話則為 ``None``\\ 。" +msgstr "Deque 的最大長度,如果不限制長度的話則為 ``None``。" #: ../../library/collections.rst:585 msgid "" @@ -821,19 +796,13 @@ msgstr "這一章節提供了多種操作 deque 的案例。" msgid "" "Bounded length deques provide functionality similar to the ``tail`` filter " "in Unix::" -msgstr "" -"被限制長度的 deque 功能類似 Unix 中的 ``tail`` filter:\n" -"\n" -"::" +msgstr "被限制長度的 deque 功能類似 Unix 中的 ``tail`` filter: ::" #: ../../library/collections.rst:663 msgid "" "Another approach to using deques is to maintain a sequence of recently added " "elements by appending to the right and popping to the left::" -msgstr "" -"另一用法是透過從右邊加入、從左邊移除來維護最近加入元素的 list:\n" -"\n" -"::" +msgstr "另一用法是透過從右邊加入、從左邊移除來維護最近加入元素的 list: ::" #: ../../library/collections.rst:678 msgid "" @@ -848,9 +817,7 @@ msgstr "" "robin_scheduling>`_\\ 可以透過在 :class:`deque` 中放入 iterator 來實現,值自" "當前 iterator 的位置 0 取出,如果 iterator 已經消耗完畢就用 :meth:`~deque." "popleft` 將其從佇列中移除,否則利用 :meth:`~deque.rotate` 來將其移至佇列尾" -"端:\n" -"\n" -"::" +"端: ::" #: ../../library/collections.rst:697 msgid "" @@ -860,9 +827,7 @@ msgid "" msgstr "" ":meth:`~deque.rotate` 提供了可以用來實作 :class:`deque` 切片和刪除的方法。舉" "例來說,用純 Python 實作 ``del d[n]`` 需要用 ``rotate()`` 來定位要被移除的元" -"素:\n" -"\n" -"::" +"素: ::" #: ../../library/collections.rst:706 msgid "" @@ -890,8 +855,8 @@ msgid "" "writable instance variable. The remaining functionality is the same as for " "the :class:`dict` class and is not documented here." msgstr "" -"回傳一個新的類似字典的物件。\\ :class:`defaultdict` 是內建類別 :class:`dict` " -"的子類別。它覆蓋掉了一個方法並添加了一個可寫入的實例變數。其餘功能與 :class:" +"回傳一個新的類似字典的物件。:class:`defaultdict` 是內建類別 :class:`dict` 的" +"子類別。它覆蓋掉了一個方法並添加了一個可寫入的實例變數。其餘功能與 :class:" "`dict` 相同,此文件不再複述。" #: ../../library/collections.rst:725 @@ -953,9 +918,9 @@ msgid "" "dictionaries, return ``None`` as a default rather than using :attr:" "`default_factory`." msgstr "" -"注意,\\ :meth:`__missing__` *不會*\\ 被 :meth:`~object.__getitem__` 以外的其" -"他方法呼叫,這意味著 :meth:`get` 會像一般的 dict 那樣回傳 ``None`` 做為預設" -"值,而非使用 :attr:`default_factory`。" +"注意,:meth:`__missing__` *不會*\\ 被 :meth:`~object.__getitem__` 以外的其他" +"方法呼叫,這意味著 :meth:`get` 會像一般的 dict 那樣回傳 ``None`` 做為預設值," +"而非使用 :attr:`default_factory`。" #: ../../library/collections.rst:756 msgid ":class:`defaultdict` objects support the following instance variable:" @@ -1000,10 +965,10 @@ msgid "" msgstr "" "當每個鍵第一次被存取時,它還沒有存在於對映中,所以會自動呼叫 :attr:" "`~defaultdict.default_factory` 方法來回傳一個空的 :class:`list` 以建立一個條" -"目,\\ :meth:`list.append` 操作後續會再新增值到這個新的列表裡。當再次存取該鍵" -"時,就如普通字典般操作(回傳該鍵所對應到的 list),\\ :meth:`list.append` 也" -"會新增另一個值到 list 中。和使用與其等價的 :meth:`dict.setdefault` 相比,這個" -"技巧更加快速和簡單:" +"目,:meth:`list.append` 操作後續會再新增值到這個新的列表裡。當再次存取該鍵" +"時,就如普通字典般操作(回傳該鍵所對應到的 list),:meth:`list.append` 也會新" +"增另一個值到 list 中。和使用與其等價的 :meth:`dict.setdefault` 相比,這個技巧" +"更加快速和簡單:" #: ../../library/collections.rst:799 msgid "" @@ -1149,7 +1114,7 @@ msgid "" "`." msgstr "" "*verbose* 和 *rename* 參數成為\\ :ref:`僅限關鍵字引數 `\\ 。" +"only_parameter>`。" #: ../../library/collections.rst:893 msgid "Added the *module* parameter." @@ -1170,9 +1135,7 @@ msgid "" "tuples returned by the :mod:`csv` or :mod:`sqlite3` modules::" msgstr "" "Named tuple 在賦予欄位名稱於 :mod:`csv` 或 :mod:`sqlite3` 模組回傳之 tuple 時" -"相當有用:\n" -"\n" -"::" +"相當有用: ::" #: ../../library/collections.rst:935 msgid "" @@ -1207,16 +1170,13 @@ msgid "" msgstr "" "回傳一個常規 :class:`dict` 而非 :class:`OrderedDict`,自從 Python 3.7 開始," "dict 已經保證有順序性,如果需要 :class:`OrderedDict` 所專屬的特性,推薦的解法" -"是將結果專換成所需的類型:\\ ``OrderedDict(nt._asdict())``\\ 。" +"是將結果專換成所需的類型:``OrderedDict(nt._asdict())``。" #: ../../library/collections.rst:972 msgid "" "Return a new instance of the named tuple replacing specified fields with new " "values::" -msgstr "" -"回傳一個新的 named tuple 實例,並將指定欄位替換為新的值:\n" -"\n" -"::" +msgstr "回傳一個新的 named tuple 實例,並將指定欄位替換為新的值: ::" #: ../../library/collections.rst:984 msgid "" @@ -1288,9 +1248,7 @@ msgid "" "keyword::" msgstr "" "關於為 named tuple 新增型別提示的方法,請參閱 :class:`typing.NamedTuple`,它" -"運用 :keyword:`class` 關鍵字以提供了一個簡潔的表示法:\n" -"\n" -"::" +"運用 :keyword:`class` 關鍵字以提供了一個簡潔的表示法: ::" #: ../../library/collections.rst:1072 msgid "" @@ -1380,7 +1338,7 @@ msgid "" "with ``d.popitem()`` which is guaranteed to pop the rightmost (last) item." msgstr "" "一個一般的 :class:`dict` 可以用 ``d.popitem()`` 來效仿 OrderedDict 的 ``od." -"popitem(last=True)``\\ ,這保證會移除最右邊(最後一個)的元素。" +"popitem(last=True)``,這保證會移除最右邊(最後一個)的元素。" #: ../../library/collections.rst:1112 msgid "" @@ -1389,8 +1347,8 @@ msgid "" "leftmost (first) item if it exists." msgstr "" "一個一般的 :class:`dict` 可以用 ``(k := next(iter(d)), d.pop(k))`` 來效仿 " -"OrderedDict 的 ``od.popitem(last=False)``\\ ,若最左邊(第一個)的元素存在," -"則將其回傳並移除。" +"OrderedDict 的 ``od.popitem(last=False)``,若最左邊(第一個)的元素存在,則將" +"其回傳並移除。" #: ../../library/collections.rst:1116 msgid "" @@ -1407,7 +1365,7 @@ msgid "" "associated value to the rightmost (last) position." msgstr "" "一個一般的 :class:`dict` 可以用 ``d[k] = d.pop(k)`` 來效仿 OrderedDict 的 " -"``od.move_to_end(k, last=True)``\\ ,這會將該鍵與其對應到的值移動至最右(最後" +"``od.move_to_end(k, last=True)``,這會將該鍵與其對應到的值移動至最右(最後" "面)的位置。" #: ../../library/collections.rst:1123 @@ -1471,9 +1429,9 @@ msgid "" "dictionary is used." msgstr "" ":class:`OrderedDict` 物件之間的相等性運算是會檢查順序是否相同的,是透過 " -"``list(od1.items())==list(od2.items())`` 來實現。\\ :class:`OrderedDict` 物件" -"和其他 :class:`~collections.abc.Mapping` 物件間的相等性運算則像普通字典一樣不" -"考慮順序性,這使得 :class:`OrderedDict` 可於任何字典可使用的時機中被替換掉。" +"``list(od1.items())==list(od2.items())`` 來實現。:class:`OrderedDict` 物件和" +"其他 :class:`~collections.abc.Mapping` 物件間的相等性運算則像普通字典一樣不考" +"慮順序性,這使得 :class:`OrderedDict` 可於任何字典可使用的時機中被替換掉。" #: ../../library/collections.rst:1173 msgid "" @@ -1503,9 +1461,7 @@ msgid "" "end::" msgstr "" "建立一個能夠記住鍵\\ *最後*\\ 插入順序的 ordered dictionary 變體很簡單。如果" -"新條目覆蓋了現有條目,則原本插入位置會被更改並移動至末端:\n" -"\n" -"::" +"新條目覆蓋了現有條目,則原本插入位置會被更改並移動至末端: ::" #: ../../library/collections.rst:1201 msgid "" @@ -1539,15 +1495,15 @@ msgid "" "not be kept, allowing it to be used for other purposes." msgstr "" "模擬字典的類別。實例的內容被存於一個字典,可透過 :class:`UserDict` 的 :attr:" -"`data` 屬性來做存取。如果有提供 *initialdata*\\ ,\\ :attr:`data` 屬性會被初" -"始化為其值;要注意指到 *initialdata* 的參照不會被保留,使其可被用於其他目的。" +"`data` 屬性來做存取。如果有提供 *initialdata*,:attr:`data` 屬性會被初始化為" +"其值;要注意指到 *initialdata* 的參照不會被保留,使其可被用於其他目的。" #: ../../library/collections.rst:1316 msgid "" "In addition to supporting the methods and operations of mappings, :class:" "`UserDict` instances provide the following attribute:" msgstr "" -"除了支援作為對映所需的方法與操作,\\ :class:`UserDict` 實例提供了以下屬性:" +"除了支援作為對映所需的方法與操作,:class:`UserDict` 實例提供了以下屬性:" #: ../../library/collections.rst:1321 msgid "" @@ -1588,15 +1544,14 @@ msgid "" msgstr "" "模擬 list 的類別。實例的內容被存於一個 list,可透過 :class:`UserList` 的 :" "attr:`data` 屬性來做存取。實例內容被初始化為 *list* 的複製,預設為一個空的 " -"list ``[]``。\\ *list* 可以是任何 iterable,例如一個真實的 Python list 或是一" +"list ``[]``。*list* 可以是任何 iterable,例如一個真實的 Python list 或是一" "個 :class:`UserList` 物件。" #: ../../library/collections.rst:1346 msgid "" "In addition to supporting the methods and operations of mutable sequences, :" "class:`UserList` instances provide the following attribute:" -msgstr "" -"除了支援可變序列的方法與操作,\\ :class:`UserList` 實例提供了以下屬性:" +msgstr "除了支援可變序列的方法與操作,:class:`UserList` 實例提供了以下屬性:" #: ../../library/collections.rst:1351 msgid "" @@ -1653,15 +1608,15 @@ msgid "" "converted into a string using the built-in :func:`str` function." msgstr "" "模擬字串物件的類別。實例的內容被存於一個字串物件,可透過 :class:`UserString` " -"的 :attr:`data` 屬性來做存取。實例內容被初始化為 *seq* 的複製,\\ *seq* 引數" -"可以是任何可被內建函式 :func:`str` 轉換成字串的物件。" +"的 :attr:`data` 屬性來做存取。實例內容被初始化為 *seq* 的複製,*seq* 引數可以" +"是任何可被內建函式 :func:`str` 轉換成字串的物件。" #: ../../library/collections.rst:1384 msgid "" "In addition to supporting the methods and operations of strings, :class:" "`UserString` instances provide the following attribute:" msgstr "" -"除了支援字串的方法和操作以外,\\ :class:`UserString` 實例也提供了以下屬性:" +"除了支援字串的方法和操作以外,:class:`UserString` 實例也提供了以下屬性:" #: ../../library/collections.rst:1389 msgid "" @@ -1676,4 +1631,4 @@ msgid "" "``isprintable``, and ``maketrans``." msgstr "" "新增方法 ``__getnewargs__``、``__rmod__``、``casefold``、``format_map``、" -"``isprintable`` 以及 ``maketrans``\\ 。" +"``isprintable`` 以及 ``maketrans``。" diff --git a/library/compileall.po b/library/compileall.po index 5d5a638d6a..9bd89d349e 100644 --- a/library/compileall.po +++ b/library/compileall.po @@ -163,7 +163,7 @@ msgstr "" #: ../../library/compileall.rst:124 msgid "Added the ``-i``, ``-b`` and ``-h`` options." -msgstr "新增選項 ``-i``\\ 、\\ ``-b`` 與 ``-h``\\ 。" +msgstr "新增選項 ``-i``、``-b`` 與 ``-h``。" #: ../../library/compileall.rst:127 msgid "" @@ -174,7 +174,7 @@ msgstr "" #: ../../library/compileall.rst:132 msgid "Added the ``--invalidation-mode`` option." -msgstr "新增選項 ``--invalidation-mode``\\ 。" +msgstr "新增選項 ``--invalidation-mode``。" #: ../../library/compileall.rst:135 msgid "" diff --git a/library/concurrent.futures.po b/library/concurrent.futures.po index c0b29ef0ab..d3bb977047 100644 --- a/library/concurrent.futures.po +++ b/library/concurrent.futures.po @@ -192,13 +192,11 @@ msgid "" msgstr "" "如果使用 :keyword:`with` 陳述句,你就可以不用明確地呼叫此方法,這將會自己關" "閉 :class:`Executor`\\(如同呼叫 :meth:`Executor.shutdown` 時 *wait* 被設定" -"為 ``True`` 般等待):\n" -"\n" -"::" +"為 ``True`` 般等待): ::" #: ../../library/concurrent.futures.rst:107 msgid "Added *cancel_futures*." -msgstr "新增 *cancel_futures*\\ 。" +msgstr "新增 *cancel_futures*。" #: ../../library/concurrent.futures.rst:112 msgid "ThreadPoolExecutor" @@ -218,16 +216,11 @@ msgid "" "waits on the results of another :class:`Future`. For example::" msgstr "" "當與 :class:`Future` 關聯的可呼叫物件等待另一個 :class:`Future` 的結果時,可" -"能會發生死鎖 (deadlock)。例如:\n" -"\n" -"::" +"能會發生死鎖 (deadlock)。例如: ::" #: ../../library/concurrent.futures.rst:136 msgid "And::" -msgstr "" -"和:\n" -"\n" -"::" +msgstr "和: ::" #: ../../library/concurrent.futures.rst:150 msgid "" diff --git a/library/contextlib.po b/library/contextlib.po index 269365cada..23c11f2ca6 100644 --- a/library/contextlib.po +++ b/library/contextlib.po @@ -141,10 +141,7 @@ msgstr "" #: ../../library/contextlib.rst:113 msgid "A simple example::" -msgstr "" -"一個簡單範例:\n" -"\n" -"::" +msgstr "一個簡單範例: ::" #: ../../library/contextlib.rst:131 msgid "" @@ -221,10 +218,7 @@ msgstr "" #: ../../library/contextlib.rst:245 msgid "An example using *enter_result*::" -msgstr "" -"一個使用 *enter_result* 的範例:\n" -"\n" -"::" +msgstr "一個使用 *enter_result* 的範例: ::" #: ../../library/contextlib.rst:258 msgid "" @@ -254,10 +248,7 @@ msgstr "" #: ../../library/contextlib.rst:291 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/contextlib.rst:301 msgid "This code is equivalent to::" @@ -364,10 +355,7 @@ msgstr "" #: ../../library/contextlib.rst:405 msgid "Example of ``ContextDecorator``::" -msgstr "" -"``ContextDecorator`` 範例:\n" -"\n" -"::" +msgstr "``ContextDecorator`` 範例: ::" #: ../../library/contextlib.rst:418 ../../library/contextlib.rst:490 msgid "The class can then be used like this::" @@ -409,10 +397,7 @@ msgstr "" #: ../../library/contextlib.rst:476 msgid "Example of ``AsyncContextDecorator``::" -msgstr "" -"``AsyncContextDecorator`` 範例:\n" -"\n" -"::" +msgstr "``AsyncContextDecorator`` 範例: ::" #: ../../library/contextlib.rst:515 msgid "" diff --git a/library/contextvars.po b/library/contextvars.po index 840cab2b66..5ef8f55540 100644 --- a/library/contextvars.po +++ b/library/contextvars.po @@ -37,7 +37,7 @@ msgstr "" #: ../../library/contextvars.rst:21 msgid "See also :pep:`567` for additional details." -msgstr "額外資訊請見 :pep:`567`\\ 。" +msgstr "額外資訊請見 :pep:`567`。" #: ../../library/contextvars.rst:27 msgid "Context Variables" @@ -120,10 +120,7 @@ msgstr "" #: ../../library/contextvars.rst:85 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/contextvars.rst:99 msgid "" diff --git a/library/copy.po b/library/copy.po index 76c08f1639..df91a7a329 100644 --- a/library/copy.po +++ b/library/copy.po @@ -138,7 +138,7 @@ msgid "" "original_list[:]``." msgstr "" "字典的淺層複製可以使用 :meth:`dict.copy`\\,而 list 的淺層複製可以透過賦值整" -"個 list 的切片 (slice) 完成,例如,``copied_list = original_list[:]``\\ 。" +"個 list 的切片 (slice) 完成,例如,``copied_list = original_list[:]``。" #: ../../library/copy.rst:73 msgid "" @@ -164,9 +164,9 @@ msgid "" "opaque object." msgstr "" "想要為一個類別定義它自己的複製操作實作,可以透過定義特殊方法 :meth:" -"`__copy__` 和 :meth:`__deepcopy__`\\ 。呼叫前者以實現淺層複製操作;不必傳入額" -"外引數。呼叫後者以實現深層複製操作;它應傳入一個引數,即 ``memo`` 字典。如" -"果 :meth:`__deepcopy__` 實現需要建立一個元件的深層複製,它應當呼叫 :func:" +"`__copy__` 和 :meth:`__deepcopy__`。呼叫前者以實現淺層複製操作;不必傳入額外" +"引數。呼叫後者以實現深層複製操作;它應傳入一個引數,即 ``memo`` 字典。如果 :" +"meth:`__deepcopy__` 實現需要建立一個元件的深層複製,它應當呼叫 :func:" "`deepcopy` 函式並以該元件作為第一個引數、以該 memo 字典作為第二個引數。memo " "字典應當被當作不透明物件 (opaque object) 來處理。" diff --git a/library/crypto.po b/library/crypto.po index 49bdcb623a..e033e505e4 100644 --- a/library/crypto.po +++ b/library/crypto.po @@ -31,7 +31,7 @@ msgid "" "available. Here's an overview:" msgstr "" "本章所描述的模組 (module) 實作了多種加密演算法。它們可以在安裝時選擇是否一同" -"安裝。在 Unix 系統上,\\ :mod:`crypt` 模組也有機會能夠被使用。以下為概述:" +"安裝。在 Unix 系統上,:mod:`crypt` 模組也有機會能夠被使用。以下為概述:" #: ../../library/crypto.rst:7 msgid "cryptography" diff --git a/library/csv.po b/library/csv.po index 5722cb196b..1a829b7f8e 100644 --- a/library/csv.po +++ b/library/csv.po @@ -553,9 +553,9 @@ msgid "" "escaping." msgstr "" "一個會被寫入器使用的單一字元的字串,當 *quoting* 設定為 :const:`QUOTE_NONE` " -"時逸出\\ *分隔符號*\\ ;當 *doublequote* 設定為 :const:`False` 時逸出\\ *引號" -"*\\ 。在讀取時,\\ *逸出字元*\\ 會移除後面的字元以及任何特殊意義。預設為 :" -"const:`None`,表示禁止逸出。" +"時逸出\\ *分隔符號*;當 *doublequote* 設定為 :const:`False` 時逸出\\ *引號*。" +"在讀取時,*逸出字元*\\ 會移除後面的字元以及任何特殊意義。預設為 :const:" +"`None`,表示禁止逸出。" #: ../../library/csv.rst:416 msgid "An empty *escapechar* is not allowed." diff --git a/library/ctypes.po b/library/ctypes.po index 96ffd89143..20395118a5 100644 --- a/library/ctypes.po +++ b/library/ctypes.po @@ -1258,10 +1258,7 @@ msgstr "" #: ../../library/ctypes.rst:1322 msgid "Here are some examples::" -msgstr "" -"以下是一些範例:\n" -"\n" -"::" +msgstr "以下是一些範例: ::" #: ../../library/ctypes.rst:1333 msgid "" diff --git a/library/datetime.po b/library/datetime.po index 853c709bfb..9cfd8502bc 100644 --- a/library/datetime.po +++ b/library/datetime.po @@ -676,7 +676,7 @@ msgstr "" #: ../../library/datetime.rst:422 msgid "Examples of usage: :class:`timedelta`" -msgstr "用法範例:\\ :class:`timedelta`" +msgstr "用法範例::class:`timedelta`" #: ../../library/datetime.rst:424 msgid "An additional example of normalization::" @@ -798,10 +798,7 @@ msgstr "" #: ../../library/datetime.rst:524 ../../library/datetime.rst:1011 #: ../../library/datetime.rst:1452 msgid "Examples::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/datetime.rst:535 msgid "Previously, this method only supported the format ``YYYY-MM-DD``." @@ -939,10 +936,7 @@ msgstr "" #: ../../library/datetime.rst:636 ../../library/datetime.rst:1866 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/datetime.rst:646 ../../library/datetime.rst:1337 msgid "" @@ -957,10 +951,7 @@ msgstr "" #: ../../library/datetime.rst:650 ../../library/datetime.rst:1339 msgid "``d.timetuple()`` is equivalent to::" -msgstr "" -"``d.timetuple()`` 等價於:\n" -"\n" -"::" +msgstr "``d.timetuple()`` 等價於: ::" #: ../../library/datetime.rst:654 msgid "" @@ -1024,10 +1015,7 @@ msgstr "" #: ../../library/datetime.rst:705 msgid "" "Return a string representing the date in ISO 8601 format, ``YYYY-MM-DD``::" -msgstr "" -"回傳一以 ISO 8601 格式 ``YYYY-MM-DD`` 表示的日期字串:\n" -"\n" -"::" +msgstr "回傳一以 ISO 8601 格式 ``YYYY-MM-DD`` 表示的日期字串: ::" #: ../../library/datetime.rst:713 msgid "For a date *d*, ``str(d)`` is equivalent to ``d.isoformat()``." @@ -1039,10 +1027,7 @@ msgstr "" #: ../../library/datetime.rst:724 ../../library/datetime.rst:1523 msgid "``d.ctime()`` is equivalent to::" -msgstr "" -"``d.ctime()`` 等價於:\n" -"\n" -"::" +msgstr "``d.ctime()`` 等價於: ::" #: ../../library/datetime.rst:728 msgid "" @@ -1069,14 +1054,11 @@ msgstr "" #: ../../library/datetime.rst:748 msgid "Examples of Usage: :class:`date`" -msgstr "用法範例:\\ :class:`date`" +msgstr "用法範例::class:`date`" #: ../../library/datetime.rst:750 msgid "Example of counting days to an event::" -msgstr "" -"計算一個事件的天數的範例:\n" -"\n" -"::" +msgstr "計算一個事件的天數的範例: ::" #: ../../library/datetime.rst:769 msgid "More examples of working with :class:`date`:" @@ -1154,14 +1136,11 @@ msgstr "" #: ../../library/datetime.rst:855 msgid "Equivalent to::" -msgstr "" -"等價於:\n" -"\n" -"::" +msgstr "等價於: ::" #: ../../library/datetime.rst:859 msgid "See also :meth:`now`, :meth:`fromtimestamp`." -msgstr "也請見 :meth:`now`\\ 、\\ :meth:`fromtimestamp`\\ 。" +msgstr "也請見 :meth:`now`、:meth:`fromtimestamp`。" #: ../../library/datetime.rst:861 msgid "" @@ -3065,7 +3044,7 @@ msgstr "" #: ../../library/datetime.rst:2490 msgid "``%G``, ``%u`` and ``%V`` were added." -msgstr "新增 ``%G``\\ 、\\ ``%u`` 與 ``%V``\\ 。" +msgstr "新增 ``%G``、``%u`` 與 ``%V``。" #: ../../library/datetime.rst:2493 msgid "``%:z`` was added." diff --git a/library/dialog.po b/library/dialog.po index 1e1c1522e1..dbe0255950 100644 --- a/library/dialog.po +++ b/library/dialog.po @@ -284,4 +284,4 @@ msgstr "" #: ../../library/dialog.rst:230 msgid "Modules :mod:`tkinter.messagebox`, :ref:`tut-files`" -msgstr ":mod:`tkinter.messagebox` 模組、\\ :ref:`tut-files`" +msgstr ":mod:`tkinter.messagebox` 模組、:ref:`tut-files`" diff --git a/library/difflib.po b/library/difflib.po index a7fb650a49..cdca4d7729 100644 --- a/library/difflib.po +++ b/library/difflib.po @@ -265,7 +265,7 @@ msgstr "" #: ../../library/difflib.rst:194 ../../library/difflib.rst:320 msgid "See :ref:`difflib-interface` for a more detailed example." -msgstr "一個更詳盡的範例請見 :ref:`difflib-interface`\\ 。" +msgstr "一個更詳盡的範例請見 :ref:`difflib-interface`。" #: ../../library/difflib.rst:199 msgid "" @@ -606,10 +606,7 @@ msgstr "" #: ../../library/difflib.rst:512 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/difflib.rst:529 msgid "Return a :term:`generator` of groups with up to *n* lines of context." @@ -827,10 +824,7 @@ msgstr "" #: ../../library/difflib.rst:764 msgid "ndiff example" -msgstr "" -"ndiff 範例:\n" -"\n" -"::" +msgstr "ndiff 範例: ::" #: ../../library/difflib.rst:766 msgid "This example shows how to use :func:`difflib.ndiff`." diff --git a/library/doctest.po b/library/doctest.po index daafa53745..480f7f16f5 100644 --- a/library/doctest.po +++ b/library/doctest.po @@ -382,10 +382,7 @@ msgstr "" #: ../../library/doctest.rst:428 msgid "Simple example::" -msgstr "" -"簡單範例:\n" -"\n" -"::" +msgstr "簡單範例: ::" #: ../../library/doctest.rst:435 msgid "" diff --git a/library/email.compat32-message.po b/library/email.compat32-message.po index 7a2f9ecf06..80875bfdba 100644 --- a/library/email.compat32-message.po +++ b/library/email.compat32-message.po @@ -461,10 +461,7 @@ msgstr "" #: ../../library/email.compat32-message.rst:404 msgid "Here's an example::" -msgstr "" -"以下是個範例:\n" -"\n" -"::" +msgstr "以下是個範例: ::" #: ../../library/email.compat32-message.rst:408 msgid "This will add a header that looks like ::" diff --git a/library/email.generator.po b/library/email.generator.po index 4b3aee0ca2..b0ae12d0f7 100644 --- a/library/email.generator.po +++ b/library/email.generator.po @@ -110,7 +110,7 @@ msgstr "" #: ../../library/email.generator.rst:75 ../../library/email.generator.rst:174 msgid "Added the *policy* keyword." -msgstr "新增關鍵字 *policy*\\ 。" +msgstr "新增關鍵字 *policy*。" #: ../../library/email.generator.rst:77 ../../library/email.generator.rst:176 msgid "" diff --git a/library/email.header.po b/library/email.header.po index 8ba9cf3024..2c1a175f90 100644 --- a/library/email.header.po +++ b/library/email.header.po @@ -211,7 +211,7 @@ msgstr "" #: ../../library/email.header.rst:143 msgid "Added the *linesep* argument." -msgstr "新增引數 *linesep*\\ 。" +msgstr "新增引數 *linesep*。" #: ../../library/email.header.rst:147 msgid "" @@ -265,10 +265,7 @@ msgstr "" #: ../../library/email.header.rst:186 msgid "Here's an example::" -msgstr "" -"以下是個範例:\n" -"\n" -"::" +msgstr "以下是個範例: ::" #: ../../library/email.header.rst:195 msgid "" diff --git a/library/email.headerregistry.po b/library/email.headerregistry.po index c4800db186..274ee09e6f 100644 --- a/library/email.headerregistry.po +++ b/library/email.headerregistry.po @@ -547,10 +547,7 @@ msgstr "" #: ../../library/email.headerregistry.rst:382 msgid "or::" -msgstr "" -"或是:\n" -"\n" -"::" +msgstr "或是: ::" #: ../../library/email.headerregistry.rst:386 msgid "" diff --git a/library/email.message.po b/library/email.message.po index a61adaa52c..5f517b523a 100644 --- a/library/email.message.po +++ b/library/email.message.po @@ -345,10 +345,7 @@ msgstr "" #: ../../library/email.message.rst:287 msgid "Here is an example::" -msgstr "" -"以下是個範例:\n" -"\n" -"::" +msgstr "以下是個範例: ::" #: ../../library/email.message.rst:291 msgid "This will add a header that looks like ::" diff --git a/library/email.mime.po b/library/email.mime.po index adf760f87d..1f45a7bcc2 100644 --- a/library/email.mime.po +++ b/library/email.mime.po @@ -59,7 +59,7 @@ msgstr "" #: ../../library/email.mime.rst:35 msgid "Module: :mod:`email.mime.base`" -msgstr "模組:\\ :mod:`email.mime.base`" +msgstr "模組::mod:`email.mime.base`" #: ../../library/email.mime.rst:37 msgid "" @@ -97,11 +97,11 @@ msgstr "" #: ../../library/email.mime.rst:205 ../../library/email.mime.rst:225 #: ../../library/email.mime.rst:259 msgid "Added *policy* keyword-only parameter." -msgstr "新增僅限關鍵字參數 *policy*\\ 。" +msgstr "新增僅限關鍵字參數 *policy*。" #: ../../library/email.mime.rst:65 msgid "Module: :mod:`email.mime.nonmultipart`" -msgstr "模組:\\ :mod:`email.mime.nonmultipart`" +msgstr "模組::mod:`email.mime.nonmultipart`" #: ../../library/email.mime.rst:67 msgid "" @@ -115,7 +115,7 @@ msgstr "" #: ../../library/email.mime.rst:80 msgid "Module: :mod:`email.mime.multipart`" -msgstr "模組:\\ :mod:`email.mime.multipart`" +msgstr "模組::mod:`email.mime.multipart`" #: ../../library/email.mime.rst:82 msgid "" @@ -159,7 +159,7 @@ msgstr "" #: ../../library/email.mime.rst:113 msgid "Module: :mod:`email.mime.application`" -msgstr "模組:\\ :mod:`email.mime.application`" +msgstr "模組::mod:`email.mime.application`" #: ../../library/email.mime.rst:115 msgid "" @@ -188,7 +188,7 @@ msgstr "" #: ../../library/email.mime.rst:144 msgid "Module: :mod:`email.mime.audio`" -msgstr "模組:\\ :mod:`email.mime.audio`" +msgstr "模組::mod:`email.mime.audio`" #: ../../library/email.mime.rst:146 msgid "" @@ -216,7 +216,7 @@ msgstr "" #: ../../library/email.mime.rst:178 msgid "Module: :mod:`email.mime.image`" -msgstr "模組:\\ :mod:`email.mime.image`" +msgstr "模組::mod:`email.mime.image`" #: ../../library/email.mime.rst:180 msgid "" @@ -251,7 +251,7 @@ msgstr "" #: ../../library/email.mime.rst:212 msgid "Module: :mod:`email.mime.message`" -msgstr "模組:\\ :mod:`email.mime.message`" +msgstr "模組::mod:`email.mime.message`" #: ../../library/email.mime.rst:214 msgid "" @@ -270,7 +270,7 @@ msgstr "" #: ../../library/email.mime.rst:232 msgid "Module: :mod:`email.mime.text`" -msgstr "模組:\\ :mod:`email.mime.text`" +msgstr "模組::mod:`email.mime.text`" #: ../../library/email.mime.rst:234 msgid "" diff --git a/library/email.policy.po b/library/email.policy.po index a026933bc1..b516bdae08 100644 --- a/library/email.policy.po +++ b/library/email.policy.po @@ -486,7 +486,7 @@ msgstr "" #: ../../library/email.policy.rst:414 msgid "The default is ``long``." -msgstr "預設為 ``long``\\ 。" +msgstr "預設為 ``long``。" #: ../../library/email.policy.rst:419 msgid "" diff --git a/library/ensurepip.po b/library/ensurepip.po index ba1216e285..006cbf3f05 100644 --- a/library/ensurepip.po +++ b/library/ensurepip.po @@ -99,10 +99,7 @@ msgstr "使用直譯器 (interpreter) 的 ``-m`` 來調用命令列介面" #: ../../library/ensurepip.rst:48 msgid "The simplest possible invocation is::" -msgstr "" -"最簡單可行的調用:\n" -"\n" -"::" +msgstr "最簡單可行的調用: ::" #: ../../library/ensurepip.rst:52 msgid "" @@ -113,9 +110,7 @@ msgid "" msgstr "" "若 ``pip`` 未安裝,此調用會將其安裝;否則甚麼也不做。可透過傳入 ``--" "upgrade`` 參數來確保 ``pip`` 的安裝版本至少為當前 ``ensurepip`` 中最新可用的" -"版本:\n" -"\n" -"::" +"版本: ::" #: ../../library/ensurepip.rst:59 msgid "" diff --git a/library/enum.po b/library/enum.po index b4cea91386..d36e0483b6 100644 --- a/library/enum.po +++ b/library/enum.po @@ -999,7 +999,7 @@ msgstr "" #: ../../library/enum.rst:850 msgid "``_missing_``, ``_order_``, ``_generate_next_value_``" -msgstr "``_missing_``\\ 、\\ ``_order_``\\ 、\\ ``_generate_next_value_``" +msgstr "``_missing_``、``_order_``、``_generate_next_value_``" #: ../../library/enum.rst:851 msgid "``_ignore_``" diff --git a/library/fcntl.po b/library/fcntl.po index 3d8afd3c06..c9bcddee77 100644 --- a/library/fcntl.po +++ b/library/fcntl.po @@ -180,10 +180,7 @@ msgstr "" #: ../../library/fcntl.rst:123 msgid "An example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/fcntl.rst:136 msgid "" diff --git a/library/fileinput.po b/library/fileinput.po index 6bae105971..a5de640e6f 100644 --- a/library/fileinput.po +++ b/library/fileinput.po @@ -287,7 +287,7 @@ msgstr "" #: ../../library/fileinput.rst:223 msgid "Added the optional *errors* parameter." -msgstr "新增可選參數 *errors*\\ 。" +msgstr "新增可選參數 *errors*。" #: ../../library/fileinput.rst:226 msgid "" diff --git a/library/functions.po b/library/functions.po index 1473138050..edd3866bd1 100644 --- a/library/functions.po +++ b/library/functions.po @@ -423,9 +423,7 @@ msgid "" "iterable is empty). Equivalent to::" msgstr "" "如果 *iterable* 的所有元素皆為真(或 iterable 為空)則回傳 ``True``。等價" -"於:\n" -"\n" -"::" +"於: ::" #: ../../library/functions.rst:89 msgid "" @@ -457,9 +455,7 @@ msgid "" "is empty, return ``False``. Equivalent to::" msgstr "" "如果 *iterable* 的任一元素為真,回傳 ``True``。如果 iterable 是空的,則回傳 " -"``False``。等價於:\n" -"\n" -"::" +"``False``。等價於: ::" #: ../../library/functions.rst:116 msgid "" @@ -511,9 +507,8 @@ msgstr "" "``True`` 兩個實例(參見 :ref:`typebool`)。" #: ../../library/functions.rst:156 ../../library/functions.rst:774 -#, fuzzy msgid "The parameter is now positional-only." -msgstr "*x* 現在為僅限位置參數。" +msgstr "現在為僅限位置參數。" #: ../../library/functions.rst:161 msgid "" @@ -565,8 +560,8 @@ msgid "" "methods of mutable sequences, described in :ref:`typesseq-mutable`, as well " "as most methods that the :class:`bytes` type has, see :ref:`bytes-methods`." msgstr "" -"回傳一個新的 bytes 陣列。\\ :class:`bytearray` class 是一個可變的整數序列,包" -"含範圍為 0 <= x < 256 的整數。它有可變序列大部分常見的 method(如在 :ref:" +"回傳一個新的 bytes 陣列。:class:`bytearray` class 是一個可變的整數序列,包含" +"範圍為 0 <= x < 256 的整數。它有可變序列大部分常見的 method(如在 :ref:" "`typesseq-mutable` 中所述),同時也有 :class:`bytes` 型別大部分的 method,參" "見 :ref:`bytes-methods`。" @@ -640,7 +635,7 @@ msgstr "Bytes 物件還可以用文字建立,參見 :ref:`strings`。" #: ../../library/functions.rst:231 msgid "See also :ref:`binaryseq`, :ref:`typebytes`, and :ref:`bytes-methods`." -msgstr "可參考 :ref:`binaryseq`、\\ :ref:`typebytes` 和 :ref:`bytes-methods`。" +msgstr "可參考 :ref:`binaryseq`、:ref:`typebytes` 和 :ref:`bytes-methods`。" #: ../../library/functions.rst:236 msgid "" @@ -689,9 +684,7 @@ msgid "" "this idiom::" msgstr "" "一個 class method 把自己的 class 作為第一個引數,就像一個實例 method 把實例自" -"己作為第一個引數。請用以下慣例來宣告 class method:\n" -"\n" -"::" +"己作為第一個引數。請用以下慣例來宣告 class method: ::" #: ../../library/functions.rst:269 msgid "" @@ -813,8 +806,8 @@ msgstr "" "編譯器選項和 future 陳述式使用 bits 來表示,可以一起被位元操作 OR 來表示複數" "個選項。需要被具體定義特徵的位元域可以透過 :mod:`__future__` module 中 :" "class:`~__future__._Feature` 實例中的 :attr:`~__future__._Feature." -"compiler_flag` 屬性來獲得。\\ :ref:`編譯器旗標 `\\ 可以" -"在 :mod:`ast` module 中搜尋有 ``PyCF_`` 前綴的名稱。" +"compiler_flag` 屬性來獲得。:ref:`編譯器旗標 `\\ 可以在 :" +"mod:`ast` module 中搜尋有 ``PyCF_`` 前綴的名稱。" #: ../../library/functions.rst:331 msgid "" @@ -826,8 +819,8 @@ msgid "" msgstr "" "引數 *optimize* 用來指定編譯器的最佳化級別;預設值 ``-1`` 選擇與直譯器的 :" "option:`-O` 選項相同的最佳化級別。其他級別為 ``0``\\ (沒有最佳化;\\ " -"``__debug__`` 為真值)、\\ ``1``\\ (assert 被刪除,\\ ``__debug__`` 為假值)" -"或 ``2``\\ (文件字串也被刪除)。" +"``__debug__`` 為真值)、``1``\\ (assert 被刪除,``__debug__`` 為假值)或 " +"``2``\\ (文件字串也被刪除)。" #: ../../library/functions.rst:337 msgid "" @@ -910,12 +903,8 @@ msgstr "" #: ../../library/functions.rst:382 ../../library/functions.rst:719 #: ../../library/functions.rst:965 -#, fuzzy msgid "Examples:" -msgstr "" -"例如:\n" -"\n" -"::" +msgstr "例如: ::" #: ../../library/functions.rst:403 msgid "" @@ -994,8 +983,8 @@ msgid "" "Create a new dictionary. The :class:`dict` object is the dictionary class. " "See :class:`dict` and :ref:`typesmapping` for documentation about this class." msgstr "" -"建立一個新的 dictionary(字典)。\\ :class:`dict` 物件是一個 dictionary " -"class。參見 :class:`dict` 和 :ref:`typesmapping` 來瞭解這個 class。" +"建立一個新的 dictionary(字典)。:class:`dict` 物件是一個 dictionary class。" +"參見 :class:`dict` 和 :ref:`typesmapping` 來瞭解這個 class。" #: ../../library/functions.rst:471 msgid "" @@ -1114,17 +1103,14 @@ msgid "" "returns a tuple containing a count (from *start* which defaults to 0) and " "the values obtained from iterating over *iterable*." msgstr "" -"回傳一個列舉 (enumerate) 物件。*iterable* 必須是一個序列、\\ :term:" -"`iterator` 或其他支援疊代的物件。\\ :func:`enumerate` 回傳之 iterator 的 :" -"meth:`~iterator.__next__` method 回傳一個 tuple(元組),裡面包含一個計數值" -"(從 *start* 開始,預設為 0)和通過疊代 *iterable* 獲得的值。" +"回傳一個列舉 (enumerate) 物件。*iterable* 必須是一個序列、:term:`iterator` 或" +"其他支援疊代的物件。:func:`enumerate` 回傳之 iterator 的 :meth:`~iterator." +"__next__` method 回傳一個 tuple(元組),裡面包含一個計數值(從 *start* 開" +"始,預設為 0)和通過疊代 *iterable* 獲得的值。" #: ../../library/functions.rst:562 msgid "Equivalent to::" -msgstr "" -"等價於:\n" -"\n" -"::" +msgstr "等價於: ::" #: ../../library/functions.rst:0 msgid "Parameters" @@ -1206,9 +1192,9 @@ msgid "" "current global and local dictionary, respectively, which may be useful to " "pass around for use by :func:`eval` or :func:`exec`." msgstr "" -"提示:\\ :func:`exec` 函式支援動態執行陳述式。\\ :func:`globals` 和 :func:" -"`locals` 函式分別回傳當前的全域性和局部性 dictionary,它們對於將引數傳遞給 :" -"func:`eval` 或 :func:`exec` 可能會方便許多。" +"提示::func:`exec` 函式支援動態執行陳述式。:func:`globals` 和 :func:`locals` " +"函式分別回傳當前的全域性和局部性 dictionary,它們對於將引數傳遞給 :func:" +"`eval` 或 :func:`exec` 可能會方便許多。" #: ../../library/functions.rst:620 msgid "" @@ -1362,12 +1348,10 @@ msgstr "" "*iterable* 中元素的互補函式。" #: ../../library/functions.rst:717 -#, fuzzy msgid "Return a floating point number constructed from a number or a string." -msgstr "回傳從數字或字串 *x* 生成的浮點數。" +msgstr "回傳從數字或字串生成的浮點數。" #: ../../library/functions.rst:734 -#, fuzzy msgid "" "If the argument is a string, it should contain a decimal number, optionally " "preceded by a sign, and optionally embedded in whitespace. The optional " @@ -1380,7 +1364,7 @@ msgstr "" "如果引數是字串,則它必須是包含十進位制數字的字串,字串前面可以有符號,之前也" "可以有空格。選擇性的符號有 ``'+'`` 和 ``'-'``;``'+'`` 對建立的值沒有影響。引" "數也可以是 NaN(非數字)或正負無窮大的字串。確切地說,除去首尾的空格後,輸入" -"必須遵循以下語法中 ``floatvalue`` 的生成規則:" +"必須遵循以下語法中 :token:`~float:floatvalue` 的生成規則:" #: ../../library/functions.rst:755 msgid "" @@ -1470,8 +1454,8 @@ msgid "" "*iterable*. ``frozenset`` is a built-in class. See :class:`frozenset` and :" "ref:`types-set` for documentation about this class." msgstr "" -"回傳一個新的 :class:`frozenset` 物件,它包含選擇性引數 *iterable* 中的元" -"素。\\ ``frozenset`` 是一個內建的 class。有關此 class 的文件,請參閱 :class:" +"回傳一個新的 :class:`frozenset` 物件,它包含選擇性引數 *iterable* 中的元素。" +"``frozenset`` 是一個內建的 class。有關此 class 的文件,請參閱 :class:" "`frozenset` 和 :ref:`types-set`。" #: ../../library/functions.rst:815 @@ -1641,9 +1625,7 @@ msgid "" msgstr "" "如果有提供 *prompt* 引數,則將其寫入標準輸出,末尾不帶換行符。接下來,該函式" "從輸入中讀取一行,將其轉換為字串(去除末尾的換行符)並回傳。當讀取到 EOF 時," -"則觸發 :exc:`EOFError`。例如:\n" -"\n" -"::" +"則觸發 :exc:`EOFError`。例如: ::" #: ../../library/functions.rst:945 msgid "" @@ -1686,11 +1668,10 @@ msgstr "" "result``。" #: ../../library/functions.rst:962 -#, fuzzy msgid "" "Return an integer object constructed from a number or a string, or return " "``0`` if no arguments are given." -msgstr "回傳從數字或字串 *x* 生成的浮點數。" +msgstr "" #: ../../library/functions.rst:982 #, fuzzy @@ -1707,7 +1688,6 @@ msgstr "" "了 :meth:`~object.__trunc__` 則回傳 ``x.__trunc__()``。對於浮點數則向零舍入。" #: ../../library/functions.rst:988 -#, fuzzy msgid "" "If the argument is not a number or if *base* is given, then it must be a " "string, :class:`bytes`, or :class:`bytearray` instance representing an " @@ -1715,10 +1695,10 @@ msgid "" "``-`` (with no space in between), have leading zeros, be surrounded by " "whitespace, and have single underscores interspersed between digits." msgstr "" -"如果 *x* 不是數字或如果有給定 *base*,則 *x* 必須是個字串、:class:`bytes` " -"或 :class:`bytearray` 實例,表示基數 (radix) *base* 中的整數。可選地,字串之" -"前可以有 ``+`` 或 ``-``\\ (中間沒有空格)、可有個前導的零、也可被空格包圍、" -"或在數字間有單一底線。" +"如果引數不是數字或如果有給定 *base*,則它必須是個字串、:class:`bytes` 或 :" +"class:`bytearray` 實例,表示基數 (radix) *base* 中的整數。可選地,字串之前可" +"以有 ``+`` 或 ``-``\\ (中間沒有空格)、可有個前導的零、也可被空格包圍、或在" +"數字間有單一底線。" #: ../../library/functions.rst:994 msgid "" @@ -1760,7 +1740,7 @@ msgstr "" #: ../../library/functions.rst:1017 msgid "The first parameter is now positional-only." -msgstr "" +msgstr "第一個參數為僅限位置參數。" #: ../../library/functions.rst:1020 msgid "" @@ -1817,10 +1797,10 @@ msgid "" "any other case, a :exc:`TypeError` exception is raised." msgstr "" "如果 *class* 是 *classinfo* 的 subclass(直接、間接或 :term:`virtual " -"`),則回傳 ``True``。\\ *classinfo* 可以是 class 物件" -"的 tuple(或遞迴地其他類似 tuple)或是一個 :ref:`types-union`,此時若 " -"*class* 是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會" -"觸發 :exc:`TypeError`。" +"`),則回傳 ``True``。*classinfo* 可以是 class 物件的 " +"tuple(或遞迴地其他類似 tuple)或是一個 :ref:`types-union`,此時若 *class* " +"是 *classinfo* 中任一元素的 subclass 時則回傳 ``True``。其他情況,會觸發 :" +"exc:`TypeError`。" #: ../../library/functions.rst:1068 msgid "" @@ -1888,8 +1868,8 @@ msgid "" "`locals` and :func:`globals` are the same dictionary." msgstr "" "更新並回傳表示當前本地符號表的 dictionary。在函式區塊而不是 class 區塊中呼" -"叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,\\ :func:" -"`locals` 和 :func:`globals` 是相同的 dictionary。" +"叫 :func:`locals` 時會回傳自由變數。請注意,在 module 階層中,:func:`locals` " +"和 :func:`globals` 是相同的 dictionary。" #: ../../library/functions.rst:1123 msgid "" @@ -1958,7 +1938,7 @@ msgstr "新增 *default* 僅限關鍵字參數。" #: ../../library/functions.rst:1162 ../../library/functions.rst:1200 msgid "The *key* can be ``None``." -msgstr "" +msgstr "*key* 可以為 ``None``。" #: ../../library/functions.rst:1170 msgid "" @@ -2077,9 +2057,9 @@ msgid "" msgstr "" "*mode* 是一個選擇性字串,用於指定開啟檔案的模式。預設值是 ``'r'``,這意味著它" "以文字模式開啟並讀取。其他常見模式有:寫入 ``'w'``\\ (會捨去已經存在的檔" -"案)、唯一性建立 ``'x'``\\ 、追加寫入 ``'a'``\\ (在\\ *一些* Unix 系統上,無" -"論當前的檔案指標在什麼位置,*所有* 寫入都會追加到檔案末尾)。在文字模式,如果" -"沒有指定 *encoding*,則根據電腦平臺來決定使用的編碼:呼叫 :func:`locale." +"案)、唯一性建立 ``'x'``、追加寫入 ``'a'``\\ (在\\ *一些* Unix 系統上,無論" +"當前的檔案指標在什麼位置,*所有* 寫入都會追加到檔案末尾)。在文字模式,如果沒" +"有指定 *encoding*,則根據電腦平臺來決定使用的編碼:呼叫 :func:`locale." "getencoding()` 來獲取當前的本地編碼。(要讀取和寫入原始 bytes,請使用二進位制" "模式且不要指定 *encoding*。)可用的模式有:" @@ -2320,9 +2300,7 @@ msgid "" "`os.open` function to open a file relative to a given directory::" msgstr "" "下面的範例使用 :func:`os.open` 函式回傳值當作 :ref:`dir_fd ` 的參數," -"從給定的目錄中用相對路徑開啟檔案:\n" -"\n" -"::" +"從給定的目錄中用相對路徑開啟檔案: ::" #: ../../library/functions.rst:1418 msgid "" @@ -2424,7 +2402,7 @@ msgid "" "``8364``. This is the inverse of :func:`chr`." msgstr "" "對於代表單個 Unicode 字元的字串,回傳代表它 Unicode 編碼位置的整數。例如 " -"``ord('a')`` 回傳整數 ``97``、\\ ``ord('€')``\\ (歐元符號)回傳 ``8364``。這" +"``ord('a')`` 回傳整數 ``97``、``ord('€')``\\ (歐元符號)回傳 ``8364``。這" "是 :func:`chr` 的逆函式。" #: ../../library/functions.rst:1486 @@ -3031,10 +3009,7 @@ msgstr "" #: ../../library/functions.rst:2018 msgid "Example::" -msgstr "" -"例如:\n" -"\n" -"::" +msgstr "例如: ::" #: ../../library/functions.rst:2027 msgid "" @@ -3339,42 +3314,3 @@ msgstr "import(引入)" #: ../../library/functions.rst:2111 msgid "builtins" msgstr "builtins(內建)" - -#~ msgid "" -#~ "Return a complex number with the value *real* + *imag*\\*1j or convert a " -#~ "string or number to a complex number. If the first parameter is a " -#~ "string, it will be interpreted as a complex number and the function must " -#~ "be called without a second parameter. The second parameter can never be " -#~ "a string. Each argument may be any numeric type (including complex). If " -#~ "*imag* is omitted, it defaults to zero and the constructor serves as a " -#~ "numeric conversion like :class:`int` and :class:`float`. If both " -#~ "arguments are omitted, returns ``0j``." -#~ msgstr "" -#~ "回傳值為 *real* + *imag*\\*1j 的複數,或將字串、數字轉換為複數。如果第一個" -#~ "引數是字串,則它被視為一個複數,並且函式呼叫時不得有第二個引數。第二個引數" -#~ "絕對不能是字串。每個引數都可以是任意的數值型別(包括複數)。如果省略了 " -#~ "*imag*,則預設值為零,建構函式會像 :class:`int` 和 :class:`float` 一樣進行" -#~ "數值轉換。如果兩個引數都省略,則回傳 ``0j``。" - -#~ msgid "" -#~ "When converting from a string, the string must not contain whitespace " -#~ "around the central ``+`` or ``-`` operator. For example, " -#~ "``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises :exc:" -#~ "`ValueError`." -#~ msgstr "" -#~ "當轉換自一字串時,字串在 ``+`` 或 ``-`` 運算子的周圍必須不能有空格。例如 " -#~ "``complex('1+2j')`` 是有效的,但 ``complex('1 + 2j')`` 會觸發 :exc:" -#~ "`ValueError`。" - -#~ msgid "" -#~ "The arguments are a string and optional globals and locals. If provided, " -#~ "*globals* must be a dictionary. If provided, *locals* can be any mapping " -#~ "object." -#~ msgstr "" -#~ "引數是一個字串,以及選擇性的 globals 和 locals。如果有提供選擇性引數," -#~ "*globals* 必須是一個 dictionary。*locals* 可以是任何映射 (mapping) 物件。" - -#~ msgid "" -#~ "The return value is the result of the evaluated expression. Syntax errors " -#~ "are reported as exceptions. Example:" -#~ msgstr "回傳值是計算運算式的結果。語法錯誤將被報告為例外。例如:" diff --git a/library/functools.po b/library/functools.po index a0c05bc814..69b9489124 100644 --- a/library/functools.po +++ b/library/functools.po @@ -55,10 +55,7 @@ msgstr "" #: ../../library/functools.rst:39 ../../library/functools.rst:291 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/functools.rst:52 ../../library/functools.rst:158 msgid "" @@ -85,10 +82,7 @@ msgstr "" #: ../../library/functools.rst:70 ../../library/functools.rst:142 #: ../../library/functools.rst:383 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/functools.rst:81 msgid "" diff --git a/library/gc.po b/library/gc.po index e91d69d8f4..8947c5145a 100644 --- a/library/gc.po +++ b/library/gc.po @@ -280,18 +280,14 @@ msgstr "" "當物件正在被垃圾回收器追蹤時回傳 ``True``,否則回傳 ``False``。一般來說,原子" "型別 (atomic type) 的實例不會被追蹤,而非原子型別(如容器、使用者自己定義的物" "件)會被追蹤。然而,有一些特定型別最佳化會被用來減少垃圾回收器在簡單實例(如" -"只含有原子性的鍵和值的字典)上的足跡:\n" -"\n" -"::" +"只含有原子性的鍵和值的字典)上的足跡: ::" #: ../../library/gc.rst:191 msgid "" "Returns ``True`` if the given object has been finalized by the garbage " "collector, ``False`` otherwise. ::" msgstr "" -"如果給定物件已被垃圾回收器終結則回傳 ``True``,否則回傳 ``False``。:\n" -"\n" -"::" +"如果給定物件已被垃圾回收器終結則回傳 ``True``,否則回傳 ``False``。: ::" #: ../../library/gc.rst:212 msgid "" diff --git a/library/getpass.po b/library/getpass.po index 68d7189d6f..b20161096f 100644 --- a/library/getpass.po +++ b/library/getpass.po @@ -56,7 +56,7 @@ msgstr "" "提示使用者輸入一個密碼且不會有回音 (echo)。使用者會看到字串 *prompt* 作為提" "示,其預設值為 ``'Password: '``。在 Unix 上,如有必要的話會使用替換錯誤處理函" "式 (replace error handler) 寫入到類檔案物件 (file-like object) *stream*\\ " -"中。\\ *stream* 預設為主控終端機 (controlling terminal) (\\ :file:`/dev/" +"中。*stream* 預設為主控終端機 (controlling terminal) (\\ :file:`/dev/" "tty`\\ ),如果不可用則為 ``sys.stderr`` (此引數在 Windows 上會被忽略)。" #: ../../library/getpass.rst:28 @@ -66,8 +66,7 @@ msgid "" "`GetPassWarning`." msgstr "" "如果無回音輸入 (echo-free input) 無法使用則 getpass() 將回退為印出一條警告訊" -"息到 *stream*\\ ,並從 ``sys.stdin`` 讀取且同時發出 :exc:" -"`GetPassWarning`\\ 。" +"息到 *stream*,並從 ``sys.stdin`` 讀取且同時發出 :exc:`GetPassWarning`。" #: ../../library/getpass.rst:33 msgid "" diff --git a/library/gettext.po b/library/gettext.po index 1ccd582ac7..3f3673198f 100644 --- a/library/gettext.po +++ b/library/gettext.po @@ -351,7 +351,7 @@ msgstr "" #: ../../library/gettext.rst:292 msgid "Added ``'pgettext'`` and ``'npgettext'``." -msgstr "新增 ``'pgettext'`` 與 ``'npgettext'``\\ 。" +msgstr "新增 ``'pgettext'`` 與 ``'npgettext'``。" #: ../../library/gettext.rst:297 msgid "The :class:`GNUTranslations` class" @@ -428,10 +428,7 @@ msgstr "" #: ../../library/gettext.rst:348 msgid "Here is an example::" -msgstr "" -"以下是個範例:\n" -"\n" -"::" +msgstr "以下是個範例: ::" #: ../../library/gettext.rst:360 msgid "" diff --git a/library/glob.po b/library/glob.po index 1a22f588d6..81927c319b 100644 --- a/library/glob.po +++ b/library/glob.po @@ -49,7 +49,7 @@ msgid "" "expanduser` and :func:`os.path.expandvars`.)" msgstr "" "請注意,以點 (``.``) 開頭的檔案只能與同樣以點開頭的模式匹配,這與 :func:" -"`fnmatch.fnmatch` 或 :func:`pathlib.Path.glob` 不同。 (對於波浪號和 shell 變" +"`fnmatch.fnmatch` 或 :func:`pathlib.Path.glob` 不同。(對於波浪號和 shell 變" "數擴展,請使用 :func:`os.path.expanduser` 和 :func:`os.path.expandvars`。)" #: ../../library/glob.rst:34 diff --git a/library/graphlib.po b/library/graphlib.po index 328a307ea7..c64cee245b 100644 --- a/library/graphlib.po +++ b/library/graphlib.po @@ -111,10 +111,7 @@ msgstr "" msgid "" "The class is designed to easily support parallel processing of the nodes as " "they become ready. For instance::" -msgstr "" -"該類別設計為在節點準備就緒時,簡單支援節點的平行處理。例如:\n" -"\n" -"::" +msgstr "該類別設計為在節點準備就緒時,簡單支援節點的平行處理。例如: ::" #: ../../library/graphlib.rst:87 msgid "" @@ -181,17 +178,11 @@ msgstr "" msgid "" "The :meth:`~object.__bool__` method of this class defers to this function, " "so instead of::" -msgstr "" -"此類別的 :meth:`~object.__bool__` 方法遵循此函式,因此以下做法:\n" -"\n" -"::" +msgstr "此類別的 :meth:`~object.__bool__` 方法遵循此函式,因此以下做法: ::" #: ../../library/graphlib.rst:124 msgid "it is possible to simply do::" -msgstr "" -"可以簡單地用以下方式替換:\n" -"\n" -"::" +msgstr "可以簡單地用以下方式替換: ::" #: ../../library/graphlib.rst:129 ../../library/graphlib.rst:152 msgid "" @@ -246,9 +237,7 @@ msgid "" msgstr "" "回傳一個可疊代物件,它將按拓撲排序疊代節點。使用此方法時,不應呼叫 :meth:" "`~TopologicalSorter.prepare` 和 :meth:`~TopologicalSorter.done`。此方法等效" -"於:\n" -"\n" -"::" +"於: ::" #: ../../library/graphlib.rst:169 msgid "" diff --git a/library/hashlib.po b/library/hashlib.po index d352fca7e2..e7aed89235 100644 --- a/library/hashlib.po +++ b/library/hashlib.po @@ -931,4 +931,4 @@ msgid "blake2b, blake2s" msgstr "blake2b, blake2s" #~ msgid ":func:`blake2b` and :func:`blake2s` were added." -#~ msgstr "加入 :func:`blake2b` 和 :func:`blake2s`\\ 。" +#~ msgstr "加入 :func:`blake2b` 和 :func:`blake2s`。" diff --git a/library/hmac.po b/library/hmac.po index c37f0e459e..6dea034e07 100644 --- a/library/hmac.po +++ b/library/hmac.po @@ -72,7 +72,7 @@ msgid "" "`~hmac.new`." msgstr "" "基於給定密鑰 *key* 和 *digest* 回傳 *msg* 的摘要。此函式等價於 ``HMAC(key, " -"msg, digest).digest()``\\ ,但使用了優化的 C 或 行內實作(inline " +"msg, digest).digest()``,但使用了優化的 C 或 行內實作(inline " "implementation),對放入記憶體的訊息能處理得更快。參數 *key*、*msg* 和 " "*digest* 在 :func:`~hmac.new` 中具有相同含義。" @@ -96,7 +96,7 @@ msgid "" "update(b)`` is equivalent to ``m.update(a + b)``." msgstr "" "用 *msg* 來更新 hmac 物件。重複呼叫相當於單次呼叫並傳入所有引數的拼接結果:" -"``m.update(a); m.update(b)`` 等價於 ``m.update(a + b)``\\ 。" +"``m.update(a); m.update(b)`` 等價於 ``m.update(a + b)``。" #: ../../library/hmac.rst:58 msgid "Parameter *msg* can be of any type supported by :mod:`hashlib`." @@ -167,15 +167,15 @@ msgstr "以 bytes 表示雜湊演算法的內部區塊大小。" #: ../../library/hmac.rst:111 msgid "The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``." -msgstr "HMAC 的正準名稱總是為小寫形式,例如 ``hmac-md5``\\ 。" +msgstr "HMAC 的正準名稱總是為小寫形式,例如 ``hmac-md5``。" #: ../../library/hmac.rst:116 msgid "" "Removed the undocumented attributes ``HMAC.digest_cons``, ``HMAC.inner``, " "and ``HMAC.outer``." msgstr "" -"未寫入文件的屬性 ``HMAC.digest_cons``\\ ,``HMAC.inner`` 和 ``HMAC.outer`` 已" -"被移除。" +"未寫入文件的屬性 ``HMAC.digest_cons``,``HMAC.inner`` 和 ``HMAC.outer`` 已被" +"移除。" #: ../../library/hmac.rst:120 msgid "This module also provides the following helper function:" @@ -189,10 +189,10 @@ msgid "" "either :class:`str` (ASCII only, as e.g. returned by :meth:`HMAC." "hexdigest`), or a :term:`bytes-like object`." msgstr "" -"回傳 ``a == b``\\ 。此函式使用一種經專門設計的方式通過避免基於內容的短路行為" -"來防止定時分析,使得它適合處理密碼學。*a* 和 *b* 必須為相同的型別:可以是 :" -"class:`str`\\ (僅限 ASCII,如 :meth:`HMAC.hexdigest` 的回傳值),或者是 :" -"term:`bytes-like object`\\ 。" +"回傳 ``a == b``。此函式使用一種經專門設計的方式通過避免基於內容的短路行為來防" +"止定時分析,使得它適合處理密碼學。*a* 和 *b* 必須為相同的型別:可以是 :class:" +"`str`\\ (僅限 ASCII,如 :meth:`HMAC.hexdigest` 的回傳值),或者是 :term:" +"`bytes-like object`。" #: ../../library/hmac.rst:132 msgid "" @@ -206,7 +206,7 @@ msgstr "" #: ../../library/hmac.rst:140 msgid "" "The function uses OpenSSL's ``CRYPTO_memcmp()`` internally when available." -msgstr "此函式在可能的情況下會在內部使用 OpenSSL 的 ``CRYPTO_memcmp()``\\ 。" +msgstr "此函式在可能的情況下會在內部使用 OpenSSL 的 ``CRYPTO_memcmp()``。" #: ../../library/hmac.rst:146 msgid "Module :mod:`hashlib`" diff --git a/library/html.parser.po b/library/html.parser.po index 1d538deccd..c3e3b966fe 100644 --- a/library/html.parser.po +++ b/library/html.parser.po @@ -88,9 +88,7 @@ msgid "" "encountered::" msgstr "" "以下的基礎範例是一個簡單的 HTML 剖析器,它使用 :class:`HTMLParser` 類別,當遇" -"到開始標籤、結束標籤和資料時將它們印出:\n" -"\n" -"::" +"到開始標籤、結束標籤和資料時將它們印出: ::" #: ../../library/html.parser.rst:64 msgid "The output will then be:" @@ -326,40 +324,25 @@ msgstr "範例" msgid "" "The following class implements a parser that will be used to illustrate more " "examples::" -msgstr "" -"以下類別實作了一個剖析器,將用於解說更多範例:\n" -"\n" -"::" +msgstr "以下類別實作了一個剖析器,將用於解說更多範例: ::" #: ../../library/html.parser.rst:269 msgid "Parsing a doctype::" -msgstr "" -"剖析文件類型:\n" -"\n" -"::" +msgstr "剖析文件類型: ::" #: ../../library/html.parser.rst:275 msgid "Parsing an element with a few attributes and a title::" -msgstr "" -"剖析一個具有一些屬性和標題的元素:\n" -"\n" -"::" +msgstr "剖析一個具有一些屬性和標題的元素: ::" #: ../../library/html.parser.rst:287 msgid "" "The content of ``script`` and ``style`` elements is returned as is, without " "further parsing::" -msgstr "" -"``script`` 和 ``style`` 元素的內容按原樣回傳,無需進一步剖析:\n" -"\n" -"::" +msgstr "``script`` 和 ``style`` 元素的內容按原樣回傳,無需進一步剖析: ::" #: ../../library/html.parser.rst:303 msgid "Parsing comments::" -msgstr "" -"剖析註解:\n" -"\n" -"::" +msgstr "剖析註解: ::" #: ../../library/html.parser.rst:310 msgid "" @@ -367,9 +350,7 @@ msgid "" "correct char (note: these 3 references are all equivalent to ``'>'``)::" msgstr "" "剖析附名 (named) 且為數值的 (numeric) 字元參照,並將它們轉換為正確的字元(注" -"意:這 3 個參照都等同於 ``'>'``):\n" -"\n" -"::" +"意:這 3 個參照都等同於 ``'>'``): ::" #: ../../library/html.parser.rst:318 msgid "" @@ -379,16 +360,11 @@ msgid "" msgstr "" "將不完整的區塊提供給 :meth:`~HTMLParser.feed` 是可行的,但是 :meth:" "`~HTMLParser.handle_data` 可能會被多次呼叫(除非 *convert_charrefs* 設定為 " -"``True``):\n" -"\n" -"::" +"``True``): ::" #: ../../library/html.parser.rst:331 msgid "Parsing invalid HTML (e.g. unquoted attributes) also works::" -msgstr "" -"也能夠剖析無效的 HTML(例如未加引號的屬性):\n" -"\n" -"::" +msgstr "也能夠剖析無效的 HTML(例如未加引號的屬性): ::" #: ../../library/html.parser.rst:9 msgid "HTML" diff --git a/library/http.client.po b/library/http.client.po index 520ef78b10..7f37515ef3 100644 --- a/library/http.client.po +++ b/library/http.client.po @@ -83,7 +83,7 @@ msgstr "" #: ../../library/http.client.rst:59 msgid "*source_address* was added." -msgstr "新增 *source_address*\\ 。" +msgstr "新增 *source_address*。" #: ../../library/http.client.rst:62 msgid "" @@ -109,7 +109,7 @@ msgstr "" #: ../../library/http.client.rst:81 msgid "*source_address*, *context* and *check_hostname* were added." -msgstr "新增 *source_address*\\ 、\\ *context* 與 *check_hostname*\\ 。" +msgstr "新增 *source_address*、*context* 與 *check_hostname*。" #: ../../library/http.client.rst:84 msgid "" diff --git a/library/http.cookiejar.po b/library/http.cookiejar.po index 5f9de4fca7..e1d4b07d92 100644 --- a/library/http.cookiejar.po +++ b/library/http.cookiejar.po @@ -776,7 +776,7 @@ msgstr "" #: ../../library/http.cookiejar.rst:609 msgid "Equivalent to ``DomainStrictNoDots|DomainStrictNonDomain``." -msgstr "等價於 ``DomainStrictNoDots|DomainStrictNonDomain``\\ 。" +msgstr "等價於 ``DomainStrictNoDots|DomainStrictNonDomain``。" #: ../../library/http.cookiejar.rst:613 msgid "Cookie Objects" diff --git a/library/http.po b/library/http.po index ad7992908e..218ae3aa82 100644 --- a/library/http.po +++ b/library/http.po @@ -77,10 +77,7 @@ msgstr "" #: ../../library/http.rst:34 ../../library/http.rst:157 #: ../../library/http.rst:171 msgid "Usage::" -msgstr "" -"用法:\n" -"\n" -"::" +msgstr "用法: ::" #: ../../library/http.rst:53 msgid "HTTP status codes" diff --git a/library/imaplib.po b/library/imaplib.po index 4d61da63df..995f89c9b1 100644 --- a/library/imaplib.po +++ b/library/imaplib.po @@ -480,10 +480,7 @@ msgstr "" #: ../../library/imaplib.rst:424 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/imaplib.rst:435 msgid "" diff --git a/library/imghdr.po b/library/imghdr.po index ba14438d14..8c3cf55379 100644 --- a/library/imghdr.po +++ b/library/imghdr.po @@ -199,7 +199,4 @@ msgstr "" #: ../../library/imghdr.rst:81 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" diff --git a/library/intro.po b/library/intro.po index 33dd5d7944..40887bae06 100644 --- a/library/intro.po +++ b/library/intro.po @@ -108,8 +108,8 @@ msgstr "" "*\\ 像是在讀一本小說一樣讀這本手冊——你可以快速瀏覽目錄(在手冊的最前頭)、或" "是你可以利用最後面的索引來查詢特定的函式或模組。最後,如果你享受閱讀一些隨機" "的主題,你可以選擇一個隨機的數字並開始閱讀(見 :mod:`random` 模組) 。不管你想" -"要以什麼順序來閱讀這個手冊,\\ :ref:`built-in-funcs`\\ 會是一個很好的入門,因" -"為手冊中其他章節都預設你已經對這個章節有一定的熟悉程度。" +"要以什麼順序來閱讀這個手冊,:ref:`built-in-funcs`\\ 會是一個很好的入門,因為" +"手冊中其他章節都預設你已經對這個章節有一定的熟悉程度。" #: ../../library/intro.rst:48 msgid "Let the show begin!" diff --git a/library/io.po b/library/io.po index c3923f3020..fd6d0776c8 100644 --- a/library/io.po +++ b/library/io.po @@ -97,17 +97,12 @@ msgid "" "The easiest way to create a text stream is with :meth:`open()`, optionally " "specifying an encoding::" msgstr "" -"建立文字資料串流最簡單的方法是使用 :meth:`open()`,可選擇性地指定編碼:\n" -"\n" -"::" +"建立文字資料串流最簡單的方法是使用 :meth:`open()`,可選擇性地指定編碼: ::" #: ../../library/io.rst:63 msgid "" "In-memory text streams are also available as :class:`StringIO` objects::" -msgstr "" -"記憶體內的文字資料串流也可以使用 :class:`StringIO` 物件建立:\n" -"\n" -"::" +msgstr "記憶體內的文字資料串流也可以使用 :class:`StringIO` 物件建立: ::" #: ../../library/io.rst:67 msgid "" @@ -138,17 +133,12 @@ msgid "" "``'b'`` in the mode string::" msgstr "" "建立二進位資料串流最簡單的方法是使用 :meth:`open()`,並在 mode 字串中加入 " -"``'b'``:\n" -"\n" -"::" +"``'b'``: ::" #: ../../library/io.rst:85 msgid "" "In-memory binary streams are also available as :class:`BytesIO` objects::" -msgstr "" -"記憶體內的二進位資料串流也可以透過 :class:`BytesIO` 物件來建立:\n" -"\n" -"::" +msgstr "記憶體內的二進位資料串流也可以透過 :class:`BytesIO` 物件來建立: ::" #: ../../library/io.rst:89 msgid "" @@ -178,9 +168,7 @@ msgstr "" "原始 I/O(也稱為\\ *無緩衝 I/O (unbuffered I/O)*)通常作為二進位以及文字資料" "串流的低階 building-block 使用;在使用者程式碼中直接操作原始資料串流很少有" "用。然而,你可以透過以無緩衝的二進位模式開啟一個檔案來建立一個原始資料串" -"流:\n" -"\n" -"::" +"流: ::" #: ../../library/io.rst:106 msgid "" @@ -245,7 +233,7 @@ msgstr "選擇性加入的編碼警告" #: ../../library/io.rst:145 msgid "See :pep:`597` for more details." -msgstr "更多資訊請見 :pep:`597`\\ 。" +msgstr "更多資訊請見 :pep:`597`。" #: ../../library/io.rst:148 msgid "" @@ -370,7 +358,7 @@ msgstr "" #: ../../library/io.rst:220 msgid "See :ref:`io-text-encoding` for more information." -msgstr "更多資訊請見 :ref:`io-text-encoding`\\ 。" +msgstr "更多資訊請見 :ref:`io-text-encoding`。" #: ../../library/io.rst:224 msgid "" @@ -518,7 +506,7 @@ msgstr ":class:`IOBase`" #: ../../library/io.rst:296 msgid "``fileno``, ``seek``, and ``truncate``" -msgstr "``fileno``\\ 、\\ ``seek`` 和 ``truncate``" +msgstr "``fileno``、``seek`` 和 ``truncate``" #: ../../library/io.rst:296 msgid "" @@ -548,7 +536,7 @@ msgstr ":class:`BufferedIOBase`" #: ../../library/io.rst:303 msgid "``detach``, ``read``, ``read1``, and ``write``" -msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``read1`` 和 ``write``" +msgstr "``detach``、``read``、``read1`` 和 ``write``" #: ../../library/io.rst:303 msgid "Inherited :class:`IOBase` methods, ``readinto``, and ``readinto1``" @@ -560,7 +548,7 @@ msgstr ":class:`TextIOBase`" #: ../../library/io.rst:305 msgid "``detach``, ``read``, ``readline``, and ``write``" -msgstr "``detach``\\ 、\\ ``read``\\ 、\\ ``readline`` 和 ``write``" +msgstr "``detach``、``read``、``readline`` 和 ``write``" #: ../../library/io.rst:305 msgid "" @@ -1719,10 +1707,7 @@ msgstr "" #: ../../library/io.rst:1104 msgid "Example usage::" -msgstr "" -"使用範例:\n" -"\n" -"::" +msgstr "使用範例: ::" #: ../../library/io.rst:1126 msgid "" diff --git a/library/itertools.po b/library/itertools.po index 80996b7982..111c072e5b 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -219,9 +219,8 @@ msgid "seq[n], seq[n+1], starting when predicate fails" msgstr "" #: ../../library/itertools.rst:59 -#, fuzzy msgid "``dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8``" -msgstr "``dropwhile(lambda x: x<5, [1,4,6,4,1]) → 6 4 1``" +msgstr "``dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8``" #: ../../library/itertools.rst:60 msgid ":func:`filterfalse`" @@ -232,9 +231,8 @@ msgid "elements of seq where predicate(elem) fails" msgstr "" #: ../../library/itertools.rst:60 -#, fuzzy msgid "``filterfalse(lambda x: x<5, [1,4,6,3,8]) → 6 8``" -msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" +msgstr "``filterfalse(lambda x: x<5, [1,4,6,3,8]) → 6 8``" #: ../../library/itertools.rst:61 msgid ":func:`groupby`" @@ -301,9 +299,8 @@ msgid "seq[0], seq[1], until predicate fails" msgstr "" #: ../../library/itertools.rst:65 -#, fuzzy msgid "``takewhile(lambda x: x<5, [1,4,6,3,8]) → 1 4``" -msgstr "``takewhile(lambda x: x<5, [1,4,6,4,1]) → 1 4``" +msgstr "``takewhile(lambda x: x<5, [1,4,6,3,8]) → 1 4``" #: ../../library/itertools.rst:66 msgid ":func:`tee`" @@ -466,9 +463,8 @@ msgid "" msgstr "" #: ../../library/itertools.rst:158 -#, fuzzy msgid "Added the optional *function* parameter." -msgstr "新增選用的 *func* 參數。" +msgstr "新增選用的 *function* 參數。" #: ../../library/itertools.rst:161 msgid "Added the optional *initial* parameter." @@ -642,10 +638,7 @@ msgstr "" #: ../../library/itertools.rst:424 msgid ":func:`groupby` is roughly equivalent to::" -msgstr "" -":func:`groupby` 大致等價於:\n" -"\n" -"::" +msgstr ":func:`groupby` 大致等價於: ::" #: ../../library/itertools.rst:462 msgid "" diff --git a/library/json.po b/library/json.po index cd5b22bef4..b9d14ec55d 100644 --- a/library/json.po +++ b/library/json.po @@ -63,10 +63,7 @@ msgstr "" #: ../../library/json.rst:29 msgid "Encoding basic Python object hierarchies::" -msgstr "" -"對基本 Python 物件階層進行編碼:\n" -"\n" -"::" +msgstr "對基本 Python 物件階層進行編碼: ::" #: ../../library/json.rst:48 msgid "Compact encoding::" @@ -78,10 +75,7 @@ msgstr "美化輸出:" #: ../../library/json.rst:63 msgid "Decoding JSON::" -msgstr "" -"JSON 解碼:\n" -"\n" -"::" +msgstr "JSON 解碼: ::" #: ../../library/json.rst:75 msgid "Specializing JSON object decoding::" @@ -97,7 +91,7 @@ msgstr "" #: ../../library/json.rst:119 msgid "See :ref:`json-commandline` for detailed documentation." -msgstr "更詳盡的文件請見 :ref:`json-commandline`\\ 。" +msgstr "更詳盡的文件請見 :ref:`json-commandline`。" #: ../../library/json.rst:123 msgid "" diff --git a/library/linecache.po b/library/linecache.po index f31afafca4..d8f7a4e5bc 100644 --- a/library/linecache.po +++ b/library/linecache.po @@ -86,10 +86,7 @@ msgstr "" #: ../../library/linecache.rst:63 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/linecache.rst:31 msgid "module" diff --git a/library/locale.po b/library/locale.po index 477495fc36..12cb2ebde4 100644 --- a/library/locale.po +++ b/library/locale.po @@ -754,10 +754,7 @@ msgstr "" #: ../../library/locale.rst:565 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/locale.rst:578 msgid "Background, details, hints, tips and caveats" diff --git a/library/logging.config.po b/library/logging.config.po index a7c5d837c1..2483fce5bb 100644 --- a/library/logging.config.po +++ b/library/logging.config.po @@ -631,10 +631,7 @@ msgstr "" #: ../../library/logging.config.rst:505 msgid "and::" -msgstr "" -"和:\n" -"\n" -"::" +msgstr "和: ::" #: ../../library/logging.config.rst:512 msgid "" diff --git a/library/logging.handlers.po b/library/logging.handlers.po index 64b2d4b753..0ada1cbeee 100644 --- a/library/logging.handlers.po +++ b/library/logging.handlers.po @@ -833,7 +833,7 @@ msgstr "" #: ../../library/logging.handlers.rst:645 msgid "*socktype* was added." -msgstr "新增 *socktype*\\ 。" +msgstr "新增 *socktype*。" #: ../../library/logging.handlers.rst:651 msgid "Closes the socket to the remote host." diff --git a/library/logging.po b/library/logging.po index 1d2d84dd54..a627508ed7 100644 --- a/library/logging.po +++ b/library/logging.po @@ -293,7 +293,7 @@ msgstr "" #: ../../library/logging.rst:211 ../../library/logging.rst:554 msgid "See :ref:`levels` for a list of levels." -msgstr "層級清單請見 :ref:`levels`\\ 。" +msgstr "層級清單請見 :ref:`levels`。" #: ../../library/logging.rst:213 msgid "" diff --git a/library/marshal.po b/library/marshal.po index c8ef584075..01e9a4f860 100644 --- a/library/marshal.po +++ b/library/marshal.po @@ -38,7 +38,7 @@ msgstr "" "此 module(模組)包含一個能以二進位制格式來讀寫 Python 值的函式。這種格式是 " "Python 專屬但獨立於機器架構的(例如,你可以在一臺 PC 上寫入某個 Python 值,再" "將檔案傳到一臺 Mac 上並在那裡讀取它)。這種格式的細節是有意地不在文件上說明" -"的;它可能在不同 Python 版本中被改變(雖然這種情況極少發生)。\\ [#]_" +"的;它可能在不同 Python 版本中被改變(雖然這種情況極少發生)。[#]_" #: ../../library/marshal.rst:21 msgid "" @@ -54,12 +54,12 @@ msgid "" "marshal." msgstr "" "這不是一個通用「持續性 (persistence)」module 。關於通用持續性以及透過 RPC 呼" -"叫傳遞 Python 物件,請參閱 :mod:`pickle` 和 :mod:`shelve` 等 module 。\\ :" -"mod:`marshal` module 主要是為了支援用來讀寫「偽編譯 (pseudo-compiled)」 :" -"file:`.pyc` 檔案的 Python module。因此,Python 維護者保留了在必要時以不向後相" -"容的方式修改 marshal 格式的權利。如果你要序列化和反序列化 Python 物件,請改" -"用 :mod:`pickle` module -- 其執行效率相當、有保證版本獨立性,且實質上 " -"pickle 還支援比 marshal 更多樣的物件。" +"叫傳遞 Python 物件,請參閱 :mod:`pickle` 和 :mod:`shelve` 等 module 。:mod:" +"`marshal` module 主要是為了支援用來讀寫「偽編譯 (pseudo-compiled)」 :file:`." +"pyc` 檔案的 Python module。因此,Python 維護者保留了在必要時以不向後相容的方" +"式修改 marshal 格式的權利。如果你要序列化和反序列化 Python 物件,請改用 :mod:" +"`pickle` module -- 其執行效率相當、有保證版本獨立性,且實質上 pickle 還支援" +"比 marshal 更多樣的物件。" #: ../../library/marshal.rst:33 msgid "" @@ -146,8 +146,8 @@ msgid "" "file must be a readable :term:`binary file`." msgstr "" "從開啟的檔案讀取一個值並回傳。如果讀不到有效的值(例如,由於資料為不同 " -"Python 版本的不相容 marshal 格式),則會引發 :exc:`EOFError`\\ 、\\ :exc:" -"`ValueError` 或 :exc:`TypeError`。檔案必須為可讀取的 :term:`binary file`\\ 。" +"Python 版本的不相容 marshal 格式),則會引發 :exc:`EOFError`、:exc:" +"`ValueError` 或 :exc:`TypeError`。檔案必須為可讀取的 :term:`binary file`。" #: ../../library/marshal.rst:79 msgid "" diff --git a/library/mimetypes.po b/library/mimetypes.po index 74b65b25cf..d4e79df177 100644 --- a/library/mimetypes.po +++ b/library/mimetypes.po @@ -203,10 +203,7 @@ msgstr "" #: ../../library/mimetypes.rst:161 msgid "An example usage of the module::" -msgstr "" -"模組的使用範例:\n" -"\n" -"::" +msgstr "模組的使用範例: ::" #: ../../library/mimetypes.rst:178 msgid "MimeTypes Objects" diff --git a/library/multiprocessing.po b/library/multiprocessing.po index b0852d2899..a9ded5fc5c 100644 --- a/library/multiprocessing.po +++ b/library/multiprocessing.po @@ -402,10 +402,7 @@ msgstr "" #: ../../library/multiprocessing.rst:408 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/multiprocessing.rst:452 msgid "" @@ -502,10 +499,7 @@ msgstr "" #: ../../library/multiprocessing.rst:536 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/multiprocessing.rst:548 msgid "Start the process's activity." @@ -636,7 +630,7 @@ msgstr "" #: ../../library/multiprocessing.rst:633 msgid "See :ref:`multiprocessing-auth-keys`." -msgstr "參閱 :ref:`multiprocessing-auth-keys`\\ 。" +msgstr "參閱 :ref:`multiprocessing-auth-keys`。" #: ../../library/multiprocessing.rst:637 msgid "" diff --git a/library/nntplib.po b/library/nntplib.po index a82790085a..d8f3b4c026 100644 --- a/library/nntplib.po +++ b/library/nntplib.po @@ -361,7 +361,7 @@ msgstr "" #: ../../library/nntplib.rst:349 msgid "*group_pattern* was added." -msgstr "新增 *group_pattern*\\ 。" +msgstr "新增 *group_pattern*。" #: ../../library/nntplib.rst:355 msgid "" diff --git a/library/numbers.po b/library/numbers.po index 41df5f3445..0b79ed5064 100644 --- a/library/numbers.po +++ b/library/numbers.po @@ -1,5 +1,4 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) 2001-2022, Python Software Foundation +# Copyright (C) 2001-2024, Python Software Foundation # This file is distributed under the same license as the Python package. # # Translators: @@ -138,12 +137,10 @@ msgstr "" "operations) 的抽象方法:``<<``、``>>``、``&``、``^``、``|``、``~``。" #: ../../library/numbers.rst:88 -#, fuzzy msgid "Notes for type implementers" msgstr "給型別實作者的註記" #: ../../library/numbers.rst:90 -#, fuzzy msgid "" "Implementers should be careful to make equal numbers equal and hash them to " "the same values. This may be subtle if there are two different extensions of " @@ -152,9 +149,7 @@ msgid "" msgstr "" "實作者需注意,相等的數值除了大小相等外,還必須擁有同樣的雜湊值。當使用兩個不" "同的實數擴充時,這可能是很微妙的。例如,:class:`fractions.Fraction` 底下的 :" -"func:`hash` 實作如下:\n" -"\n" -"::" +"func:`hash` 實作如下: ::" #: ../../library/numbers.rst:109 msgid "Adding More Numeric ABCs" @@ -167,9 +162,7 @@ msgid "" "``MyFoo`` between :class:`Complex` and :class:`Real` with::" msgstr "" "當然,還有更多用於數值的 ABC,如果不加入它們就不會有健全的階層。你可以在 :" -"class:`Complex` 和 :class:`Real` 中加入 ``MyFoo``,像是:\n" -"\n" -"::" +"class:`Complex` 和 :class:`Real` 中加入 ``MyFoo``,像是: ::" #: ../../library/numbers.rst:123 msgid "Implementing the arithmetic operations" @@ -186,9 +179,7 @@ msgstr "" "我們想要實作算術操作,來使得混合模式操作要麼呼叫一個作者知道兩個引數之型別的" "實作,要麼將其轉換成最接近的內建型別並執行這個操作。對於 :class:`Integral` 的" "子型別,這意味著 :meth:`~object.__add__` 和 :meth:`~object.__radd__` 必須用如" -"下方式定義:\n" -"\n" -"::" +"下方式定義: ::" #: ../../library/numbers.rst:157 msgid "" @@ -267,6 +258,4 @@ msgid "" msgstr "" "由於大部分對任意給定類型的操作都十分相似的,定義一個為任意給定運算子生成向前 " "(forward) 與向後 (reverse) 實例的輔助函式可能會非常有用。例如,:class:" -"`fractions.Fraction` 使用了:\n" -"\n" -"::" +"`fractions.Fraction` 使用了: ::" diff --git a/library/operator.po b/library/operator.po index c306cf22b4..8055ef5154 100644 --- a/library/operator.po +++ b/library/operator.po @@ -40,9 +40,9 @@ msgid "" "for clarity." msgstr "" ":mod:`operator` module(模組)提供了一套與 Python 原生運算子對應的高效率函" -"式。例如,\\ ``operator.add(x, y)`` 與表示式 ``x+y`` 相同。許多函式名與特殊方" -"法名相同,只是沒有雙底線。為了向後相容,許多包含雙底線的函式被保留了下來,但" -"為了易於表達,建議使用沒有雙底線的函式。" +"式。例如,``operator.add(x, y)`` 與表示式 ``x+y`` 相同。許多函式名與特殊方法" +"名相同,只是沒有雙底線。為了向後相容,許多包含雙底線的函式被保留了下來,但為" +"了易於表達,建議使用沒有雙底線的函式。" #: ../../library/operator.rst:25 msgid "" @@ -67,12 +67,11 @@ msgid "" "which may or may not be interpretable as a Boolean value. See :ref:" "`comparisons` for more information about rich comparisons." msgstr "" -"在 *a* 和 *b* 之間進行 \"rich comparison\"。具體來說,\\ ``lt(a, b)`` 與 ``a " -"< b`` 相同,\\ ``le(a, b)`` 與 ``a <= b`` 相同,\\ ``eq(a, b)`` 與 ``a == " -"b`` 相同,\\ ``ne(a, b)`` 與 ``a != b`` 相同,\\ ``gt(a, b)`` 與 ``a > b`` 相" -"同,\\ ``ge(a, b)`` 與 ``a >= b`` 相同。注意這些函式可以回傳任何值,無論它是" -"否可當作 boolean(布林)值。關於 rich comparison 的更多資訊請參考 :ref:" -"`comparisons`\\ 。" +"在 *a* 和 *b* 之間進行 \"rich comparison\"。具體來說,``lt(a, b)`` 與 ``a < " +"b`` 相同,``le(a, b)`` 與 ``a <= b`` 相同,``eq(a, b)`` 與 ``a == b`` 相同," +"``ne(a, b)`` 與 ``a != b`` 相同,``gt(a, b)`` 與 ``a > b`` 相同,``ge(a, " +"b)`` 與 ``a >= b`` 相同。注意這些函式可以回傳任何值,無論它是否可當作 boolean" +"(布林)值。關於 rich comparison 的更多資訊請參考 :ref:`comparisons`。" #: ../../library/operator.rst:54 msgid "" @@ -189,8 +188,7 @@ msgstr "回傳 ``a - b``。" msgid "" "Return ``a / b`` where 2/3 is .66 rather than 0. This is also known as " "\"true\" division." -msgstr "" -"回傳 ``a / b``\\ ,例如 2/3 將等於 .66 而不是 0。這也被稱為「真」除法。" +msgstr "回傳 ``a / b``,例如 2/3 將等於 .66 而不是 0。這也被稱為「真」除法。" #: ../../library/operator.rst:200 msgid "Return the bitwise exclusive or of *a* and *b*." @@ -255,8 +253,8 @@ msgid "" "other functions that expect a function argument." msgstr "" ":mod:`operator` module 還定義了一些用於常規屬性和條目查詢的工具。這些工具適合" -"用來編寫快速欄位提取器以作為 :func:`map`\\ 、\\ :func:`sorted`\\ 、\\ :meth:" -"`itertools.groupby` 或其他需要函式引數的函式之引數。" +"用來編寫快速欄位提取器以作為 :func:`map`、:func:`sorted`、:meth:`itertools." +"groupby` 或其他需要函式引數的函式之引數。" #: ../../library/operator.rst:273 msgid "" @@ -290,10 +288,7 @@ msgstr "" #: ../../library/operator.rst:285 ../../library/operator.rst:317 #: ../../library/operator.rst:365 msgid "Equivalent to::" -msgstr "" -"等價於:\n" -"\n" -"::" +msgstr "等價於: ::" #: ../../library/operator.rst:308 msgid "" @@ -835,7 +830,7 @@ msgstr "``a = iand(a, b)`` 等價於 ``a &= b``。" #: ../../library/operator.rst:503 msgid "" "``a = iconcat(a, b)`` is equivalent to ``a += b`` for *a* and *b* sequences." -msgstr "``a = iconcat(a, b)`` 等價於 ``a += b``\\ ,其中 *a* 和 *b* 為序列。" +msgstr "``a = iconcat(a, b)`` 等價於 ``a += b``,其中 *a* 和 *b* 為序列。" #: ../../library/operator.rst:509 msgid "``a = ifloordiv(a, b)`` is equivalent to ``a //= b``." diff --git a/library/optparse.po b/library/optparse.po index a4d9cbb574..412926c2c8 100644 --- a/library/optparse.po +++ b/library/optparse.po @@ -428,10 +428,7 @@ msgstr "" #: ../../library/optparse.rst:330 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/optparse.rst:335 msgid "" @@ -1169,10 +1166,7 @@ msgstr "" #: ../../library/optparse.rst:971 msgid "For example, when you call ::" -msgstr "" -"例如說,當你呼叫:\n" -"\n" -"::" +msgstr "例如說,當你呼叫: ::" #: ../../library/optparse.rst:975 msgid "" @@ -1358,10 +1352,7 @@ msgstr "" #: ../../library/optparse.rst:1163 ../../library/optparse.rst:1181 #: ../../library/optparse.rst:1220 ../../library/optparse.rst:1258 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/optparse.rst:1126 msgid "As it parses the command line ::" @@ -1494,7 +1485,7 @@ msgstr "" #: ../../library/optparse.rst:1242 msgid "See section :ref:`optparse-option-callbacks` for more detail." -msgstr "更多細節請見 :ref:`optparse-option-callbacks`\\ 。" +msgstr "更多細節請見 :ref:`optparse-option-callbacks`。" #: ../../library/optparse.rst:1246 msgid "" diff --git a/library/os.po b/library/os.po index 46ac43863e..cf914e275c 100644 --- a/library/os.po +++ b/library/os.po @@ -168,7 +168,7 @@ msgstr "" #: ../../library/os.rst:100 msgid "See also the :term:`locale encoding`." -msgstr "另請參閱 :term:`locale encoding`\\ 。" +msgstr "另請參閱 :term:`locale encoding`。" #: ../../library/os.rst:106 msgid "Python UTF-8 Mode" @@ -176,7 +176,7 @@ msgstr "Python UTF-8 模式" #: ../../library/os.rst:108 msgid "See :pep:`540` for more details." -msgstr "更多資訊請見 :pep:`540`\\ 。" +msgstr "更多資訊請見 :pep:`540`。" #: ../../library/os.rst:111 msgid "" @@ -1265,8 +1265,7 @@ msgstr "" #: ../../library/os.rst:1108 msgid "See also :func:`set_blocking` and :meth:`socket.socket.setblocking`." -msgstr "" -"另請參閱 :func:`set_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" +msgstr "另請參閱 :func:`set_blocking` 與 :meth:`socket.socket.setblocking`。" #: ../../library/os.rst:1115 ../../library/os.rst:1654 msgid "On Windows, this function is limited to pipes." @@ -1841,8 +1840,7 @@ msgstr "" #: ../../library/os.rst:1647 msgid "See also :func:`get_blocking` and :meth:`socket.socket.setblocking`." -msgstr "" -"另請參閱 :func:`get_blocking` 與 :meth:`socket.socket.setblocking`\\ 。" +msgstr "另請參閱 :func:`get_blocking` 與 :meth:`socket.socket.setblocking`。" #: ../../library/os.rst:1664 msgid "" @@ -2150,7 +2148,7 @@ msgstr "" #: ../../library/os.rst:1960 msgid "Added the *dir_fd*, *effective_ids*, and *follow_symlinks* parameters." -msgstr "新增 *dir_fd*\\ 、\\ *effective_ids* 與 *follow_symlinks* 參數。" +msgstr "新增 *dir_fd*、*effective_ids* 與 *follow_symlinks* 參數。" #: ../../library/os.rst:1972 msgid "" @@ -4660,7 +4658,7 @@ msgstr "" #: ../../library/os.rst:4250 msgid "See also :func:`signal.pthread_kill`." -msgstr "另請參閱 :func:`signal.pthread_kill`\\ 。" +msgstr "另請參閱 :func:`signal.pthread_kill`。" #: ../../library/os.rst:4252 msgid "" diff --git a/library/ossaudiodev.po b/library/ossaudiodev.po index 33094d63ca..32e2bf2bed 100644 --- a/library/ossaudiodev.po +++ b/library/ossaudiodev.po @@ -430,17 +430,11 @@ msgstr "" #: ../../library/ossaudiodev.rst:311 msgid "For example, ::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/ossaudiodev.rst:315 msgid "is equivalent to ::" -msgstr "" -"等價於:\n" -"\n" -"::" +msgstr "等價於: ::" #: ../../library/ossaudiodev.rst:324 msgid "Returns the size of the hardware buffer, in samples." diff --git a/library/pathlib.po b/library/pathlib.po index 301436b534..b6ee3951dd 100644 --- a/library/pathlib.po +++ b/library/pathlib.po @@ -655,13 +655,11 @@ msgstr "" "你的應用程式導致漏洞或故障): ::" #: ../../library/pathlib.rst:792 -#, fuzzy msgid "" "Some concrete path methods can raise an :exc:`OSError` if a system call " "fails (for example because the path doesn't exist)." msgstr "" -"實體路徑除了純路徑的方法之外也提供以下方法。如果系統呼叫失敗(例如因為路徑不" -"存在),以下許多方法會引發 :exc:`OSError`。" +"有些實體路徑方法會在系統呼叫失敗(例如因為路徑不存在)時引發 :exc:`OSError`" #: ../../library/pathlib.rst:797 msgid "Querying file type and status" @@ -893,9 +891,8 @@ msgid "An existing file of the same name is overwritten." msgstr "一個名稱相同的已存在檔案會被覆寫。" #: ../../library/pathlib.rst:1047 -#, fuzzy msgid "Reading directories" -msgstr "列出子目錄: ::" +msgstr "讀取目錄" #: ../../library/pathlib.rst:1051 msgid "" @@ -904,7 +901,6 @@ msgid "" msgstr "當該路徑指向一個目錄,會 yield 目錄裡面的路徑物件: ::" #: ../../library/pathlib.rst:1065 -#, fuzzy msgid "" "The children are yielded in arbitrary order, and the special entries ``'.'`` " "and ``'..'`` are not included. If a file is removed from or added to the " @@ -912,8 +908,8 @@ msgid "" "object for that file is included." msgstr "" "子路徑會以任意順序被 yield,且不會包含特殊項目 ``'.'`` 和 ``'..'``。如果一個" -"檔案在建立這個疊代器之後加到該目錄或從目錄刪除,是否會包含這個檔案的路徑物件" -"是不確定的。" +"檔案在建立這個疊代器之後加到該目錄或從目錄刪除,這個檔案的路徑物件是否會被包" +"含是沒有明定的。" #: ../../library/pathlib.rst:1070 msgid "" @@ -1139,9 +1135,8 @@ msgstr "" "必要的,因為 :func:`rmdir` 不允許在目錄為空之前刪除它: ::" #: ../../library/pathlib.rst:1242 -#, fuzzy msgid "Other methods" -msgstr "方法" +msgstr "其他方法" #: ../../library/pathlib.rst:1246 msgid "" diff --git a/library/pipes.po b/library/pipes.po index db608b386d..92d04cb5c7 100644 --- a/library/pipes.po +++ b/library/pipes.po @@ -33,7 +33,7 @@ msgid "" "details). Please use the :mod:`subprocess` module instead." msgstr "" ":mod:`pipes` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#pipes>`\\ )。" -"請改用 :mod:`subprocess`\\ 。" +"請改用 :mod:`subprocess`。" #: ../../library/pipes.rst:20 msgid "" @@ -61,10 +61,7 @@ msgstr "" #: ../../library/pipes.rst:35 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/pipes.rst:50 msgid "Template Objects" diff --git a/library/pkgutil.po b/library/pkgutil.po index 4606b80c12..fdd666ab5d 100644 --- a/library/pkgutil.po +++ b/library/pkgutil.po @@ -203,10 +203,7 @@ msgstr "" #: ../../library/pkgutil.rst:165 msgid "Examples::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/pkgutil.rst:187 msgid "Get a resource from a package." diff --git a/library/platform.po b/library/platform.po index eaaa1ffb54..9a25d70bbc 100644 --- a/library/platform.po +++ b/library/platform.po @@ -51,8 +51,8 @@ msgid "" "architecture and the linkage format used for the executable. Both values are " "returned as strings." msgstr "" -"回傳一個 tuple(元組) ``(bits, linkage)``\\ ,其中包含可執行檔案所使用的位元" -"架構和連結格式資訊。這兩個值均以字串形式回傳。" +"回傳一個 tuple(元組) ``(bits, linkage)``,其中包含可執行檔案所使用的位元架" +"構和連結格式資訊。這兩個值均以字串形式回傳。" #: ../../library/platform.rst:33 msgid "" @@ -61,9 +61,9 @@ msgid "" "``sizeof(long)`` on Python version < 1.5.2) is used as indicator for the " "supported pointer size." msgstr "" -"無法確定的值將回傳參數所給定之預先設置值。如果給定的位元為 ``''``\\ ,則會使" -"用 ``sizeof(pointer)``\\ (或者當 Python 版本 < 1.5.2 時為 " -"``sizeof(long)``\\ )作為所支援指標大小的指示器 (indicator)。" +"無法確定的值將回傳參數所給定之預先設置值。如果給定的位元為 ``''``,則會使用 " +"``sizeof(pointer)``\\ (或者當 Python 版本 < 1.5.2 時為 ``sizeof(long)``\\ )" +"作為所支援指標大小的指示器 (indicator)。" #: ../../library/platform.rst:38 msgid "" @@ -116,7 +116,7 @@ msgid "" "The output is intended to be *human readable* rather than machine parseable. " "It may look different on different platforms and this is intended." msgstr "" -"輸出應為\\ *人類易讀的 (human readable)*\\ ,而非機器易剖析的 (machine " +"輸出應為\\ *人類易讀的 (human readable)*,而非機器易剖析的 (machine " "parseable)。它在不同平臺上看起來可能不一致,這是有意為之的。" #: ../../library/platform.rst:74 diff --git a/library/posix.po b/library/posix.po index 8b55f73ed6..e6869fb00c 100644 --- a/library/posix.po +++ b/library/posix.po @@ -91,16 +91,11 @@ msgstr "" "當 :c:type:`off_t` 的大小大於 :c:expr:`long` 且 :c:expr:`long long` 的大小至" "少與 :c:type:`off_t` 相同時,對大檔案的支援會被啟用。可能需要使用某些編譯器旗" "標來配置和編譯 Python 以啟用此模式。例如,對於 Solaris 2.6 和 2.7,你需要執行" -"如下操作:\n" -"\n" -"::" +"如下操作: ::" #: ../../library/posix.rst:58 msgid "On large-file-capable Linux systems, this might work::" -msgstr "" -"在支援大檔案的 Linux 系統上,這可能有效:\n" -"\n" -"::" +msgstr "在支援大檔案的 Linux 系統上,這可能有效: ::" #: ../../library/posix.rst:67 msgid "Notable Module Contents" diff --git a/library/queue.po b/library/queue.po index c94ad062b2..02ce14273b 100644 --- a/library/queue.po +++ b/library/queue.po @@ -130,9 +130,7 @@ msgid "" "class that ignores the data item and only compares the priority number::" msgstr "" "如果 *data* 元素為不可比較的,則可以將資料包裝在一個 class 中,該 class 忽略" -"資料項目並僅比較優先數:\n" -"\n" -"::" +"資料項目並僅比較優先數: ::" #: ../../library/queue.rst:76 msgid "" @@ -303,10 +301,7 @@ msgstr "" #: ../../library/queue.rst:191 msgid "Example of how to wait for enqueued tasks to be completed::" -msgstr "" -"如何等待放入佇列的任務完成的範例:\n" -"\n" -"::" +msgstr "如何等待放入佇列的任務完成的範例: ::" #: ../../library/queue.rst:218 msgid "SimpleQueue Objects" diff --git a/library/random.po b/library/random.po index 9128075727..09192af648 100644 --- a/library/random.po +++ b/library/random.po @@ -126,8 +126,8 @@ msgid "" "simple update operations." msgstr "" "`進位互補乘法 (Complementary-Multiply-with-Carry) 用法 `_\\ ,可" -"作為隨機數產生器的一個可相容替代方案,具有較長的週期和相對簡單的更新操作。" +"activestate.com/recipes/576707-long-period-random-number-generator/>`_,可作" +"為隨機數產生器的一個可相容替代方案,具有較長的週期和相對簡單的更新操作。" #: ../../library/random.rst:64 msgid "Bookkeeping functions" diff --git a/library/re.po b/library/re.po index 4b150c02d4..8112fe1e0f 100644 --- a/library/re.po +++ b/library/re.po @@ -1211,10 +1211,7 @@ msgstr "" #: ../../library/re.rst:891 msgid "is equivalent to ::" -msgstr "" -"等價於:\n" -"\n" -"::" +msgstr "等價於: ::" #: ../../library/re.rst:895 msgid "" @@ -1690,10 +1687,7 @@ msgstr "" #: ../../library/re.rst:1428 ../../library/re.rst:1653 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/re.rst:1434 msgid "" @@ -1904,7 +1898,7 @@ msgstr "``\\d+``" #: ../../library/re.rst:1622 msgid "``%x``, ``%X``" -msgstr "``%x``\\ 、\\ ``%X``" +msgstr "``%x``、``%X``" #: ../../library/re.rst:1622 msgid "``[-+]?(0[xX])?[\\dA-Fa-f]+``" diff --git a/library/resource.po b/library/resource.po index 600638a234..295114249c 100644 --- a/library/resource.po +++ b/library/resource.po @@ -318,10 +318,7 @@ msgstr "" #: ../../library/resource.rst:285 msgid "A simple example::" -msgstr "" -"一個簡單範例:\n" -"\n" -"::" +msgstr "一個簡單範例: ::" #: ../../library/resource.rst:299 msgid "" diff --git a/library/rlcompleter.po b/library/rlcompleter.po index 40fc7aaf4c..2444fc6e68 100644 --- a/library/rlcompleter.po +++ b/library/rlcompleter.po @@ -43,10 +43,7 @@ msgstr "" #: ../../library/rlcompleter.rst:22 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/rlcompleter.rst:33 msgid "" diff --git a/library/sched.po b/library/sched.po index a903b9c372..a7fbfe7d4b 100644 --- a/library/sched.po +++ b/library/sched.po @@ -55,10 +55,7 @@ msgstr "" #: ../../library/sched.rst:36 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/sched.rst:67 msgid "Scheduler Objects" diff --git a/library/shutil.po b/library/shutil.po index 9e1c72edf1..150d4985d8 100644 --- a/library/shutil.po +++ b/library/shutil.po @@ -204,7 +204,7 @@ msgstr "" #: ../../library/shutil.rst:150 msgid "Please see :data:`os.supports_follow_symlinks` for more information." -msgstr "更多資訊請見 :data:`os.supports_follow_symlinks`\\ 。" +msgstr "更多資訊請見 :data:`os.supports_follow_symlinks`。" #: ../../library/shutil.rst:153 ../../library/shutil.rst:210 msgid "" diff --git a/library/signal.po b/library/signal.po index 39130317bf..2485f8c902 100644 --- a/library/signal.po +++ b/library/signal.po @@ -511,7 +511,7 @@ msgstr "更多資訊請見 :manpage:`pthread_kill(3)` 手冊頁。" #: ../../library/signal.rst:441 msgid "See also :func:`os.kill`." -msgstr "另請參閱 :func:`os.kill`\\ 。" +msgstr "另請參閱 :func:`os.kill`。" #: ../../library/signal.rst:448 msgid "" @@ -563,7 +563,7 @@ msgstr "" #: ../../library/signal.rst:476 msgid "See also :func:`pause`, :func:`sigpending` and :func:`sigwait`." -msgstr "另請參閱 :func:`pause`\\ 、\\ :func:`sigpending` 與 :func:`sigwait`。" +msgstr "另請參閱 :func:`pause`、:func:`sigpending` 與 :func:`sigwait`。" #: ../../library/signal.rst:483 msgid "" @@ -716,8 +716,7 @@ msgstr "更多資訊請見 :manpage:`sigpending(2)` 手冊頁。" #: ../../library/signal.rst:607 msgid "See also :func:`pause`, :func:`pthread_sigmask` and :func:`sigwait`." -msgstr "" -"另請參閱 :func:`pause`\\ 、\\ :func:`pthread_sigmask` 與 :func:`sigwait`。" +msgstr "另請參閱 :func:`pause`、:func:`pthread_sigmask` 與 :func:`sigwait`。" #: ../../library/signal.rst:614 msgid "" @@ -762,8 +761,7 @@ msgstr "更多資訊請見 :manpage:`sigwaitinfo(2)` 手冊頁。" #: ../../library/signal.rst:648 msgid "See also :func:`pause`, :func:`sigwait` and :func:`sigtimedwait`." -msgstr "" -"另請參閱 :func:`pause`\\ 、\\ :func:`sigwait` 與 :func:`sigtimedwait`。" +msgstr "另請參閱 :func:`pause`、:func:`sigwait` 與 :func:`sigtimedwait`。" #: ../../library/signal.rst:652 msgid "" @@ -785,7 +783,7 @@ msgstr "更多資訊請見 :manpage:`sigtimedwait(2)` 手冊頁。" #: ../../library/signal.rst:668 msgid "See also :func:`pause`, :func:`sigwait` and :func:`sigwaitinfo`." -msgstr "另請參閱 :func:`pause`\\ 、\\ :func:`sigwait` 與 :func:`sigwaitinfo`。" +msgstr "另請參閱 :func:`pause`、:func:`sigwait` 與 :func:`sigwaitinfo`。" #: ../../library/signal.rst:672 msgid "" diff --git a/library/smtplib.po b/library/smtplib.po index 573900ed53..f30540c3f0 100644 --- a/library/smtplib.po +++ b/library/smtplib.po @@ -131,7 +131,7 @@ msgstr "" #: ../../library/smtplib.rst:92 ../../library/smtplib.rst:415 msgid "*context* was added." -msgstr "新增 *context*\\ 。" +msgstr "新增 *context*。" #: ../../library/smtplib.rst:95 #, fuzzy diff --git a/library/socket.po b/library/socket.po index 65caea6283..cc24f7ca2c 100644 --- a/library/socket.po +++ b/library/socket.po @@ -998,11 +998,11 @@ msgstr "" #: ../../library/socket.rst:812 msgid "*source_address* was added." -msgstr "新增 *source_address*\\ 。" +msgstr "新增 *source_address*。" #: ../../library/socket.rst:815 msgid "*all_errors* was added." -msgstr "新增 *all_errors*\\ 。" +msgstr "新增 *all_errors*。" #: ../../library/socket.rst:821 msgid "" @@ -1970,10 +1970,7 @@ msgstr "" #: ../../library/socket.rst:1733 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/socket.rst:1756 msgid "" @@ -2309,10 +2306,7 @@ msgstr "" #: ../../library/socket.rst:2076 msgid "The first two examples support IPv4 only. ::" -msgstr "" -"前兩個範例只支援 IPv4:\n" -"\n" -"::" +msgstr "前兩個範例只支援 IPv4: ::" #: ../../library/socket.rst:2107 msgid "" diff --git a/library/ssl.po b/library/ssl.po index 5cf93972de..5bbb0e9f97 100644 --- a/library/ssl.po +++ b/library/ssl.po @@ -148,24 +148,15 @@ msgstr "" #: ../../library/ssl.rst:82 msgid "Client socket example with default context and IPv4/IPv6 dual stack::" -msgstr "" -"使用預設語境及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例:\n" -"\n" -"::" +msgstr "使用預設語境及 IPv4/IPv6 雙協定堆疊的客戶端 socket 範例: ::" #: ../../library/ssl.rst:95 msgid "Client socket example with custom context and IPv4::" -msgstr "" -"使用自訂語境及 IPv4 的客戶端 socket範例:\n" -"\n" -"::" +msgstr "使用自訂語境及 IPv4 的客戶端 socket範例: ::" #: ../../library/ssl.rst:107 msgid "Server socket example listening on localhost IPv4::" -msgstr "" -"在本地 IPv4 上監聽伺服器 socket 的範例:\n" -"\n" -"::" +msgstr "在本地 IPv4 上監聽伺服器 socket 的範例: ::" #: ../../library/ssl.rst:121 msgid "Context creation" @@ -258,9 +249,7 @@ msgstr "" "時,收到 \"Protocol or cipher suite mismatch\" 錯誤,這可能是因為他們的系統僅" "支援 SSL3.0,然而 SSL3.0 已被此函式用 :data:`OP_NO_SSLv3` 排除。目前廣泛認為 " "SSL3.0 已經\\ `被完全破解 `_。如果您仍" -"然希望在允許 SSL3.0 連線的情況下使用此函式,可以使用下面的方法:\n" -"\n" -"::" +"然希望在允許 SSL3.0 連線的情況下使用此函式,可以使用下面的方法: ::" #: ../../library/ssl.rst:177 msgid "RC4 was dropped from the default cipher string." @@ -995,7 +984,6 @@ msgstr "" "SSLv2 伺服器的 sockets。" #: ../../library/ssl.rst:762 -#, fuzzy msgid "" "Prevents reuse of the same DH key for distinct SSL sessions. This improves " "forward secrecy but requires more computational resources. This option only " @@ -1005,7 +993,6 @@ msgstr "" "資源。此選項只適用於伺服器 sockets。" #: ../../library/ssl.rst:770 -#, fuzzy msgid "" "Prevents reuse of the same ECDH key for distinct SSL sessions. This " "improves forward secrecy but requires more computational resources. This " diff --git a/library/stat.po b/library/stat.po index 2d85f61501..34f1d48a4b 100644 --- a/library/stat.po +++ b/library/stat.po @@ -115,10 +115,7 @@ msgstr "" #: ../../library/stat.rst:101 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/stat.rst:129 msgid "" diff --git a/library/stdtypes.po b/library/stdtypes.po index 1b61b36860..51e604c2e6 100644 --- a/library/stdtypes.po +++ b/library/stdtypes.po @@ -872,10 +872,7 @@ msgstr "" #: ../../library/stdtypes.rst:475 ../../library/stdtypes.rst:498 #: ../../library/stdtypes.rst:543 ../../library/stdtypes.rst:587 msgid "Equivalent to::" -msgstr "" -"等同於:\n" -"\n" -"::" +msgstr "等同於: ::" #: ../../library/stdtypes.rst:486 msgid "" @@ -2525,10 +2522,7 @@ msgstr "" #: ../../library/stdtypes.rst:1849 msgid "Example: ::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/stdtypes.rst:1862 msgid "" @@ -2758,10 +2752,7 @@ msgstr "" #: ../../library/stdtypes.rst:3448 ../../library/stdtypes.rst:3490 #: ../../library/stdtypes.rst:3514 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/stdtypes.rst:2107 msgid "" @@ -3634,10 +3625,7 @@ msgstr "" #: ../../library/stdtypes.rst:2729 msgid "and::" -msgstr "" -"和:\n" -"\n" -"::" +msgstr "和: ::" #: ../../library/stdtypes.rst:2734 msgid "" @@ -5860,9 +5848,9 @@ msgstr "" #: ../../library/stdtypes.rst:5291 msgid "" -"Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." +"Modules built into the interpreter are written like this: ````. If loaded from a file, they are written as ````." msgstr "" #: ../../library/stdtypes.rst:5299 @@ -6312,10 +6300,7 @@ msgstr "" #: ../../library/stdtypes.rst:5679 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/stdtypes.rst:5691 msgid "If you need to disable it entirely, set it to ``0``." diff --git a/library/string.po b/library/string.po index 7400b9c5c2..79d707cd95 100644 --- a/library/string.po +++ b/library/string.po @@ -342,10 +342,7 @@ msgstr "" #: ../../library/string.rst:269 msgid "Some examples::" -msgstr "" -"一些範例:\n" -"\n" -"::" +msgstr "一些範例: ::" #: ../../library/string.rst:275 msgid "" diff --git a/library/sunau.po b/library/sunau.po index 522bdb462a..a3cd5ba496 100644 --- a/library/sunau.po +++ b/library/sunau.po @@ -64,7 +64,7 @@ msgstr "magic word" #: ../../library/sunau.rst:28 msgid "The four bytes ``.snd``." -msgstr "四個位元組 ``.snd``\\ 。" +msgstr "四個位元組 ``.snd``。" #: ../../library/sunau.rst:30 msgid "header size" @@ -133,7 +133,7 @@ msgid "" "seekable file-like object. *mode* can be any of" msgstr "" "如 *file* 是一個字串,則以此名開啟檔案,否則把它當作一個可以被搜尋的 file-" -"like object(類檔案物件)。\\ *mode* 可以是以下任一" +"like object(類檔案物件)。*mode* 可以是以下任一" #: ../../library/sunau.rst:55 msgid "``'r'``" @@ -233,9 +233,7 @@ msgstr "回傳音訊總幀數。" msgid "" "Returns compression type. Supported compression types are ``'ULAW'``, " "``'ALAW'`` and ``'NONE'``." -msgstr "" -"回傳壓縮種類。支援的壓縮種類有 ``'ULAW'``\\ 、\\ ``'ALAW'`` 和 " -"``'NONE'``\\ 。" +msgstr "回傳壓縮種類。支援的壓縮種類有 ``'ULAW'``、``'ALAW'`` 和 ``'NONE'``。" #: ../../library/sunau.rst:147 msgid "" @@ -243,9 +241,9 @@ msgid "" "respective names ``'CCITT G.711 u-law'``, ``'CCITT G.711 A-law'`` and ``'not " "compressed'``." msgstr "" -"可被人類讀懂 (human-readable) 的 :meth:`getcomptype`\\ 。有被支援的種類分別有" -"這些名稱 ``'CCITT G.711 u-law'``\\ 、\\ ``'CCITT G.711 A-law'`` 和 ``'not " -"compressed'``\\ 。" +"可被人類讀懂 (human-readable) 的 :meth:`getcomptype`。有被支援的種類分別有這" +"些名稱 ``'CCITT G.711 u-law'``、``'CCITT G.711 A-law'`` 和 ``'not " +"compressed'``。" #: ../../library/sunau.rst:154 msgid "" @@ -254,7 +252,7 @@ msgid "" "`get\\*` methods." msgstr "" "回傳一個 :func:`~collections.namedtuple` ``(nchannels, sampwidth, framerate, " -"nframes, comptype, compname)``\\ ,與 :meth:`get\\*` methods 的輸出相同。" +"nframes, comptype, compname)``,與 :meth:`get\\*` methods 的輸出相同。" #: ../../library/sunau.rst:161 msgid "" @@ -297,7 +295,7 @@ msgstr "以下兩個函式單純是為了和 :mod:`aifc` 相容而定義,並 #: ../../library/sunau.rst:191 msgid "Returns ``None``." -msgstr "回傳 ``None``\\ 。" +msgstr "回傳 ``None``。" #: ../../library/sunau.rst:196 msgid "Raise an error." @@ -339,7 +337,7 @@ msgstr "設定幀數,該值可以在寫入更多幀後修改。" msgid "" "Set the compression type and description. Only ``'NONE'`` and ``'ULAW'`` are " "supported on output." -msgstr "設定壓縮種類和敘述,輸出只支援 ``'NONE'`` 和 ``'ULAW'``\\ 。" +msgstr "設定壓縮種類和敘述,輸出只支援 ``'NONE'`` 和 ``'ULAW'``。" #: ../../library/sunau.rst:239 msgid "" @@ -361,11 +359,11 @@ msgstr "" #: ../../library/sunau.rst:252 msgid "Write audio frames, without correcting *nframes*." -msgstr "寫入音訊資料但不更新 *nframes*\\ 。" +msgstr "寫入音訊資料但不更新 *nframes*。" #: ../../library/sunau.rst:254 ../../library/sunau.rst:262 msgid "Any :term:`bytes-like object` is now accepted." -msgstr "現在可接受任意 :term:`bytes-like object`\\ 。" +msgstr "現在可接受任意 :term:`bytes-like object`。" #: ../../library/sunau.rst:260 msgid "Write audio frames and make sure *nframes* is correct." diff --git a/library/symtable.po b/library/symtable.po index 571353296d..26958fe1da 100644 --- a/library/symtable.po +++ b/library/symtable.po @@ -242,10 +242,7 @@ msgstr "如果名稱用作函式或類別陳述式的目標,則這將會是 tr #: ../../library/symtable.rst:192 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/symtable.rst:198 msgid "" diff --git a/library/sys.po b/library/sys.po index cf71d9db02..e06b7d53e5 100644 --- a/library/sys.po +++ b/library/sys.po @@ -135,7 +135,7 @@ msgstr "" #: ../../library/sys.rst:86 msgid "See also :data:`sys.orig_argv`." -msgstr "另請參閱 :data:`sys.orig_argv`\\ 。" +msgstr "另請參閱 :data:`sys.orig_argv`。" #: ../../library/sys.rst:89 msgid "" @@ -1263,7 +1263,7 @@ msgstr "" #: ../../library/sys.rst:997 msgid "See :pep:`525` for more details." -msgstr "更多細節請見 :pep:`525`\\ 。" +msgstr "更多細節請見 :pep:`525`。" #: ../../library/sys.rst:1001 ../../library/sys.rst:1677 msgid "" @@ -1323,7 +1323,7 @@ msgstr "" #: ../../library/sys.rst:1057 msgid "Added *algorithm*, *hash_bits* and *seed_bits*" -msgstr "新增 *algorithm*\\ 、\\ *hash_bits* 與 *seed_bits*" +msgstr "新增 *algorithm*、*hash_bits* 與 *seed_bits*" #: ../../library/sys.rst:1063 msgid "" @@ -2240,7 +2240,7 @@ msgstr "" #: ../../library/sys.rst:1747 msgid "See :pep:`529` for more details." -msgstr "更多細節請見 :pep:`529`\\ 。" +msgstr "更多細節請見 :pep:`529`。" #: ../../library/sys.rst:1754 msgid "" @@ -2599,7 +2599,7 @@ msgid "" "n1256.pdf\\ ." msgstr "" "ISO/IEC 9899:1999. \"Programming languages -- C.\" 公開草案可在以下網址取" -"得 https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf\\ 。" +"得 https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf。" #: ../../library/sys.rst:99 msgid "auditing" @@ -2662,7 +2662,7 @@ msgid "..." msgstr "..." #~ msgid "See also :data:`sys.argv`." -#~ msgstr "另請參閱 :data:`sys.argv`\\ 。" +#~ msgstr "另請參閱 :data:`sys.argv`。" #~ msgid "Attribute" #~ msgstr "屬性" diff --git a/library/sysconfig.po b/library/sysconfig.po index 3d70123141..c479b06f82 100644 --- a/library/sysconfig.po +++ b/library/sysconfig.po @@ -82,10 +82,7 @@ msgstr "" #: ../../library/sysconfig.rst:54 msgid "Example of usage::" -msgstr "" -"用法範例:\n" -"\n" -"::" +msgstr "用法範例: ::" #: ../../library/sysconfig.rst:68 msgid "Installation paths" diff --git a/library/syslog.po b/library/syslog.po index cf630f8b75..8cfcffd20d 100644 --- a/library/syslog.po +++ b/library/syslog.po @@ -209,10 +209,7 @@ msgstr "簡單範例" #: ../../library/syslog.rst:134 msgid "A simple set of examples::" -msgstr "" -"一組簡單範例:\n" -"\n" -"::" +msgstr "一組簡單範例: ::" #: ../../library/syslog.rst:142 msgid "" diff --git a/library/tempfile.po b/library/tempfile.po index 2320c7c6f6..0eae51d0ce 100644 --- a/library/tempfile.po +++ b/library/tempfile.po @@ -671,10 +671,7 @@ msgstr "範例" #: ../../library/tempfile.rst:388 msgid "Here are some examples of typical usage of the :mod:`tempfile` module::" -msgstr "" -"以下是 :mod:`tempfile` module 的一些常見用法範例:\n" -"\n" -"::" +msgstr "以下是 :mod:`tempfile` module 的一些常見用法範例: ::" #: ../../library/tempfile.rst:433 msgid "Deprecated functions and variables" @@ -720,9 +717,7 @@ msgid "" msgstr "" "使用此功能可能會在程式中引入安全漏洞。當你開始使用本方法回傳的檔案執行任何操" "作時,可能有人已經捷足先登了。:func:`mktemp` 的功能可以很輕鬆地用帶有 " -"``delete=False`` 參數的 :func:`NamedTemporaryFile` 代替:\n" -"\n" -"::" +"``delete=False`` 參數的 :func:`NamedTemporaryFile` 代替: ::" #: ../../library/tempfile.rst:11 msgid "temporary" diff --git a/library/textwrap.po b/library/textwrap.po index 3a8a72217b..48764dd1b8 100644 --- a/library/textwrap.po +++ b/library/textwrap.po @@ -112,10 +112,7 @@ msgstr "" #: ../../library/textwrap.rst:94 ../../library/textwrap.rst:115 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/textwrap.rst:108 msgid "Add *prefix* to the beginning of selected lines in *text*." diff --git a/library/threading.po b/library/threading.po index 24f8fb2084..16198340d3 100644 --- a/library/threading.po +++ b/library/threading.po @@ -529,10 +529,7 @@ msgstr "" #: ../../library/threading.rst:392 msgid "Example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/threading.rst:406 msgid "" @@ -1328,10 +1325,7 @@ msgstr "" #: ../../library/threading.rst:1042 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/threading.rst:1053 msgid "" diff --git a/library/time.po b/library/time.po index 5468a77d0e..1819a31907 100644 --- a/library/time.po +++ b/library/time.po @@ -113,7 +113,7 @@ msgstr "" #: ../../library/time.rst:84 msgid "See :class:`struct_time` for a description of these objects." -msgstr "關於這些物件的敘述請見 :class:`struct_time`\\ 。" +msgstr "關於這些物件的敘述請見 :class:`struct_time`。" #: ../../library/time.rst:86 msgid "" @@ -297,23 +297,23 @@ msgstr "" #: ../../library/time.rst:229 msgid "``'monotonic'``: :func:`time.monotonic`" -msgstr "``'monotonic'``\\ :\\ :func:`time.monotonic`" +msgstr "``'monotonic'``::func:`time.monotonic`" #: ../../library/time.rst:230 msgid "``'perf_counter'``: :func:`time.perf_counter`" -msgstr "``'perf_counter'``\\ :\\ :func:`time.perf_counter`" +msgstr "``'perf_counter'``::func:`time.perf_counter`" #: ../../library/time.rst:231 msgid "``'process_time'``: :func:`time.process_time`" -msgstr "``'process_time'``\\ :\\ :func:`time.process_time`" +msgstr "``'process_time'``::func:`time.process_time`" #: ../../library/time.rst:232 msgid "``'thread_time'``: :func:`time.thread_time`" -msgstr "``'thread_time'``\\ :\\ :func:`time.thread_time`" +msgstr "``'thread_time'``::func:`time.thread_time`" #: ../../library/time.rst:233 msgid "``'time'``: :func:`time.time`" -msgstr "``'time'``\\ :\\ :func:`time.time`" +msgstr "``'time'``::func:`time.time`" #: ../../library/time.rst:235 msgid "The result has the following attributes:" diff --git a/library/tkinter.po b/library/tkinter.po index 482cac7f73..0a0adc9a66 100644 --- a/library/tkinter.po +++ b/library/tkinter.po @@ -1050,10 +1050,7 @@ msgstr "``'groove'``" #: ../../library/tkinter.rst:628 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/tkinter.rst:633 msgid "" @@ -1227,10 +1224,7 @@ msgstr "" #: ../../library/tkinter.rst:769 msgid "Here are some examples of typical usage::" -msgstr "" -"以下是一些常見用法範例:\n" -"\n" -"::" +msgstr "以下是一些常見用法範例: ::" #: ../../library/tkinter.rst:792 ../../library/tkinter.rst:794 msgid "Tk Option Data Types" diff --git a/library/tokenize.po b/library/tokenize.po index 691ba2ee2b..42a9906850 100644 --- a/library/tokenize.po +++ b/library/tokenize.po @@ -207,10 +207,7 @@ msgstr "" #: ../../library/tokenize.rst:145 msgid "or::" -msgstr "" -"或是:\n" -"\n" -"::" +msgstr "或是: ::" #: ../../library/tokenize.rst:154 msgid "Command-Line Usage" diff --git a/library/tomllib.po b/library/tomllib.po index ec519741e5..d53d734a75 100644 --- a/library/tomllib.po +++ b/library/tomllib.po @@ -92,8 +92,8 @@ msgid "" "*parse_float* argument has the same meaning as in :func:`load`." msgstr "" "自一個 :class:`str` 物件載入成 TOML。回傳一個 :class:`dict`。用這個\\ :ref:`" -"轉換表 `\\ 轉換 TOML 型別成 Python 的。\\ *parse_float* 引" -"數和 :func:`load` 中的相同。" +"轉換表 `\\ 轉換 TOML 型別成 Python 的。*parse_float* 引數" +"和 :func:`load` 中的相同。" #: ../../library/tomllib.rst:61 msgid "The following exceptions are available:" diff --git a/library/tracemalloc.po b/library/tracemalloc.po index b8b211e477..64e9bd0481 100644 --- a/library/tracemalloc.po +++ b/library/tracemalloc.po @@ -88,7 +88,7 @@ msgstr "" #: ../../library/tracemalloc.rst:73 ../../library/tracemalloc.rst:250 msgid "See :meth:`Snapshot.statistics` for more options." -msgstr "更多選項請見 :meth:`Snapshot.statistics`\\ 。" +msgstr "更多選項請見 :meth:`Snapshot.statistics`。" #: ../../library/tracemalloc.rst:77 msgid "Compute differences" @@ -166,10 +166,7 @@ msgstr "" #: ../../library/tracemalloc.rst:280 ../../library/tracemalloc.rst:759 msgid "Output::" -msgstr "" -"輸出:\n" -"\n" -"::" +msgstr "輸出: ::" #: ../../library/tracemalloc.rst:285 msgid "" @@ -197,7 +194,7 @@ msgstr "" #: ../../library/tracemalloc.rst:304 msgid "See also :func:`stop`." -msgstr "另請參閱 :func:`stop`\\ 。" +msgstr "另請參閱 :func:`stop`。" #: ../../library/tracemalloc.rst:309 msgid "" @@ -252,7 +249,7 @@ msgstr "" #: ../../library/tracemalloc.rst:346 msgid "See also :func:`get_traced_memory`." -msgstr "另請參閱 :func:`get_traced_memory`\\ 。" +msgstr "另請參閱 :func:`get_traced_memory`。" #: ../../library/tracemalloc.rst:353 msgid "" @@ -556,7 +553,7 @@ msgstr "" #: ../../library/tracemalloc.rst:574 msgid "See also :meth:`dump`." -msgstr "另請參閱 :meth:`dump`\\ 。" +msgstr "另請參閱 :meth:`dump`。" #: ../../library/tracemalloc.rst:579 msgid "" @@ -790,7 +787,4 @@ msgstr "" #: ../../library/tracemalloc.rst:753 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" diff --git a/library/turtle.po b/library/turtle.po index e53b29bde6..7db0a611dd 100644 --- a/library/turtle.po +++ b/library/turtle.po @@ -2222,7 +2222,7 @@ msgstr "例如:" #: ../../library/turtle.rst:2398 msgid "See :ref:`compoundshapes`." -msgstr "請見\\ :ref:`compoundshapes`\\ 。" +msgstr "請見\\ :ref:`compoundshapes`。" #: ../../library/turtle.rst:2403 msgid "" diff --git a/library/typing.po b/library/typing.po index dff304a274..426b3be31f 100644 --- a/library/typing.po +++ b/library/typing.po @@ -225,7 +225,7 @@ msgstr "以及針對 ``ProUserId`` 的型別檢查會如期運作。" #: ../../library/typing.rst:176 msgid "See :pep:`484` for more details." -msgstr "更多細節請見 :pep:`484`\\ 。" +msgstr "更多細節請見 :pep:`484`。" #: ../../library/typing.rst:180 msgid "" @@ -236,7 +236,7 @@ msgid "" msgstr "" "請記得使用型別別名是宣告兩種型別是互相\\ *相等*\\ 的。使用 ``type Alias = " "Original`` 則會讓靜態型別檢查器在任何情況之下將 ``Alias`` 視為與 " -"``Original`` \\ *完全相等*\\ 。這當你想把複雜的型別簽名進行簡化時,非常好用。" +"``Original`` \\ *完全相等*。這當你想把複雜的型別簽名進行簡化時,非常好用。" #: ../../library/typing.rst:185 msgid "" @@ -812,10 +812,7 @@ msgstr "" #: ../../library/typing.rst:1173 ../../library/typing.rst:1382 #: ../../library/typing.rst:2769 msgid "For example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/typing.rst:794 msgid "" @@ -1293,10 +1290,7 @@ msgstr "" #: ../../library/typing.rst:1308 msgid "This would be equivalent to::" -msgstr "" -"這會等價於:\n" -"\n" -"::" +msgstr "這會等價於: ::" #: ../../library/typing.rst:1312 msgid "" @@ -1838,10 +1832,7 @@ msgstr "" #: ../../library/typing.rst:1975 msgid "This is equivalent to::" -msgstr "" -"這等價於:\n" -"\n" -"::" +msgstr "這等價於: ::" #: ../../library/typing.rst:1979 msgid "" @@ -2278,10 +2269,7 @@ msgstr "" #: ../../library/typing.rst:2488 msgid "Example::" -msgstr "" -"舉例來說:\n" -"\n" -"::" +msgstr "舉例來說: ::" #: ../../library/typing.rst:2499 msgid "" diff --git a/library/unittest.mock-examples.po b/library/unittest.mock-examples.po index 8c29f6c77e..2c1566df08 100644 --- a/library/unittest.mock-examples.po +++ b/library/unittest.mock-examples.po @@ -409,7 +409,7 @@ msgid "" msgstr "" "使用 :func:`patch` 時,需注意的是你得在被查找物件的命名空間中(in the " "namespace where they are looked up)patch 物件。這通常很直接,但若需要快速導" -"引,請參閱\\ :ref:`該 patch 何處 `\\ 。" +"引,請參閱\\ :ref:`該 patch 何處 `。" #: ../../library/unittest.mock-examples.rst:398 msgid "" diff --git a/library/unittest.mock.po b/library/unittest.mock.po index 5a1d96efcd..755f7e9c4e 100644 --- a/library/unittest.mock.po +++ b/library/unittest.mock.po @@ -57,7 +57,7 @@ msgid "" msgstr "" "此外,mock 還提供了一個 :func:`patch` 裝飾器,用於 patching 測試範圍內對 " "module(模組)以及 class(類別)級別的屬性,以及用於建立唯一物件的 :const:" -"`sentinel`\\ 。有關如何使用 :class:`Mock`\\、\\ :class:`MagicMock` 和 :func:" +"`sentinel`。有關如何使用 :class:`Mock`\\、:class:`MagicMock` 和 :func:" "`patch` 的一些範例,請參閱\\ `快速導引 `_。" #: ../../library/unittest.mock.rst:32 @@ -107,9 +107,9 @@ msgid "" "from another object. Attempting to access attributes or methods on the mock " "that don't exist on the spec will fail with an :exc:`AttributeError`." msgstr "" -"Mock 有許多其他方法可以讓你配置與控制它的行為。例如,\\ *spec* 引數可以配置 " +"Mock 有許多其他方法可以讓你配置與控制它的行為。例如,*spec* 引數可以配置 " "mock ,讓其從另一個物件獲取規格。嘗試讀取 mock 中不存在於規格中的屬性或方法將" -"會失敗,並出現 :exc:`AttributeError`\\ 。" +"會失敗,並出現 :exc:`AttributeError`。" #: ../../library/unittest.mock.rst:97 msgid "" @@ -119,9 +119,7 @@ msgid "" "ends::" msgstr "" ":func:`patch` 裝飾器/情境管理器可以在測試中簡單的 mock 模組中的類別或物件。" -"被指定的物件在測試期間會被替換為 mock(或其他物件),並在測試結束時恢復:\n" -"\n" -"::" +"被指定的物件在測試期間會被替換為 mock(或其他物件),並在測試結束時恢復: ::" #: ../../library/unittest.mock.rst:116 msgid "" @@ -142,7 +140,7 @@ msgid "" msgstr "" "使用 :func:`patch` 時,需注意的是你得在被查找物件的命名空間中(in the " "namespace where they are looked up)patch 物件。這通常很直接,但若需要快速導" -"引,請參閱\\ :ref:`該 patch 何處 `\\ 。" +"引,請參閱\\ :ref:`該 patch 何處 `。" #: ../../library/unittest.mock.rst:125 msgid "" @@ -156,8 +154,8 @@ msgid "" "during a scope and restoring the dictionary to its original state when the " "test ends:" msgstr "" -"也有 :func:`patch.dict`\\ ,用於在測試範圍中設定 dictionary(字典)內的值,並" -"在測試結束時將其恢復為原始狀態:" +"也有 :func:`patch.dict`,用於在測試範圍中設定 dictionary(字典)內的值,並在" +"測試結束時將其恢復為原始狀態:" #: ../../library/unittest.mock.rst:146 msgid "" @@ -176,8 +174,8 @@ msgid "" "(well, all the useful ones anyway)." msgstr "" "Mock 允許你將函式(或其他 Mock 實例)分配給魔術方法,並且它們將被適當地呼" -"叫。\\ :class:`MagicMock` 類別是一個 Mock 的變體,它為你預先建好了所有魔術方" -"法(好吧,所有有用的方法)。" +"叫。:class:`MagicMock` 類別是一個 Mock 的變體,它為你預先建好了所有魔術方法" +"(好吧,所有有用的方法)。" #: ../../library/unittest.mock.rst:161 msgid "" @@ -196,10 +194,10 @@ msgid "" "same call signature as the real object." msgstr "" "為了確保測試中的 mock 物件與它們要替換的物件具有相同的 api,你可以使用\\ :" -"ref:`自動規格 `\\ 。自動規格(auto-speccing)可以通過 patch " -"的 *autospec* 引數或 :func:`create_autospec` 函式來完成。自動規格建立的 mock " -"物件與它們要替換的物件具有相同的屬性和方法,並且任何函式和方法(包括建構函" -"式)都具有與真實物件相同的呼叫簽名(call signature)。" +"ref:`自動規格 `。自動規格(auto-speccing)可以通過 patch 的 " +"*autospec* 引數或 :func:`create_autospec` 函式來完成。自動規格建立的 mock 物" +"件與它們要替換的物件具有相同的屬性和方法,並且任何函式和方法(包括建構函式)" +"都具有與真實物件相同的呼叫簽名(call signature)。" #: ../../library/unittest.mock.rst:177 msgid "" @@ -274,7 +272,7 @@ msgstr "" "*spec*:這可以是字串的 list(串列),也可以是充當 mock 物件規格的現有物件(類" "別或實例)。如果傳入一個物件,則通過對該物件呼叫 dir 來形成字串的串列(不包括" "不支援的魔術屬性和方法)。存取不在此串列中的任何屬性都會引發 :exc:" -"`AttributeError`\\ 。" +"`AttributeError`。" #: ../../library/unittest.mock.rst:239 msgid "" @@ -345,8 +343,8 @@ msgid "" "attributes." msgstr "" "*unsafe*:預設情況下,存取任何以 *assert*、*assret*、*asert*、*aseert* 或 " -"*assrt* 開頭的屬性將引發 :exc:`AttributeError`。如果傳遞 ``unsafe=True``\\ ," -"將會允許存取這些屬性。" +"*assrt* 開頭的屬性將引發 :exc:`AttributeError`。如果傳遞 ``unsafe=True``,將" +"會允許存取這些屬性。" #: ../../library/unittest.mock.rst:272 msgid "" @@ -1706,7 +1704,7 @@ msgid "" "created by :func:`patch`::" msgstr "" ":func:`patch.multiple` 可以與其他 ``patch`` 裝飾器巢狀使用,但需要將透過關鍵" -"字傳遞的引數放在 :func:`patch` 建立的任何標準引數\\ *之後*\\ : ::" +"字傳遞的引數放在 :func:`patch` 建立的任何標準引數\\ *之後*: ::" #: ../../library/unittest.mock.rst:1738 msgid "" diff --git a/library/unittest.po b/library/unittest.po index 1d51f8ea8c..1de72adb03 100644 --- a/library/unittest.po +++ b/library/unittest.po @@ -36,7 +36,7 @@ msgid "" "want to skip to :ref:`the list of assert methods `.)" msgstr "" "(假如你已經熟悉相關基礎的測試概念,你可能會希望跳過以下段落,直接參考 :ref:" -"`assert 方法清單 `\\ 。)" +"`assert 方法清單 `。)" #: ../../library/unittest.rst:19 msgid "" @@ -82,8 +82,8 @@ msgid "" "base class, :class:`TestCase`, which may be used to create new test cases." msgstr "" "一個 :dfn:`test case` 是一個獨立的單元測試。這是用來確認一個特定設定的輸入的" -"特殊回饋。 :mod:`unittest` 提供一個基礎類別,類別 :class:`TestCase`\\ ,可以" -"用來建立一個新的測試條例。" +"特殊回饋。 :mod:`unittest` 提供一個基礎類別,類別 :class:`TestCase`,可以用來" +"建立一個新的測試條例。" #: ../../library/unittest.rst:39 msgid "test suite" @@ -143,7 +143,7 @@ msgid "" "tests. For example, ``assert func(10) == 42``." msgstr "" "第三方的單元測試框架,但在撰寫測試時使用更輕量的語法。例如: ``assert " -"func(10) == 42``\\ 。" +"func(10) == 42``。" #: ../../library/unittest.rst:63 msgid "" @@ -201,10 +201,7 @@ msgstr "" #: ../../library/unittest.rst:89 msgid "Here is a short script to test three string methods::" -msgstr "" -"這是一段簡短的腳本用來測試 3 個字串方法:\n" -"\n" -"::" +msgstr "這是一段簡短的腳本用來測試 3 個字串方法: ::" #: ../../library/unittest.rst:113 msgid "" @@ -247,9 +244,7 @@ msgid "" "command line, the above script produces an output that looks like this::" msgstr "" "最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令執行列介" -"面測試腳本。當透過命令執行列執行,輸出結果將會像是:\n" -"\n" -"::" +"面測試腳本。當透過命令執行列執行,輸出結果將會像是: ::" #: ../../library/unittest.rst:139 msgid "" @@ -258,9 +253,7 @@ msgid "" "output::" msgstr "" "在測試時加入 ``-v`` 選項將指示 :func:`unittest.main` 提高 verbosity 層級,產" -"生以下的輸出:\n" -"\n" -"::" +"生以下的輸出: ::" #: ../../library/unittest.rst:151 msgid "" @@ -286,9 +279,7 @@ msgid "" "The unittest module can be used from the command line to run tests from " "modules, classes or even individual test methods::" msgstr "" -"單元測試模組可以透過命令執行列執行測試模組,物件甚至個別的測試方法:\n" -"\n" -"::" +"單元測試模組可以透過命令執行列執行測試模組,物件甚至個別的測試方法: ::" #: ../../library/unittest.rst:172 msgid "" @@ -298,10 +289,7 @@ msgstr "你可以通過一個串列與任何模組名稱的組合,完全符合 #: ../../library/unittest.rst:175 msgid "Test modules can be specified by file path as well::" -msgstr "" -"測試模組可以根據檔案路徑指定:\n" -"\n" -"::" +msgstr "測試模組可以根據檔案路徑指定: ::" #: ../../library/unittest.rst:179 msgid "" @@ -321,24 +309,16 @@ msgid "" "You can run tests with more detail (higher verbosity) by passing in the -v " "flag::" msgstr "" -"通過增加 -v 的旗標數,可以在你執行測試時得到更多細節(更高的 verbosity):\n" -"\n" -"::" +"通過增加 -v 的旗標數,可以在你執行測試時得到更多細節(更高的 verbosity): ::" #: ../../library/unittest.rst:189 msgid "" "When executed without arguments :ref:`unittest-test-discovery` is started::" -msgstr "" -"若執行時不代任何引數,將執行 :ref:`unittest-test-discovery`\\ :\n" -"\n" -"::" +msgstr "若執行時不代任何引數,將執行 :ref:`unittest-test-discovery`: ::" #: ../../library/unittest.rst:193 msgid "For a list of all the command-line options::" -msgstr "" -"列出所有命令列選項:\n" -"\n" -"::" +msgstr "列出所有命令列選項: ::" #: ../../library/unittest.rst:197 msgid "" @@ -371,7 +351,7 @@ msgid "" "normal :exc:`KeyboardInterrupt` exception." msgstr "" ":kbd:`Control-C` 測試執行過程中等待正確的測試結果並回報目前為止所有的測試結" -"果。第二個 :kbd:`Control-C` 拋出一般例外 :exc:`KeyboardInterrupt`\\ 。" +"果。第二個 :kbd:`Control-C` 拋出一般例外 :exc:`KeyboardInterrupt`。" #: ../../library/unittest.rst:221 msgid "" @@ -419,7 +399,7 @@ msgstr "" #: ../../library/unittest.rst:251 msgid "The command-line options ``-b``, ``-c`` and ``-f`` were added." -msgstr "增加命令列模式選項 ``-b`` 、 ``-c`` 與 ``-f``\\ 。" +msgstr "增加命令列模式選項 ``-b`` 、 ``-c`` 與 ``-f``。" #: ../../library/unittest.rst:254 msgid "The command-line option ``--locals``." @@ -462,10 +442,8 @@ msgid "" "Test discovery is implemented in :meth:`TestLoader.discover`, but can also " "be used from the command line. The basic command-line usage is::" msgstr "" -"Test discovery(測試探索)實作在 :meth:`TestLoader.discover`\\ ,但也可以被用" -"於命令列模式。基本的命令列模式用法如下:\n" -"\n" -"::" +"Test discovery(測試探索)實作在 :meth:`TestLoader.discover`,但也可以被用於" +"命令列模式。基本的命令列模式用法如下: ::" #: ../../library/unittest.rst:287 msgid "" @@ -474,8 +452,8 @@ msgid "" "``discover`` sub-command must be used explicitly." msgstr "" "``python -m unittest`` 作為捷徑,其功能相當於 ``python -m unittest " -"discover``\\ 。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` " -"子指令。" +"discover``。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` 子" +"指令。" #: ../../library/unittest.rst:291 msgid "The ``discover`` sub-command has the following options:" @@ -504,9 +482,7 @@ msgid "" "equivalent::" msgstr "" ":option:`-s`, :option:`-p`, 和 :option:`-t` 選項依照傳遞位置作為引數排序順" -"序。以下兩個命令列被視為等價:\n" -"\n" -"::" +"序。以下兩個命令列被視為等價: ::" #: ../../library/unittest.rst:318 msgid "" @@ -854,17 +830,11 @@ msgstr "" #: ../../library/unittest.rst:655 msgid "For example, the following test::" -msgstr "" -"舉例來說,以下測試:\n" -"\n" -"::" +msgstr "舉例來說,以下測試: ::" #: ../../library/unittest.rst:667 msgid "will produce the following output::" -msgstr "" -"會有以下輸出:\n" -"\n" -"::" +msgstr "會有以下輸出: ::" #: ../../library/unittest.rst:699 msgid "" @@ -951,7 +921,7 @@ msgstr "" #: ../../library/unittest.rst:782 ../../library/unittest.rst:797 msgid "See `Class and Module Fixtures`_ for more details." -msgstr "更多細節請見 `Class and Module Fixtures`_\\ 。" +msgstr "更多細節請見 `Class and Module Fixtures`_。" #: ../../library/unittest.rst:789 msgid "" @@ -1000,7 +970,7 @@ msgstr "" #: ../../library/unittest.rst:835 msgid "See :ref:`subtests` for more information." -msgstr "更多資訊請見 :ref:`subtests`\\ 。" +msgstr "更多資訊請見 :ref:`subtests`。" #: ../../library/unittest.rst:842 msgid "" @@ -1341,10 +1311,7 @@ msgstr "" #: ../../library/unittest.rst:1046 ../../library/unittest.rst:1114 msgid "or::" -msgstr "" -"或是:\n" -"\n" -"::" +msgstr "或是: ::" #: ../../library/unittest.rst:1051 msgid "Added under the name ``assertRaisesRegexp``." @@ -1444,10 +1411,7 @@ msgstr "" #: ../../library/unittest.rst:1156 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/unittest.rst:1168 msgid "" diff --git a/library/urllib.request.po b/library/urllib.request.po index ab27f622b6..da3320e7ad 100644 --- a/library/urllib.request.po +++ b/library/urllib.request.po @@ -43,7 +43,7 @@ msgid "" "recommended for a higher-level HTTP client interface." msgstr "" "有關於更高階的 HTTP 用戶端介面,推薦使用 `Requests 套件 `_\\ 。" +"readthedocs.io/en/master/>`_。" #: ../../library/urllib.request.rst:26 msgid "" @@ -85,7 +85,7 @@ msgid "" "details." msgstr "" "*data* 必須是一個包含傳送給伺服器額外資料的物件,若不需要傳送額外資料則指定" -"為 ``None``\\ 。更多細節請見 :class:`Request`\\ 。" +"為 ``None``。更多細節請見 :class:`Request`。" #: ../../library/urllib.request.rst:46 msgid "" @@ -113,7 +113,7 @@ msgid "" "HTTPSConnection` for more details." msgstr "" "若 *context* 有被指定時,它必須是一個 :class:`ssl.SSLContext` 的實例並描述著" -"各種 SSL 選項。更多細節請見 :class:`~http.client.HTTPSConnection`\\ 。" +"各種 SSL 選項。更多細節請見 :class:`~http.client.HTTPSConnection`。" #: ../../library/urllib.request.rst:58 msgid "" @@ -126,7 +126,7 @@ msgstr "" "選擇性參數 *cafile* 與 *capath* 用來指定一組 HTTPS 請求中所需之受信任 CA 憑" "證。*cafile* 的值應該指向內容包含一堆 CA 憑證的單一檔案,而 *capath* 則指向存" "放一堆雜湊後的憑證檔案的目錄。欲瞭解更多的資訊請參見 :meth:`ssl.SSLContext." -"load_verify_locations`\\ 。" +"load_verify_locations`。" #: ../../library/urllib.request.rst:64 msgid "The *cadefault* parameter is ignored." @@ -140,7 +140,7 @@ msgid "" msgstr "" "這個函式總是回傳一個可作為 :term:`context manager` 使用的物件,並有著特性 " "(property) *url*、*headers* 與 *status*。欲知更多這些特性細節請參見 :class:" -"`urllib.response.addinfourl`\\ 。" +"`urllib.response.addinfourl`。" #: ../../library/urllib.request.rst:70 msgid "" @@ -169,7 +169,7 @@ msgstr "" #: ../../library/urllib.request.rst:82 msgid "Raises :exc:`~urllib.error.URLError` on protocol errors." -msgstr "當遇到協定上的錯誤時會引發 :exc:`~urllib.error.URLError`\\ 。" +msgstr "當遇到協定上的錯誤時會引發 :exc:`~urllib.error.URLError`。" #: ../../library/urllib.request.rst:84 msgid "" @@ -276,9 +276,9 @@ msgid "" msgstr "" "安裝一個 :class:`OpenerDirector` 實例作為預設的全域 opener。僅在當你想要讓 " "urlopen 使用該 opener 時安裝一個 opener,否則的話應直接呼叫 :meth:" -"`OpenerDirector.open` 而非 :func:`~urllib.request.urlopen`\\ 。程式碼不會檢" -"查 class 是否真的為 :class:`OpenerDirector`,而是任何具有正確介面的 class 都" -"能適用。" +"`OpenerDirector.open` 而非 :func:`~urllib.request.urlopen`。程式碼不會檢查 " +"class 是否真的為 :class:`OpenerDirector`,而是任何具有正確介面的 class 都能適" +"用。" #: ../../library/urllib.request.rst:144 msgid "" @@ -297,11 +297,10 @@ msgstr "" "*handler*\\s 可以是 :class:`BaseHandler` 的實例,亦或是 :class:`BaseHandler` " "的 subclasses(這個情況下必須有不帶參數的建構函式能夠被呼叫)。以下 classes " "的實例順位會在 *handler*\\s 之前,除非 *handler*\\s 已經包含它們,是它們的實" -"例,或是它們的 subclasses:\\ :class:`ProxyHandler`\\ (如果代理服務設定被偵" -"測到)、\\ :class:`UnknownHandler`\\ 、\\ :class:`HTTPHandler`\\ 、\\ :class:" -"`HTTPDefaultErrorHandler`\\ 、\\ :class:`HTTPRedirectHandler`\\ 、\\ :class:" -"`FTPHandler`\\ 、\\ :class:`FileHandler`\\ 、\\ :class:" -"`HTTPErrorProcessor`\\ 。" +"例,或是它們的 subclasses::class:`ProxyHandler`\\ (如果代理服務設定被偵測" +"到)、:class:`UnknownHandler`、:class:`HTTPHandler`、:class:" +"`HTTPDefaultErrorHandler`、:class:`HTTPRedirectHandler`、:class:" +"`FTPHandler`、:class:`FileHandler`、:class:`HTTPErrorProcessor`。" #: ../../library/urllib.request.rst:154 msgid "" @@ -431,7 +430,7 @@ msgid "" "case." msgstr "" "*headers* 必須是一個 dictionary,並會被視為如同每對 key 和 value 作為引數來呼" -"叫 :meth:`add_header`\\ 。經常用於「偽裝」 ``User-Agent`` header 的值,這個 " +"叫 :meth:`add_header`。經常用於「偽裝」 ``User-Agent`` header 的值,這個 " "header 是用來讓一個瀏覽器向伺服器表明自己的身分 --- 有些 HTTP 伺服器僅允許來" "自普通瀏覽器的請求,而不接受來自程式腳本的請求。例如,Mozilla Firefox 會將 " "header 的值設為 ``\"Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 " @@ -467,9 +466,9 @@ msgid "" "for the page containing the image." msgstr "" "*origin_req_host* 應為原始傳輸互動的請求主機 (request-host),如同在 :rfc:" -"`2965` 中的定義。預設值為 ``http.cookiejar.request_host(self)``\\ 。這是使用" -"者發起的原始請求的主機名稱或是 IP 位址。例如當請求是要求一個 HTML 文件中的一" -"個影像,則這個屬性應為請求包含影像頁面的請求主機。" +"`2965` 中的定義。預設值為 ``http.cookiejar.request_host(self)``。這是使用者發" +"起的原始請求的主機名稱或是 IP 位址。例如當請求是要求一個 HTML 文件中的一個影" +"像,則這個屬性應為請求包含影像頁面的請求主機。" #: ../../library/urllib.request.rst:246 msgid "" @@ -519,7 +518,7 @@ msgstr "新增 :attr:`Request.method` 引數到 Request class。" #: ../../library/urllib.request.rst:271 msgid "Default :attr:`Request.method` may be indicated at the class level." -msgstr "能夠在 class 中設置預設的 :attr:`Request.method`\\ 。" +msgstr "能夠在 class 中設置預設的 :attr:`Request.method`。" #: ../../library/urllib.request.rst:274 msgid "" @@ -683,7 +682,7 @@ msgstr "" #: ../../library/urllib.request.rst:436 msgid "*context* and *check_hostname* were added." -msgstr "新增 *context* 與 *check_hostname*\\ 。" +msgstr "新增 *context* 與 *check_hostname*。" #: ../../library/urllib.request.rst:442 msgid "Open local files." @@ -885,7 +884,7 @@ msgstr "" #: ../../library/urllib.request.rst:633 msgid "See |protocol_open|_ for more information." -msgstr "更多資訊請見 |protocol_open|_\\ 。" +msgstr "更多資訊請見 |protocol_open|_。" #: ../../library/urllib.request.rst:635 msgid "" @@ -895,7 +894,7 @@ msgstr "" #: ../../library/urllib.request.rst:638 msgid "See |http_error_nnn|_ for more information." -msgstr "更多資訊請見 |http_error_nnn|_\\ 。" +msgstr "更多資訊請見 |http_error_nnn|_。" #: ../../library/urllib.request.rst:640 msgid "" @@ -911,7 +910,7 @@ msgstr "" #: ../../library/urllib.request.rst:646 msgid "See |protocol_request|_ for more information." -msgstr "更多資訊請見 |protocol_request|_\\ 。" +msgstr "更多資訊請見 |protocol_request|_。" #: ../../library/urllib.request.rst:648 msgid "" @@ -921,7 +920,7 @@ msgstr "" #: ../../library/urllib.request.rst:651 msgid "See |protocol_response|_ for more information." -msgstr "更多資訊請見 |protocol_response|_\\ 。" +msgstr "更多資訊請見 |protocol_response|_。" #: ../../library/urllib.request.rst:660 msgid "" diff --git a/library/urllib.robotparser.po b/library/urllib.robotparser.po index d888004c86..ff6f54b466 100644 --- a/library/urllib.robotparser.po +++ b/library/urllib.robotparser.po @@ -36,10 +36,10 @@ msgid "" "on the structure of :file:`robots.txt` files, see http://www.robotstxt.org/" "orig.html." msgstr "" -"此模組 (module) 提供了一個單獨的類別 (class) \\ :class:`RobotFileParser`\\ ," -"它可以知道某個特定 user agent(使用者代理)是否能在有發布 :file:`robots.txt` " -"文件的網站 fetch(擷取)特定 URL。有關 :file:`robots.txt` 文件結構的更多細" -"節,請參閱 http://www.robotstxt.org/orig.html。" +"此模組 (module) 提供了一個單獨的類別 (class) \\ :class:`RobotFileParser`,它" +"可以知道某個特定 user agent(使用者代理)是否能在有發布 :file:`robots.txt` 文" +"件的網站 fetch(擷取)特定 URL。有關 :file:`robots.txt` 文件結構的更多細節," +"請參閱 http://www.robotstxt.org/orig.html。" #: ../../library/urllib.robotparser.rst:28 msgid "" @@ -119,10 +119,7 @@ msgstr "" msgid "" "The following example demonstrates basic use of the :class:`RobotFileParser` " "class::" -msgstr "" -"下面的範例展示了 :class:`RobotFileParser` 類別的基本用法:\n" -"\n" -"::" +msgstr "下面的範例展示了 :class:`RobotFileParser` 類別的基本用法: ::" #: ../../library/urllib.robotparser.rst:12 msgid "WWW" diff --git a/library/uu.po b/library/uu.po index 78a9562010..78351d83bf 100644 --- a/library/uu.po +++ b/library/uu.po @@ -33,7 +33,7 @@ msgid "" "encoding>` for details). :mod:`base64` is a modern alternative." msgstr "" ":mod:`uu` 模組 (module) 即將被棄用(詳見 :pep:`PEP 594 <594#uu-and-the-uu-" -"encoding>`\\ )。\\ :mod:`base64` 是個現時常用的替代方案。" +"encoding>`\\ )。:mod:`base64` 是個現時常用的替代方案。" #: ../../library/uu.rst:19 msgid "" diff --git a/library/uuid.po b/library/uuid.po index 0c3baadbe4..9129afb7d8 100644 --- a/library/uuid.po +++ b/library/uuid.po @@ -94,9 +94,7 @@ msgstr "" "位元的 *clock_seq_hi_variant*、8 位元的 *clock_seq_low*、48 位元的 *node*)組" "成的元組 (tuple) 作為 *fields* 引數,或者是單一的 128 位元整數作為 *int* 引" "數。當給定由十六進位的數字組成的字串時,大括號、連字符號和 URN 前綴都是可以選" -"用的。例如,以下這些運算式都會產生相同的 UUID:\n" -"\n" -"::" +"用的。例如,以下這些運算式都會產生相同的 UUID: ::" #: ../../library/uuid.rst:66 msgid "" @@ -401,10 +399,7 @@ msgstr "範例" #: ../../library/uuid.rst:321 msgid "Here are some examples of typical usage of the :mod:`uuid` module::" -msgstr "" -"以下是一些 :mod:`uuid` 模組的典型使用範例:\n" -"\n" -"::" +msgstr "以下是一些 :mod:`uuid` 模組的典型使用範例: ::" #: ../../library/uuid.rst:360 msgid "Command-Line Example" diff --git a/library/venv.po b/library/venv.po index 80c676488b..8c4774012c 100644 --- a/library/venv.po +++ b/library/venv.po @@ -82,7 +82,7 @@ msgstr "" #: ../../library/venv.rst:52 msgid "See :pep:`405` for more background on Python virtual environments." -msgstr "更多關於 Python 虛擬環境的背景資訊請見 :pep:`405`\\ 。" +msgstr "更多關於 Python 虛擬環境的背景資訊請見 :pep:`405`。" #: ../../library/venv.rst:56 msgid "" diff --git a/library/webbrowser.po b/library/webbrowser.po index 01ee8fec4e..0de224a135 100644 --- a/library/webbrowser.po +++ b/library/webbrowser.po @@ -364,10 +364,7 @@ msgstr "" #: ../../library/webbrowser.rst:177 msgid "Here are some simple examples::" -msgstr "" -"以下是一些簡單範例:\n" -"\n" -"::" +msgstr "以下是一些簡單範例: ::" #: ../../library/webbrowser.rst:191 msgid "Browser Controller Objects" diff --git a/library/winsound.po b/library/winsound.po index d695ddcfa2..e8dcdafaa6 100644 --- a/library/winsound.po +++ b/library/winsound.po @@ -131,10 +131,7 @@ msgstr "" #: ../../library/winsound.rst:77 msgid "For example::" -msgstr "" -"例如說:\n" -"\n" -"::" +msgstr "例如說: ::" #: ../../library/winsound.rst:90 msgid "" diff --git a/library/wsgiref.po b/library/wsgiref.po index f67db40019..fd22c9f8c0 100644 --- a/library/wsgiref.po +++ b/library/wsgiref.po @@ -211,10 +211,7 @@ msgstr "" #: ../../library/wsgiref.rst:122 ../../library/wsgiref.rst:170 #: ../../library/wsgiref.rst:293 ../../library/wsgiref.rst:426 msgid "Example usage::" -msgstr "" -"用法範例:\n" -"\n" -"::" +msgstr "用法範例: ::" #: ../../library/wsgiref.rst:146 msgid "" diff --git a/library/xml.dom.pulldom.po b/library/xml.dom.pulldom.po index 1ceea86e52..f87591bbe2 100644 --- a/library/xml.dom.pulldom.po +++ b/library/xml.dom.pulldom.po @@ -54,10 +54,7 @@ msgstr "" #: ../../library/xml.dom.pulldom.rst:43 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/xml.dom.pulldom.rst:54 msgid "``event`` is a constant and can be one of:" diff --git a/library/xmlrpc.server.po b/library/xmlrpc.server.po index ddcc968fe4..41d02b77ed 100644 --- a/library/xmlrpc.server.po +++ b/library/xmlrpc.server.po @@ -268,10 +268,7 @@ msgstr "" #: ../../library/xmlrpc.server.rst:342 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../library/xmlrpc.server.rst:358 msgid "Documenting XMLRPC server" diff --git a/reference/compound_stmts.po b/reference/compound_stmts.po index d280a055ee..07cebfd460 100644 --- a/reference/compound_stmts.po +++ b/reference/compound_stmts.po @@ -1383,10 +1383,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1249 #: ../../reference/compound_stmts.rst:1439 msgid "is roughly equivalent to ::" -msgstr "" -"大致等價於:\n" -"\n" -"::" +msgstr "大致等價於: ::" #: ../../reference/compound_stmts.rst:1254 msgid "" @@ -1682,10 +1679,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1514 msgid "An example of a coroutine function::" -msgstr "" -"一個協程韓式函式範例:\n" -"\n" -"::" +msgstr "一個協程韓式函式範例: ::" #: ../../reference/compound_stmts.rst:1520 msgid "" @@ -1717,8 +1711,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1563 msgid "" "See also :meth:`~object.__aiter__` and :meth:`~object.__anext__` for details." -msgstr "" -"更多細節請見 :meth:`~object.__aiter__` 與 :meth:`~object.__anext__`\\ 。" +msgstr "更多細節請見 :meth:`~object.__aiter__` 與 :meth:`~object.__anext__`。" #: ../../reference/compound_stmts.rst:1565 msgid "" @@ -1740,8 +1733,7 @@ msgstr "" msgid "" "See also :meth:`~object.__aenter__` and :meth:`~object.__aexit__` for " "details." -msgstr "" -"更多細節請見 :meth:`~object.__aenter__` 與 :meth:`~object.__aexit__`\\ 。" +msgstr "更多細節請見 :meth:`~object.__aenter__` 與 :meth:`~object.__aexit__`。" #: ../../reference/compound_stmts.rst:1607 msgid "" @@ -1864,10 +1856,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1721 #: ../../reference/compound_stmts.rst:1781 msgid "This syntax is equivalent to::" -msgstr "" -"語法大致等價於:\n" -"\n" -"::" +msgstr "語法大致等價於: ::" #: ../../reference/compound_stmts.rst:1730 msgid "" @@ -1928,10 +1917,7 @@ msgstr "" #: ../../reference/compound_stmts.rst:1804 msgid "This is equivalent to::" -msgstr "" -"這等價於:\n" -"\n" -"::" +msgstr "這等價於: ::" #: ../../reference/compound_stmts.rst:1817 msgid "Generic type aliases" diff --git a/reference/datamodel.po b/reference/datamodel.po index 24a791db59..73f257f726 100644 --- a/reference/datamodel.po +++ b/reference/datamodel.po @@ -185,7 +185,7 @@ msgstr "" #: ../../reference/datamodel.rst:168 msgid "See :ref:`implementing-the-arithmetic-operations` for more details." -msgstr "更多細節請見 :ref:`implementing-the-arithmetic-operations`\\ 。" +msgstr "更多細節請見 :ref:`implementing-the-arithmetic-operations`。" #: ../../reference/datamodel.rst:172 msgid "" @@ -2128,7 +2128,7 @@ msgstr "" #: ../../reference/datamodel.rst:1892 msgid "See also :envvar:`PYTHONHASHSEED`." -msgstr "另請參閱 :envvar:`PYTHONHASHSEED`\\ 。" +msgstr "另請參閱 :envvar:`PYTHONHASHSEED`。" #: ../../reference/datamodel.rst:1894 msgid "Hash randomization is enabled by default." @@ -2687,7 +2687,7 @@ msgstr "" #: ../../reference/datamodel.rst:2365 msgid "See :ref:`class-object-creation` for more details." -msgstr "更多細節請見 :ref:`class-object-creation`\\ 。" +msgstr "更多細節請見 :ref:`class-object-creation`。" #: ../../reference/datamodel.rst:2373 msgid "Metaclasses" diff --git a/reference/import.po b/reference/import.po index dabb7b0882..983aad1faf 100644 --- a/reference/import.po +++ b/reference/import.po @@ -1395,7 +1395,7 @@ msgstr "註解" #: ../../reference/import.rst:1075 msgid "See :class:`types.ModuleType`." -msgstr "參閱 :class:`types.ModuleType`\\ 。" +msgstr "參閱 :class:`types.ModuleType`。" #: ../../reference/import.rst:1077 msgid "" diff --git a/reference/index.po b/reference/index.po index e91b5668fb..5f843e0bd9 100644 --- a/reference/index.po +++ b/reference/index.po @@ -38,6 +38,6 @@ msgstr "" "這份參考手冊會描述 Python 語言的語法及「核心語意」。它雖然簡潔,但也盡量保持" "精確並完整。關於非必要的 (non-essential) 內建物件型別、內建函式及模組的語意," "則在 :ref:`library-index` 中說明。關於此語言的非正式介紹,請參閱 :ref:" -"`tutorial-index`\\ 。對於 C 或 C++ 程式設計師,還有另外兩個手冊:\\ :ref:" +"`tutorial-index`。對於 C 或 C++ 程式設計師,還有另外兩個手冊::ref:" "`extending-index`\\ 以高階的視野說明如何編寫 Python 擴充模組,而 :ref:`c-api-" "index`\\ 則詳細說明 C/C++ 程式設計師可用的介面。" diff --git a/reference/simple_stmts.po b/reference/simple_stmts.po index d50e1e0389..a9ec01b51a 100644 --- a/reference/simple_stmts.po +++ b/reference/simple_stmts.po @@ -791,10 +791,7 @@ msgstr "" #: ../../reference/simple_stmts.rst:813 msgid "Examples::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../reference/simple_stmts.rst:823 msgid "" diff --git a/tutorial/appendix.po b/tutorial/appendix.po index 759f2297d5..398fe96532 100644 --- a/tutorial/appendix.po +++ b/tutorial/appendix.po @@ -74,9 +74,7 @@ msgid "" "like shell scripts, by putting the line ::" msgstr "" "在類 BSD 的 Unix 系統上,Python 腳本可以直接執行,就像 shell 腳本一樣,通過放" -"置以下這行:\n" -"\n" -"::" +"置以下這行: ::" #: ../../tutorial/appendix.rst:45 msgid "" @@ -153,9 +151,7 @@ msgstr "" "如果你想從當前目錄中讀取一個額外的啟動檔案,你可以在全域啟動檔案中使用類似 " "``if os.path.isfile('.pythonrc.py'): exec(open('.pythonrc.py').read()`` 的程" "式碼設定這個行為。如果你想在一個腳本中使用啟動檔案,你必須在腳本中明確地這樣" -"做:\n" -"\n" -"::" +"做: ::" #: ../../tutorial/appendix.rst:102 msgid "The Customization Modules" @@ -170,9 +166,7 @@ msgid "" msgstr "" "Python 提供了兩個鉤子 (hook) 讓你可以將它客製化: :index:`sitecustomize` 和 :" "index:`usercustomize` 。要看它是如何運作的,你首先需要找到你的 site-packages " -"的位置。啟動 Python 並運行這段程式碼:\n" -"\n" -"::" +"的位置。啟動 Python 並運行這段程式碼: ::" #: ../../tutorial/appendix.rst:112 msgid "" diff --git a/tutorial/appetite.po b/tutorial/appetite.po index 89f22f2dc8..520d0ba0af 100644 --- a/tutorial/appetite.po +++ b/tutorial/appetite.po @@ -149,8 +149,8 @@ msgid "" "Python interpreter into an application written in C and use it as an " "extension or command language for that application." msgstr "" -"Python 是\\ *可擴充的*\\ :如果你會寫 C 程式,那麼要加個新的內建函式或模組到" -"直譯器中是很容易的。無論是為了用最快速的執行速度完成一些關鍵的操作,或是讓 " +"Python 是\\ *可擴充的*:如果你會寫 C 程式,那麼要加個新的內建函式或模組到直譯" +"器中是很容易的。無論是為了用最快速的執行速度完成一些關鍵的操作,或是讓 " "Python 連結到一些僅以二進位形式 (binary form) 釋出的程式庫(例如特定供應商的" "繪圖程式庫)。如果你想更多這樣的結合,你其實也可以把 Python 直譯器連結到用 C " "寫的應用程式,並在該應用程式中使用 Python 寫擴充或者作為下達指令的語言。" diff --git a/tutorial/classes.po b/tutorial/classes.po index 62f592c351..55c2370949 100644 --- a/tutorial/classes.po +++ b/tutorial/classes.po @@ -34,9 +34,9 @@ msgid "" "also have methods (defined by its class) for modifying its state." msgstr "" "Class 提供了一種結合資料與功能的手段。建立一個 class 將會新增一個物件的\\ *型" -"別 (type)*\\ ,並且允許建立該型別的新\\ *實例 (instance)*。每一個 class 實例" -"可以擁有一些維持該實例狀態的屬性 (attribute)。Class 實例也可以有一些(由其 " -"class 所定義的)method(方法),用於修改該實例的狀態。" +"別 (type)*,並且允許建立該型別的新\\ *實例 (instance)*。每一個 class 實例可以" +"擁有一些維持該實例狀態的屬性 (attribute)。Class 實例也可以有一些(由其 class " +"所定義的)method(方法),用於修改該實例的狀態。" #: ../../tutorial/classes.rst:13 msgid "" @@ -348,9 +348,7 @@ msgid "" "variable binding::" msgstr "" "這是一個範例,演示如何參照不同的作用域和命名空間,以及 :keyword:`global` 和 :" -"keyword:`nonlocal` 如何影響變數的綁定:\n" -"\n" -"::" +"keyword:`nonlocal` 如何影響變數的綁定: ::" #: ../../tutorial/classes.rst:191 msgid "The output of the example code is:" @@ -363,7 +361,7 @@ msgid "" "changed *scope_test*\\'s binding of *spam*, and the :keyword:`global` " "assignment changed the module-level binding." msgstr "" -"請注意,\\ *區域*\\ 賦值(預設情況)不會改變 *scope_test* 對 *spam* 的連結。:" +"請注意,*區域*\\ 賦值(預設情況)不會改變 *scope_test* 對 *spam* 的連結。:" "keyword:`nonlocal` 賦值改變了 *scope_test* 對 *spam* 的連結,而 :keyword:" "`global` 賦值改變了模組層次的連結。" @@ -389,10 +387,7 @@ msgstr "Class definition(類別定義)語法" #: ../../tutorial/classes.rst:223 msgid "The simplest form of class definition looks like this::" -msgstr "" -"Class definition 最簡單的形式如下:\n" -"\n" -"::" +msgstr "Class definition 最簡單的形式如下: ::" #: ../../tutorial/classes.rst:232 msgid "" @@ -465,9 +460,7 @@ msgid "" msgstr "" "*屬性參照*\\ 使用 Python 中所有屬性參照的標準語法:``obj.name``。有效的屬性名" "稱是 class 物件被建立時,class 的命名空間中所有的名稱。所以,如果 class " -"definition 看起來像這樣:\n" -"\n" -"::" +"definition 看起來像這樣: ::" #: ../../tutorial/classes.rst:276 msgid "" @@ -489,15 +482,13 @@ msgid "" "For example (assuming the above class)::" msgstr "" "Class *實例化*\\ 使用了函式記法 (function notation)。就好像 class 物件是一個" -"沒有參數的函式,它回傳一個新的 class 實例。例如(假設是上述的 class):\n" -"\n" -"::" +"沒有參數的函式,它回傳一個新的 class 實例。例如(假設是上述的 class): ::" #: ../../tutorial/classes.rst:288 msgid "" "creates a new *instance* of the class and assigns this object to the local " "variable ``x``." -msgstr "建立 class 的一個新\\ *實例*\\ ,並將此物件指派給區域變數 ``x``。" +msgstr "建立 class 的一個新\\ *實例*,並將此物件指派給區域變數 ``x``。" #: ../../tutorial/classes.rst:291 msgid "" @@ -508,9 +499,7 @@ msgid "" msgstr "" "實例化運算(「呼叫」一個 class 物件)會建立一個空的物件。許多 class 喜歡在建" "立物件時有著自訂的特定實例初始狀態。因此,class 可以定義一個名為 :meth:" -"`~object.__init__` 的特別 method,像這樣:\n" -"\n" -"::" +"`~object.__init__` 的特別 method,像這樣: ::" #: ../../tutorial/classes.rst:299 msgid "" @@ -521,9 +510,7 @@ msgid "" msgstr "" "當 class 定義了 :meth:`~object.__init__` method,class 實例化會為新建的 " "class 實例自動調用 :meth:`!__init__`。所以在這個範例中,一個新的、初始化的實" -"例可以如此獲得:\n" -"\n" -"::" +"例可以如此獲得: ::" #: ../../tutorial/classes.rst:305 msgid "" @@ -532,9 +519,7 @@ msgid "" "instantiation operator are passed on to :meth:`!__init__`. For example, ::" msgstr "" "當然,:meth:`~object.__init__` method 可能為了更多的彈性而有引數。在這種情況" -"下,要給 class 實例化運算子的引數會被傳遞給 :meth:`!__init__`。例如:\n" -"\n" -"::" +"下,要給 class 實例化運算子的引數會被傳遞給 :meth:`!__init__`。例如: ::" #: ../../tutorial/classes.rst:322 msgid "Instance Objects" @@ -561,9 +546,7 @@ msgstr "" "*資料屬性*\\ 對應 Smalltalk 中的「實例變數」,以及 C++ 中的「資料成員」。資料" "屬性不需要被宣告;和區域變數一樣,它們在第一次被賦值時就會立即存在。例如,如" "果 ``x`` 是 :class:`!MyClass` 在上述例子中建立的實例,下面的程式碼將印出值 " -"``16``,而不留下蹤跡:\n" -"\n" -"::" +"``16``,而不留下蹤跡: ::" #: ../../tutorial/classes.rst:340 msgid "" @@ -592,10 +575,7 @@ msgstr "Method 物件" #: ../../tutorial/classes.rst:358 msgid "Usually, a method is called right after it is bound::" -msgstr "" -"通常,一個 method 在它被連結後隨即被呼叫:\n" -"\n" -"::" +msgstr "通常,一個 method 在它被連結後隨即被呼叫: ::" #: ../../tutorial/classes.rst:362 msgid "" @@ -606,9 +586,7 @@ msgid "" msgstr "" "在 :class:`!MyClass` 的例子中,這將回傳字串 ``'hello world'``。然而,並沒有必" "要立即呼叫一個 method:``x.f`` 是一個 method 物件,並且可以被儲藏起來,之後再" -"被呼叫。舉例來說:\n" -"\n" -"::" +"被呼叫。舉例來說: ::" #: ../../tutorial/classes.rst:370 msgid "will continue to print ``hello world`` until the end of time." @@ -669,9 +647,7 @@ msgid "" "of the class::" msgstr "" "一般來說,實例變數用於每一個實例的獨特資料,而 class 變數用於該 class 的所有" -"實例共享的屬性和 method:\n" -"\n" -"::" +"實例共享的屬性和 method: ::" #: ../../tutorial/classes.rst:422 msgid "" @@ -684,16 +660,11 @@ msgstr "" "如同在\\ :ref:`tut-object`\\ 的討論,共享的資料若涉及 :term:`mutable` 物件," "如 list 和 dictionary,可能會產生意外的影響。舉例來說,下列程式碼的 *tricks* " "list 不應該作為一個 class 變數使用,因為這個 list 將會被所有的 *Dog* 實例所共" -"享:\n" -"\n" -"::" +"享: ::" #: ../../tutorial/classes.rst:445 msgid "Correct design of the class should use an instance variable instead::" -msgstr "" -"正確的 class 設計應該使用實例變數:\n" -"\n" -"::" +msgstr "正確的 class 設計應該使用實例變數: ::" #: ../../tutorial/classes.rst:469 msgid "Random Remarks" @@ -704,9 +675,8 @@ msgid "" "If the same attribute name occurs in both an instance and in a class, then " "attribute lookup prioritizes the instance::" msgstr "" -"如果屬性名稱同時出現在一個實例和一個 class 中,則屬性的尋找會以實例為優先:\n" -"\n" -"::" +"如果屬性名稱同時出現在一個實例和一個 class 中,則屬性的尋找會以實例為優" +"先: ::" #: ../../tutorial/classes.rst:488 msgid "" @@ -770,9 +740,7 @@ msgid "" msgstr "" "任何一個作為 class 屬性的函式物件都為該 class 的實例定義了一個相應的 method。" "函式定義不一定要包含在 class definition 的文本中:將函式物件指定給 class 中的" -"區域變數也是可以的。例如:\n" -"\n" -"::" +"區域變數也是可以的。例如: ::" #: ../../tutorial/classes.rst:530 msgid "" @@ -789,10 +757,7 @@ msgstr "" msgid "" "Methods may call other methods by using method attributes of the ``self`` " "argument::" -msgstr "" -"Method 可以藉由使用 ``self`` 引數的 method 屬性,呼叫其他 method:\n" -"\n" -"::" +msgstr "Method 可以藉由使用 ``self`` 引數的 method 屬性,呼叫其他 method: ::" #: ../../tutorial/classes.rst:549 msgid "" @@ -832,9 +797,7 @@ msgid "" "looks like this::" msgstr "" "當然,如果沒有支援繼承,「class」這個語言特色就不值得被稱為 class。一個 " -"derived class(衍生類別)定義的語法看起來如下:\n" -"\n" -"::" +"derived class(衍生類別)定義的語法看起來如下: ::" #: ../../tutorial/classes.rst:579 msgid "" @@ -846,9 +809,7 @@ msgstr "" "名稱 :class:`!BaseClassName` 必須被定義於作用域可及的命名空間,且該作用域要包" "含 derived class 定義。要代替 base class(基底類別)的名稱,用其他任意的運算" "式也是被允許的。這會很有用,例如,當一個 base class 是在另一個模組中被定義" -"時:\n" -"\n" -"::" +"時: ::" #: ../../tutorial/classes.rst:587 msgid "" @@ -942,9 +903,7 @@ msgid "" "with multiple base classes looks like this::" msgstr "" "Python 也支援多重繼承的形式。一個有多個 base class 的 class definition 看起來" -"像這樣子:\n" -"\n" -"::" +"像這樣子: ::" #: ../../tutorial/classes.rst:640 msgid "" @@ -1013,7 +972,7 @@ msgid "" msgstr "" "「私有」(private) 實例變數,指的是不在物件內部便無法存取的變數,這在 Python " "中是不存在的。但是,大多數 Python 的程式碼都遵守一個慣例:前綴為一個底線的名" -"稱(如:\\ ``_spam``)應被視為 API (應用程式介面)的非公有 (non-public) 部分" +"稱(如:``_spam``)應被視為 API (應用程式介面)的非公有 (non-public) 部分" "(無論它是函式、方法或是資料成員)。這被視為一個實作細節,如有調整,亦不另行" "通知。" @@ -1041,9 +1000,7 @@ msgid "" "breaking intraclass method calls. For example::" msgstr "" "名稱修飾對於讓 subclass 覆寫 method 而不用破壞 class 內部的 method 呼叫,是有" -"幫助的。舉例來說:\n" -"\n" -"::" +"幫助的。舉例來說: ::" #: ../../tutorial/classes.rst:713 msgid "" @@ -1092,9 +1049,7 @@ msgid "" msgstr "" "如果有一種資料型別,類似於 Pascal 的「record」或 C 的「struct」,可以將一些有" "名稱的資料項目捆綁在一起,有時候這會很有用。符合語言習慣的做法是使用 :mod:" -"`dataclasses`:\n" -"\n" -"::" +"`dataclasses`: ::" #: ../../tutorial/classes.rst:755 msgid "" @@ -1133,9 +1088,7 @@ msgid "" "over using a :keyword:`for` statement::" msgstr "" "到目前為止,你可能已經注意到大多數的容器 (container) 物件都可以使用 :keyword:" -"`for` 陳述式來進行迴圈:\n" -"\n" -"::" +"`for` 陳述式來進行迴圈: ::" #: ../../tutorial/classes.rst:793 msgid "" @@ -1155,9 +1108,7 @@ msgstr "" "存取容器中的元素。當元素用盡時,:meth:`~iterator.__next__` 將引發 :exc:" "`StopIteration` 例外,來通知 :keyword:`!for` 終止迴圈。你可以使用內建函式 :" "func:`next` 來呼叫 :meth:`~iterator.__next__` method;這個例子展示了它的運作" -"方式:\n" -"\n" -"::" +"方式: ::" #: ../../tutorial/classes.rst:818 msgid "" @@ -1170,9 +1121,7 @@ msgstr "" "看過疊代器協定的幕後機制後,在你的 class 加入疊代器的行為就很容易了。定義一" "個 :meth:`~container.__iter__` method 來回傳一個帶有 :meth:`~iterator." "__next__` method 的物件。如果 class 已定義了 :meth:`!__next__`,則 :meth:`!" -"__iter__` 可以只回傳 ``self``:\n" -"\n" -"::" +"__iter__` 可以只回傳 ``self``: ::" #: ../../tutorial/classes.rst:855 msgid "Generators" @@ -1190,9 +1139,7 @@ msgstr "" ":term:`產生器 `\\ 是一個用於建立疊代器的簡單而強大的工具。它們的寫" "法和常規的函式一樣,但當它們要回傳資料時,會使用 :keyword:`yield` 陳述式。每" "次在產生器上呼叫 :func:`next` 時,它會從上次離開的位置恢復執行(它會記得所有" -"資料值以及上一個被執行的陳述式)。以下範例顯示,建立產生器可以相當地容易:\n" -"\n" -"::" +"資料值以及上一個被執行的陳述式)。以下範例顯示,建立產生器可以相當地容易: ::" #: ../../tutorial/classes.rst:878 msgid "" @@ -1247,10 +1194,7 @@ msgstr "" #: ../../tutorial/classes.rst:906 msgid "Examples::" -msgstr "" -"例如:\n" -"\n" -"::" +msgstr "例如: ::" #: ../../tutorial/classes.rst:927 msgid "Footnotes" diff --git a/tutorial/controlflow.po b/tutorial/controlflow.po index bd3440f671..9154fd17be 100644 --- a/tutorial/controlflow.po +++ b/tutorial/controlflow.po @@ -42,10 +42,7 @@ msgstr ":keyword:`!if` 陳述式" msgid "" "Perhaps the most well-known statement type is the :keyword:`if` statement. " "For example::" -msgstr "" -"或許最常見的陳述式種類就是 :keyword:`if` 了。舉例來說:\n" -"\n" -"::" +msgstr "或許最常見的陳述式種類就是 :keyword:`if` 了。舉例來說: ::" #: ../../tutorial/controlflow.rst:33 msgid "" @@ -86,9 +83,7 @@ msgstr "" "在 Python 中的 :keyword:`for` 陳述式有點不同於在 C 或 Pascal 中的慣用方式。相" "較於只能疊代 (iterate) 一個等差數列(如 Pascal),或給予使用者定義疊代步驟與" "終止條件(如 C),Python 的 :keyword:`!for` 陳述式疊代任何序列(list 或者字" -"串)的元素,順序與它們出現在序列中的順序相同。例如(無意雙關):\n" -"\n" -"::" +"串)的元素,順序與它們出現在序列中的順序相同。例如(無意雙關): ::" #: ../../tutorial/controlflow.rst:72 msgid "" @@ -97,9 +92,7 @@ msgid "" "loop over a copy of the collection or to create a new collection::" msgstr "" "在疊代一個集合的同時修改該集合的內容,很難獲取想要的結果。比較直觀的替代方" -"式,是疊代該集合的副本,或建立一個新的集合:\n" -"\n" -"::" +"式,是疊代該集合的副本,或建立一個新的集合: ::" #: ../../tutorial/controlflow.rst:94 msgid "The :func:`range` Function" @@ -111,9 +104,7 @@ msgid "" "func:`range` comes in handy. It generates arithmetic progressions::" msgstr "" "如果你需要疊代一個數列的話,使用內建 :func:`range` 函式就很方便。它可以生成一" -"等差數列:\n" -"\n" -"::" +"等差數列: ::" #: ../../tutorial/controlflow.rst:108 msgid "" @@ -122,20 +113,16 @@ msgid "" "10. It is possible to let the range start at another number, or to specify " "a different increment (even negative; sometimes this is called the 'step')::" msgstr "" -"給定的結束值永遠不會出現在生成的序列中;\\ ``range(10)`` 生成的 10 個數值,即" -"對應存取一個長度為 10 的序列內每一個項目的索引值。也可以讓 range 從其他數值開" -"始計數,或者給定不同的公差(甚至為負;有時稱之為 step):\n" -"\n" -"::" +"給定的結束值永遠不會出現在生成的序列中;``range(10)`` 生成的 10 個數值,即對" +"應存取一個長度為 10 的序列內每一個項目的索引值。也可以讓 range 從其他數值開始" +"計數,或者給定不同的公差(甚至為負;有時稱之為 step): ::" #: ../../tutorial/controlflow.rst:122 msgid "" "To iterate over the indices of a sequence, you can combine :func:`range` " "and :func:`len` as follows::" msgstr "" -"欲疊代一個序列的索引值,你可以搭配使用 :func:`range` 和 :func:`len` 如下:\n" -"\n" -"::" +"欲疊代一個序列的索引值,你可以搭配使用 :func:`range` 和 :func:`len` 如下: ::" #: ../../tutorial/controlflow.rst:135 msgid "" @@ -147,10 +134,7 @@ msgstr "" #: ../../tutorial/controlflow.rst:138 msgid "A strange thing happens if you just print a range::" -msgstr "" -"如果直接印出一個 range 則會出現奇怪的輸出:\n" -"\n" -"::" +msgstr "如果直接印出一個 range 則會出現奇怪的輸出: ::" #: ../../tutorial/controlflow.rst:143 msgid "" @@ -173,9 +157,7 @@ msgid "" msgstr "" "我們稱這樣的物件為 :term:`iterable`\\ (可疊代物件),意即能作為函式及架構中" "可以一直獲取項目直到取盡的對象。我們已經了解 :keyword:`for` 陳述式就是如此的" -"架構,另一個使用 iterable 的函式範例是 :func:`sum`\\ :\n" -"\n" -"::" +"架構,另一個使用 iterable 的函式範例是 :func:`sum`: ::" #: ../../tutorial/controlflow.rst:157 msgid "" @@ -264,9 +246,8 @@ msgid "" "The :keyword:`continue` statement, also borrowed from C, continues with the " "next iteration of the loop::" msgstr "" -":keyword:`continue` 陳述式,亦承襲於 C 語言,讓所屬的迴圈繼續執行下個疊代:\n" -"\n" -"::" +":keyword:`continue` 陳述式,亦承襲於 C 語言,讓所屬的迴圈繼續執行下個疊" +"代: ::" #: ../../tutorial/controlflow.rst:231 msgid ":keyword:`!pass` Statements" @@ -278,16 +259,11 @@ msgid "" "is required syntactically but the program requires no action. For example::" msgstr "" ":keyword:`pass` 陳述式不執行任何動作。它可用在語法上需要一個陳述式但程式不需" -"要執行任何動作的時候。例如:\n" -"\n" -"::" +"要執行任何動作的時候。例如: ::" #: ../../tutorial/controlflow.rst:240 msgid "This is commonly used for creating minimal classes::" -msgstr "" -"這經常用於建立簡單的 class(類別):\n" -"\n" -"::" +msgstr "這經常用於建立簡單的 class(類別): ::" #: ../../tutorial/controlflow.rst:246 msgid "" @@ -297,9 +273,7 @@ msgid "" "ignored::" msgstr "" ":keyword:`pass` 亦可作為一個函式或條件判斷主體的預留位置,在你撰寫新的程式碼" -"時讓你保持在更抽象的思維層次。:keyword:`!pass` 會直接被忽略:\n" -"\n" -"::" +"時讓你保持在更抽象的思維層次。:keyword:`!pass` 會直接被忽略: ::" #: ../../tutorial/controlflow.rst:258 msgid ":keyword:`!match` Statements" @@ -326,9 +300,7 @@ msgid "" "The simplest form compares a subject value against one or more literals::" msgstr "" "最簡單的形式,是將一個主題值 (subject value) 與一個或多個字面值 (literal) 進" -"行比較:\n" -"\n" -"::" +"行比較: ::" #: ../../tutorial/controlflow.rst:281 msgid "" @@ -341,19 +313,14 @@ msgstr "" #: ../../tutorial/controlflow.rst:284 msgid "" "You can combine several literals in a single pattern using ``|`` (\"or\")::" -msgstr "" -"你可以使用 ``|``\\ (「或」)來將多個字面值組合在單一模式中:\n" -"\n" -"::" +msgstr "你可以使用 ``|``\\ (「或」)來將多個字面值組合在單一模式中: ::" #: ../../tutorial/controlflow.rst:289 msgid "" "Patterns can look like unpacking assignments, and can be used to bind " "variables::" msgstr "" -"模式可以看起來像是拆解賦值 (unpacking assignment),且可以用來連結變數:\n" -"\n" -"::" +"模式可以看起來像是拆解賦值 (unpacking assignment),且可以用來連結變數: ::" #: ../../tutorial/controlflow.rst:305 msgid "" @@ -376,9 +343,7 @@ msgid "" "to capture attributes into variables::" msgstr "" "如果你要用 class 來結構化你的資料,你可以使用該 class 的名稱加上一個引數列" -"表,類似一個建構式 (constructor),但它能夠將屬性擷取到變數中:\n" -"\n" -"::" +"表,類似一個建構式 (constructor),但它能夠將屬性擷取到變數中: ::" #: ../../tutorial/controlflow.rst:334 msgid "" @@ -392,9 +357,7 @@ msgstr "" "你可以將位置參數 (positional parameter) 與一些能夠排序其屬性的內建 class(例" "如 dataclasses)一起使用。你也可以透過在 class 中設定特殊屬性 " "``__match_args__``,來定義模式中屬性們的特定位置。如果它被設定為 (\"x\", " -"\"y\"),則以下的模式都是等價的(且都會將屬性 ``y`` 連結到變數 ``var``):\n" -"\n" -"::" +"\"y\"),則以下的模式都是等價的(且都會將屬性 ``y`` 連結到變數 ``var``): ::" #: ../../tutorial/controlflow.rst:345 msgid "" @@ -418,9 +381,7 @@ msgid "" "Points, with ``__match_args__`` added, we could match it like this::" msgstr "" "模式可以任意地被巢套 (nested)。例如,如果我們有一個由某些點所組成的簡短 " -"list,我們就可以像這樣加入 ``__match_args__`` 來對它進行匹配:\n" -"\n" -"::" +"list,我們就可以像這樣加入 ``__match_args__`` 來對它進行匹配: ::" #: ../../tutorial/controlflow.rst:373 msgid "" @@ -430,9 +391,7 @@ msgid "" msgstr "" "我們可以在模式中加入一個 ``if`` 子句,稱為「防護 (guard)」。如果該防護為假," "則 ``match`` 會繼續嘗試下一個 case 區塊。請注意,值的擷取會發生在防護的評估之" -"前:\n" -"\n" -"::" +"前: ::" #: ../../tutorial/controlflow.rst:383 msgid "Several other key features of this statement:" @@ -473,10 +432,7 @@ msgstr "" #: ../../tutorial/controlflow.rst:399 msgid "Subpatterns may be captured using the ``as`` keyword::" -msgstr "" -"使用關鍵字 ``as`` 可以擷取子模式 (subpattern):\n" -"\n" -"::" +msgstr "使用關鍵字 ``as`` 可以擷取子模式 (subpattern): ::" #: ../../tutorial/controlflow.rst:403 msgid "" @@ -500,9 +456,7 @@ msgid "" "them from being interpreted as capture variable::" msgstr "" "模式可以使用附名常數 (named constant)。這些模式必須是點分隔名稱,以免它們被解" -"釋為擷取變數:\n" -"\n" -"::" +"釋為擷取變數: ::" #: ../../tutorial/controlflow.rst:428 msgid "" @@ -519,10 +473,7 @@ msgstr "定義函式 (function)" msgid "" "We can create a function that writes the Fibonacci series to an arbitrary " "boundary::" -msgstr "" -"我們可以建立一個函式來產生費式數列到任何一個上界:\n" -"\n" -"::" +msgstr "我們可以建立一個函式來產生費式數列到任何一個上界: ::" #: ../../tutorial/controlflow.rst:456 msgid "" @@ -531,8 +482,8 @@ msgid "" "parameters. The statements that form the body of the function start at the " "next line, and must be indented." msgstr "" -"關鍵字 :keyword:`def` 介紹一個函式的\\ *定義*\\ 。它之後必須連著該函式的名稱" -"和置於括號之中的一串參數。自下一行起,所有縮排的陳述式成為該函式的主體。" +"關鍵字 :keyword:`def` 介紹一個函式的\\ *定義*。它之後必須連著該函式的名稱和置" +"於括號之中的一串參數。自下一行起,所有縮排的陳述式成為該函式的主體。" #: ../../tutorial/controlflow.rst:461 msgid "" @@ -582,9 +533,8 @@ msgid "" msgstr "" "在一個函式被呼叫的時候,實際傳入的參數(引數)會被加入至該函式的區域符號表。" "因此,引數傳入的方式為\\ *傳值呼叫 (call by value)*\\ (這裡傳遞的\\ *值*\\ " -"永遠是一個物件的\\ *參照 (reference)*\\ ,而不是該物件的值)。\\ [#]_ 當一個" -"函式呼叫別的函式或遞迴呼叫它自己時,在被呼叫的函式中會建立一個新的區域符號" -"表。" +"永遠是一個物件的\\ *參照 (reference)*,而不是該物件的值)。 [#]_ 當一個函式呼" +"叫別的函式或遞迴呼叫它自己時,在被呼叫的函式中會建立一個新的區域符號表。" #: ../../tutorial/controlflow.rst:486 msgid "" @@ -595,9 +545,7 @@ msgid "" msgstr "" "函式定義時,會把該函式名稱加入至當前的符號表。函式名稱的值帶有一個型別,並被" "直譯器辨識為使用者自定函式 (user-defined function)。該值可以被指定給別的變數" -"名,使該變數名也可以被當作函式使用。這是常見的重新命名方式:\n" -"\n" -"::" +"名,使該變數名也可以被當作函式使用。這是常見的重新命名方式: ::" #: ../../tutorial/controlflow.rst:497 msgid "" @@ -612,18 +560,13 @@ msgstr "" "如果你是來自別的語言,你可能不同意 ``fib`` 是個函式,而是個程序 (procedure)," "因為它並沒有回傳值。實際上,即使一個函式缺少一個 :keyword:`return` 陳述式,它" "亦有一個固定的回傳值。這個值稱為 ``None``\\ (它是一個內建名稱)。在直譯器中" -"單獨使用 ``None`` 時,通常不會被顯示。你可以使用 :func:`print` 來看到它:\n" -"\n" -"::" +"單獨使用 ``None`` 時,通常不會被顯示。你可以使用 :func:`print` 來看到它: ::" #: ../../tutorial/controlflow.rst:508 msgid "" "It is simple to write a function that returns a list of the numbers of the " "Fibonacci series, instead of printing it::" -msgstr "" -"如果要寫一個函式回傳費式數列的 list 而不是直接印出它,這也很容易:\n" -"\n" -"::" +msgstr "如果要寫一個函式回傳費式數列的 list 而不是直接印出它,這也很容易: ::" #: ../../tutorial/controlflow.rst:524 msgid "This example, as usual, demonstrates some new Python features:" @@ -684,9 +627,7 @@ msgid "" "than it is defined to allow. For example::" msgstr "" "為一個或多個引數指定預設值是很有用的方式。函式建立後,可以用比定義時更少的引" -"數呼叫該函式。例如:\n" -"\n" -"::" +"數呼叫該函式。例如: ::" #: ../../tutorial/controlflow.rst:572 msgid "This function can be called in several ways:" @@ -721,10 +662,7 @@ msgstr "此例也使用了關鍵字 :keyword:`in`,用於測試序列中是否 msgid "" "The default values are evaluated at the point of function definition in the " "*defining* scope, so that ::" -msgstr "" -"預設值是在函式定義當下,於\\ *定義時*\\ 的作用域中求值,所以:\n" -"\n" -"::" +msgstr "預設值是在函式定義當下,於\\ *定義時*\\ 的作用域中求值,所以: ::" #: ../../tutorial/controlflow.rst:595 msgid "will print ``5``." @@ -737,18 +675,13 @@ msgid "" "dictionary, or instances of most classes. For example, the following " "function accumulates the arguments passed to it on subsequent calls::" msgstr "" -"\\ **重要警告**\\ :預設值只求值一次。當預設值為可變物件,例如 list、" -"dictionary(字典)或許多類別實例時,會產生不同的結果。例如,以下函式於後續呼" -"叫時會累積曾經傳遞的引數:\n" -"\n" -"::" +"\\ **重要警告**:預設值只求值一次。當預設值為可變物件,例如 list、dictionary" +"(字典)或許多類別實例時,會產生不同的結果。例如,以下函式於後續呼叫時會累積" +"曾經傳遞的引數: ::" #: ../../tutorial/controlflow.rst:610 msgid "This will print ::" -msgstr "" -"將會輸出:\n" -"\n" -"::" +msgstr "將會輸出: ::" #: ../../tutorial/controlflow.rst:616 msgid "" @@ -767,9 +700,7 @@ msgid "" "function::" msgstr "" "函式也可以使用\\ :term:`關鍵字引數 `,以 ``kwarg=value`` 的" -"形式呼叫。舉例來說,以下函式:\n" -"\n" -"::" +"形式呼叫。舉例來說,以下函式: ::" #: ../../tutorial/controlflow.rst:640 msgid "" @@ -778,16 +709,11 @@ msgid "" "of the following ways::" msgstr "" "接受一個必要引數 (``voltage``) 和三個選擇性引數 (``state``,``action``,和 " -"``type``)。該函式可用下列任一方式呼叫:\n" -"\n" -"::" +"``type``)。該函式可用下列任一方式呼叫: ::" #: ../../tutorial/controlflow.rst:651 msgid "but all the following calls would be invalid::" -msgstr "" -"但以下呼叫方式都無效:\n" -"\n" -"::" +msgstr "但以下呼叫方式都無效: ::" #: ../../tutorial/controlflow.rst:658 msgid "" @@ -803,9 +729,7 @@ msgstr "" "argument) 後面。所有傳遞的關鍵字引數都必須匹配一個可被函式接受的引數(\\ " "``actor`` 不是 ``parrot`` 函式的有效引數),而關鍵字引數的順序並不重要。此規" "則也包括必要引數,(\\ ``parrot(voltage=1000)`` 也有效)。一個引數不可多次被" -"賦值,下面就是一個因此限制而無效的例子:\n" -"\n" -"::" +"賦值,下面就是一個因此限制而無效的例子: ::" #: ../../tutorial/controlflow.rst:674 msgid "" @@ -821,23 +745,15 @@ msgstr "" "`typesmapping`\\ ),該字典包含所有可對應形式參數以外的關鍵字引數。" "``**name`` 可以與 ``*name`` 參數(下一小節介紹)組合使用,``*name`` 接收一" "個 :ref:`tuple `,該 tuple 包含一般參數以外的位置引數(\\ " -"``*name`` 必須出現在 ``**name`` 前面)。例如,若我們定義這樣的函式:\n" -"\n" -"::" +"``*name`` 必須出現在 ``**name`` 前面)。例如,若我們定義這樣的函式: ::" #: ../../tutorial/controlflow.rst:691 msgid "It could be called like this::" -msgstr "" -"它可以被如此呼叫:\n" -"\n" -"::" +msgstr "它可以被如此呼叫: ::" #: ../../tutorial/controlflow.rst:699 msgid "and of course it would print:" -msgstr "" -"輸出結果如下:\n" -"\n" -"::" +msgstr "輸出結果如下: ::" #: ../../tutorial/controlflow.rst:712 msgid "" @@ -901,10 +817,10 @@ msgid "" "parameters. If there is no ``/`` in the function definition, there are no " "positional-only parameters." msgstr "" -"此處再詳述一些細節,特定參數可以標記為\\ *僅限位置*\\ 。若參數為\\ *僅限位置" -"*\\ 時,它們的順序很重要,且這些參數不能用關鍵字傳遞。僅限位置參數必須放在 " -"``/``\\ (斜線)之前。\\ ``/`` 用於在邏輯上分開僅限位置參數與其餘參數。如果函" -"式定義中沒有 ``/``\\ ,則表示沒有任何僅限位置參數。" +"此處再詳述一些細節,特定參數可以標記為\\ *僅限位置*。若參數為\\ *僅限位置*\\ " +"時,它們的順序很重要,且這些參數不能用關鍵字傳遞。僅限位置參數必須放在 ``/" +"``\\ (斜線)之前。``/`` 用於在邏輯上分開僅限位置參數與其餘參數。如果函式定義" +"中沒有 ``/``,則表示沒有任何僅限位置參數。" #: ../../tutorial/controlflow.rst:759 msgid "" @@ -922,8 +838,8 @@ msgid "" "passed by keyword argument, place an ``*`` in the arguments list just before " "the first *keyword-only* parameter." msgstr "" -"要把參數標記為\\ *僅限關鍵字*\\ ,表明參數必須以關鍵字引數傳遞,必須在引數列" -"表中第一個\\ *僅限關鍵字*\\ 參數前放上 ``*``。" +"要把參數標記為\\ *僅限關鍵字*,表明參數必須以關鍵字引數傳遞,必須在引數列表中" +"第一個\\ *僅限關鍵字*\\ 參數前放上 ``*``。" #: ../../tutorial/controlflow.rst:771 msgid "Function Examples" @@ -933,10 +849,7 @@ msgstr "函式範例" msgid "" "Consider the following example function definitions paying close attention " "to the markers ``/`` and ``*``::" -msgstr "" -"請看以下的函式定義範例,注意 ``/`` 和 ``*`` 記號:\n" -"\n" -"::" +msgstr "請看以下的函式定義範例,注意 ``/`` 和 ``*`` 記號: ::" #: ../../tutorial/controlflow.rst:789 msgid "" @@ -945,36 +858,27 @@ msgid "" "by position or keyword::" msgstr "" "第一個函式定義 ``standard_arg`` 是我們最熟悉的形式,對呼叫方式沒有任何限制," -"可以按位置或關鍵字傳遞引數:\n" -"\n" -"::" +"可以按位置或關鍵字傳遞引數: ::" #: ../../tutorial/controlflow.rst:799 msgid "" "The second function ``pos_only_arg`` is restricted to only use positional " "parameters as there is a ``/`` in the function definition::" msgstr "" -"第二個函式 ``pos_only_arg`` 的函式定義中有 ``/``,因此僅限使用位置參數:\n" -"\n" -"::" +"第二個函式 ``pos_only_arg`` 的函式定義中有 ``/``,因此僅限使用位置參數: ::" #: ../../tutorial/controlflow.rst:810 msgid "" "The third function ``kwd_only_args`` only allows keyword arguments as " "indicated by a ``*`` in the function definition::" msgstr "" -"第三個函式 ``kwd_only_args`` 的函式定義透過 ``*`` 表明僅限關鍵字引數:\n" -"\n" -"::" +"第三個函式 ``kwd_only_args`` 的函式定義透過 ``*`` 表明僅限關鍵字引數: ::" #: ../../tutorial/controlflow.rst:821 msgid "" "And the last uses all three calling conventions in the same function " "definition::" -msgstr "" -"最後一個函式在同一個函式定義中,使用了全部三種呼叫方式:\n" -"\n" -"::" +msgstr "最後一個函式在同一個函式定義中,使用了全部三種呼叫方式: ::" #: ../../tutorial/controlflow.rst:841 msgid "" @@ -983,9 +887,7 @@ msgid "" "as a key::" msgstr "" "最後,請看這個函式定義,如果 ``**kwds`` 內有 ``name`` 這個鍵,可能與位置引數 " -"``name`` 產生潛在衝突:\n" -"\n" -"::" +"``name`` 產生潛在衝突: ::" #: ../../tutorial/controlflow.rst:846 msgid "" @@ -993,9 +895,7 @@ msgid "" "``'name'`` will always bind to the first parameter. For example::" msgstr "" "呼叫該函式不可能回傳 ``True``,因為關鍵字 ``'name'`` 永遠是連結在第一個參數。" -"例如:\n" -"\n" -"::" +"例如: ::" #: ../../tutorial/controlflow.rst:855 msgid "" @@ -1004,9 +904,7 @@ msgid "" "arguments::" msgstr "" "使用 ``/``\\ (僅限位置引數)後,就可以了。函式定義會允許 ``name`` 當作位置引" -"數,而 ``'name'`` 也可以當作關鍵字引數中的鍵:\n" -"\n" -"::" +"數,而 ``'name'`` 也可以當作關鍵字引數中的鍵: ::" #: ../../tutorial/controlflow.rst:863 msgid "" @@ -1022,10 +920,7 @@ msgstr "回顧" msgid "" "The use case will determine which parameters to use in the function " "definition::" -msgstr "" -"此用例決定哪些參數可以用於函式定義:\n" -"\n" -"::" +msgstr "此用例決定哪些參數可以用於函式定義: ::" #: ../../tutorial/controlflow.rst:874 msgid "As guidance:" @@ -1073,9 +968,7 @@ msgid "" msgstr "" "最後,有個較不常用的選項,是規定函式被呼叫時,可以使用任意數量的引數。這些引" "數會被包裝進一個 tuple 中(詳見 :ref:`tut-tuples`\\ )。在可變數量的引數之" -"前,可能有零個或多個普通引數:\n" -"\n" -"::" +"前,可能有零個或多個普通引數: ::" #: ../../tutorial/controlflow.rst:904 msgid "" @@ -1107,18 +1000,13 @@ msgstr "" "當引數們已經存在一個 list 或 tuple 裡,但為了滿足一個需要個別位置引數的函式呼" "叫,而去拆解它們時,情況就剛好相反。例如,內建的 :func:`range` 函式要求分開" "的 *start* 和 *stop* 引數。如果這些引數不是分開的,則要在呼叫函式時,用 " -"``*`` 運算子把引數們從 list 或 tuple 中拆解出來:\n" -"\n" -"::" +"``*`` 運算子把引數們從 list 或 tuple 中拆解出來: ::" #: ../../tutorial/controlflow.rst:939 msgid "" "In the same fashion, dictionaries can deliver keyword arguments with the " "``**``\\ -operator::" -msgstr "" -"同樣地,dictionary(字典)可以用 ``**`` 運算子傳遞關鍵字引數:\n" -"\n" -"::" +msgstr "同樣地,dictionary(字典)可以用 ``**`` 運算子傳遞關鍵字引數: ::" #: ../../tutorial/controlflow.rst:955 msgid "Lambda Expressions" @@ -1137,9 +1025,7 @@ msgstr "" ":keyword:`lambda` 關鍵字用於建立小巧的匿名函式。``lambda a, b: a+b`` 函式返回" "兩個引數的和。Lambda 函式可用於任何需要函式物件的地方。在語法上,它們被限定只" "能是單一運算式。在語義上,它就是一個普通函式定義的語法糖 (syntactic sugar)。" -"與巢狀函式定義一樣,lambda 函式可以從包含它的作用域中引用變數:\n" -"\n" -"::" +"與巢狀函式定義一樣,lambda 函式可以從包含它的作用域中引用變數: ::" #: ../../tutorial/controlflow.rst:974 msgid "" @@ -1147,9 +1033,7 @@ msgid "" "use is to pass a small function as an argument::" msgstr "" "上面的例子用 lambda 運算式回傳了一個函式。另外的用法是傳遞一個小函式當作引" -"數:\n" -"\n" -"::" +"數: ::" #: ../../tutorial/controlflow.rst:986 msgid "Documentation Strings" @@ -1207,10 +1091,7 @@ msgstr "" #: ../../tutorial/controlflow.rst:1019 msgid "Here is an example of a multi-line docstring::" -msgstr "" -"下面是多行說明字串的一個範例:\n" -"\n" -"::" +msgstr "下面是多行說明字串的一個範例: ::" #: ../../tutorial/controlflow.rst:1037 msgid "Function Annotations" @@ -1241,9 +1122,7 @@ msgstr "" "定義方式是在參數名稱後加一個冒號,冒號後面跟著一個對註釋求值的運算式。回傳註" "釋的定義方式是在參數列表和 :keyword:`def` 陳述式結尾的冒號中間,用一個 ``-" ">`` 文字接著一個運算式。以下範例註釋了一個必要引數、一個選擇性引數,以及回傳" -"值:\n" -"\n" -"::" +"值: ::" #: ../../tutorial/controlflow.rst:1071 msgid "Intermezzo: Coding Style" @@ -1359,9 +1238,9 @@ msgid "" "a mutable object is passed, the caller will see any changes the callee makes " "to it (items inserted into a list)." msgstr "" -"實際上,\\ *傳址呼叫 (call by object reference)* 的說法可能較為貼切。因為,若" -"傳遞的是一個可變物件時,呼叫者將看得見被呼叫者對物件做出的任何改變(例如被插" -"入 list 內的新項目)。" +"實際上,*傳址呼叫 (call by object reference)* 的說法可能較為貼切。因為,若傳" +"遞的是一個可變物件時,呼叫者將看得見被呼叫者對物件做出的任何改變(例如被插入 " +"list 內的新項目)。" #: ../../tutorial/controlflow.rst:48 msgid "statement" @@ -1422,17 +1301,3 @@ msgstr "coding(程式編寫)" #: ../../tutorial/controlflow.rst:1074 msgid "style" msgstr "style(風格)" - -#~ msgid "" -#~ "Loop statements may have an :keyword:`!else` clause; it is executed when " -#~ "the loop terminates through exhaustion of the iterable (with :keyword:" -#~ "`for`) or when the condition becomes false (with :keyword:`while`), but " -#~ "not when the loop is terminated by a :keyword:`break` statement. This is " -#~ "exemplified by the following loop, which searches for prime numbers::" -#~ msgstr "" -#~ "迴圈陳述式可以帶有一個 :keyword:`!else` 子句。當迴圈用盡所有的 iterable " -#~ "(在 :keyword:`for` 中)或條件為假(在 :keyword:`while` 中)時,這個子句會" -#~ "被執行;但迴圈被 :keyword:`break` 陳述式終止時則不會執行。底下尋找質數的迴" -#~ "圈即示範了這個行為:\n" -#~ "\n" -#~ "::" diff --git a/tutorial/errors.po b/tutorial/errors.po index 2e94ac8397..158e084b49 100644 --- a/tutorial/errors.po +++ b/tutorial/errors.po @@ -78,8 +78,8 @@ msgid "" "here::" msgstr "" "即使一段陳述式或運算式使用了正確的語法,嘗試執行時仍可能導致錯誤。執行時檢測" -"到的錯誤稱為\\ *例外*\\ ,例外不一定都很嚴重:你很快就能學會在 Python 程式中" -"如何處理它們。不過大多數的例外不會被程式處理,並且會顯示如下的錯誤訊息: ::" +"到的錯誤稱為\\ *例外*,例外不一定都很嚴重:你很快就能學會在 Python 程式中如何" +"處理它們。不過大多數的例外不會被程式處理,並且會顯示如下的錯誤訊息: ::" #: ../../tutorial/errors.rst:58 msgid "" @@ -224,8 +224,8 @@ msgid "" "exception's *arguments*. The presence and types of the arguments depend on " "the exception type." msgstr "" -"當例外發生時,它可能有相關聯的值,也就是例外的\\ *引數*\\ 。引數的存在與否及" -"它的類型,是取決於例外的類型。" +"當例外發生時,它可能有相關聯的值,也就是例外的\\ *引數*。引數的存在與否及它的" +"類型,是取決於例外的類型。" #: ../../tutorial/errors.rst:153 msgid "" diff --git a/tutorial/floatingpoint.po b/tutorial/floatingpoint.po index 531e67b37a..faa143c4b4 100644 --- a/tutorial/floatingpoint.po +++ b/tutorial/floatingpoint.po @@ -38,8 +38,8 @@ msgid "" msgstr "" "在計算機架構中,浮點數 (floating-point number) 是以基數為 2(二進位)的小數表" "示。例如說,在\\ **十進位**\\ 小數中 ``0.625`` 可被分為 6/10 + 2/100 + " -"5/1000,同樣的道理,\\ **二進位**\\ 小數 ``0.101`` 可被分為 1/2 + 0/4 + 1/8。" -"這兩個小數有相同的數值,而唯一真正的不同在於前者以十進位表示,後者以二進位表" +"5/1000,同樣的道理,**二進位**\\ 小數 ``0.101`` 可被分為 1/2 + 0/4 + 1/8。這" +"兩個小數有相同的數值,而唯一真正的不同在於前者以十進位表示,後者以二進位表" "示。" #: ../../tutorial/floatingpoint.rst:23 @@ -58,16 +58,11 @@ msgid "" "fraction 1/3. You can approximate that as a base 10 fraction::" msgstr "" "在十進位中,這個問題更容易被理解。以分數 1/3 為例,你可以將其近似為十進位小" -"數:\n" -"\n" -"::" +"數: ::" #: ../../tutorial/floatingpoint.rst:33 ../../tutorial/floatingpoint.rst:37 msgid "or, better, ::" -msgstr "" -"或者,更好的近似:\n" -"\n" -"::" +msgstr "或者,更好的近似: ::" #: ../../tutorial/floatingpoint.rst:41 msgid "" @@ -85,9 +80,7 @@ msgid "" "base 2, 1/10 is the infinitely repeating fraction ::" msgstr "" "同樣的道理,不論你願意以多少位數表示二進位小數,十進位小數 0.1 都無法被二進位" -"小數精準地表達。在二進位小數中,1/10 會是一個無限循環小數:\n" -"\n" -"::" +"小數精準地表達。在二進位小數中,1/10 會是一個無限循環小數: ::" #: ../../tutorial/floatingpoint.rst:51 msgid "" @@ -114,9 +107,7 @@ msgstr "" "由於數值顯示的方式,很多使用者並沒有發現數值是個近似值。Python 只會印出一個十" "進位近似值,其近似了儲存在計算機中的二進位近似值的真正十進位數值。在大多數的" "計算機中,如果 Python 真的會印出完整的十進位數值,其表示儲存在計算機中的 0.1 " -"的二進位近似值,它將顯示為:\n" -"\n" -"::" +"的二進位近似值,它將顯示為: ::" #: ../../tutorial/floatingpoint.rst:67 msgid "" @@ -213,9 +204,7 @@ msgid "" "the :func:`math.isclose` function can be useful for comparing inexact values:" msgstr "" "雖然數字不會再更接近他們的精準數值,但 :func:`math.isclose` 函式可以用來比較" -"不精確的值:\n" -"\n" -"::" +"不精確的值: ::" #: ../../tutorial/floatingpoint.rst:139 msgid "" @@ -403,16 +392,11 @@ msgstr "" "754 binary64 標準中的「雙精度 (double precision)」來作為 Python 的 float。" "IEEE 754 binary64 的值包含 53 位元的精度,所以在輸入時,電腦會努力把 0.1 轉換" "到最接近的分數,以 *J*/2**\\ *N* 的形式表示,此處 *J* 是一個正好包含 53 位元" -"的整數。可以將:\n" -"\n" -"::" +"的整數。可以將: ::" #: ../../tutorial/floatingpoint.rst:282 msgid "as ::" -msgstr "" -"重寫為:\n" -"\n" -"::" +msgstr "重寫為: ::" #: ../../tutorial/floatingpoint.rst:286 msgid "" @@ -440,18 +424,12 @@ msgstr "由於餘數超過 10 的一半,所以最佳的近似值是透過進 msgid "" "Therefore the best possible approximation to 1/10 in IEEE 754 double " "precision is::" -msgstr "" -"所以,在 IEEE 754 雙精度下,1/10 的最佳近似值是:\n" -"\n" -"::" +msgstr "所以,在 IEEE 754 雙精度下,1/10 的最佳近似值是: ::" #: ../../tutorial/floatingpoint.rst:318 msgid "" "Dividing both the numerator and denominator by two reduces the fraction to::" -msgstr "" -"將分子和分母同除以二,會約分為:\n" -"\n" -"::" +msgstr "將分子和分母同除以二,會約分為: ::" #: ../../tutorial/floatingpoint.rst:322 msgid "" @@ -468,9 +446,7 @@ msgid "" "given above, the best IEEE 754 double approximation it can get:" msgstr "" "所以電腦從來沒有「看到」1/10:它看到的是上述的精準分數,也就是它能得到的 " -"IEEE 754 double 最佳近似值:\n" -"\n" -"::" +"IEEE 754 double 最佳近似值: ::" #: ../../tutorial/floatingpoint.rst:334 msgid "" diff --git a/tutorial/inputoutput.po b/tutorial/inputoutput.po index 10e390065f..ef3ac5c59b 100644 --- a/tutorial/inputoutput.po +++ b/tutorial/inputoutput.po @@ -257,13 +257,12 @@ msgstr "" "用 '**' 符號,把 ``table`` 字典當作關鍵字引數來傳遞,也有一樣的結果。 ::" #: ../../tutorial/inputoutput.rst:206 -#, fuzzy msgid "" "This is particularly useful in combination with the built-in function :func:" "`vars`, which returns a dictionary containing all local variables::" msgstr "" "與內建函式 :func:`vars` 組合使用時,這種方式特別實用。該函式可以回傳一個包含" -"所有區域變數的 dictionary。" +"所有區域變數的 dictionary: ::" #: ../../tutorial/inputoutput.rst:214 msgid "" @@ -326,7 +325,6 @@ msgid "Old string formatting" msgstr "格式化字串的舊方法" #: ../../tutorial/inputoutput.rst:282 -#, fuzzy msgid "" "The % operator (modulo) can also be used for string formatting. Given " "``format % values`` (where *format* is a string), ``%`` conversion " @@ -334,9 +332,9 @@ msgid "" "*values*. This operation is commonly known as string interpolation. For " "example::" msgstr "" -"% 運算子(modulo,模數)也可用於字串格式化。在 ``'string' % values`` 中," -"``string`` 中所有的 ``%`` 會被 ``values`` 的零個或多個元素所取代。此運算常被" -"稱為字串插值 (string interpolation)。例如: ::" +"% 運算子(modulo,模數)也可用於字串格式化。在 ``format % values`` 中(其中 " +"*format* 是個字串),*format* 內的 ``%`` 轉換規格會被 *values* 的零個或多個元" +"素所取代。此運算常被稱為字串插值 (string interpolation)。例如: ::" #: ../../tutorial/inputoutput.rst:293 msgid "" diff --git a/tutorial/interactive.po b/tutorial/interactive.po index 7725c15ae5..f95e9e3326 100644 --- a/tutorial/interactive.po +++ b/tutorial/interactive.po @@ -56,14 +56,14 @@ msgid "" "during the next interactive interpreter session." msgstr "" "在直譯器啟動的時候,變數和模組名稱的自動完成功能會被\\ :ref:`自動啟用 " -"`\\ ,所以可以用 :kbd:`Tab` 鍵來呼叫自動完成函式;它會查" -"看 Python 的陳述式名稱、當前區域變數名稱和可用模組名稱。對於像是 ``string." -"a`` 的點分隔運算式 (dotted expression),它會對最後一個 ``'.'`` 之前的運算式求" -"值,然後根據求值結果物件的屬性,給予自動完成的建議。請注意,如果一個物件有 :" -"meth:`~object.__getattr__` method(方法),同時又是該運算式的一部份,這樣可能" -"會執行應用程式自定義的程式碼。預設設定也會把你的指令歷史記錄儲存在你的使用者" -"資料夾內,一個名為 :file:`.python_history` 的檔案中。在下一次啟動互動式直譯器" -"時,這些歷史記錄依然可以被使用。" +"`,所以可以用 :kbd:`Tab` 鍵來呼叫自動完成函式;它會查看 " +"Python 的陳述式名稱、當前區域變數名稱和可用模組名稱。對於像是 ``string.a`` 的" +"點分隔運算式 (dotted expression),它會對最後一個 ``'.'`` 之前的運算式求值,然" +"後根據求值結果物件的屬性,給予自動完成的建議。請注意,如果一個物件有 :meth:" +"`~object.__getattr__` method(方法),同時又是該運算式的一部份,這樣可能會執" +"行應用程式自定義的程式碼。預設設定也會把你的指令歷史記錄儲存在你的使用者資料" +"夾內,一個名為 :file:`.python_history` 的檔案中。在下一次啟動互動式直譯器時," +"這些歷史記錄依然可以被使用。" #: ../../tutorial/interactive.rst:36 msgid "Alternatives to the Interactive Interpreter" @@ -92,6 +92,6 @@ msgid "" "customized and embedded into other applications. Another similar enhanced " "interactive environment is bpython_." msgstr "" -"有一個功能增強的互動式直譯器替代方案,已經存在一段時間,稱為 IPython_\\ ,它" -"具有 Tab 鍵自動完成、物件探索和進階歷史記錄管理等特色。它也可以完全客製化並被" -"嵌入到其他應用程式中。另一個類似的增強型互動式環境,稱為 bpython_\\ 。" +"有一個功能增強的互動式直譯器替代方案,已經存在一段時間,稱為 IPython_,它具" +"有 Tab 鍵自動完成、物件探索和進階歷史記錄管理等特色。它也可以完全客製化並被嵌" +"入到其他應用程式中。另一個類似的增強型互動式環境,稱為 bpython_。" diff --git a/tutorial/interpreter.po b/tutorial/interpreter.po index ba971521ee..3e01d7bfc2 100644 --- a/tutorial/interpreter.po +++ b/tutorial/interpreter.po @@ -45,8 +45,8 @@ msgid "" "local Python guru or system administrator. (E.g., :file:`/usr/local/python` " "is a popular alternative location.)" msgstr "" -"能啟動 Python [#]_\\ 。因為直譯器存放的目錄是個安裝選項,其他的目錄也是有可能" -"的;請洽談在地的 Python 達人或者系統管理員。(例如:\\ :file:`/usr/local/" +"能啟動 Python [#]_。因為直譯器存放的目錄是個安裝選項,其他的目錄也是有可能" +"的;請洽談在地的 Python 達人或者系統管理員。(例如::file:`/usr/local/" "python` 是個很常見的另類存放路徑。)" #: ../../tutorial/interpreter.rst:26 @@ -59,8 +59,8 @@ msgid "" msgstr "" "Windows 系統中,從 :ref:`Microsoft Store ` 安裝 Python 後,就" "可以使用 :file:`python3.12` 命令了。如果安裝了 :ref:`py.exe launcher " -"` ,則可以使用 :file:`py` 命令。請參閱附錄:\\ :ref:`setting-" -"envvars`\\ ,了解其他啟動 Python 的方式。" +"` ,則可以使用 :file:`py` 命令。請參閱附錄::ref:`setting-" +"envvars`,了解其他啟動 Python 的方式。" #: ../../tutorial/interpreter.rst:31 msgid "" @@ -88,10 +88,9 @@ msgstr "" "直譯器的指令列編輯功能有很多,在支援 `GNU Readline `_ 函式庫的系統上包含:互動編輯、歷史取代、指令" "補完等功能。最快檢查有無支援指令列編輯的方法為:在第一個 Python 提示符後輸" -"入 :kbd:`Control-P`\\ ,如果出現嗶嗶聲,就代表有支援;見附錄\\ :ref:`tut-" -"interacting`\\ 介紹相關的快速鍵。如果什麼事都沒有發生,或者出現一個 " -"``^P``\\ ,就代表並沒有指令列編輯功能;此時只能使用 backspace 去除該行的字" -"元。" +"入 :kbd:`Control-P`,如果出現嗶嗶聲,就代表有支援;見附錄\\ :ref:`tut-" +"interacting`\\ 介紹相關的快速鍵。如果什麼事都沒有發生,或者出現一個 ``^P``," +"就代表並沒有指令列編輯功能;此時只能使用 backspace 去除該行的字元。" #: ../../tutorial/interpreter.rst:46 msgid "" @@ -112,7 +111,7 @@ msgid "" "characters that are special to the shell, it is usually advised to quote " "*command* in its entirety." msgstr "" -"另一個啟動直譯器的方式為 ``python -c command [arg] ...``\\ ,它會執行在 " +"另一個啟動直譯器的方式為 ``python -c command [arg] ...``,它會執行在 " "*command* 裡的指令(們),行為如同 shell 的 :option:`-c` 選項。因為 Python 的" "指令包含空白等 shell 用到的特殊字元,通常建議用引號把 *command* 包起來。" @@ -132,11 +131,11 @@ msgid "" "option:`-i` before the script." msgstr "" "當要執行一個腳本檔時,有時候會希望在腳本結束時進入互動模式。此時可在執行腳本" -"的指令加入 :option:`-i`\\ 。" +"的指令加入 :option:`-i`。" #: ../../tutorial/interpreter.rst:65 msgid "All command line options are described in :ref:`using-on-general`." -msgstr "所有指令可用的參數都詳記在\\ :ref:`using-on-general`\\ 。" +msgstr "所有指令可用的參數都詳記在\\ :ref:`using-on-general`。" #: ../../tutorial/interpreter.rst:71 msgid "Argument Passing" @@ -160,12 +159,11 @@ msgstr "" "當直擇器收到腳本的名稱和額外的引數後,他們會轉換為由字串所組成的 list(串列)" "並指派給 ``sys`` 模組的 ``argv`` 變數。你可以執行 ``import sys`` 取得這個串" "列。這個串列的長度至少為一;當沒有給任何腳本名稱和引數時, ``sys.argv[0]`` 為" -"空字串。當腳本名為 ``'-'``\\ (指標準輸入)時, ``sys.argv[0]`` 為 " -"``'-'``\\ 。當使用 :option:`-c` *command* 時, ``sys.argv[0]`` 為 ``'-" -"c'``\\ 。當使用 :option:`-m` *module* 時, ``sys.argv[0]`` 為該模組存在的完整" -"路徑。其餘非 :option:`-c` *command* 或 :option:`-m` *module* 的選項不會被 " -"Python 直譯器吸收掉,而是留在 ``sys.argv`` 變數中給後續的 command 或 module " -"使用。" +"空字串。當腳本名為 ``'-'``\\ (指標準輸入)時, ``sys.argv[0]`` 為 ``'-'``。" +"當使用 :option:`-c` *command* 時, ``sys.argv[0]`` 為 ``'-c'``。當使用 :" +"option:`-m` *module* 時, ``sys.argv[0]`` 為該模組存在的完整路徑。其餘非 :" +"option:`-c` *command* 或 :option:`-m` *module* 的選項不會被 Python 直譯器吸收" +"掉,而是留在 ``sys.argv`` 變數中給後續的 command 或 module 使用。" #: ../../tutorial/interpreter.rst:89 msgid "Interactive Mode" @@ -181,12 +179,10 @@ msgid "" "number and a copyright notice before printing the first prompt:" msgstr "" "在終端 (tty) 輸入並執行指令時,直譯器在\\ *互動模式(interactive mode)*\\ 中" -"運行。在這種模式中,會顯示\\ *主提示符*\\ ,提示輸入下一條指令,主提示符通常" -"用三個大於號(``>>>``)表示;輸入連續行時,顯示\\ *次要提示符*\\ ,預設是三個" -"點(``...``)。進入直譯器時,首先顯示歡迎訊息、版本訊息、版權聲明,然後才是提" -"示符:\n" -"\n" -"::" +"運行。在這種模式中,會顯示\\ *主提示符*,提示輸入下一條指令,主提示符通常用三" +"個大於號(``>>>``)表示;輸入連續行時,顯示\\ *次要提示符*,預設是三個點" +"(``...``)。進入直譯器時,首先顯示歡迎訊息、版本訊息、版權聲明,然後才是提示" +"符: ::" #: ../../tutorial/interpreter.rst:108 msgid "" @@ -194,13 +190,11 @@ msgid "" "example, take a look at this :keyword:`if` statement::" msgstr "" "接續多行的情況出現在需要多行才能建立完整指令時。舉例來說,像是 :keyword:`if` " -"敘述:\n" -"\n" -"::" +"敘述: ::" #: ../../tutorial/interpreter.rst:118 msgid "For more on interactive mode, see :ref:`tut-interac`." -msgstr "更多有關互動模式的使用,請見\\ :ref:`tut-interac`\\ 。" +msgstr "更多有關互動模式的使用,請見\\ :ref:`tut-interac`。" #: ../../tutorial/interpreter.rst:124 msgid "The Interpreter and Its Environment" @@ -232,22 +226,17 @@ msgid "" "should be added as the *first* line of the file. The syntax is as follows::" msgstr "" "如果不使用預設編碼,則要聲明檔案的編碼,檔案的\\ *第一*\\ 行要寫成特殊註解。" -"語法如下:\n" -"\n" -"::" +"語法如下: ::" #: ../../tutorial/interpreter.rst:145 msgid "where *encoding* is one of the valid :mod:`codecs` supported by Python." -msgstr "其中, *encoding* 可以是 Python 支援的任意一種 :mod:`codecs`\\ 。" +msgstr "其中, *encoding* 可以是 Python 支援的任意一種 :mod:`codecs`。" #: ../../tutorial/interpreter.rst:147 msgid "" "For example, to declare that Windows-1252 encoding is to be used, the first " "line of your source code file should be::" -msgstr "" -"比如,聲明使用 Windows-1252 編碼,源碼檔案要寫成:\n" -"\n" -"::" +msgstr "比如,聲明使用 Windows-1252 編碼,源碼檔案要寫成: ::" #: ../../tutorial/interpreter.rst:152 msgid "" @@ -256,9 +245,7 @@ msgid "" "declaration should be added as the second line of the file. For example::" msgstr "" "*第一行*\\ 的規則也有一種例外情況,在源碼以 :ref:`UNIX \"shebang\" line ` 行開頭時。此時,編碼聲明要寫在檔案的第二行。例如:\n" -"\n" -"::" +"scripts>` 行開頭時。此時,編碼聲明要寫在檔案的第二行。例如: ::" #: ../../tutorial/interpreter.rst:160 msgid "Footnotes" diff --git a/tutorial/introduction.po b/tutorial/introduction.po index 301693f800..46d04b3cfb 100644 --- a/tutorial/introduction.po +++ b/tutorial/introduction.po @@ -238,9 +238,9 @@ msgid "" "included in the string, but it's possible to prevent this by adding a ``\\`` " "at the end of the line. The following example::" msgstr "" -"字串文本可以跨越數行。其中一方式是使用三個重覆引號:\\ ``\"\"\"...\"\"\"`` " -"或 ``'''...'''``。此時換行會被自動加入字串值中,但也可以在換行前加入 ``\\`` " -"來取消這個行為。在以下的例子中: ::" +"字串文本可以跨越數行。其中一方式是使用三個重覆引號:``\"\"\"...\"\"\"`` 或 " +"``'''...'''``。此時換行會被自動加入字串值中,但也可以在換行前加入 ``\\`` 來取" +"消這個行為。在以下的例子中: ::" #: ../../tutorial/introduction.rst:208 msgid "" @@ -565,12 +565,12 @@ msgid "" "(since the parser cannot guess when you have typed the last line). Note " "that each line within a basic block must be indented by the same amount." msgstr "" -"迴圈的主體會\\ *縮排*\\ :縮排在 Python 中用來關連一群陳述式。在互動式提示字" -"元中,你必須在迴圈內的每一行一開始鍵入 tab 或者(數個)空白來維持縮排。實務" -"上,你會先在文字編輯器中準備好比較複雜的輸入;多數編輯器都有自動縮排的功能。" -"當一個複合陳述式以互動地方式輸入,必須在結束時多加一行空行來代表結束(因為語" -"法剖析器無法判斷你何時輸入複合陳述的最後一行)。注意在一個縮排段落內的縮排方" -"式與數量必須維持一致。" +"迴圈的主體會\\ *縮排*:縮排在 Python 中用來關連一群陳述式。在互動式提示字元" +"中,你必須在迴圈內的每一行一開始鍵入 tab 或者(數個)空白來維持縮排。實務上," +"你會先在文字編輯器中準備好比較複雜的輸入;多數編輯器都有自動縮排的功能。當一" +"個複合陳述式以互動地方式輸入,必須在結束時多加一行空行來代表結束(因為語法剖" +"析器無法判斷你何時輸入複合陳述的最後一行)。注意在一個縮排段落內的縮排方式與" +"數量必須維持一致。" #: ../../tutorial/introduction.rst:544 msgid "" diff --git a/tutorial/modules.po b/tutorial/modules.po index a392be2da3..82d93621b9 100644 --- a/tutorial/modules.po +++ b/tutorial/modules.po @@ -103,8 +103,8 @@ msgid "" "[#]_ (They are also run if the file is executed as a script.)" msgstr "" "模組可以包含可執行的陳述式以及函式的定義。這些陳述式是作為模組的初始化,它們" -"只會在\\ *第一次*\\ 被 import 時才會執行。\\ [#]_\\ (如果檔案被當成腳本執" -"行,也會執行它們)。" +"只會在\\ *第一次*\\ 被 import 時才會執行。[#]_\\ (如果檔案被當成腳本執行,也" +"會執行它們)。" #: ../../tutorial/modules.rst:79 msgid "" @@ -442,9 +442,7 @@ msgid "" msgstr "" "變數 ``sys.path`` 是一個字串 list,它決定直譯器的模組搜尋路徑。它的初始值為環" "境變數 :envvar:`PYTHONPATH` 中提取的預設路徑,或是當 :envvar:`PYTHONPATH` 未" -"設定時,從內建預設值提取。你可以用標準的 list 操作修改該變數:\n" -"\n" -"::" +"設定時,從內建預設值提取。你可以用標準的 list 操作修改該變數: ::" #: ../../tutorial/modules.rst:307 msgid "The :func:`dir` Function" @@ -475,9 +473,7 @@ msgid "" "`builtins`::" msgstr "" ":func:`dir` 不會列出內建函式和變數的名稱。如果你想要列出它們,它們被定義在標" -"準模組 :mod:`builtins` 內:\n" -"\n" -"::" +"準模組 :mod:`builtins` 內: ::" #: ../../tutorial/modules.rst:389 msgid "Packages" @@ -545,26 +541,18 @@ msgstr "" msgid "" "Users of the package can import individual modules from the package, for " "example::" -msgstr "" -"套件使用者可以從套件中 import 個別模組,例如:\n" -"\n" -"::" +msgstr "套件使用者可以從套件中 import 個別模組,例如: ::" #: ../../tutorial/modules.rst:452 msgid "" "This loads the submodule :mod:`!sound.effects.echo`. It must be referenced " "with its full name. ::" msgstr "" -"這樣就載入了子模組 :mod:`!sound.effects.echo`。引用時必須用它的全名:\n" -"\n" -"::" +"這樣就載入了子模組 :mod:`!sound.effects.echo`。引用時必須用它的全名: ::" #: ../../tutorial/modules.rst:457 msgid "An alternative way of importing the submodule is::" -msgstr "" -"另一種 import 子模組的方法是:\n" -"\n" -"::" +msgstr "另一種 import 子模組的方法是: ::" #: ../../tutorial/modules.rst:461 msgid "" @@ -572,18 +560,13 @@ msgid "" "its package prefix, so it can be used as follows::" msgstr "" "這段程式碼一樣可以載入子模組 :mod:`!echo`,並且不加套件前綴也可以使用,因此能" -"以如下方式使用:\n" -"\n" -"::" +"以如下方式使用: ::" #: ../../tutorial/modules.rst:466 msgid "" "Yet another variation is to import the desired function or variable " "directly::" -msgstr "" -"另一種變化是直接 import 所需的函式或變數:\n" -"\n" -"::" +msgstr "另一種變化是直接 import 所需的函式或變數: ::" #: ../../tutorial/modules.rst:470 msgid "" @@ -591,9 +574,7 @@ msgid "" "func:`!echofilter` directly available::" msgstr "" "同樣地,這樣也會載入子模組 :mod:`!echo`,但它的函式 :func:`!echofilter` 就可" -"以直接使用:\n" -"\n" -"::" +"以直接使用: ::" #: ../../tutorial/modules.rst:475 msgid "" @@ -654,9 +635,7 @@ msgstr "" "list,若遇到 ``from package import *`` 的時候,它就會是要被 import 的模組名" "稱。發布套件的新版本時,套件作者可自行決定是否更新此 list。如果套件作者認為沒" "有人會從他的套件中 import \\*,他也可能會決定不支援這個 list。舉例來說,:" -"file:`sound/effects/__init__.py` 檔案可包含以下程式碼:\n" -"\n" -"::" +"file:`sound/effects/__init__.py` 檔案可包含以下程式碼: ::" #: ../../tutorial/modules.rst:513 msgid "" @@ -698,9 +677,7 @@ msgstr "" "保證 :mod:`!sound.effects` 套件有被 import(可能會運行 :file:`__init__.py` 中" "的初始化程式碼),然後 import 套件中被定義的全部名稱。這包含 :file:`__init__." "py` 定義(以及被明確載入的子模組)的任何名稱。它也包括任何之前被 :keyword:" -"`import` 陳述式明確載入的套件子模組。請看以下程式碼:\n" -"\n" -"::" +"`import` 陳述式明確載入的套件子模組。請看以下程式碼: ::" #: ../../tutorial/modules.rst:545 msgid "" @@ -758,9 +735,7 @@ msgid "" msgstr "" "你也可以用 ``from module import name`` 的 import 陳述式,編寫「相對 " "(relative) import」。這些 import 使用前導句號指示相對 import 中的當前套件和母" -"套件。例如,在 :mod:`!urround` 模組中,你可以使用:\n" -"\n" -"::" +"套件。例如,在 :mod:`!urround` 模組中,你可以使用: ::" #: ../../tutorial/modules.rst:580 msgid "" diff --git a/tutorial/stdlib.po b/tutorial/stdlib.po index 782d7448b2..25080cb3a9 100644 --- a/tutorial/stdlib.po +++ b/tutorial/stdlib.po @@ -38,10 +38,7 @@ msgstr "作業系統介面" msgid "" "The :mod:`os` module provides dozens of functions for interacting with the " "operating system::" -msgstr "" -":mod:`os` 模組提供了數十個與作業系統溝通的函式:\n" -"\n" -"::" +msgstr ":mod:`os` 模組提供了數十個與作業系統溝通的函式: ::" #: ../../tutorial/stdlib.rst:23 msgid "" @@ -58,18 +55,14 @@ msgid "" "interactive aids for working with large modules like :mod:`os`::" msgstr "" "在使用 :mod:`os` 諸如此類大型模組時搭配內建函式 :func:`dir` 和 :func:`help` " -"是非常有用的:\n" -"\n" -"::" +"是非常有用的: ::" #: ../../tutorial/stdlib.rst:38 msgid "" "For daily file and directory management tasks, the :mod:`shutil` module " "provides a higher level interface that is easier to use::" msgstr "" -"對於日常檔案和目錄管理任務,:mod:`shutil` 模組提供了更容易使用的高階介面:\n" -"\n" -"::" +"對於日常檔案和目錄管理任務,:mod:`shutil` 模組提供了更容易使用的高階介面: ::" #: ../../tutorial/stdlib.rst:51 msgid "File Wildcards" @@ -80,9 +73,7 @@ msgid "" "The :mod:`glob` module provides a function for making file lists from " "directory wildcard searches::" msgstr "" -":mod:`glob` 模組提供了一函式可以從目錄萬用字元中搜尋並產生檔案列表:\n" -"\n" -"::" +":mod:`glob` 模組提供了一函式可以從目錄萬用字元中搜尋並產生檔案列表: ::" #: ../../tutorial/stdlib.rst:64 msgid "Command Line Arguments" @@ -95,9 +86,7 @@ msgid "" "For instance, let's take the following :file:`demo.py` file::" msgstr "" "通用工具腳本常需要處理命令列引數。這些引數會以 list(串列)形式存放在 :mod:" -"`sys` 模組的 *argv* 屬性中。例如以下 :file:`demo.py` 檔案:\n" -"\n" -"::" +"`sys` 模組的 *argv* 屬性中。例如以下 :file:`demo.py` 檔案: ::" #: ../../tutorial/stdlib.rst:74 msgid "" @@ -112,9 +101,7 @@ msgid "" "filenames and an optional number of lines to be displayed::" msgstr "" ":mod:`argparse` 模組提供了一種更複雜的機制來處理命令列引數。以下腳本可擷取一" -"個或多個檔案名稱,並可選擇要顯示的行數:\n" -"\n" -"::" +"個或多個檔案名稱,並可選擇要顯示的行數: ::" #: ../../tutorial/stdlib.rst:93 msgid "" @@ -137,9 +124,7 @@ msgid "" "make them visible even when *stdout* has been redirected::" msgstr "" ":mod:`sys` 模組也有 *stdin*,*stdout*,和 *stderr* 等屬性。即使當 *stdout* 被" -"重新導向時,後者 *stderr* 可輸出警告和錯誤訊息:\n" -"\n" -"::" +"重新導向時,後者 *stderr* 可輸出警告和錯誤訊息: ::" #: ../../tutorial/stdlib.rst:110 msgid "The most direct way to terminate a script is to use ``sys.exit()``." @@ -156,9 +141,7 @@ msgid "" "succinct, optimized solutions::" msgstr "" ":mod:`re` 模組提供正規表示式 (regular expression) 做進階的字串處理。當要處理" -"複雜的比對以及操作時,正規表示式是簡潔且經過最佳化的解決方案:\n" -"\n" -"::" +"複雜的比對以及操作時,正規表示式是簡潔且經過最佳化的解決方案: ::" #: ../../tutorial/stdlib.rst:128 msgid "" @@ -166,9 +149,7 @@ msgid "" "because they are easier to read and debug::" msgstr "" "當只需要簡單的字串操作時,因為可讀性以及方便除錯,字串本身的 method 是比較建" -"議的:\n" -"\n" -"::" +"議的: ::" #: ../../tutorial/stdlib.rst:138 msgid "Mathematics" @@ -178,17 +159,11 @@ msgstr "數學相關" msgid "" "The :mod:`math` module gives access to the underlying C library functions " "for floating point math::" -msgstr "" -":mod:`math` 模組提供了 C 函式庫中底層的浮點數運算的函式:\n" -"\n" -"::" +msgstr ":mod:`math` 模組提供了 C 函式庫中底層的浮點數運算的函式: ::" #: ../../tutorial/stdlib.rst:149 msgid "The :mod:`random` module provides tools for making random selections::" -msgstr "" -":mod:`random` 模組提供了隨機選擇的工具:\n" -"\n" -"::" +msgstr ":mod:`random` 模組提供了隨機選擇的工具: ::" #: ../../tutorial/stdlib.rst:161 msgid "" @@ -196,9 +171,7 @@ msgid "" "mean, median, variance, etc.) of numeric data::" msgstr "" ":mod:`statistics` 模組提供了替數值資料計算基本統計量(包括平均、中位數、變異" -"量數等)的功能:\n" -"\n" -"::" +"量數等)的功能: ::" #: ../../tutorial/stdlib.rst:173 msgid "" @@ -217,9 +190,7 @@ msgid "" "retrieving data from URLs and :mod:`smtplib` for sending mail::" msgstr "" "Python 中有許多存取網路以及處理網路協定。最簡單的兩個例子包括 :mod:`urllib." -"request` 模組可以從網址抓取資料以及 :mod:`smtplib` 可以用來寄郵件:\n" -"\n" -"::" +"request` 模組可以從網址抓取資料以及 :mod:`smtplib` 可以用來寄郵件: ::" #: ../../tutorial/stdlib.rst:204 msgid "(Note that the second example needs a mailserver running on localhost.)" @@ -278,9 +249,7 @@ msgid "" "`timeit` module quickly demonstrates a modest performance advantage::" msgstr "" "舉例來說,有人可能會試著用 tuple 的打包機制來交換引數代替傳統的方式。:mod:" -"`timeit` 模組可以迅速地展示效能的進步:\n" -"\n" -"::" +"`timeit` 模組可以迅速地展示效能的進步: ::" #: ../../tutorial/stdlib.rst:274 msgid "" @@ -317,9 +286,7 @@ msgstr "" ":mod:`doctest` 模組提供了一個工具,掃描模組並根據程式中內嵌的文件字串執行測" "試。撰寫測試如同簡單地將它的呼叫及輸出結果剪下並貼上到文件字串中。透過提供範" "例給使用者,它強化了說明文件,並允許 doctest 模組確認程式碼的結果與說明文件一" -"致:\n" -"\n" -"::" +"致: ::" #: ../../tutorial/stdlib.rst:306 msgid "" @@ -328,9 +295,7 @@ msgid "" "a separate file::" msgstr "" ":mod:`unittest` 模組不像 :mod:`doctest` 模組這般容易,但是它讓你可以在另外一" -"個檔案裡撰寫更完整的測試集:\n" -"\n" -"::" +"個檔案裡撰寫更完整的測試集: ::" #: ../../tutorial/stdlib.rst:328 msgid "Batteries Included" diff --git a/tutorial/stdlib2.po b/tutorial/stdlib2.po index 6aa9ebef8b..829836e8ee 100644 --- a/tutorial/stdlib2.po +++ b/tutorial/stdlib2.po @@ -44,9 +44,7 @@ msgid "" "abbreviated displays of large or deeply nested containers::" msgstr "" ":mod:`reprlib` 模組提供了一個 :func:`repr` 的版本,專門用來以簡短的形式顯示大" -"型或深層的巢狀容器:\n" -"\n" -"::" +"型或深層的巢狀容器: ::" #: ../../tutorial/stdlib2.rst:23 msgid "" @@ -57,18 +55,13 @@ msgid "" msgstr "" ":mod:`pprint` 模組能對內建和使用者自定的物件提供更複雜的列印控制,並且是以直" "譯器可讀的方式。當結果超過一行時,「漂亮的印表機」會加入換行和縮排,以更清楚" -"地顯示資料結構:\n" -"\n" -"::" +"地顯示資料結構: ::" #: ../../tutorial/stdlib2.rst:39 msgid "" "The :mod:`textwrap` module formats paragraphs of text to fit a given screen " "width::" -msgstr "" -":mod:`textwrap` 模組能夠格式化文本的段落,以符合指定的螢幕寬度:\n" -"\n" -"::" +msgstr ":mod:`textwrap` 模組能夠格式化文本的段落,以符合指定的螢幕寬度: ::" #: ../../tutorial/stdlib2.rst:53 msgid "" @@ -78,9 +71,7 @@ msgid "" msgstr "" ":mod:`locale` 模組能存取一個含有特定文化相關資料格式的資料庫。locale 模組的 " "format 函式有一個 grouping 屬性,可直接以群分隔符 (group separator) 將數字格" -"式化:\n" -"\n" -"::" +"式化: ::" #: ../../tutorial/stdlib2.rst:72 msgid "Templating" @@ -107,9 +98,7 @@ msgid "" msgstr "" "格式化方式是使用佔位符號名稱 (placeholder name),它是由 ``$`` 加上合法的 " "Python 識別符(字母、數字和下底線)構成。使用大括號包覆佔位符號以允許在後面接" -"上更多的字母和數字而無需插入空格。使用 ``$$`` 將會跳脫為單一字元 ``$``:\n" -"\n" -"::" +"上更多的字母和數字而無需插入空格。使用 ``$$`` 將會跳脫為單一字元 ``$``: ::" #: ../../tutorial/stdlib2.rst:88 msgid "" @@ -120,12 +109,10 @@ msgid "" "it will leave placeholders unchanged if data is missing::" msgstr "" "如果在 dictionary 或關鍵字引數中未提供某個佔位符號的值,那麼 :meth:`~string." -"Template.substitute` method 將引發 :exc:`KeyError`\\ 。對於郵件合併 (mail-" +"Template.substitute` method 將引發 :exc:`KeyError`。對於郵件合併 (mail-" "merge) 類型的應用程式,使用者提供的資料有可能是不完整的,此時使用 :meth:" "`~string.Template.safe_substitute` method 會更適當——如果資料有缺少,它會保持" -"佔位符號不變:\n" -"\n" -"::" +"佔位符號不變: ::" #: ../../tutorial/stdlib2.rst:103 msgid "" @@ -136,9 +123,7 @@ msgid "" msgstr "" "Template 的 subclass(子類別)可以指定自訂的分隔符號 (delimiter)。例如,一個" "相片瀏覽器的批次重新命名功能,可以選擇用百分號作為現在日期、照片序號或檔案格" -"式的佔位符號:\n" -"\n" -"::" +"式的佔位符號: ::" #: ../../tutorial/stdlib2.rst:126 msgid "" @@ -167,10 +152,8 @@ msgstr "" "式,用於處理可變動長度的二進制記錄格式。以下範例說明,如何在不使用 :mod:" "`zipfile` 模組的情況下,使用迴圈瀏覽一個 ZIP 檔案中的標頭資訊 (header " "information)。壓縮程式碼 ``\"H\"`` 和 ``\"I\"`` 分別代表兩個和四個位元組的無" -"符號數 (unsigned number)。\\ ``\"<\"`` 表示它們是標準大小,並使用小端 " -"(little-endian) 位元組順序:\n" -"\n" -"::" +"符號數 (unsigned number)。``\"<\"`` 表示它們是標準大小,並使用小端 (little-" +"endian) 位元組順序: ::" #: ../../tutorial/stdlib2.rst:167 msgid "Multi-threading" @@ -195,9 +178,7 @@ msgid "" "tasks in background while the main program continues to run::" msgstr "" "以下程式碼顯示了高階的 :mod:`threading` 模組如何在背景運行任務,而主程式同時" -"繼續運行:\n" -"\n" -"::" +"繼續運行: ::" #: ../../tutorial/stdlib2.rst:198 msgid "" @@ -236,9 +217,7 @@ msgid "" "stderr``::" msgstr "" ":mod:`logging` 模組提供功能齊全且富彈性的日誌記錄系統。在最簡單的情況下,日誌" -"訊息會被發送到檔案或 ``sys.stderr``:\n" -"\n" -"::" +"訊息會被發送到檔案或 ``sys.stderr``: ::" #: ../../tutorial/stdlib2.rst:226 msgid "This produces the following output:" @@ -256,9 +235,8 @@ msgstr "" "在預設情況,資訊和除錯訊息不會被顯示,其輸出會被發送到標準錯誤 (standard " "error)。其他輸出選項包括,將訊息轉發到電子郵件、資料報 (datagram)、網路插座 " "(socket) 或 HTTP 伺服器。新的過濾器可以根據訊息的優先順序,選擇不同的路由 " -"(routing) 方式:\\ :const:`~logging.DEBUG`\\ ,\\ :const:`~logging." -"INFO`\\ ,\\ :const:`~logging.WARNING`\\ ,\\ :const:`~logging.ERROR`\\ ," -"及 :const:`~logging.CRITICAL`\\ 。" +"(routing) 方式::const:`~logging.DEBUG`、:const:`~logging.INFO`、:const:" +"`~logging.WARNING`、:const:`~logging.ERROR` 及 :const:`~logging.CRITICAL`。" #: ../../tutorial/stdlib2.rst:241 msgid "" @@ -296,12 +274,10 @@ msgid "" msgstr "" "此方式對大多數應用程式來說都沒問題,但偶爾也需要在物件仍然被其他物件所使用時" "持續追蹤它們。可惜的是,儘管只是追蹤它們,也會建立一個使它們永久化 " -"(permanent) 的參照。\\ :mod:`weakref` 模組提供的工具可以不必建立參照就能追蹤" -"物件。當該物件不再被需要時,它會自動從一個弱引用表 (weakref table) 中被移除," -"並為弱引用物件觸發一個回呼 (callback)。典型的應用包括暫存 (cache) 那些成本較" -"為昂貴的物件:\n" -"\n" -"::" +"(permanent) 的參照。:mod:`weakref` 模組提供的工具可以不必建立參照就能追蹤物" +"件。當該物件不再被需要時,它會自動從一個弱引用表 (weakref table) 中被移除,並" +"為弱引用物件觸發一個回呼 (callback)。典型的應用包括暫存 (cache) 那些成本較為" +"昂貴的物件: ::" #: ../../tutorial/stdlib2.rst:290 msgid "Tools for Working with Lists" @@ -327,9 +303,7 @@ msgstr "" ":mod:`array` 模組提供了一個 :class:`~array.array()` 物件,它像是 list,但只能" "儲存同類的資料且能緊密地儲存。下面的範例展示一個數值陣列 (array),以兩個位元" "組的無符號二進數 (unsigned binary numbers) 為儲存單位(類型碼為 ``\"H\"``)," -"而在 Python 整數物件的正規 list 中,每個項目通常使用 16 個位元組:\n" -"\n" -"::" +"而在 Python 整數物件的正規 list 中,每個項目通常使用 16 個位元組: ::" #: ../../tutorial/stdlib2.rst:309 msgid "" @@ -341,9 +315,7 @@ msgstr "" ":mod:`collections` 模組提供了一個 :class:`~collections.deque()` 物件,它像是 " "list,但從左側加入 (append) 和彈出 (pop) 的速度較快,而在中間查找的速度則較" "慢。這種物件適用於實作佇列 (queue) 和廣度優先搜尋法 (breadth first tree " -"search):\n" -"\n" -"::" +"search): ::" #: ../../tutorial/stdlib2.rst:330 msgid "" @@ -352,9 +324,7 @@ msgid "" "sorted lists::" msgstr "" "除了替代的 list 實作以外,函式庫也提供了其他工具,例如 :mod:`bisect` 模組,具" -"有能夠操作 sorted list(已排序串列)的函式:\n" -"\n" -"::" +"有能夠操作 sorted list(已排序串列)的函式: ::" #: ../../tutorial/stdlib2.rst:340 msgid "" @@ -365,9 +335,7 @@ msgid "" msgstr "" ":mod:`heapq` 模組提供了一些函式,能基於正規 list 來實作堆積 (heap)。最小值的" "項目會永遠保持在位置零。對於一些需要多次存取最小元素,但不想要對整個 list 進" -"行排序的應用程式來說,這會很有用:\n" -"\n" -"::" +"行排序的應用程式來說,這會很有用: ::" #: ../../tutorial/stdlib2.rst:356 msgid "Decimal Floating Point Arithmetic" @@ -415,9 +383,7 @@ msgid "" msgstr "" "例如,要計算 70 美分的手機充電加上 5% 稅金的總價,使用十進制浮點數和二進制浮" "點數,會算出不同的答案。如果把計算結果四捨五入到最接近的美分,兩者的差異會更" -"顯著:\n" -"\n" -"::" +"顯著: ::" #: ../../tutorial/stdlib2.rst:380 msgid "" @@ -438,15 +404,10 @@ msgid "" "floating point::" msgstr "" "準確的表示法使得 :class:`~decimal.Decimal` class 能夠執行對於二進制浮點數不適" -"用的模數計算和相等性檢測:\n" -"\n" -"::" +"用的模數計算和相等性檢測: ::" #: ../../tutorial/stdlib2.rst:400 msgid "" "The :mod:`decimal` module provides arithmetic with as much precision as " "needed::" -msgstr "" -":mod:`decimal` 模組可提供運算中需要的足夠精確度:\n" -"\n" -"::" +msgstr ":mod:`decimal` 模組可提供運算中需要的足夠精確度: ::" diff --git a/tutorial/venv.po b/tutorial/venv.po index d5c0b6d443..613fa91909 100644 --- a/tutorial/venv.po +++ b/tutorial/venv.po @@ -80,7 +80,6 @@ msgid "Creating Virtual Environments" msgstr "建立虛擬環境" #: ../../tutorial/venv.rst:38 -#, fuzzy msgid "" "The module used to create and manage virtual environments is called :mod:" "`venv`. :mod:`venv` will install the Python version from which the command " diff --git a/using/cmdline.po b/using/cmdline.po index 2c74d49926..1a3a41009d 100644 --- a/using/cmdline.po +++ b/using/cmdline.po @@ -529,7 +529,7 @@ msgstr "" #: ../../using/cmdline.rst:410 msgid "See also :envvar:`PYTHONUNBUFFERED`." -msgstr "另請參閱 :envvar:`PYTHONUNBUFFERED`\\ 。" +msgstr "另請參閱 :envvar:`PYTHONUNBUFFERED`。" #: ../../using/cmdline.rst:412 msgid "The text layer of the stdout and stderr streams now is unbuffered." @@ -551,7 +551,7 @@ msgstr "" #: ../../using/cmdline.rst:427 msgid "See also :envvar:`PYTHONVERBOSE`." -msgstr "另請參閱 :envvar:`PYTHONVERBOSE`\\ 。" +msgstr "另請參閱 :envvar:`PYTHONVERBOSE`。" #: ../../using/cmdline.rst:433 msgid "" diff --git a/using/mac.po b/using/mac.po index a4b126dda2..cc6e83b9fa 100644 --- a/using/mac.po +++ b/using/mac.po @@ -206,8 +206,7 @@ msgstr "" #: ../../using/mac.rst:101 msgid "" "With Python 3.9, you can use either :program:`python` or :program:`pythonw`." -msgstr "" -"Python 3.9 上,你可以使用 :program:`python` 或者 :program:`pythonw`\\ 。" +msgstr "Python 3.9 上,你可以使用 :program:`python` 或者 :program:`pythonw`。" #: ../../using/mac.rst:105 msgid "Configuration" @@ -281,7 +280,7 @@ msgid "" "bundled with macOS by Apple, and the latest version can be downloaded and " "installed from https://www.activestate.com; it can also be built from source." msgstr "" -"標準的 Python GUI 工具套件是 :mod:`tkinter`\\ ,基於跨平臺的 Tk 工具套件 " +"標準的 Python GUI 工具套件是 :mod:`tkinter`,基於跨平臺的 Tk 工具套件 " "(https://www.tcl.tk)。Apple 的 macOS 包含了 Aqua 原生版本的 Tk,最新版本可以" "從 https://www.activestate.com 下載和安裝;它也可以從原始碼開始建置。" diff --git a/using/unix.po b/using/unix.po index c60e6b9d4a..88a296c2d0 100644 --- a/using/unix.po +++ b/using/unix.po @@ -93,24 +93,15 @@ msgstr "在 FreeBSD 和 OpenBSD 上" #: ../../using/unix.rst:42 msgid "FreeBSD users, to add the package use::" -msgstr "" -"FreeBSD 用戶應使用以下命令增加套件:\n" -"\n" -"::" +msgstr "FreeBSD 用戶應使用以下命令增加套件: ::" #: ../../using/unix.rst:46 msgid "OpenBSD users, to add the package use::" -msgstr "" -"OpenBSD 用戶應使用以下命令增加套件:\n" -"\n" -"::" +msgstr "OpenBSD 用戶應使用以下命令增加套件: ::" #: ../../using/unix.rst:52 msgid "For example i386 users get the 2.5.1 version of Python using::" -msgstr "" -"例如 i386 使用者要獲取 Python 2.5.1 的可用版本:\n" -"\n" -"::" +msgstr "例如 i386 使用者要獲取 Python 2.5.1 的可用版本: ::" #: ../../using/unix.rst:60 msgid "Building Python" @@ -131,10 +122,7 @@ msgstr "" #: ../../using/unix.rst:68 msgid "The build process consists of the usual commands::" -msgstr "" -"建置過程由幾個常用命令組成:\n" -"\n" -"::" +msgstr "建置過程由幾個常用命令組成: ::" #: ../../using/unix.rst:74 msgid "" @@ -234,10 +222,7 @@ msgstr "" msgid "" "and put an appropriate Shebang line at the top of the script. A good choice " "is usually ::" -msgstr "" -"並在腳本的頂部放一個合適的 Shebang。以下通常是個好選擇:\n" -"\n" -"::" +msgstr "並在腳本的頂部放一個合適的 Shebang。以下通常是個好選擇: ::" #: ../../using/unix.rst:125 msgid "" diff --git a/using/windows.po b/using/windows.po index 14f747fe48..15af71e1d4 100644 --- a/using/windows.po +++ b/using/windows.po @@ -395,7 +395,7 @@ msgstr "CompileAll" #: ../../using/windows.rst:181 msgid "Compile all ``.py`` files to ``.pyc``." -msgstr "編譯所有 ``.py`` 檔案為 ``.pyc``\\ 。" +msgstr "編譯所有 ``.py`` 檔案為 ``.pyc``。" #: ../../using/windows.rst:184 msgid "PrependPath" @@ -1281,10 +1281,7 @@ msgstr "" #: ../../using/windows.rst:751 msgid "The command::" -msgstr "" -"指令:\n" -"\n" -"::" +msgstr "指令: ::" #: ../../using/windows.rst:755 msgid "displays the currently installed version(s) of Python." diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index ccf80e8cae..5626a58b50 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # @@ -84,10 +83,7 @@ msgstr "" #: ../../whatsnew/2.3.rst:50 msgid "Here's a simple example::" -msgstr "" -"以下是個簡單範例:\n" -"\n" -"::" +msgstr "以下是個簡單範例: ::" #: ../../whatsnew/2.3.rst:66 msgid "" @@ -654,9 +650,9 @@ msgstr "" msgid "" "When encoding a Unicode string into a byte string, unencodable characters " "may be encountered. So far, Python has allowed specifying the error " -"processing as either \"strict\" (raising :exc:`UnicodeError`), " -"\"ignore\" (skipping the character), or \"replace\" (using a question mark " -"in the output string), with \"strict\" being the default behavior. It may be " +"processing as either \"strict\" (raising :exc:`UnicodeError`), \"ignore\" " +"(skipping the character), or \"replace\" (using a question mark in the " +"output string), with \"strict\" being the default behavior. It may be " "desirable to specify alternative processing of such errors, such as " "inserting an XML character reference or HTML entity reference into the " "converted string." diff --git a/whatsnew/2.4.po b/whatsnew/2.4.po index cd88e145da..8ab75bbe26 100644 --- a/whatsnew/2.4.po +++ b/whatsnew/2.4.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/2.5.po b/whatsnew/2.5.po index 401013431e..820ca1a7de 100644 --- a/whatsnew/2.5.po +++ b/whatsnew/2.5.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # @@ -1160,10 +1159,7 @@ msgstr "" #: ../../whatsnew/2.5.rst:1005 msgid "Some examples::" -msgstr "" -"一些範例:\n" -"\n" -"::" +msgstr "一些範例: ::" #: ../../whatsnew/2.5.rst:1018 msgid "" diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po index 13ab4d414c..065c5ca865 100644 --- a/whatsnew/2.6.po +++ b/whatsnew/2.6.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/2.7.po b/whatsnew/2.7.po index 14199854b0..bf6f479020 100644 --- a/whatsnew/2.7.po +++ b/whatsnew/2.7.po @@ -454,10 +454,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:370 msgid "Here's an example::" -msgstr "" -"以下是個範例:\n" -"\n" -"::" +msgstr "以下是個範例: ::" #: ../../whatsnew/2.7.rst:393 msgid "" @@ -1969,10 +1966,7 @@ msgstr "" #: ../../whatsnew/2.7.rst:1756 msgid "Here are some examples::" -msgstr "" -"以下是一些範例:\n" -"\n" -"::" +msgstr "以下是一些範例: ::" #: ../../whatsnew/2.7.rst:1767 msgid "" @@ -2385,14 +2379,14 @@ msgid "" "ElementTree's code for converting trees to a string has been significantly " "reworked, making it roughly twice as fast in many cases. The :meth:" "`ElementTree.write() ` and :meth:" -"`Element.write` methods now have a *method* parameter that can be " -"\"xml\" (the default), \"html\", or \"text\". HTML mode will output empty " -"elements as ```` instead of ````, and text mode will " -"skip over elements and only output the text chunks. If you set the :attr:" -"`~xml.etree.ElementTree.Element.tag` attribute of an element to ``None`` but " -"leave its children in place, the element will be omitted when the tree is " -"written out, so you don't need to do more extensive rearrangement to remove " -"a single element." +"`Element.write` methods now have a *method* parameter that can be \"xml\" " +"(the default), \"html\", or \"text\". HTML mode will output empty elements " +"as ```` instead of ````, and text mode will skip over " +"elements and only output the text chunks. If you set the :attr:`~xml.etree." +"ElementTree.Element.tag` attribute of an element to ``None`` but leave its " +"children in place, the element will be omitted when the tree is written out, " +"so you don't need to do more extensive rearrangement to remove a single " +"element." msgstr "" #: ../../whatsnew/2.7.rst:2044 diff --git a/whatsnew/3.0.po b/whatsnew/3.0.po index 409deb8c21..8d29abd557 100644 --- a/whatsnew/3.0.po +++ b/whatsnew/3.0.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/3.1.po b/whatsnew/3.1.po index 29563e015f..5c60e35ffb 100644 --- a/whatsnew/3.1.po +++ b/whatsnew/3.1.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/3.10.po b/whatsnew/3.10.po index 8193adc673..85abce61ff 100644 --- a/whatsnew/3.10.po +++ b/whatsnew/3.10.po @@ -1245,7 +1245,7 @@ msgid "" "function. (Contributed by Hai Shi in :issue:`41842`.)" msgstr "" "新增 :func:`codecs.unregister` 函式來取消註冊 (unregister) 一個編解碼器的搜索" -"功能。 (Hai Shi 在 :issue:`41842` 中貢獻。)" +"功能。(Hai Shi 在 :issue:`41842` 中貢獻。)" #: ../../whatsnew/3.10.rst:951 msgid "collections.abc" @@ -1323,7 +1323,7 @@ msgstr "" "ncurses 6.1 中新增的擴充顏色函式將由 :func:`curses.color_content`、:func:" "`curses.init_color`、:func:`curses.init_pair` 和 :func:`curses.pair_content` " "透明地使用。新函式 :func:`curses.has_extended_color_support` 表示了底層的 " -"ncurses 函式庫是否支援擴充顏色。 (由 Jeffrey Kintscher 和 Hans Petter " +"ncurses 函式庫是否支援擴充顏色。(由 Jeffrey Kintscher 和 Hans Petter " "Jansson 在 :issue:`36982` 中貢獻。)" #: ../../whatsnew/3.10.rst:988 @@ -1587,7 +1587,7 @@ msgid "" "The hmac module now uses OpenSSL's HMAC implementation internally. " "(Contributed by Christian Heimes in :issue:`40645`.)" msgstr "" -"hmac 模組現在在內部使用 OpenSSL 的 HMAC 實作。 (由 Christian Heimes 在 :" +"hmac 模組現在在內部使用 OpenSSL 的 HMAC 實作。(由 Christian Heimes 在 :" "issue:`40645` 中貢獻。)" #: ../../whatsnew/3.10.rst:1152 @@ -1784,7 +1784,7 @@ msgid "" "`41001`.)" msgstr "" "新增函式 :func:`os.eventfd` 和相關幫助程式來包裝 Linux 上的 ``eventfd2`` 系統" -"呼叫。 (由 Christian Heimes 在 :issue:`41001` 中貢獻。)" +"呼叫。(由 Christian Heimes 在 :issue:`41001` 中貢獻。)" #: ../../whatsnew/3.10.rst:1255 msgid "" @@ -1877,7 +1877,7 @@ msgid "" msgstr "" "新增 :func:`platform.freedesktop_os_release()` 以從 `freedesktop.org os-" "release `_ " -"標準檔案中檢索出作業系統標識。 (由 Christian Heimes 在 :issue:`28468` 中貢" +"標準檔案中檢索出作業系統標識。(由 Christian Heimes 在 :issue:`28468` 中貢" "獻。)" #: ../../whatsnew/3.10.rst:1301 @@ -2038,7 +2038,7 @@ msgstr "" "ssl 模組現在具有更安全的預設設定。預設情況下禁用沒有前向保密或 SHA-1 MAC 的密" "碼。安全級別 2 禁止安全性低於 112 位元的弱 RSA、DH 和 ECC 密鑰。 :class:" "`~ssl.SSLContext` 預設為最低協議版本 TLS 1.2。設定基於 Hynek Schlawack 的研" -"究。 (由 Christian Heimes 在 :issue:`43998` 中貢獻。)" +"究。(由 Christian Heimes 在 :issue:`43998` 中貢獻。)" #: ../../whatsnew/3.10.rst:1383 msgid "" @@ -2121,7 +2121,7 @@ msgid "" "Antoine Pitrou in :issue:`43356`.)" msgstr "" ":func:`_thread.interrupt_main` 現在需要一個可選的信號編號來進行模擬(預設值仍" -"然是 :const:`signal.SIGINT`)。 (由 Antoine Pitrou 在 :issue:`43356` 中貢" +"然是 :const:`signal.SIGINT`)。(由 Antoine Pitrou 在 :issue:`43356` 中貢" "獻。)" #: ../../whatsnew/3.10.rst:1424 @@ -3118,7 +3118,7 @@ msgstr "" "FunctionType` 建構函式現在會繼承當前的內建物件,而不是使用 ``{\"None\": None}" "``:相同行為如 :func:`eval` 和 :func:`exec` 函式。在 Python 中使用 ``def " "function(...): ...`` 定義函式不受影響,全域變數不能用此語法覆蓋:它也繼承當前" -"的內建物件。 (由 Victor Stinner 在 :issue:`42990` 中貢獻。)" +"的內建物件。(由 Victor Stinner 在 :issue:`42990` 中貢獻。)" #: ../../whatsnew/3.10.rst:1939 msgid "Changes in the C API" @@ -3419,7 +3419,7 @@ msgid "" "Stinner in :issue:`42262`.)" msgstr "" "新增 :c:func:`Py_NewRef` 和 :c:func:`Py_XNewRef` 函式來增加物件的參照計數並回" -"傳物件。 (由 Victor Stinner 在 :issue:`42262` 中貢獻。)" +"傳物件。(由 Victor Stinner 在 :issue:`42262` 中貢獻。)" #: ../../whatsnew/3.10.rst:2090 msgid "" @@ -3461,7 +3461,7 @@ msgid "" "Add :c:func:`PyErr_SetInterruptEx` which allows passing a signal number to " "simulate. (Contributed by Antoine Pitrou in :issue:`43356`.)" msgstr "" -"新增 :c:func:`PyErr_SetInterruptEx`,它允許傳遞信號編號來進行模擬。 (由 " +"新增 :c:func:`PyErr_SetInterruptEx`,它允許傳遞信號編號來進行模擬。(由 " "Antoine Pitrou 在 :issue:`43356` 中貢獻。)" #: ../../whatsnew/3.10.rst:2110 diff --git a/whatsnew/3.11.po b/whatsnew/3.11.po index 7f9101fa43..23ac3e9dd8 100644 --- a/whatsnew/3.11.po +++ b/whatsnew/3.11.po @@ -78,8 +78,8 @@ msgid "" ":pep:`680`: :mod:`tomllib` — Support for parsing `TOML `_ " "in the Standard Library" msgstr "" -":pep:`680`:\\ :mod:`tomllib` — 在標準函式庫中支援 `TOML `_ 檔案的剖析" +":pep:`680`::mod:`tomllib` — 在標準函式庫中支援 `TOML `_ 檔" +"案的剖析" #: ../../whatsnew/3.11.rst:79 msgid "Interpreter improvements:" @@ -132,21 +132,20 @@ msgid "" ":pep:`594`: :ref:`Many legacy standard library modules have been deprecated " "` and will be removed in Python 3.13" msgstr "" -":pep:`594`:\\ :ref:`許多標準函式庫中的遺留模組已被棄用 `\\ 且將於 Python 3.13 移除" +":pep:`594`::ref:`許多標準函式庫中的遺留模組已被棄用 `\\ " +"且將於 Python 3.13 移除" #: ../../whatsnew/3.11.rst:99 msgid "" ":pep:`624`: :ref:`Py_UNICODE encoder APIs have been removed `" -msgstr "" -":pep:`624`:\\ :ref:`Py_UNICODE 編碼器 API 已被移除 `" +msgstr ":pep:`624`::ref:`Py_UNICODE 編碼器 API 已被移除 `" #: ../../whatsnew/3.11.rst:101 msgid "" ":pep:`670`: :ref:`Macros converted to static inline functions `" -msgstr ":pep:`670`:\\ :ref:`轉換為靜態行內函式的巨集 `" +msgstr ":pep:`670`::ref:`轉換為靜態行內函式的巨集 `" #: ../../whatsnew/3.11.rst:108 ../../whatsnew/3.11.rst:2196 msgid "New Features" @@ -575,7 +574,7 @@ msgid "" msgstr "" "非同步\\ :ref:`綜合運算 (comprehension) ` 現在允許在\\ :ref:`" "非同步函式中的內部綜合運算 (inside comprehension) `。在這種情況" -"下,外部綜合運算 (outer comprehension) 隱晦地變成了非同步的了。 (由 Serhiy " +"下,外部綜合運算 (outer comprehension) 隱晦地變成了非同步的了。(由 Serhiy " "Storchaka 在 :issue:`33346` 中貢獻。)" #: ../../whatsnew/3.11.rst:447 @@ -592,7 +591,7 @@ msgstr "" "和 :meth:`contextlib.ExitStack.enter_context` 或在不支援 :term:`asynchronous " "context manager` 協議的物件上使用 :keyword:`async with` 陳述式和 :meth:" "`contextlib.AsyncExitStack.enter_async_context`,會引發 :exc:`TypeError` 而不" -"是 :exc:`AttributeError`。 (由 Serhiy Storchaka 在 :issue:`12022` 和 :issue:" +"是 :exc:`AttributeError`。(由 Serhiy Storchaka 在 :issue:`12022` 和 :issue:" "`44471` 中貢獻。)" #: ../../whatsnew/3.11.rst:455 @@ -624,7 +623,7 @@ msgstr "" "它們禁用了當使用 :option:`-c` 和 :option:`-m` 以在運行腳本或當前目錄時自動添" "加到腳本目錄的 :data:`sys.path`。這確保只有 stdlib 和已安裝的模組會被 :" "keyword:`import` 取用,以避免不小心或被惡意地將模組與本地(通常是使用者可寫入" -"的)目錄中的模組重疊。 (由 Victor Stinner 在 :gh:`57684` 中貢獻。)" +"的)目錄中的模組重疊。(由 Victor Stinner 在 :gh:`57684` 中貢獻。)" #: ../../whatsnew/3.11.rst:481 msgid "" @@ -715,7 +714,7 @@ msgid "" msgstr "" "新增\\ :ref:`命令列選項 ` ``AppendPath``,已增加於 " "Windows 安裝程式。它的行為類似於 ``PrependPath``,但在安裝和腳本目錄後面附加" -"而非新增於它們前面。 (由 Bastian Neuburger 在 :issue:`44934` 中貢獻。)" +"而非新增於它們前面。(由 Bastian Neuburger 在 :issue:`44934` 中貢獻。)" #: ../../whatsnew/3.11.rst:531 msgid "" @@ -778,7 +777,7 @@ msgid "" ":mod:`wsgiref.types`: :pep:`WSGI <3333>`-specific types for static type " "checking. (Contributed by Sebastian Rittau in :issue:`42012`.)" msgstr "" -":mod:`wsgiref.types`:\\ :pep:`WSGI <3333>` 限定型別,用於靜態型別檢查。" +":mod:`wsgiref.types`::pep:`WSGI <3333>` 限定型別,用於靜態型別檢查。" "(Sebastian Rittau 於 :issue:`42012` 中所貢獻。)" #: ../../whatsnew/3.11.rst:571 @@ -1165,7 +1164,7 @@ msgid "" "Weipeng Hong in :issue:`30533`.)" msgstr "" "添加 :func:`~inspect.getmembers_static` 以回傳所有成員,而不會通過描述器協議 " -"(descriptor protocol) 觸發動態查找。 (由 Weipeng Hong 在 :issue:`30533` 中貢" +"(descriptor protocol) 觸發動態查找。(由 Weipeng Hong 在 :issue:`30533` 中貢" "獻。)" #: ../../whatsnew/3.11.rst:813 @@ -1254,7 +1253,7 @@ msgstr "" "添加了一個 :meth:`~logging.handlers.SysLogHandler.createSocket` 方法到 :" "class:`~logging.handlers.SysLogHandler`,以匹配 :meth:`SocketHandler." "createSocket() ` 。如果沒有已啟" -"用的 socket,它會在處理程式初始化期間和發出一個事件時自動呼叫。 (由 Kirill " +"用的 socket,它會在處理程式初始化期間和發出一個事件時自動呼叫。(由 Kirill " "Pinchuk 在 :gh:`88457` 中貢獻。)" #: ../../whatsnew/3.11.rst:864 @@ -1351,7 +1350,7 @@ msgid "" msgstr "" "現在規則運算式 (regular expression) 是有支援原子性群組 (atomic grouping) " "(``(?>...)``) 和佔有性量詞 (possessive quantifier) (``*+``, ``++``, ``?+``, " -"``{m,n}+``) 的。 (由 Jeffrey C. Jacobs 和 Serhiy Storchaka 在 :issue:" +"``{m,n}+``) 的。(由 Jeffrey C. Jacobs 和 Serhiy Storchaka 在 :issue:" "`433030` 中貢獻。)" #: ../../whatsnew/3.11.rst:926 @@ -1531,7 +1530,7 @@ msgid "" msgstr "" ":func:`sys.exc_info` 現在從 ``value``\\ (例外實例)衍生出 ``type`` 和 " "``traceback`` 欄位,因此當例外在處理過程中被修改時,變更會反映在 :func:`!" -"exc_info` 後續呼叫的結果中。 (由 Irit Katriel 在 :issue:`45711` 中貢獻。)" +"exc_info` 後續呼叫的結果中。(由 Irit Katriel 在 :issue:`45711` 中貢獻。)" #: ../../whatsnew/3.11.rst:1022 msgid "" @@ -1895,7 +1894,7 @@ msgid "" "`47074`.)" msgstr "" ":func:`warnings.catch_warnings` 現在接受 :func:`warnings.simplefilter` 的引" -"數,提供了一種更簡潔的方法來在本地端忽略警告或將它們轉換為錯誤。 (由 Zac " +"數,提供了一種更簡潔的方法來在本地端忽略警告或將它們轉換為錯誤。(由 Zac " "Hatfield-Dodds 在 :issue:`47074` 中貢獻。)" #: ../../whatsnew/3.11.rst:1242 @@ -2212,7 +2211,7 @@ msgid "" msgstr "" ":pep:`659` 是加速 CPython 專案的關鍵部分之一。一般的想法是,雖然 Python 是一" "種動態語言,但大多數程式碼都有物件和型別很少去更改的區域。這個概念被稱為\\ *" -"型別穩定 (type stability)*\\ 。" +"型別穩定 (type stability)*。" #: ../../whatsnew/3.11.rst:1424 msgid "" @@ -3722,7 +3721,7 @@ msgstr "" "bind_textdomain_codeset` 函式、:meth:`!NullTranslations.output_charset` 和 :" "meth:`!NullTranslations.set_output_charset` 方法,以及 :func:`!translation` " "和 :func:`!install` 的 *codeset* 參數,因為它們僅被用於 :func:`!l*gettext` 函" -"式。 (由 Donghee Na 和 Serhiy Storchaka 在 :issue:`44235` 中貢獻。)" +"式。(由 Donghee Na 和 Serhiy Storchaka 在 :issue:`44235` 中貢獻。)" #: ../../whatsnew/3.11.rst:1988 msgid "Removed from the :mod:`inspect` module:" @@ -3934,7 +3933,7 @@ msgid "" "`47066`.)" msgstr "" "在 :mod:`re` :ref:`re-syntax` 中,全域行內旗標(例如 ``(?i)``)現在只能在規則" -"運算式的開頭使用。自 Python 3.6 以來,在其他地方使用它們已被棄用。 (由 " +"運算式的開頭使用。自 Python 3.6 以來,在其他地方使用它們已被棄用。(由 " "Serhiy Storchaka 在 :issue:`47066` 中貢獻。)" #: ../../whatsnew/3.11.rst:2091 @@ -4042,8 +4041,7 @@ msgid "" "libpython is no longer linked against libcrypt. (Contributed by Mike Gilbert " "in :issue:`45433`.)" msgstr "" -"libpython 不再鏈接到 libcrypt。 (由 Mike Gilbert 在 :issue:`45433` 中貢" -"獻。)" +"libpython 不再鏈接到 libcrypt。(由 Mike Gilbert 在 :issue:`45433` 中貢獻。)" #: ../../whatsnew/3.11.rst:2150 msgid "" @@ -4116,7 +4114,7 @@ msgstr "" "``SIZEOF_VOID_P >= 8`` 的平台上預設使用 30-bit 數字,否則使用 15-bit 數字,但" "仍能通過配置腳本的 :option:`--enable-big-digits` 選項或(於 Windows)\\ ``PC/" "pyconfig.h`` 中的 ``PYLONG_BITS_IN_DIGIT`` 變數來明確請求使用 15-bit 數字,但" -"此選項可能會在將來的某個時候被刪除。 (由 Mark Dickinson 在 :issue:`45569` 中" +"此選項可能會在將來的某個時候被刪除。(由 Mark Dickinson 在 :issue:`45569` 中" "貢獻。)" #: ../../whatsnew/3.11.rst:2191 @@ -4295,7 +4293,7 @@ msgstr "" "gnu.org/onlinedocs/cpp/Macro-Pitfalls.html>`_。這種變化對用戶來說應該是透明" "的,因為替換函式會將它們的引數轉換為預期的型別,以避免由於靜態型別檢查而產生" "的編譯器警告。但是,當受限 C API 設置為 >=3.11 時,這些轉換不會完成,使用者需" -"要將引數轉換為他們期望的型別。有關更多詳細資訊,請參閱 :pep:`670`。 (由 " +"要將引數轉換為他們期望的型別。有關更多詳細資訊,請參閱 :pep:`670`。(由 " "Victor Stinner 和 Erlend E. Aasland 在 :gh:`89653` 中貢獻。)" #: ../../whatsnew/3.11.rst:2277 @@ -4327,7 +4325,7 @@ msgid "" "``size``. (Contributed by Kumar Aditya in :issue:`46608`.)" msgstr "" ":c:struct:`_frozen` 有一個新的 ``is_package`` 欄位來表示凍結模組是否為一個套" -"件。以前 ``size`` 欄位中的負值是指標,現在只有非負值可用於 ``size``。 (由 " +"件。以前 ``size`` 欄位中的負值是指標,現在只有非負值可用於 ``size``。(由 " "Kumar Aditya 在 :issue:`46608` 中貢獻。)" #: ../../whatsnew/3.11.rst:2293 diff --git a/whatsnew/3.2.po b/whatsnew/3.2.po index dee0bc118b..a6936a0252 100644 --- a/whatsnew/3.2.po +++ b/whatsnew/3.2.po @@ -544,7 +544,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:567 msgid "(See :issue:`4617`.)" -msgstr "(請見 :issue:`4617`\\ 。)" +msgstr "(請見 :issue:`4617`。)" #: ../../whatsnew/3.2.rst:569 msgid "" @@ -635,7 +635,7 @@ msgstr "" #: ../../whatsnew/3.2.rst:649 msgid "(See :issue:`10518`.)" -msgstr "(請見 :issue:`10518`\\ 。)" +msgstr "(請見 :issue:`10518`。)" #: ../../whatsnew/3.2.rst:651 msgid "" diff --git a/whatsnew/3.3.po b/whatsnew/3.3.po index b73225094e..4dc4ea82bf 100644 --- a/whatsnew/3.3.po +++ b/whatsnew/3.3.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # @@ -722,17 +721,11 @@ msgstr "" #: ../../whatsnew/3.3.rst:569 msgid "Example with nested classes::" -msgstr "" -"巢狀類別範例:\n" -"\n" -"::" +msgstr "巢狀類別範例: ::" #: ../../whatsnew/3.3.rst:585 msgid "Example with nested functions::" -msgstr "" -"巢狀函式範例:\n" -"\n" -"::" +msgstr "巢狀函式範例: ::" #: ../../whatsnew/3.3.rst:597 msgid "" @@ -2724,7 +2717,7 @@ msgid "" "(Contributed by Giampaolo Rodolà in :issue:`11289`.)" msgstr "" ":class:`~smtplib.SMTP` 現在支援情境管理協議,允許在 ``with`` 陳述式中使用 " -"``SMTP`` 實例。 (由 Giampaolo Rodolà 在 :issue:`11289` 中貢獻。)" +"``SMTP`` 實例。(由 Giampaolo Rodolà 在 :issue:`11289` 中貢獻。)" #: ../../whatsnew/3.3.rst:1870 msgid "" @@ -2733,8 +2726,8 @@ msgid "" "the secure channel. (Contributed by Kasun Herath in :issue:`8809`.)" msgstr "" ":class:`~smtplib.SMTP_SSL` 構造函式和 :meth:`~smtplib.SMTP.starttls` 方法現在" -"接受 SSLContext 參數來控制安全通道的參數。 (由 Kasun Herath 在 :issue:" -"`8809` 中貢獻。)" +"接受 SSLContext 參數來控制安全通道的參數。(由 Kasun Herath 在 :issue:`8809` " +"中貢獻。)" #: ../../whatsnew/3.3.rst:1876 msgid "socket" @@ -2982,7 +2975,7 @@ msgid "" ":mod:`tarfile` now supports ``lzma`` encoding via the :mod:`lzma` module. " "(Contributed by Lars Gustäbel in :issue:`5689`.)" msgstr "" -":mod:`tarfile` 現在透過 :mod:`lzma` 模組支援 ``lzma`` 編碼。 (由 Lars " +":mod:`tarfile` 現在透過 :mod:`lzma` 模組支援 ``lzma`` 編碼。(由 Lars " "Gustäbel 在 :issue:`5689` 中貢獻。)" #: ../../whatsnew/3.3.rst:2019 @@ -3078,7 +3071,7 @@ msgid "" "Victor Stinner in :issue:`10278`.)" msgstr "" ":func:`~time.clock_getres`、:func:`~time.clock_gettime` 和 :func:`~time." -"clock_settime` 函式帶有 :samp:`CLOCK_{xxx}` 常數。 (由 Victor Stinner 在 :" +"clock_settime` 函式帶有 :samp:`CLOCK_{xxx}` 常數。(由 Victor Stinner 在 :" "issue:`10278` 中貢獻。)" #: ../../whatsnew/3.3.rst:2073 diff --git a/whatsnew/3.4.po b/whatsnew/3.4.po index dc97a81592..83b13685d7 100644 --- a/whatsnew/3.4.po +++ b/whatsnew/3.4.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/3.5.po b/whatsnew/3.5.po index 9678fe5cbe..55bfa804a2 100644 --- a/whatsnew/3.5.po +++ b/whatsnew/3.5.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # @@ -389,10 +388,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:373 ../../whatsnew/3.5.rst:1848 msgid "Examples::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../whatsnew/3.5.rst:381 msgid "" @@ -556,10 +552,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:496 msgid "and::" -msgstr "" -"和:\n" -"\n" -"::" +msgstr "和: ::" #: ../../whatsnew/3.5.rst:505 msgid "" @@ -625,7 +618,7 @@ msgstr ":func:`signal.sigtimedwait` 和 :func:`signal.sigwaitinfo`\\ ;" #: ../../whatsnew/3.5.rst:547 msgid ":func:`time.sleep`." -msgstr ":func:`time.sleep`\\ 。" +msgstr ":func:`time.sleep`。" #: ../../whatsnew/3.5.rst:551 msgid ":pep:`475` -- Retry system calls failing with EINTR" @@ -1220,10 +1213,7 @@ msgstr "" #: ../../whatsnew/3.5.rst:998 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../whatsnew/3.5.rst:1016 msgid "(Contributed by Łukasz Langa in :issue:`18159`.)" diff --git a/whatsnew/3.6.po b/whatsnew/3.6.po index 8e049b4ab9..f85fa0b51f 100644 --- a/whatsnew/3.6.po +++ b/whatsnew/3.6.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. msgid "" diff --git a/whatsnew/3.7.po b/whatsnew/3.7.po index 716b813d6c..4edd8206af 100644 --- a/whatsnew/3.7.po +++ b/whatsnew/3.7.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. msgid "" @@ -631,7 +630,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:452 msgid "See :ref:`pyc-invalidation` for more information." -msgstr "更多資訊請見 :ref:`pyc-invalidation`\\ 。" +msgstr "更多資訊請見 :ref:`pyc-invalidation`。" #: ../../whatsnew/3.7.rst:456 msgid ":pep:`552` -- Deterministic pycs" @@ -814,10 +813,7 @@ msgstr "" #: ../../whatsnew/3.7.rst:580 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../whatsnew/3.7.rst:593 msgid ":pep:`557` -- Data Classes" diff --git a/whatsnew/3.8.po b/whatsnew/3.8.po index 89a88b2582..ad8fe18135 100644 --- a/whatsnew/3.8.po +++ b/whatsnew/3.8.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. @@ -91,7 +90,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:114 msgid "See :pep:`572` for a full description." -msgstr "完整敘述請見 :pep:`572`\\ 。" +msgstr "完整敘述請見 :pep:`572`。" #: ../../whatsnew/3.8.rst:116 msgid "(Contributed by Emily Morehouse in :issue:`35224`.)" @@ -163,7 +162,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:185 msgid "See :pep:`570` for a full description." -msgstr "完整敘述請見 :pep:`570`\\ 。" +msgstr "完整敘述請見 :pep:`570`。" #: ../../whatsnew/3.8.rst:187 msgid "(Contributed by Pablo Galindo in :issue:`36540`.)" @@ -298,7 +297,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:292 msgid "See :pep:`578` for full details." -msgstr "完整細節請見 :pep:`578`\\ 。" +msgstr "完整細節請見 :pep:`578`。" #: ../../whatsnew/3.8.rst:296 msgid "PEP 587: Python Initialization Configuration" @@ -456,7 +455,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:346 msgid "See :pep:`587` for a full description." -msgstr "完整敘述請見 :pep:`587`\\ 。" +msgstr "完整敘述請見 :pep:`587`。" #: ../../whatsnew/3.8.rst:348 msgid "(Contributed by Victor Stinner in :issue:`36763`.)" @@ -481,7 +480,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:363 msgid "See :pep:`590` for a full description." -msgstr "完整敘述請見 :pep:`590`\\ 。" +msgstr "完整敘述請見 :pep:`590`。" #: ../../whatsnew/3.8.rst:365 msgid "" @@ -512,7 +511,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:380 msgid "See :pep:`574` for a full description." -msgstr "完整敘述請見 :pep:`574`\\ 。" +msgstr "完整敘述請見 :pep:`574`。" #: ../../whatsnew/3.8.rst:382 msgid "(Contributed by Antoine Pitrou in :issue:`36785`.)" @@ -764,10 +763,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:612 msgid "This is *roughly* equivalent to::" -msgstr "" -"這\\ *大致*\\ 等價於:\n" -"\n" -"::" +msgstr "這\\ *大致*\\ 等價於: ::" #: ../../whatsnew/3.8.rst:629 msgid "" @@ -1703,10 +1699,7 @@ msgstr "" #: ../../whatsnew/3.8.rst:1383 msgid "Example::" -msgstr "" -"範例:\n" -"\n" -"::" +msgstr "範例: ::" #: ../../whatsnew/3.8.rst:1406 msgid "venv" diff --git a/whatsnew/3.9.po b/whatsnew/3.9.po index 78b95c73c0..f64f21aa1b 100644 --- a/whatsnew/3.9.po +++ b/whatsnew/3.9.po @@ -1690,7 +1690,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1195 msgid "(See :issue:`35810` and :issue:`40217` for more information.)" -msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`\\ 。)" +msgstr "(更多資訊請見 :issue:`35810` 與 :issue:`40217`。)" #: ../../whatsnew/3.9.rst:1197 msgid "" @@ -2014,7 +2014,7 @@ msgstr "" #: ../../whatsnew/3.9.rst:1403 msgid "(See :issue:`40170` for more details.)" -msgstr "(更多資訊請見 :issue:`40170`\\ 。)" +msgstr "(更多資訊請見 :issue:`40170`。)" #: ../../whatsnew/3.9.rst:1408 msgid "" diff --git a/whatsnew/changelog.po b/whatsnew/changelog.po index 1cefe27320..57e5decb8d 100644 --- a/whatsnew/changelog.po +++ b/whatsnew/changelog.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. # diff --git a/whatsnew/index.po b/whatsnew/index.po index f3125a66e5..919f5dd09e 100644 --- a/whatsnew/index.po +++ b/whatsnew/index.po @@ -1,4 +1,3 @@ -# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001-2022, Python Software Foundation # This file is distributed under the same license as the Python package. #