diff --git a/glossary.po b/glossary.po index 5228e8a0a7..73fb64b92b 100644 --- a/glossary.po +++ b/glossary.po @@ -7,8 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.9\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-06-20 18:08+0800\n" +"POT-Creation-Date: 2021-10-26 16:30+0000\n" "PO-Revision-Date: 2021-10-27 00:04+0800\n" +"Last-Translator: Steven Hsu \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" "Language: zh_TW\n" @@ -16,7 +17,6 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"Last-Translator: Steven Hsu \n" "X-Generator: Poedit 2.4.3\n" #: ../../glossary.rst:5 @@ -438,22 +438,22 @@ msgid "" msgstr "" "位元組碼的指令列表可以在 :ref:`dis 模組 `\\ 的說明文件中找到。" -#: ../../glossary.rst:190 +#: ../../glossary.rst:191 msgid "callback" msgstr "callback(回呼)" -#: ../../glossary.rst:191 +#: ../../glossary.rst:193 msgid "" "A subroutine function which is passed as an argument to be executed at some " "point in the future." msgstr "" "作為引數被傳遞的一個副程式 (subroutine) 函式,會在未來的某個時間點被執行。" -#: ../../glossary.rst:192 +#: ../../glossary.rst:195 msgid "class" msgstr "class(類別)" -#: ../../glossary.rst:193 +#: ../../glossary.rst:197 msgid "" "A template for creating user-defined objects. Class definitions normally " "contain method definitions which operate on instances of the class." @@ -461,11 +461,11 @@ msgstr "" "一個用於建立使用者定義物件的模板。Class 的定義通常會包含 method 的定義,這些 " "method 可以在 class 的實例上進行操作。" -#: ../../glossary.rst:196 +#: ../../glossary.rst:200 msgid "class variable" msgstr "class variable(類別變數)" -#: ../../glossary.rst:198 +#: ../../glossary.rst:202 msgid "" "A variable defined in a class and intended to be modified only at class " "level (i.e., not in an instance of the class)." @@ -473,11 +473,11 @@ msgstr "" "一個在 class 中被定義,且應該只能在 class 層次(意即不是在 class 的實例中)被" "修改的變數。" -#: ../../glossary.rst:200 +#: ../../glossary.rst:204 msgid "coercion" msgstr "coercion(強制轉型)" -#: ../../glossary.rst:202 +#: ../../glossary.rst:206 msgid "" "The implicit conversion of an instance of one type to another during an " "operation which involves two arguments of the same type. For example, " @@ -495,11 +495,11 @@ msgstr "" "\\ 。如果沒有強制轉型,即使所有的引數型別皆相容,它們都必須要由程式設計師正規" "化 (normalize) 為相同的值,例如,要用 ``float(3)+4.5`` 而不能只是 ``3+4.5``。" -#: ../../glossary.rst:210 +#: ../../glossary.rst:214 msgid "complex number" msgstr "complex number(複數)" -#: ../../glossary.rst:212 +#: ../../glossary.rst:216 msgid "" "An extension of the familiar real number system in which all numbers are " "expressed as a sum of a real part and an imaginary part. Imaginary numbers " @@ -519,11 +519,11 @@ msgstr "" "相當進階的數學功能。如果你沒有察覺到對它們的需求,那麼幾乎能確定你可以安全地" "忽略它們。" -#: ../../glossary.rst:222 +#: ../../glossary.rst:226 msgid "context manager" msgstr "context manager(情境管理器)" -#: ../../glossary.rst:224 +#: ../../glossary.rst:228 msgid "" "An object which controls the environment seen in a :keyword:`with` statement " "by defining :meth:`__enter__` and :meth:`__exit__` methods. See :pep:`343`." @@ -531,11 +531,11 @@ msgstr "" "一個可以控制 :keyword:`with` 陳述式中所見環境的物件,而它是透過定義 :meth:" "`__enter__` 和 :meth:`__exit__` method 來控制的。請參閱 :pep:`343`\\ 。" -#: ../../glossary.rst:227 +#: ../../glossary.rst:231 msgid "context variable" msgstr "context variable(情境變數)" -#: ../../glossary.rst:229 +#: ../../glossary.rst:233 msgid "" "A variable which can have different values depending on its context. This is " "similar to Thread-Local Storage in which each execution thread may have a " @@ -550,11 +550,11 @@ msgstr "" "任務 (concurrent asynchronous task) 中,對於變數狀態的追蹤。請參閱 :mod:" "`contextvars`\\ 。" -#: ../../glossary.rst:236 +#: ../../glossary.rst:240 msgid "contiguous" msgstr "contiguous(連續的)" -#: ../../glossary.rst:240 +#: ../../glossary.rst:244 msgid "" "A buffer is considered contiguous exactly if it is either *C-contiguous* or " "*Fortran contiguous*. Zero-dimensional buffers are C and Fortran " @@ -571,11 +571,11 @@ msgstr "" "的順序訪問各個項目時,最後一個索引的變化最快。然而,在 Fortran contiguous 陣" "列中,第一個索引的變化最快。" -#: ../../glossary.rst:248 +#: ../../glossary.rst:252 msgid "coroutine" msgstr "coroutine(協程)" -#: ../../glossary.rst:250 +#: ../../glossary.rst:254 msgid "" "Coroutines are a more generalized form of subroutines. Subroutines are " "entered at one point and exited at another point. Coroutines can be " @@ -586,11 +586,11 @@ msgstr "" "在另一個時間點被退出。協程可以在許多不同的時間點被進入、退出和回復。它們能夠" "以 :keyword:`async def` 陳述式被實作。另請參閱 :pep:`492`\\ 。" -#: ../../glossary.rst:255 +#: ../../glossary.rst:259 msgid "coroutine function" msgstr "coroutine function(協程函式)" -#: ../../glossary.rst:257 +#: ../../glossary.rst:261 msgid "" "A function which returns a :term:`coroutine` object. A coroutine function " "may be defined with the :keyword:`async def` statement, and may contain :" @@ -601,11 +601,11 @@ msgstr "" "`async def` 陳述式被定義,並可能會包含 :keyword:`await`\\ 、\\ :keyword:" "`async for` 和 :keyword:`async with` 關鍵字。這些關鍵字由 :pep:`492` 引入。" -#: ../../glossary.rst:262 +#: ../../glossary.rst:266 msgid "CPython" msgstr "CPython" -#: ../../glossary.rst:264 +#: ../../glossary.rst:268 msgid "" "The canonical implementation of the Python programming language, as " "distributed on `python.org `_. The term \"CPython\" " @@ -616,11 +616,11 @@ msgstr "" "`_ 上。「CPython」這個術語在必要時被使用,以區分此實" "作與其它語言的實作,例如 Jython 或 IronPython。" -#: ../../glossary.rst:268 +#: ../../glossary.rst:272 msgid "decorator" msgstr "decorator(裝飾器)" -#: ../../glossary.rst:270 +#: ../../glossary.rst:274 msgid "" "A function returning another function, usually applied as a function " "transformation using the ``@wrapper`` syntax. Common examples for " @@ -630,7 +630,7 @@ msgstr "" "式的變換 (function transformation)。裝飾器的常見範例是 :func:`classmethod` " "和 :func:`staticmethod`\\ 。" -#: ../../glossary.rst:274 +#: ../../glossary.rst:278 msgid "" "The decorator syntax is merely syntactic sugar, the following two function " "definitions are semantically equivalent::" @@ -639,7 +639,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:285 +#: ../../glossary.rst:289 msgid "" "The same concept exists for classes, but is less commonly used there. See " "the documentation for :ref:`function definitions ` and :ref:`class " @@ -648,11 +648,11 @@ msgstr "" "Class 也存在相同的概念,但在那裡比較不常用。關於裝飾器的更多內容,請參閱\\ :" "ref:`函式定義 `\\ 和 :ref:`class 定義 `\\ 的說明文件。" -#: ../../glossary.rst:288 +#: ../../glossary.rst:292 msgid "descriptor" msgstr "descriptor(描述器)" -#: ../../glossary.rst:290 +#: ../../glossary.rst:294 msgid "" "Any object which defines the methods :meth:`__get__`, :meth:`__set__`, or :" "meth:`__delete__`. When a class attribute is a descriptor, its special " @@ -672,7 +672,7 @@ msgstr "" "這些功能包括函式、method、屬性 (property)、class method、靜態 method,以及對 " "super class(父類別)的參照。" -#: ../../glossary.rst:300 +#: ../../glossary.rst:304 msgid "" "For more information about descriptors' methods, see :ref:`descriptors` or " "the :ref:`Descriptor How To Guide `." @@ -680,11 +680,11 @@ msgstr "" "關於描述器 method 的更多資訊,請參閱\\ :ref:`descriptors`\\ 或\\ :ref:`描述器" "使用指南 `\\ 。" -#: ../../glossary.rst:301 +#: ../../glossary.rst:306 msgid "dictionary" msgstr "dictionary(字典)" -#: ../../glossary.rst:303 +#: ../../glossary.rst:308 msgid "" "An associative array, where arbitrary keys are mapped to values. The keys " "can be any object with :meth:`__hash__` and :meth:`__eq__` methods. Called a " @@ -694,11 +694,11 @@ msgstr "" "有 :meth:`__hash__` 和 :meth:`__eq__` method 的物件。在 Perl 中被稱為雜湊 " "(hash)。" -#: ../../glossary.rst:304 +#: ../../glossary.rst:311 msgid "dictionary comprehension" msgstr "dictionary comprehension(字典綜合運算)" -#: ../../glossary.rst:305 +#: ../../glossary.rst:313 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a dictionary with the results. ``results = {n: n ** 2 for n in " @@ -709,11 +709,11 @@ msgstr "" "字典回傳。``results = {n: n ** 2 for n in range(10)}`` 會產生一個字典,它包含" "了鍵 ``n`` 映射到值 ``n ** 2``。請參閱\\ :ref:`comprehensions`\\ 。" -#: ../../glossary.rst:306 +#: ../../glossary.rst:317 msgid "dictionary view" msgstr "dictionary view(字典檢視)" -#: ../../glossary.rst:308 +#: ../../glossary.rst:319 msgid "" "The objects returned from :meth:`dict.keys`, :meth:`dict.values`, and :meth:" "`dict.items` are called dictionary views. They provide a dynamic view on the " @@ -726,11 +726,11 @@ msgstr "" "檢視會反映這些變動。若要強制將字典檢視轉為完整的 list(串列),須使用 " "``list(dictview)``。請參閱\\ :ref:`dict-views`\\ 。" -#: ../../glossary.rst:314 +#: ../../glossary.rst:325 msgid "docstring" msgstr "docstring(說明字串)" -#: ../../glossary.rst:316 +#: ../../glossary.rst:327 msgid "" "A string literal which appears as the first expression in a class, function " "or module. While ignored when the suite is executed, it is recognized by " @@ -743,11 +743,11 @@ msgstr "" "`__doc__` 屬性中。由於說明字串可以透過內省 (introspection) 來瀏覽,因此它是物" "件的說明文件存放的標準位置。" -#: ../../glossary.rst:322 +#: ../../glossary.rst:333 msgid "duck-typing" msgstr "duck-typing(鴨子型別)" -#: ../../glossary.rst:324 +#: ../../glossary.rst:335 msgid "" "A programming style which does not look at an object's type to determine if " "it has the right interface; instead, the method or attribute is simply " @@ -768,11 +768,11 @@ msgstr "" "來補充。)然而,它通常會採用 :func:`hasattr` 測試,或是 :term:`EAFP` 程式設計" "風格。" -#: ../../glossary.rst:333 +#: ../../glossary.rst:344 msgid "EAFP" msgstr "EAFP" -#: ../../glossary.rst:335 +#: ../../glossary.rst:346 msgid "" "Easier to ask for forgiveness than permission. This common Python coding " "style assumes the existence of valid keys or attributes and catches " @@ -787,11 +787,11 @@ msgstr "" "keyword:`except` 陳述式。該技術與許多其他語言(例如 C)常見的 :term:`LBYL` 風" "格形成了對比。" -#: ../../glossary.rst:341 +#: ../../glossary.rst:352 msgid "expression" msgstr "expression(運算式)" -#: ../../glossary.rst:343 +#: ../../glossary.rst:354 msgid "" "A piece of syntax which can be evaluated to some value. In other words, an " "expression is an accumulation of expression elements like literals, names, " @@ -807,11 +807,11 @@ msgstr "" "(陳述式)不能被用作運算式,例如 :keyword:`while`\\ 。賦值 (assignment) 也是" "陳述式,而不是運算式。" -#: ../../glossary.rst:350 +#: ../../glossary.rst:361 msgid "extension module" msgstr "extension module(擴充模組)" -#: ../../glossary.rst:352 +#: ../../glossary.rst:363 msgid "" "A module written in C or C++, using Python's C API to interact with the core " "and with user code." @@ -819,11 +819,11 @@ msgstr "" "一個以 C 或 C++ 編寫的模組,它使用 Python 的 C API 來與核心及使用者程式碼進行" "互動。" -#: ../../glossary.rst:354 +#: ../../glossary.rst:365 msgid "f-string" msgstr "f-string(f 字串)" -#: ../../glossary.rst:356 +#: ../../glossary.rst:367 msgid "" "String literals prefixed with ``'f'`` or ``'F'`` are commonly called \"f-" "strings\" which is short for :ref:`formatted string literals `. " @@ -832,11 +832,11 @@ msgstr "" "以 ``'f'`` 或 ``'F'`` 為前綴的字串文本通常被稱為「f 字串」,它是\\ :ref:`格式" "化的字串文本 `\\ 的縮寫。另請參閱 :pep:`498`\\ 。" -#: ../../glossary.rst:359 +#: ../../glossary.rst:370 msgid "file object" msgstr "file object(檔案物件)" -#: ../../glossary.rst:361 +#: ../../glossary.rst:372 msgid "" "An object exposing a file-oriented API (with methods such as :meth:`read()` " "or :meth:`write()`) to an underlying resource. Depending on the way it was " @@ -851,7 +851,7 @@ msgstr "" "緩衝區、socket(插座)、管線 (pipe) 等)的存取。檔案物件也被稱為\\ :dfn:`類檔" "案物件 (file-like object)` 或\\ :dfn:`串流 (stream)`\\ 。" -#: ../../glossary.rst:369 +#: ../../glossary.rst:380 msgid "" "There are actually three categories of file objects: raw :term:`binary files " "`, buffered :term:`binary files ` and :term:`text " @@ -864,26 +864,26 @@ msgstr "" "它們的介面在 :mod:`io` 模組中被定義。建立檔案物件的標準方法是使用 :func:" "`open` 函式。" -#: ../../glossary.rst:374 +#: ../../glossary.rst:385 msgid "file-like object" msgstr "file-like object(類檔案物件)" -#: ../../glossary.rst:376 +#: ../../glossary.rst:387 msgid "A synonym for :term:`file object`." msgstr ":term:`file object`\\ (檔案物件)的同義字。" -#: ../../glossary.rst:377 +#: ../../glossary.rst:388 msgid "finder" msgstr "finder(尋檢器)" -#: ../../glossary.rst:379 +#: ../../glossary.rst:390 msgid "" "An object that tries to find the :term:`loader` for a module that is being " "imported." msgstr "" "一個物件,它會嘗試為正在被 import 的模組尋找 :term:`loader`\\ (載入器)。" -#: ../../glossary.rst:382 +#: ../../glossary.rst:393 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 " @@ -894,15 +894,15 @@ msgstr "" "項目尋檢器 (path entry finder) ` 會使用 :data:`sys." "path_hooks`\\ 。" -#: ../../glossary.rst:386 +#: ../../glossary.rst:397 msgid "See :pep:`302`, :pep:`420` and :pep:`451` for much more detail." msgstr "請參閱 :pep:`302`\\ 、\\ :pep:`420` 和 :pep:`451` 以了解更多細節。" -#: ../../glossary.rst:387 +#: ../../glossary.rst:398 msgid "floor division" msgstr "floor division(向下取整除法)" -#: ../../glossary.rst:389 +#: ../../glossary.rst:400 msgid "" "Mathematical division that rounds down to nearest integer. The floor " "division operator is ``//``. For example, the expression ``11 // 4`` " @@ -915,11 +915,11 @@ msgstr "" "``2.75`` 不同。請注意,``(-11) // 4`` 的結果是 ``-3``,因為是 ``-2.75`` 被\\ " "*向下*\\ 無條件捨去。請參閱 :pep:`238`\\ 。" -#: ../../glossary.rst:394 +#: ../../glossary.rst:405 msgid "function" msgstr "function(函式)" -#: ../../glossary.rst:396 +#: ../../glossary.rst:407 msgid "" "A series of statements which returns some value to a caller. It can also be " "passed zero or more :term:`arguments ` which may be used in the " @@ -931,15 +931,15 @@ msgstr "" "`parameter`\\ (參數)、\\ :term:`method`\\ (方法),以及\\ :ref:`function`" "\\ 章節。" -#: ../../glossary.rst:400 +#: ../../glossary.rst:411 msgid "function annotation" msgstr "function annotation(函式註釋)" -#: ../../glossary.rst:402 +#: ../../glossary.rst:413 msgid "An :term:`annotation` of a function parameter or return value." msgstr "函式參數或回傳值的一個 :term:`annotation`\\ (註釋)。" -#: ../../glossary.rst:404 +#: ../../glossary.rst:415 msgid "" "Function annotations are usually used for :term:`type hints `: " "for example, this function is expected to take two :class:`int` arguments " @@ -950,22 +950,22 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:412 +#: ../../glossary.rst:423 msgid "Function annotation syntax is explained in section :ref:`function`." msgstr "函式註釋的語法在\\ :ref:`function`\\ 章節有詳細解釋。" -#: ../../glossary.rst:414 +#: ../../glossary.rst:425 msgid "" "See :term:`variable annotation` and :pep:`484`, which describe this " "functionality." msgstr "" "請參閱 :term:`variable annotation` 和 :pep:`484`\\ ,皆有此功能的描述。" -#: ../../glossary.rst:416 +#: ../../glossary.rst:427 msgid "__future__" msgstr "__future__" -#: ../../glossary.rst:418 +#: ../../glossary.rst:429 msgid "" "A :ref:`future statement `, ``from __future__ import ``, " "directs the compiler to compile the current module using syntax or semantics " @@ -983,11 +983,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:428 +#: ../../glossary.rst:440 msgid "garbage collection" msgstr "garbage collection(垃圾回收)" -#: ../../glossary.rst:430 +#: ../../glossary.rst:442 msgid "" "The process of freeing memory when it is not used anymore. Python performs " "garbage collection via reference counting and a cyclic garbage collector " @@ -999,11 +999,11 @@ msgstr "" "垃圾回收器 (cyclic garbage collector) 來完成。垃圾回收器可以使用 :mod:`gc` 模" "組對其進行控制。" -#: ../../glossary.rst:436 +#: ../../glossary.rst:448 msgid "generator" msgstr "generator(產生器)" -#: ../../glossary.rst:438 +#: ../../glossary.rst:450 msgid "" "A function which returns a :term:`generator iterator`. It looks like a " "normal function except that it contains :keyword:`yield` expressions for " @@ -1014,7 +1014,7 @@ msgstr "" "個正常的函式,但不同的是它包含了 :keyword:`yield` 運算式,能產生一系列的值," "這些值可用於 for 迴圈,或是以 :func:`next` 函式,每次檢索其中的一個值。" -#: ../../glossary.rst:443 +#: ../../glossary.rst:455 msgid "" "Usually refers to a generator function, but may refer to a *generator " "iterator* in some contexts. In cases where the intended meaning isn't " @@ -1023,15 +1023,15 @@ msgstr "" "這個術語通常用來表示一個產生器函式,但在某些情境中,也可能是表示\\ *產生器疊" "代器*\\ 。萬一想表達的意思不夠清楚,那就使用完整的術語,以避免歧義。" -#: ../../glossary.rst:446 +#: ../../glossary.rst:458 msgid "generator iterator" msgstr "generator iterator(產生器疊代器)" -#: ../../glossary.rst:448 +#: ../../glossary.rst:460 msgid "An object created by a :term:`generator` function." msgstr "一個由 :term:`generator`\\ (產生器)函式所建立的物件。" -#: ../../glossary.rst:450 +#: ../../glossary.rst:462 msgid "" "Each :keyword:`yield` temporarily suspends processing, remembering the " "location execution state (including local variables and pending try-" @@ -1042,11 +1042,11 @@ msgstr "" "中的 try 陳述式)。當\\ *產生器疊代器*\\ 回復時,它會從停止的地方繼續執行(與" "那些每次調用時都要重新開始的函式有所不同)。" -#: ../../glossary.rst:457 +#: ../../glossary.rst:469 msgid "generator expression" msgstr "generator expression(產生器運算式)" -#: ../../glossary.rst:459 +#: ../../glossary.rst:471 msgid "" "An expression that returns an iterator. It looks like a normal expression " "followed by a :keyword:`!for` clause defining a loop variable, range, and an " @@ -1059,11 +1059,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:466 +#: ../../glossary.rst:478 msgid "generic function" msgstr "generic function(泛型函式)" -#: ../../glossary.rst:468 +#: ../../glossary.rst:480 msgid "" "A function composed of multiple functions implementing the same operation " "for different types. Which implementation should be used during a call is " @@ -1072,7 +1072,7 @@ msgstr "" "一個由多個函式組成的函式,該函式會對不同的型別實作相同的運算。呼叫期間應該使" "用哪種實作,是由調度演算法 (dispatch algorithm) 來決定。" -#: ../../glossary.rst:472 +#: ../../glossary.rst:484 msgid "" "See also the :term:`single dispatch` glossary entry, the :func:`functools." "singledispatch` decorator, and :pep:`443`." @@ -1080,11 +1080,11 @@ msgstr "" "另請參閱 :term:`single dispatch`\\ (單一調度)術語表條目、\\ :func:" "`functools.singledispatch` 裝飾器和 :pep:`443`\\ 。" -#: ../../glossary.rst:473 +#: ../../glossary.rst:486 msgid "generic type" msgstr "generic type(泛型型別)" -#: ../../glossary.rst:474 +#: ../../glossary.rst:488 msgid "" "A :term:`type` that can be parameterized; typically a container like :class:" "`list`. Used for :term:`type hints ` and :term:`annotations " @@ -1094,7 +1094,7 @@ msgstr "" "像是 :class:`list`\\ (串列)。它被用於\\ :term:`型別提示 `\\ 和" "\\ :term:`註釋 `\\ 。" -#: ../../glossary.rst:475 +#: ../../glossary.rst:492 msgid "" "See :pep:`483` for more details, and :mod:`typing` or :ref:`generic alias " "type ` for its uses." @@ -1102,19 +1102,19 @@ msgstr "" "請參閱 :pep:`483` 了解更多細節,以及 :mod:`typing` 或 :ref:`泛型別名型別 " "(generic alias type) ` 了解其用途。" -#: ../../glossary.rst:476 +#: ../../glossary.rst:494 msgid "GIL" msgstr "GIL" -#: ../../glossary.rst:477 +#: ../../glossary.rst:496 msgid "See :term:`global interpreter lock`." msgstr "請參閱 :term:`global interpreter lock`\\ (全域直譯器鎖)。" -#: ../../glossary.rst:478 +#: ../../glossary.rst:497 msgid "global interpreter lock" msgstr "global interpreter lock(全域直譯器鎖)" -#: ../../glossary.rst:480 +#: ../../glossary.rst:499 msgid "" "The mechanism used by the :term:`CPython` interpreter to assure that only " "one thread executes Python :term:`bytecode` at a time. This simplifies the " @@ -1131,7 +1131,7 @@ msgstr "" "(multi-threaded),但代價是會犧牲掉多處理器的機器能夠提供的一大部分平行性 " "(parallelism)。" -#: ../../glossary.rst:489 +#: ../../glossary.rst:508 msgid "" "However, some extension modules, either standard or third-party, are " "designed so as to release the GIL when doing computationally-intensive tasks " @@ -1142,7 +1142,7 @@ msgstr "" "計算密集 (computationally-intensive) 的任務時,可以解除 GIL。另外,在執行 I/" "O 時,GIL 總是會被解除。" -#: ../../glossary.rst:494 +#: ../../glossary.rst:513 msgid "" "Past efforts to create a \"free-threaded\" interpreter (one which locks " "shared data at a much finer granularity) have not been successful because " @@ -1154,11 +1154,11 @@ msgstr "" "力並未成功,因為在一般的單一處理器情況下,效能會有所損失。一般認為,若要克服" "這個效能問題,會使實作變得複雜許多,進而付出更高的維護成本。" -#: ../../glossary.rst:500 +#: ../../glossary.rst:519 msgid "hash-based pyc" msgstr "hash-based pyc(雜湊架構的 pyc)" -#: ../../glossary.rst:502 +#: ../../glossary.rst:521 msgid "" "A bytecode cache file that uses the hash rather than the last-modified time " "of the corresponding source file to determine its validity. See :ref:`pyc-" @@ -1167,11 +1167,11 @@ msgstr "" "一個位元組碼 (bytecode) 暫存檔,它使用雜湊值而不是對應原始檔案的最後修改時" "間,來確定其有效性。請參閱\\ :ref:`pyc-invalidation`\\ 。" -#: ../../glossary.rst:505 +#: ../../glossary.rst:524 msgid "hashable" msgstr "hashable(可雜湊的)" -#: ../../glossary.rst:507 +#: ../../glossary.rst:526 msgid "" "An object is *hashable* if it has a hash value which never changes during " "its lifetime (it needs a :meth:`__hash__` method), and can be compared to " @@ -1183,7 +1183,7 @@ msgstr "" "method),那麼它就是一個\\ *可雜湊*\\ 物件。比較結果為相等的多個可雜湊物件," "它們必須擁有相同的雜湊值。" -#: ../../glossary.rst:512 +#: ../../glossary.rst:531 msgid "" "Hashability makes an object usable as a dictionary key and a set member, " "because these data structures use the hash value internally." @@ -1191,7 +1191,7 @@ msgstr "" "可雜湊性 (hashability) 使一個物件可用作 dictionary(字典)的鍵和 set(集合)" "的成員,因為這些資料結構都在其內部使用了雜湊值。" -#: ../../glossary.rst:515 +#: ../../glossary.rst:534 msgid "" "Most of Python's immutable built-in objects are hashable; mutable containers " "(such as lists or dictionaries) are not; immutable containers (such as " @@ -1206,11 +1206,11 @@ msgstr "" "則這些物件會被預設為可雜湊的。它們在互相比較時都是不相等的(除非它們與自己比" "較),而它們的雜湊值則是衍生自它們的 :func:`id`\\ 。" -#: ../../glossary.rst:522 +#: ../../glossary.rst:541 msgid "IDLE" msgstr "IDLE" -#: ../../glossary.rst:524 +#: ../../glossary.rst:543 msgid "" "An Integrated Development Environment for Python. IDLE is a basic editor " "and interpreter environment which ships with the standard distribution of " @@ -1219,11 +1219,11 @@ msgstr "" "Python 的 Integrated Development Environment(整合開發環境)。IDLE 是一個基本" "的編輯器和直譯器環境,它和 Python 的標準發行版本一起被提供。" -#: ../../glossary.rst:527 +#: ../../glossary.rst:546 msgid "immutable" msgstr "immutable(不可變物件)" -#: ../../glossary.rst:529 +#: ../../glossary.rst:548 msgid "" "An object with a fixed value. Immutable objects include numbers, strings " "and tuples. Such an object cannot be altered. A new object has to be " @@ -1235,11 +1235,11 @@ msgstr "" "能被改變的。如果一個不同的值必須被儲存,則必須建立一個新的物件。它們在需要恆" "定雜湊值的地方,扮演重要的角色,例如 dictionary(字典)中的一個鍵。" -#: ../../glossary.rst:534 +#: ../../glossary.rst:553 msgid "import path" msgstr "import path(匯入路徑)" -#: ../../glossary.rst:536 +#: ../../glossary.rst:555 msgid "" "A list of locations (or :term:`path entries `) that are searched " "by the :term:`path based finder` for modules to import. During import, this " @@ -1251,11 +1251,11 @@ msgstr "" "的位置。在 import 期間,此位置列表通常是來自 :data:`sys.path`\\ ,但對於子套" "件 (subpackage) 而言,它也可能是來自父套件的 ``__path__`` 屬性。" -#: ../../glossary.rst:541 +#: ../../glossary.rst:560 msgid "importing" msgstr "importing(匯入)" -#: ../../glossary.rst:543 +#: ../../glossary.rst:562 msgid "" "The process by which Python code in one module is made available to Python " "code in another module." @@ -1263,11 +1263,11 @@ msgstr "" "一個過程。一個模組中的 Python 程式碼可以透過此過程,被另一個模組中的 Python " "程式碼使用。" -#: ../../glossary.rst:545 +#: ../../glossary.rst:564 msgid "importer" msgstr "importer(匯入器)" -#: ../../glossary.rst:547 +#: ../../glossary.rst:566 msgid "" "An object that both finds and loads a module; both a :term:`finder` and :" "term:`loader` object." @@ -1275,11 +1275,11 @@ msgstr "" "一個能夠尋找及載入模組的物件;它既是 :term:`finder`\\ (尋檢器)也是 :term:" "`loader`\\ (載入器)物件。" -#: ../../glossary.rst:549 +#: ../../glossary.rst:568 msgid "interactive" msgstr "interactive(互動的)" -#: ../../glossary.rst:551 +#: ../../glossary.rst:570 msgid "" "Python has an interactive interpreter which means you can enter statements " "and expressions at the interpreter prompt, immediately execute them and see " @@ -1292,11 +1292,11 @@ msgstr "" "從你的電腦的主選單選擇它)。這是測試新想法或檢查模塊和包的非常強大的方法(請" "記住help(x))。" -#: ../../glossary.rst:557 +#: ../../glossary.rst:576 msgid "interpreted" msgstr "interpreted(直譯的)" -#: ../../glossary.rst:559 +#: ../../glossary.rst:578 msgid "" "Python is an interpreted language, as opposed to a compiled one, though the " "distinction can be blurry because of the presence of the bytecode compiler. " @@ -1310,11 +1310,11 @@ msgstr "" "一個執行檔,然後再執行它。直譯語言通常比編譯語言有更短的開發/除錯週期,不過" "它們的程式通常也運行得較慢。另請參閱 :term:`interactive`\\ (互動的)。" -#: ../../glossary.rst:566 +#: ../../glossary.rst:585 msgid "interpreter shutdown" msgstr "interpreter shutdown(直譯器關閉)" -#: ../../glossary.rst:568 +#: ../../glossary.rst:587 msgid "" "When asked to shut down, the Python interpreter enters a special phase where " "it gradually releases all allocated resources, such as modules and various " @@ -1332,18 +1332,18 @@ msgstr "" "段被執行的程式碼會遇到各種例外,因為它所依賴的資源可能不再有作用了(常見的例" "子是函式庫模組或是警告機制)。" -#: ../../glossary.rst:577 +#: ../../glossary.rst:596 msgid "" "The main reason for interpreter shutdown is that the ``__main__`` module or " "the script being run has finished executing." msgstr "" "直譯器關閉的主要原因,是 ``__main__`` 模組或正被運行的腳本已經執行完成。" -#: ../../glossary.rst:579 +#: ../../glossary.rst:598 msgid "iterable" msgstr "iterable(可疊代物件)" -#: ../../glossary.rst:581 +#: ../../glossary.rst:600 msgid "" "An object capable of returning its members one at a time. Examples of " "iterables include all sequence types (such as :class:`list`, :class:`str`, " @@ -1359,7 +1359,7 @@ msgstr "" "`Sequence `\\ (序列)語意的 :meth:`__getitem__` method,該物件就是" "可疊代物件。" -#: ../../glossary.rst:588 +#: ../../glossary.rst:607 msgid "" "Iterables can be used in a :keyword:`for` loop and in many other places " "where a sequence is needed (:func:`zip`, :func:`map`, ...). When an " @@ -1379,11 +1379,11 @@ msgstr "" "於在迴圈期間保有該疊代器。另請參閱 :term:`iterator`\\ (疊代器)、\\ :term:" "`sequence`\\ (序列)和 :term:`generator`\\ (產生器)。" -#: ../../glossary.rst:598 +#: ../../glossary.rst:617 msgid "iterator" msgstr "iterator(疊代器)" -#: ../../glossary.rst:600 +#: ../../glossary.rst:619 msgid "" "An object representing a stream of data. Repeated calls to the iterator's :" "meth:`~iterator.__next__` method (or passing it to the built-in function :" @@ -1412,15 +1412,15 @@ msgstr "" "事(多遍疊代)時,只會回傳在前一遍疊代中被用過的、同一個已被用盡的疊代器物" "件,使其看起來就像一個空的容器。" -#: ../../glossary.rst:615 +#: ../../glossary.rst:634 msgid "More information can be found in :ref:`typeiter`." msgstr "在\\ :ref:`typeiter`\\ 文中可以找到更多資訊。" -#: ../../glossary.rst:616 +#: ../../glossary.rst:635 msgid "key function" msgstr "key function(鍵函式)" -#: ../../glossary.rst:618 +#: ../../glossary.rst:637 msgid "" "A key function or collation function is a callable that returns a value used " "for sorting or ordering. For example, :func:`locale.strxfrm` is used to " @@ -1430,7 +1430,7 @@ msgstr "" "一個用於排序 (sorting) 或定序 (ordering) 的值。例如,\\ :func:`locale." "strxfrm` 被用來產生一個了解區域特定排序慣例的排序鍵。" -#: ../../glossary.rst:623 +#: ../../glossary.rst:642 msgid "" "A number of tools in Python accept key functions to control how elements are " "ordered or grouped. They include :func:`min`, :func:`max`, :func:`sorted`, :" @@ -1442,7 +1442,7 @@ msgstr "" "\\ 、\\ :func:`heapq.merge`\\ 、\\ :func:`heapq.nsmallest`\\ 、\\ :func:" "`heapq.nlargest` 和 :func:`itertools.groupby`\\ 。" -#: ../../glossary.rst:629 +#: ../../glossary.rst:648 msgid "" "There are several ways to create a key function. For example. the :meth:" "`str.lower` method can serve as a key function for case insensitive sorts. " @@ -1460,19 +1460,19 @@ msgstr "" "`~operator.itemgetter` 和 :func:`~operator.methodcaller`\\ 。關於如何建立和使" "用鍵函式的範例,請參閱\\ :ref:`如何排序 `\\ 。" -#: ../../glossary.rst:637 +#: ../../glossary.rst:656 msgid "keyword argument" msgstr "keyword argument(關鍵字引數)" -#: ../../glossary.rst:639 ../../glossary.rst:916 +#: ../../glossary.rst:658 ../../glossary.rst:935 msgid "See :term:`argument`." msgstr "請參閱 :term:`argument`\\ (引數)。" -#: ../../glossary.rst:640 +#: ../../glossary.rst:659 msgid "lambda" msgstr "lambda" -#: ../../glossary.rst:642 +#: ../../glossary.rst:661 msgid "" "An anonymous inline function consisting of a single :term:`expression` which " "is evaluated when the function is called. The syntax to create a lambda " @@ -1482,11 +1482,11 @@ msgstr "" "function),於該函式被呼叫時求值。建立 lambda 函式的語法是 ``lambda " "[parameters]: expression``\\ 。" -#: ../../glossary.rst:645 +#: ../../glossary.rst:664 msgid "LBYL" msgstr "LBYL" -#: ../../glossary.rst:647 +#: ../../glossary.rst:666 msgid "" "Look before you leap. This coding style explicitly tests for pre-conditions " "before making calls or lookups. This style contrasts with the :term:`EAFP` " @@ -1497,7 +1497,7 @@ msgstr "" "地測試先決條件。這種風格與 :term:`EAFP` 方式形成對比,且它的特色是會有許多 :" "keyword:`if` 陳述式的存在。" -#: ../../glossary.rst:652 +#: ../../glossary.rst:671 msgid "" "In a multi-threaded environment, the LBYL approach can risk introducing a " "race condition between \"the looking\" and \"the leaping\". For example, " @@ -1511,11 +1511,11 @@ msgstr "" "了 *key*,則該程式碼就會失效。這個問題可以用鎖 (lock) 或使用 EAFP 編碼方式來" "解決。" -#: ../../glossary.rst:657 +#: ../../glossary.rst:676 msgid "list" msgstr "list(串列)" -#: ../../glossary.rst:659 +#: ../../glossary.rst:678 msgid "" "A built-in Python :term:`sequence`. Despite its name it is more akin to an " "array in other languages than to a linked list since access to elements is " @@ -1525,11 +1525,11 @@ msgstr "" "似其他語言中的一個陣列 (array) 而較不像一個鏈結串列 (linked list),因為存取元" "素的時間複雜度是 O(1)。" -#: ../../glossary.rst:662 +#: ../../glossary.rst:681 msgid "list comprehension" msgstr "list comprehension(串列綜合運算)" -#: ../../glossary.rst:664 +#: ../../glossary.rst:683 msgid "" "A compact way to process all or part of the elements in a sequence and " "return a list with the results. ``result = ['{:#04x}'.format(x) for x in " @@ -1543,11 +1543,11 @@ msgstr "" "keyword:`if` 子句是選擇性的。如果省略它,則 ``range(256)`` 中的所有元素都會被" "處理。" -#: ../../glossary.rst:670 +#: ../../glossary.rst:689 msgid "loader" msgstr "loader(載入器)" -#: ../../glossary.rst:672 +#: ../../glossary.rst:691 msgid "" "An object that loads a module. It must define a method named :meth:" "`load_module`. A loader is typically returned by a :term:`finder`. See :pep:" @@ -1559,19 +1559,19 @@ msgstr "" "`302`,關於 :term:`abstract base class`\\ (抽象基底類別),請參閱 :class:" "`importlib.abc.Loader`\\ 。" -#: ../../glossary.rst:676 +#: ../../glossary.rst:695 msgid "magic method" msgstr "magic method(魔術方法)" -#: ../../glossary.rst:680 +#: ../../glossary.rst:699 msgid "An informal synonym for :term:`special method`." msgstr ":term:`special method`\\ (特殊方法)的一個非正式同義詞。" -#: ../../glossary.rst:681 +#: ../../glossary.rst:700 msgid "mapping" msgstr "mapping(對映)" -#: ../../glossary.rst:683 +#: ../../glossary.rst:702 msgid "" "A container object that supports arbitrary key lookups and implements the " "methods specified in the :class:`~collections.abc.Mapping` or :class:" @@ -1586,11 +1586,11 @@ msgstr "" "的 method。範例包括 :class:`dict`\\ 、\\ :class:`collections.defaultdict`" "\\ 、\\ :class:`collections.OrderedDict` 和 :class:`collections.Counter`\\ 。" -#: ../../glossary.rst:689 +#: ../../glossary.rst:708 msgid "meta path finder" msgstr "meta path finder(元路徑尋檢器)" -#: ../../glossary.rst:691 +#: ../../glossary.rst:710 msgid "" "A :term:`finder` returned by a search of :data:`sys.meta_path`. Meta path " "finders are related to, but different from :term:`path entry finders ` " "相關但是不同。" -#: ../../glossary.rst:695 +#: ../../glossary.rst:714 msgid "" "See :class:`importlib.abc.MetaPathFinder` for the methods that meta path " "finders implement." @@ -1608,11 +1608,11 @@ msgstr "" "關於元路徑尋檢器實作的 method,請參閱 :class:`importlib.abc.MetaPathFinder`" "\\ 。" -#: ../../glossary.rst:697 +#: ../../glossary.rst:716 msgid "metaclass" msgstr "metaclass(元類別)" -#: ../../glossary.rst:699 +#: ../../glossary.rst:718 msgid "" "The class of a class. Class definitions create a class name, a class " "dictionary, and a list of base classes. The metaclass is responsible for " @@ -1632,15 +1632,15 @@ msgstr "" "性存取、增加執行緒安全性、追蹤物件建立、實作單例模式 (singleton),以及許多其" "他的任務。" -#: ../../glossary.rst:709 +#: ../../glossary.rst:728 msgid "More information can be found in :ref:`metaclasses`." msgstr "更多資訊可以在\\ :ref:`metaclasses`\\ 章節中找到。" -#: ../../glossary.rst:710 +#: ../../glossary.rst:729 msgid "method" msgstr "method(方法)" -#: ../../glossary.rst:712 +#: ../../glossary.rst:731 msgid "" "A function which is defined inside a class body. If called as an attribute " "of an instance of that class, the method will get the instance object as its " @@ -1652,11 +1652,11 @@ msgstr "" "通常被稱為 ``self``)。請參閱 :term:`function`\\ (函式)和 :term:`nested " "scope`\\ (巢狀作用域)。" -#: ../../glossary.rst:716 +#: ../../glossary.rst:735 msgid "method resolution order" msgstr "method resolution order(方法解析順序)" -#: ../../glossary.rst:718 +#: ../../glossary.rst:737 msgid "" "Method Resolution Order is the order in which base classes are searched for " "a member during lookup. See `The Python 2.3 Method Resolution Order `_\\ 。" -#: ../../glossary.rst:722 +#: ../../glossary.rst:741 msgid "module" msgstr "module(模組)" -#: ../../glossary.rst:724 +#: ../../glossary.rst:743 msgid "" "An object that serves as an organizational unit of Python code. Modules " "have a namespace containing arbitrary Python objects. Modules are loaded " @@ -1681,15 +1681,15 @@ msgstr "" "空間,它包含任意的 Python 物件。模組是藉由 :term:`importing` 的過程,被載入" "至 Python。" -#: ../../glossary.rst:728 +#: ../../glossary.rst:747 msgid "See also :term:`package`." msgstr "另請參閱 :term:`package`\\ (套件)。" -#: ../../glossary.rst:729 +#: ../../glossary.rst:748 msgid "module spec" msgstr "module spec(模組規格)" -#: ../../glossary.rst:731 +#: ../../glossary.rst:750 msgid "" "A namespace containing the import-related information used to load a module. " "An instance of :class:`importlib.machinery.ModuleSpec`." @@ -1697,19 +1697,19 @@ msgstr "" "一個命名空間,它包含用於載入模組的 import 相關資訊。它是 :class:`importlib." "machinery.ModuleSpec` 的一個實例。" -#: ../../glossary.rst:733 +#: ../../glossary.rst:752 msgid "MRO" msgstr "MRO" -#: ../../glossary.rst:735 +#: ../../glossary.rst:754 msgid "See :term:`method resolution order`." msgstr "請參閱 :term:`method resolution order`\\ (方法解析順序)。" -#: ../../glossary.rst:736 +#: ../../glossary.rst:755 msgid "mutable" msgstr "mutable(可變物件)" -#: ../../glossary.rst:738 +#: ../../glossary.rst:757 msgid "" "Mutable objects can change their value but keep their :func:`id`. See also :" "term:`immutable`." @@ -1717,11 +1717,11 @@ msgstr "" "可變物件可以改變它們的值,但維持它們的 :func:`id`\\ 。另請參閱 :term:" "`immutable`\\ (不可變物件)。" -#: ../../glossary.rst:740 +#: ../../glossary.rst:759 msgid "named tuple" msgstr "named tuple(附名元組)" -#: ../../glossary.rst:742 +#: ../../glossary.rst:761 msgid "" "The term \"named tuple\" applies to any type or class that inherits from " "tuple and whose indexable elements are also accessible using named " @@ -1731,7 +1731,7 @@ msgstr "" "索引 (indexable) 元素也可以用附名屬性來存取。這些型別或 class 也可以具有其他" "的特性。" -#: ../../glossary.rst:746 +#: ../../glossary.rst:765 msgid "" "Several built-in types are named tuples, including the values returned by :" "func:`time.localtime` and :func:`os.stat`. Another example is :data:`sys." @@ -1742,7 +1742,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:757 +#: ../../glossary.rst:776 msgid "" "Some named tuples are built-in types (such as the above examples). " "Alternatively, a named tuple can be created from a regular class definition " @@ -1758,11 +1758,11 @@ msgstr "" "些額外的 method,這些 method 可能是在手寫或內建的 named tuple 中,無法找到" "的。" -#: ../../glossary.rst:764 +#: ../../glossary.rst:783 msgid "namespace" msgstr "namespace(命名空間)" -#: ../../glossary.rst:766 +#: ../../glossary.rst:785 msgid "" "The place where a variable is stored. Namespaces are implemented as " "dictionaries. There are the local, global and built-in namespaces as well " @@ -1782,11 +1782,11 @@ msgstr "" "func:`itertools.islice` 明確地表示,這些函式分別是由 :mod:`random` 和 :mod:" "`itertools` 模組在實作。" -#: ../../glossary.rst:776 +#: ../../glossary.rst:795 msgid "namespace package" msgstr "namespace package(命名空間套件)" -#: ../../glossary.rst:778 +#: ../../glossary.rst:797 msgid "" "A :pep:`420` :term:`package` which serves only as a container for " "subpackages. Namespace packages may have no physical representation, and " @@ -1797,15 +1797,15 @@ msgstr "" "一個容器。命名空間套件可能沒有實體的表示法,而且具體來說它們不像是一個 :term:" "`regular package`\\ (正規套件),因為它們並沒有 ``__init__.py`` 這個檔案。" -#: ../../glossary.rst:783 +#: ../../glossary.rst:802 msgid "See also :term:`module`." msgstr "另請參閱 :term:`module`\\ (模組)。" -#: ../../glossary.rst:784 +#: ../../glossary.rst:803 msgid "nested scope" msgstr "nested scope(巢狀作用域)" -#: ../../glossary.rst:786 +#: ../../glossary.rst:805 msgid "" "The ability to refer to a variable in an enclosing definition. For " "instance, a function defined inside another function can refer to variables " @@ -1820,11 +1820,11 @@ msgstr "" "寫入。同樣地,全域變數是在全域命名空間中讀取及寫入。\\ :keyword:`nonlocal` 容" "許對外層作用域進行寫入。" -#: ../../glossary.rst:793 +#: ../../glossary.rst:812 msgid "new-style class" msgstr "new-style class(新式類別)" -#: ../../glossary.rst:795 +#: ../../glossary.rst:814 msgid "" "Old name for the flavor of classes now used for all class objects. In " "earlier Python versions, only new-style classes could use Python's newer, " @@ -1836,11 +1836,11 @@ msgstr "" "__slots__`\\ 、描述器 (descriptor)、屬性 (property)、\\ :meth:" "`__getattribute__`\\ 、class method(類別方法)和 static method(靜態方法)。" -#: ../../glossary.rst:799 +#: ../../glossary.rst:818 msgid "object" msgstr "object(物件)" -#: ../../glossary.rst:801 +#: ../../glossary.rst:820 msgid "" "Any data with state (attributes or value) and defined behavior (methods). " "Also the ultimate base class of any :term:`new-style class`." @@ -1848,11 +1848,11 @@ msgstr "" "具有狀態(屬性或值)及被定義的行為(method)的任何資料。它也是任何 :term:" "`new-style class`\\ (新式類別)的最終 base class(基底類別)。" -#: ../../glossary.rst:804 +#: ../../glossary.rst:823 msgid "package" msgstr "package(套件)" -#: ../../glossary.rst:806 +#: ../../glossary.rst:825 msgid "" "A Python :term:`module` which can contain submodules or recursively, " "subpackages. Technically, a package is a Python module with an ``__path__`` " @@ -1862,17 +1862,17 @@ msgstr "" "迴的子套件 (subpackage)。技術上而言,套件就是具有 ``__path__`` 屬性的一個 " "Python 模組。" -#: ../../glossary.rst:810 +#: ../../glossary.rst:829 msgid "See also :term:`regular package` and :term:`namespace package`." msgstr "" "另請參閱 :term:`regular package`\\ (正規套件)和 :term:`namespace package`" "\\ (命名空間套件)。" -#: ../../glossary.rst:811 +#: ../../glossary.rst:830 msgid "parameter" msgstr "parameter(參數)" -#: ../../glossary.rst:813 +#: ../../glossary.rst:832 msgid "" "A named entity in a :term:`function` (or method) definition that specifies " "an :term:`argument` (or in some cases, arguments) that the function can " @@ -1882,7 +1882,7 @@ msgstr "" "它指明該函式能夠接受的一個 :term:`argument`\\ (引數),或在某些情況下指示多" "個引數。共有有五種不同的參數類型:" -#: ../../glossary.rst:817 +#: ../../glossary.rst:836 msgid "" ":dfn:`positional-or-keyword`: specifies an argument that can be passed " "either :term:`positionally ` or as a :term:`keyword argument " @@ -1895,7 +1895,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:826 +#: ../../glossary.rst:845 msgid "" ":dfn:`positional-only`: specifies an argument that can be supplied only by " "position. Positional-only parameters can be defined by including a ``/`` " @@ -1908,7 +1908,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:835 +#: ../../glossary.rst:854 msgid "" ":dfn:`keyword-only`: specifies an argument that can be supplied only by " "keyword. Keyword-only parameters can be defined by including a single var-" @@ -1923,7 +1923,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:843 +#: ../../glossary.rst:862 msgid "" ":dfn:`var-positional`: specifies that an arbitrary sequence of positional " "arguments can be provided (in addition to any positional arguments already " @@ -1937,7 +1937,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:851 +#: ../../glossary.rst:870 msgid "" ":dfn:`var-keyword`: specifies that arbitrarily many keyword arguments can be " "provided (in addition to any keyword arguments already accepted by other " @@ -1948,14 +1948,14 @@ msgstr "" "已被其他參數接受的任何關鍵字引數之外)。這類參數是透過在其參數名稱字首加上 " "``**`` 來定義的,例如上面範例中的 *kwargs*。" -#: ../../glossary.rst:857 +#: ../../glossary.rst:876 msgid "" "Parameters can specify both optional and required arguments, as well as " "default values for some optional arguments." msgstr "" "參數可以指明引數是選擇性的或必需的,也可以為一些選擇性的引數指定預設值。" -#: ../../glossary.rst:860 +#: ../../glossary.rst:879 msgid "" "See also the :term:`argument` glossary entry, the FAQ question on :ref:`the " "difference between arguments and parameters `, " @@ -1966,11 +1966,11 @@ msgstr "" "參數之間的差異 `\\ 、\\ :class:`inspect." "Parameter` class、\\ :ref:`function`\\ 章節,以及 :pep:`362`\\ 。" -#: ../../glossary.rst:864 +#: ../../glossary.rst:883 msgid "path entry" msgstr "path entry(路徑項目)" -#: ../../glossary.rst:866 +#: ../../glossary.rst:885 msgid "" "A single location on the :term:`import path` which the :term:`path based " "finder` consults to find modules for importing." @@ -1978,11 +1978,11 @@ msgstr "" "在 :term:`import path`\\ (匯入路徑)中的一個位置,而 :term:`path based " "finder` (基於路徑的尋檢器)會參考該位置來尋找要 import 的模組。" -#: ../../glossary.rst:868 +#: ../../glossary.rst:887 msgid "path entry finder" msgstr "path entry finder(路徑項目尋檢器)" -#: ../../glossary.rst:870 +#: ../../glossary.rst:889 msgid "" "A :term:`finder` returned by a callable on :data:`sys.path_hooks` (i.e. a :" "term:`path entry hook`) which knows how to locate modules given a :term:" @@ -1992,7 +1992,7 @@ msgstr "" "`path entry hook`\\ )所回傳的一種 :term:`finder`\\ ,它知道如何以一個 :term:" "`path entry`\\ 定位模組。" -#: ../../glossary.rst:874 +#: ../../glossary.rst:893 msgid "" "See :class:`importlib.abc.PathEntryFinder` for the methods that path entry " "finders implement." @@ -2000,11 +2000,11 @@ msgstr "" "關於路徑項目尋檢器實作的 method,請參閱 :class:`importlib.abc." "PathEntryFinder`\\ 。" -#: ../../glossary.rst:876 +#: ../../glossary.rst:895 msgid "path entry hook" msgstr "path entry hook(路徑項目鉤)" -#: ../../glossary.rst:878 +#: ../../glossary.rst:897 msgid "" "A callable on the :data:`sys.path_hook` list which returns a :term:`path " "entry finder` if it knows how to find modules on a specific :term:`path " @@ -2014,11 +2014,11 @@ msgstr "" "個特定的 :term:`path entry` 中尋找模組,則會回傳一個 :term:`path entry " "finder`\\ (路徑項目尋檢器)。" -#: ../../glossary.rst:881 +#: ../../glossary.rst:900 msgid "path based finder" msgstr "path based finder(基於路徑的尋檢器)" -#: ../../glossary.rst:883 +#: ../../glossary.rst:902 msgid "" "One of the default :term:`meta path finders ` which " "searches an :term:`import path` for modules." @@ -2026,11 +2026,11 @@ msgstr "" "預設的\\ :term:`元路徑尋檢器 (meta path finder) ` 之一,它" "會在一個 :term:`import path` 中搜尋模組。" -#: ../../glossary.rst:885 +#: ../../glossary.rst:904 msgid "path-like object" msgstr "path-like object(類路徑物件)" -#: ../../glossary.rst:887 +#: ../../glossary.rst:906 msgid "" "An object representing a file system path. A path-like object is either a :" "class:`str` or :class:`bytes` object representing a path, or an object " @@ -2048,11 +2048,11 @@ msgstr "" "`os.fsencode` 則分別可用於確保 :class:`str` 及 :class:`bytes` 的結果。由 :" "pep:`519` 引入。" -#: ../../glossary.rst:895 +#: ../../glossary.rst:914 msgid "PEP" msgstr "PEP" -#: ../../glossary.rst:897 +#: ../../glossary.rst:916 msgid "" "Python Enhancement Proposal. A PEP is a design document providing " "information to the Python community, or describing a new feature for Python " @@ -2063,7 +2063,7 @@ msgstr "" "為 Python 社群提供資訊,或是描述 Python 的一個新功能或該功能的程序和環境。" "PEP 應該要提供簡潔的技術規範以及被提案功能的運作原理。" -#: ../../glossary.rst:903 +#: ../../glossary.rst:922 msgid "" "PEPs are intended to be the primary mechanisms for proposing major new " "features, for collecting community input on an issue, and for documenting " @@ -2075,15 +2075,15 @@ msgstr "" "已納入 Python 的設計決策的記錄,這些過程的主要機制。PEP 的作者要負責在社群內" "建立共識並記錄反對意見。" -#: ../../glossary.rst:909 +#: ../../glossary.rst:928 msgid "See :pep:`1`." msgstr "請參閱 :pep:`1`\\ 。" -#: ../../glossary.rst:910 +#: ../../glossary.rst:929 msgid "portion" msgstr "portion(部分)" -#: ../../glossary.rst:912 +#: ../../glossary.rst:931 msgid "" "A set of files in a single directory (possibly stored in a zip file) that " "contribute to a namespace package, as defined in :pep:`420`." @@ -2091,15 +2091,15 @@ msgstr "" "在單一目錄中的一組檔案(也可能儲存在一個 zip 檔中),這些檔案能對一個命名空間" "套件 (namespace package) 有所貢獻,如同 :pep:`420` 中的定義。" -#: ../../glossary.rst:914 +#: ../../glossary.rst:933 msgid "positional argument" msgstr "positional argument(位置引數)" -#: ../../glossary.rst:917 +#: ../../glossary.rst:936 msgid "provisional API" msgstr "provisional API(暫行 API)" -#: ../../glossary.rst:919 +#: ../../glossary.rst:938 msgid "" "A provisional API is one which has been deliberately excluded from the " "standard library's backwards compatibility guarantees. While major changes " @@ -2115,7 +2115,7 @@ msgstr "" "該介面)。這種變更並不會無端地產生——只有 API 被納入之前未察覺的嚴重基本缺陷被" "揭露時,它們才會發生。" -#: ../../glossary.rst:928 +#: ../../glossary.rst:947 msgid "" "Even for provisional APIs, backwards incompatible changes are seen as a " "\"solution of last resort\" - every attempt will still be made to find a " @@ -2124,7 +2124,7 @@ msgstr "" "即使對於暫行 API,向後不相容的變更也會被視為「最後的解決方案」——對於任何被發" "現的問題,仍然會盡可能找出一個向後相容的解決方案。" -#: ../../glossary.rst:932 +#: ../../glossary.rst:951 msgid "" "This process allows the standard library to continue to evolve over time, " "without locking in problematic design errors for extended periods of time. " @@ -2133,19 +2133,19 @@ msgstr "" "這個過程使得標準函式庫能隨著時間不斷進化,而避免耗費過長的時間去鎖定有問題的" "設計錯誤。請參閱 :pep:`411` 了解更多細節。" -#: ../../glossary.rst:935 +#: ../../glossary.rst:954 msgid "provisional package" msgstr "provisional package(暫行套件)" -#: ../../glossary.rst:937 +#: ../../glossary.rst:956 msgid "See :term:`provisional API`." msgstr "請參閱 :term:`provisional API`\\ (暫行 API)。" -#: ../../glossary.rst:938 +#: ../../glossary.rst:957 msgid "Python 3000" msgstr "Python 3000" -#: ../../glossary.rst:940 +#: ../../glossary.rst:959 msgid "" "Nickname for the Python 3.x release line (coined long ago when the release " "of version 3 was something in the distant future.) This is also abbreviated " @@ -2154,11 +2154,11 @@ msgstr "" "Python 3.x 系列版本的暱稱(很久以前創造的,當時第 3 版的發布是在遙遠的未" "來。)也可以縮寫為「Py3k」。" -#: ../../glossary.rst:943 +#: ../../glossary.rst:962 msgid "Pythonic" msgstr "Pythonic(Python 風格的)" -#: ../../glossary.rst:945 +#: ../../glossary.rst:964 msgid "" "An idea or piece of code which closely follows the most common idioms of the " "Python language, rather than implementing code using concepts common to " @@ -2174,18 +2174,18 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:955 +#: ../../glossary.rst:974 msgid "As opposed to the cleaner, Pythonic method::" msgstr "" "相較之下,以下方法更簡潔、更具有 Python 風格:\n" "\n" "::" -#: ../../glossary.rst:959 +#: ../../glossary.rst:978 msgid "qualified name" msgstr "qualified name(限定名稱)" -#: ../../glossary.rst:961 +#: ../../glossary.rst:980 msgid "" "A dotted name showing the \"path\" from a module's global scope to a class, " "function or method defined in that module, as defined in :pep:`3155`. For " @@ -2198,7 +2198,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:978 +#: ../../glossary.rst:997 msgid "" "When used to refer to modules, the *fully qualified name* means the entire " "dotted path to the module, including any parent packages, e.g. ``email.mime." @@ -2209,11 +2209,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:985 +#: ../../glossary.rst:1004 msgid "reference count" msgstr "reference count(參照計數)" -#: ../../glossary.rst:987 +#: ../../glossary.rst:1006 msgid "" "The number of references to an object. When the reference count of an " "object drops to zero, it is deallocated. Reference counting is generally " @@ -2227,11 +2227,11 @@ msgstr "" "`CPython` 實作的一個關鍵元素。\\ :mod:`sys` 模組定義了一個 :func:`~sys." "getrefcount` 函式,程序設計師可以呼叫該函式來回傳一個特定物件的參照計數。" -#: ../../glossary.rst:993 +#: ../../glossary.rst:1012 msgid "regular package" msgstr "regular package(正規套件)" -#: ../../glossary.rst:995 +#: ../../glossary.rst:1014 msgid "" "A traditional :term:`package`, such as a directory containing an ``__init__." "py`` file." @@ -2239,15 +2239,15 @@ msgstr "" "一個傳統的 :term:`package`\\ (套件),例如一個包含 ``__init__.py`` 檔案的目" "錄。" -#: ../../glossary.rst:998 +#: ../../glossary.rst:1017 msgid "See also :term:`namespace package`." msgstr "另請參閱 :term:`namespace package`\\ (命名空間套件)。" -#: ../../glossary.rst:999 +#: ../../glossary.rst:1018 msgid "__slots__" msgstr "__slots__" -#: ../../glossary.rst:1001 +#: ../../glossary.rst:1020 msgid "" "A declaration inside a class that saves memory by pre-declaring space for " "instance attributes and eliminating instance dictionaries. Though popular, " @@ -2260,11 +2260,11 @@ msgstr "" "最好保留給那種在一個記憶體關鍵 (memory-critical) 的應用程式中存在大量實例的罕" "見情況。" -#: ../../glossary.rst:1006 +#: ../../glossary.rst:1025 msgid "sequence" msgstr "sequence(序列)" -#: ../../glossary.rst:1008 +#: ../../glossary.rst:1027 msgid "" "An :term:`iterable` which supports efficient element access using integer " "indices via the :meth:`__getitem__` special method and defines a :meth:" @@ -2282,7 +2282,7 @@ msgstr "" "對映 (mapping) 而不是序列,因為其查找方式是使用任意的 :term:`immutable` 鍵," "而不是整數。" -#: ../../glossary.rst:1017 +#: ../../glossary.rst:1036 msgid "" "The :class:`collections.abc.Sequence` abstract base class defines a much " "richer interface that goes beyond just :meth:`__getitem__` and :meth:" @@ -2296,11 +2296,11 @@ msgstr "" "`__reversed__`\\ 。實作此擴充介面的型別,可以使用 :func:`~abc.ABCMeta." "register` 被明確地註冊。" -#: ../../glossary.rst:1019 +#: ../../glossary.rst:1043 msgid "set comprehension" msgstr "set comprehension(集合綜合運算)" -#: ../../glossary.rst:1020 +#: ../../glossary.rst:1045 msgid "" "A compact way to process all or part of the elements in an iterable and " "return a set with the results. ``results = {c for c in 'abracadabra' if c " @@ -2311,11 +2311,11 @@ msgstr "" "set 回傳。``results = {c for c in 'abracadabra' if c not in 'abc'}`` 會產生一" "個字串 set:``{'r', 'd'}``。請參閱\\ :ref:`comprehensions`\\ 。" -#: ../../glossary.rst:1024 +#: ../../glossary.rst:1049 msgid "single dispatch" msgstr "single dispatch(單一調度)" -#: ../../glossary.rst:1026 +#: ../../glossary.rst:1051 msgid "" "A form of :term:`generic function` dispatch where the implementation is " "chosen based on the type of a single argument." @@ -2323,11 +2323,11 @@ msgstr "" ":term:`generic function`\\ (泛型函式)調度的一種形式,在此,實作的選擇是基於" "單一引數的型別。" -#: ../../glossary.rst:1028 +#: ../../glossary.rst:1053 msgid "slice" msgstr "slice(切片)" -#: ../../glossary.rst:1030 +#: ../../glossary.rst:1055 msgid "" "An object usually containing a portion of a :term:`sequence`. A slice is " "created using the subscript notation, ``[]`` with colons between numbers " @@ -2339,11 +2339,11 @@ msgstr "" "之間使用冒號,例如 ``in variable_name[1:3:5]``。在括號(下標)符號的內部,會" "使用 :class:`slice` 物件。" -#: ../../glossary.rst:1034 +#: ../../glossary.rst:1059 msgid "special method" msgstr "special method(特殊方法)" -#: ../../glossary.rst:1038 +#: ../../glossary.rst:1063 msgid "" "A method that is called implicitly by Python to execute a certain operation " "on a type, such as addition. Such methods have names starting and ending " @@ -2354,11 +2354,11 @@ msgstr "" "種 method 的名稱會在開頭和結尾有兩個下底線。Special method 在\\ :ref:" "`specialnames`\\ 中有詳細說明。" -#: ../../glossary.rst:1042 +#: ../../glossary.rst:1067 msgid "statement" msgstr "statement(陳述式)" -#: ../../glossary.rst:1044 +#: ../../glossary.rst:1069 msgid "" "A statement is part of a suite (a \"block\" of code). A statement is either " "an :term:`expression` or one of several constructs with a keyword, such as :" @@ -2368,19 +2368,19 @@ msgstr "" "term:`expression`\\ (運算式),或是含有關鍵字(例如 :keyword:`if`\\ 、\\ :" "keyword:`while` 或 :keyword:`for`\\ )的多種結構之一。" -#: ../../glossary.rst:1047 +#: ../../glossary.rst:1072 msgid "text encoding" msgstr "text encoding(文字編碼)" -#: ../../glossary.rst:1049 +#: ../../glossary.rst:1074 msgid "A codec which encodes Unicode strings to bytes." msgstr "將 Unicode 字串編碼為位元組的一個編解碼器 (codec)。" -#: ../../glossary.rst:1050 +#: ../../glossary.rst:1075 msgid "text file" msgstr "text file(文字檔案)" -#: ../../glossary.rst:1052 +#: ../../glossary.rst:1077 msgid "" "A :term:`file object` able to read and write :class:`str` objects. Often, a " "text file actually accesses a byte-oriented datastream and handles the :term:" @@ -2394,7 +2394,7 @@ msgstr "" "有:以文字模式(``'r'`` 或 ``'w'``)開啟的檔案、\\ :data:`sys.stdin`\\ 、\\ :" "data:`sys.stdout` 以及 :class:`io.StringIO` 的實例。" -#: ../../glossary.rst:1059 +#: ../../glossary.rst:1084 msgid "" "See also :term:`binary file` for a file object able to read and write :term:" "`bytes-like objects `." @@ -2402,11 +2402,11 @@ msgstr "" "另請參閱 :term:`binary file`\\ (二進制檔案),它是一個能夠讀取和寫入\\ :" "term:`類位元組串物件 (bytes-like object) ` 的檔案物件。" -#: ../../glossary.rst:1061 +#: ../../glossary.rst:1086 msgid "triple-quoted string" msgstr "triple-quoted string(三引號內字串)" -#: ../../glossary.rst:1063 +#: ../../glossary.rst:1088 msgid "" "A string which is bound by three instances of either a quotation mark (\") " "or an apostrophe ('). While they don't provide any functionality not " @@ -2421,11 +2421,11 @@ msgstr "" "中包含未跳脫 (unescaped) 的單引號和雙引號,而且它們不需使用連續字元 " "(continuation character) 就可以跨越多行,這使得它們在編寫說明字串時特別有用。" -#: ../../glossary.rst:1070 +#: ../../glossary.rst:1095 msgid "type" msgstr "type(型別)" -#: ../../glossary.rst:1072 +#: ../../glossary.rst:1097 msgid "" "The type of a Python object determines what kind of object it is; every " "object has a type. An object's type is accessible as its :attr:`~instance." @@ -2435,15 +2435,15 @@ msgstr "" "件的型別可以用它的 :attr:`~instance.__class__` 屬性來存取,或以 " "``type(obj)`` 來檢索。" -#: ../../glossary.rst:1076 +#: ../../glossary.rst:1101 msgid "type alias" msgstr "type alias(型別別名)" -#: ../../glossary.rst:1078 +#: ../../glossary.rst:1103 msgid "A synonym for a type, created by assigning the type to an identifier." msgstr "一個型別的同義詞,透過將型別指定給一個識別符 (identifier) 來建立。" -#: ../../glossary.rst:1080 +#: ../../glossary.rst:1105 msgid "" "Type aliases are useful for simplifying :term:`type hints `. For " "example::" @@ -2452,22 +2452,22 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1089 +#: ../../glossary.rst:1112 msgid "could be made more readable like this::" msgstr "" "可以寫成這樣,更具有可讀性:\n" "\n" "::" -#: ../../glossary.rst:1098 ../../glossary.rst:1112 +#: ../../glossary.rst:1119 ../../glossary.rst:1133 msgid "See :mod:`typing` and :pep:`484`, which describe this functionality." msgstr "請參閱 :mod:`typing` 和 :pep:`484`\\ ,有此功能的描述。" -#: ../../glossary.rst:1099 +#: ../../glossary.rst:1120 msgid "type hint" msgstr "type hint(型別提示)" -#: ../../glossary.rst:1101 +#: ../../glossary.rst:1122 msgid "" "An :term:`annotation` that specifies the expected type for a variable, a " "class attribute, or a function parameter or return value." @@ -2475,7 +2475,7 @@ msgstr "" "一種 :term:`annotation`\\ (註釋),它指定一個變數、一個 class 屬性或一個函式" "的參數或回傳值的預期型別。" -#: ../../glossary.rst:1104 +#: ../../glossary.rst:1125 msgid "" "Type hints are optional and are not enforced by Python but they are useful " "to static type analysis tools, and aid IDEs with code completion and " @@ -2484,7 +2484,7 @@ msgstr "" "型別提示是選擇性的,而不是被 Python 強制的,但它們對靜態型別分析工具很有用," "並能協助 IDE 完成程式碼的補全 (completion) 和重構 (refactoring)。" -#: ../../glossary.rst:1108 +#: ../../glossary.rst:1129 msgid "" "Type hints of global variables, class attributes, and functions, but not " "local variables, can be accessed using :func:`typing.get_type_hints`." @@ -2492,11 +2492,11 @@ msgstr "" "全域變數、class 屬性和函式(不含區域變數)的型別提示,都可以使用 :func:" "`typing.get_type_hints` 來存取。" -#: ../../glossary.rst:1113 +#: ../../glossary.rst:1134 msgid "universal newlines" msgstr "universal newlines(通用換行字元)" -#: ../../glossary.rst:1115 +#: ../../glossary.rst:1136 msgid "" "A manner of interpreting text streams in which all of the following are " "recognized as ending a line: the Unix end-of-line convention ``'\\n'``, the " @@ -2509,15 +2509,15 @@ msgstr "" "``'\\r'``。請參閱 :pep:`278` 和 :pep:`3116`\\ ,以及用於 :func:`bytes." "splitlines` 的附加用途。" -#: ../../glossary.rst:1120 +#: ../../glossary.rst:1141 msgid "variable annotation" msgstr "variable annotation(變數註釋)" -#: ../../glossary.rst:1122 +#: ../../glossary.rst:1143 msgid "An :term:`annotation` of a variable or a class attribute." msgstr "一個變數或 class 屬性的 :term:`annotation`\\ (註釋)。" -#: ../../glossary.rst:1124 +#: ../../glossary.rst:1145 msgid "" "When annotating a variable or a class attribute, assignment is optional::" msgstr "" @@ -2525,7 +2525,7 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1129 +#: ../../glossary.rst:1150 msgid "" "Variable annotations are usually used for :term:`type hints `: " "for example this variable is expected to take :class:`int` values::" @@ -2535,11 +2535,11 @@ msgstr "" "\n" "::" -#: ../../glossary.rst:1135 +#: ../../glossary.rst:1156 msgid "Variable annotation syntax is explained in section :ref:`annassign`." msgstr "變數註釋的語法在\\ :ref:`annassign`\\ 章節有詳細的解釋。" -#: ../../glossary.rst:1137 +#: ../../glossary.rst:1158 msgid "" "See :term:`function annotation`, :pep:`484` and :pep:`526`, which describe " "this functionality." @@ -2547,11 +2547,11 @@ msgstr "" "請參閱 :term:`function annotation`\\ (函式註釋)、\\ :pep:`484` 和 :pep:" "`526`\\ ,皆有此功能的描述。" -#: ../../glossary.rst:1139 +#: ../../glossary.rst:1160 msgid "virtual environment" msgstr "virtual environment(虛擬環境)" -#: ../../glossary.rst:1141 +#: ../../glossary.rst:1162 msgid "" "A cooperatively isolated runtime environment that allows Python users and " "applications to install and upgrade Python distribution packages without " @@ -2562,15 +2562,15 @@ msgstr "" "程式得以安裝和升級 Python 發佈套件,而不會對同一個系統上運行的其他 Python 應" "用程式的行為產生干擾。" -#: ../../glossary.rst:1146 +#: ../../glossary.rst:1167 msgid "See also :mod:`venv`." msgstr "另請參閱 :mod:`venv`\\ 。" -#: ../../glossary.rst:1147 +#: ../../glossary.rst:1168 msgid "virtual machine" msgstr "virtual machine(虛擬機器)" -#: ../../glossary.rst:1149 +#: ../../glossary.rst:1170 msgid "" "A computer defined entirely in software. Python's virtual machine executes " "the :term:`bytecode` emitted by the bytecode compiler." @@ -2578,11 +2578,11 @@ msgstr "" "一部完全由軟體所定義的電腦 (computer)。Python 的虛擬機器會執行由 :term:" "`bytecode`\\ (位元組碼)編譯器所發出的位元組碼。" -#: ../../glossary.rst:1151 +#: ../../glossary.rst:1172 msgid "Zen of Python" msgstr "Zen of Python(Python 之禪)" -#: ../../glossary.rst:1153 +#: ../../glossary.rst:1174 msgid "" "Listing of Python design principles and philosophies that are helpful in " "understanding and using the language. The listing can be found by typing "