From b1fcd0a7031861a5d3cf43eac01512e98e0948a1 Mon Sep 17 00:00:00 2001 From: Payon Date: Thu, 15 Aug 2024 14:08:08 +0800 Subject: [PATCH 1/5] feat: to rst:538 --- library/itertools.po | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index e6f6d956c8..10ff7aec77 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-02 00:03+0000\n" -"PO-Revision-Date: 2024-07-09 13:34+0800\n" +"PO-Revision-Date: 2024-08-15 14:07+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -42,8 +42,8 @@ msgid "" "efficiently in pure Python." msgstr "" "這個模組標準化了快速且高效率利用記憶體的核心工具集,這些工具本身或組合使用都" -"很有用。它們共同構成了一個「疊代器代數 (iterator algebra)」,使得在純 " -"Python 中簡潔且高效地建構專用工具成為可能。" +"很有用。它們共同構成了一個「疊代器代數 (iterator algebra)」,使得在純 Python " +"中簡潔且高效地建構專用工具成為可能。" #: ../../library/itertools.rst:29 msgid "" @@ -543,7 +543,7 @@ msgid "" "when ``r > n``." msgstr "" "輸出是 :func:`product` 的子序列,僅保留作為 *iterable* 子序列的條目。輸出的長" -"度由 :func:`math.comb` 給定,當 ``0 ≤ r ≤ n`` 時,計算 ``n! / r! / (n - r)!" +"度由 :func:`math.comb` 給定,當 ``0 ≤ r ≤ n`` 時,長度為 ``n! / r! / (n - r)!" "``,當 ``r > n`` 時為零。" #: ../../library/itertools.rst:228 @@ -561,8 +561,8 @@ msgid "" "If the input elements are unique, there will be no repeated values within " "each combination." msgstr "" -"元素是根據它們的位置(而非值)來決定其唯一性。如果輸入的元素都是獨特" -"的,則每個組合內將不會有重複的值。" +"元素是根據它們的位置(而非值)來決定其唯一性。如果輸入的元素都是獨特的,則每" +"個組合內將不會有重複的值。" #: ../../library/itertools.rst:263 msgid "" @@ -597,8 +597,8 @@ msgid "" "If the input elements are unique, the generated combinations will also be " "unique." msgstr "" -"元素是根據它們的位置(而非值)來決定其唯一性。如果輸入的元素都是獨特" -"的,生成的組合也將是獨特的。" +"元素是根據它們的位置(而非值)來決定其唯一性。如果輸入的元素都是獨特的,生成" +"的組合也將是獨特的。" #: ../../library/itertools.rst:305 msgid "" @@ -682,8 +682,8 @@ msgid "" msgstr "" "建立一個疊代器,回傳 *iterable* 中連續的鍵和群組。*key* 是一個為每個元素計算" "鍵值的函式。如果其未指定或為 ``None``,則 *key* 預設為一個識別性函式 " -"(identity function),並回傳未被更改的元素。一般來說,可疊代物件需要已經用相" -"同的鍵函式進行排序。" +"(identity function),並回傳未被更改的元素。一般來說,可疊代物件需要已經用相同" +"的鍵函式進行排序。" #: ../../library/itertools.rst:406 msgid "" @@ -719,18 +719,24 @@ msgid "" "like sequence slicing but does not support negative values for *start*, " "*stop*, or *step*." msgstr "" +"建立一個疊代器,回傳從 iterable 中選取的元素。其作用類似於序列切片 (sequence " +"slicing),但不支援負數的 *start*、*stop* 或 *step* 的值。" #: ../../library/itertools.rst:466 msgid "" "If *start* is zero or ``None``, iteration starts at zero. Otherwise, " "elements from the iterable are skipped until *start* is reached." msgstr "" +"如果 *start* 為零或 ``None``,則從零開始疊代。否則在達到 *start*之前,會跳過 " +"iterable 中的元素。" #: ../../library/itertools.rst:469 msgid "" "If *stop* is ``None``, iteration continues until the iterator is exhausted, " "if at all. Otherwise, it stops at the specified position." msgstr "" +"如果 *stop* 為 ``None``,則疊代將繼續前進直到疊代器耗盡。如果指定了 *stop*," +"則在達到指定位置時停止。" #: ../../library/itertools.rst:472 msgid "" @@ -738,10 +744,12 @@ msgid "" "consecutively unless *step* is set higher than one which results in items " "being skipped." msgstr "" +"如果 *step* 為 ``None``,則步長 (step) 預設為一。元素會連續回傳,除非將 " +"*step* 設定為大於一,這會導致一些項目被跳過。" #: ../../library/itertools.rst:501 msgid "Return successive overlapping pairs taken from the input *iterable*." -msgstr "" +msgstr "回傳從輸入的 *iterable* 中提取的連續重疊對。" #: ../../library/itertools.rst:503 msgid "" @@ -749,18 +757,24 @@ msgid "" "number of inputs. It will be empty if the input iterable has fewer than two " "values." msgstr "" +"輸出疊代器中的 2 元組數量將比輸入少一個。如果輸入的可疊代物件中的值少於兩個," +"則輸出將為空值。" #: ../../library/itertools.rst:522 msgid "" "Return successive *r* length `permutations of elements `_ from the *iterable*." msgstr "" +"回傳 *iterable* 中連續且長度為 *r* 的\\ `元素排列 `_ 。" #: ../../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 "" +"如果未指定 *r* 或其值為 ``None``,則 *r* 預設為 *iterable* 的長度,並產生所有" +"可能的完整長度的排列。" #: ../../library/itertools.rst:529 msgid "" @@ -769,6 +783,9 @@ msgid "" "`math.perm` which computes ``n! / (n - r)!`` when ``0 ≤ r ≤ n`` or zero when " "``r > n``." msgstr "" +"輸出是 :func:`product` 的子序列,其中重複元素的條目已被濾除。輸出的長度由 :" +"func:`math.perm` 給定,當 ``0 ≤ r ≤ n`` 時,長度為 ``n! / (n - r)!``,當 ``r " +"> n`` 時為零。" #: ../../library/itertools.rst:534 msgid "" @@ -776,6 +793,8 @@ msgid "" "order of the input *iterable*. If the input *iterable* is sorted, the " "output tuples will be produced in sorted order." msgstr "" +"根據輸入值 *iterable* 的順序,排列的元組會按照字典順序輸出。如果輸入的 " +"*iterable* 已排序,則輸出的元組也將按排序的順序產生。" #: ../../library/itertools.rst:538 msgid "" @@ -783,6 +802,8 @@ msgid "" "If the input elements are unique, there will be no repeated values within a " "permutation." msgstr "" +"元素是根據它們的位置(而非值)來決定其唯一性。如果輸入的元素都是獨特的,則排" +"列中將不會有重複的值。" #: ../../library/itertools.rst:575 msgid "Cartesian product of input iterables." From b59d99a6475d85641d1ad72f7ee15831894c68e3 Mon Sep 17 00:00:00 2001 From: Payon Date: Thu, 15 Aug 2024 14:19:38 +0800 Subject: [PATCH 2/5] fix: fix sphinx --- library/itertools.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 10ff7aec77..4dae880173 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-02 00:03+0000\n" -"PO-Revision-Date: 2024-08-15 14:07+0800\n" +"PO-Revision-Date: 2024-08-15 14:19+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -727,8 +727,8 @@ msgid "" "If *start* is zero or ``None``, iteration starts at zero. Otherwise, " "elements from the iterable are skipped until *start* is reached." msgstr "" -"如果 *start* 為零或 ``None``,則從零開始疊代。否則在達到 *start*之前,會跳過 " -"iterable 中的元素。" +"如果 *start* 為零或 ``None``,則從零開始疊代。否則在達到 *start* 之前,會跳" +"過 iterable 中的元素。" #: ../../library/itertools.rst:469 msgid "" From 2e892c67d8b67ae2b0f6b70860a214eb7b481f2b Mon Sep 17 00:00:00 2001 From: Payon Date: Thu, 15 Aug 2024 21:23:06 +0800 Subject: [PATCH 3/5] feat: to rst:605 --- library/itertools.po | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 4dae880173..9b753cb80b 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-02 00:03+0000\n" -"PO-Revision-Date: 2024-08-15 14:19+0800\n" +"PO-Revision-Date: 2024-08-15 21:22+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -807,7 +807,7 @@ msgstr "" #: ../../library/itertools.rst:575 msgid "Cartesian product of input iterables." -msgstr "" +msgstr "輸入的 iterables 的笛卡爾乘積。" #: ../../library/itertools.rst:577 msgid "" @@ -815,6 +815,8 @@ msgid "" "example, ``product(A, B)`` returns the same as ``((x,y) for x in A for y in " "B)``." msgstr "" +"大致等價於產生器運算式中的巢狀 for 迴圈。例如,``product(A, B)`` 的回傳結果" +"與 ``((x,y) for x in A for y in B)`` 相同。" #: ../../library/itertools.rst:580 msgid "" @@ -823,6 +825,8 @@ msgid "" "if the input's iterables are sorted, the product tuples are emitted in " "sorted order." msgstr "" +"巢狀迴圈的循環類似於里程表,最右邊的元素在每次疊代時前進。這種模式會建立字典" +"順序,因此如果輸入的 iterables 已排序,則輸出的乘積元組也將按排序的順序產生。" #: ../../library/itertools.rst:585 msgid "" @@ -830,12 +834,16 @@ msgid "" "repetitions with the optional *repeat* keyword argument. For example, " "``product(A, repeat=4)`` means the same as ``product(A, A, A, A)``." msgstr "" +"要計算可疊代物件自身的乘積,可以使用可選的 *repeat* 關鍵字引數來指定重複次" +"數。例如,``product(A, repeat=4)`` 與 ``product(A, A, A, A)`` 相同。" #: ../../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:605 msgid "" @@ -843,6 +851,8 @@ msgid "" "keeping pools of values in memory to generate the products. Accordingly, it " "is only useful with finite inputs." msgstr "" +"在 :func:`product` 執行之前,它會完全消耗輸入的 iterables,並將值的池 (pools " +"of values) 保存在記憶體中以產生乘積。因此,它僅對有限的輸入有用。" #: ../../library/itertools.rst:612 msgid "" From 4bfd0c7795d8a50aceb5d9b90015dc6cc42500a5 Mon Sep 17 00:00:00 2001 From: Payon Date: Fri, 16 Aug 2024 15:01:26 +0800 Subject: [PATCH 4/5] feat: to rst:956 --- library/itertools.po | 66 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 11 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 9b753cb80b..93554ba8c6 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Python 3.12\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-06-02 00:03+0000\n" -"PO-Revision-Date: 2024-08-15 21:22+0800\n" +"PO-Revision-Date: 2024-08-16 15:01+0800\n" "Last-Translator: Adrian Liaw \n" "Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-" "tw)\n" @@ -606,8 +606,8 @@ msgid "" "element in *selectors* is true. Stops when either the *data* or *selectors* " "iterables have been exhausted. Roughly equivalent to::" msgstr "" -"建立一個疊代器,回傳 *data* 中對應 *selectors* 的元素為真的元素。當 *data* " -"或 *selectors* 可疊代物件耗盡時停止。大致等價於: ::" +"建立一個疊代器,回傳 *data* 中對應 *selectors* 的元素為 true 的元素。當 " +"*data* 或 *selectors* 可疊代物件耗盡時停止。大致等價於: ::" #: ../../library/itertools.rst:319 msgid "" @@ -652,8 +652,8 @@ msgid "" "*predicate* is true and afterwards returns every element. Roughly " "equivalent to::" msgstr "" -"建立一個疊代器,在 *predicate* 為真時丟棄 *iterable* 中的元素,之後回傳每個元" -"素。大致等價於:" +"建立一個疊代器,在 *predicate* 為 true 時丟棄 *iterable* 中的元素,之後回傳每" +"個元素。大致等價於:" #: ../../library/itertools.rst:378 msgid "" @@ -859,12 +859,14 @@ msgid "" "Make an iterator that returns *object* over and over again. Runs " "indefinitely unless the *times* argument is specified." msgstr "" +"建立一個疊代器,反覆回傳 *object*。除非指定了 *times* 引數,否則會執行無限" +"次。" #: ../../library/itertools.rst:626 msgid "" "A common use for *repeat* is to supply a stream of constant values to *map* " "or *zip*:" -msgstr "" +msgstr "*repeat* 的常見用途是為 *map* 或 *zip* 提供定值的串流:" #: ../../library/itertools.rst:637 msgid "" @@ -872,6 +874,8 @@ msgid "" "the *iterable*. Used instead of :func:`map` when argument parameters have " "already been \"pre-zipped\" into tuples." msgstr "" +"建立一個疊代器,使用從 *iterable* 獲取的引數計算 *function* 。當引數參數已經" +"被「預先壓縮”」成元組時,使用此方法代替 :func:`map`。" #: ../../library/itertools.rst:641 msgid "" @@ -879,12 +883,16 @@ msgid "" "distinction between ``function(a,b)`` and ``function(*c)``. Roughly " "equivalent to::" msgstr "" +":func:`map` 和 :func:`starmap` 之間的區別類似於 ``function(a,b)`` 和 " +"``function(*c)`` 之間的區別。大致等價於:" #: ../../library/itertools.rst:653 msgid "" "Make an iterator that returns elements from the *iterable* as long as the " "*predicate* is true. Roughly equivalent to::" msgstr "" +"建立一個疊代器,只在 *predicate* 為 true 時回傳 *iterable* 中的元素。大致等價" +"於:" #: ../../library/itertools.rst:663 msgid "" @@ -895,10 +903,15 @@ msgid "" "consider using `more-iterools before_and_after() `_ instead." msgstr "" +"注意,第一個不符合條件判斷的元素將從輸入疊代器中被消耗,且無法再存取它。如果" +"應用程式希望在 *takewhile* 耗盡後進一步消耗輸入疊代器,這可能會是個問題。為了" +"解決這個問題,可以考慮使用 `more-itertools 中的 before_and_after() `_ 作為替代。" #: ../../library/itertools.rst:674 msgid "Return *n* independent iterators from a single iterable." -msgstr "" +msgstr "從一個 iterable 中回傳 *n* 個獨立的疊代器。" #: ../../library/itertools.rst:694 msgid "" @@ -906,6 +919,8 @@ msgid "" "used anywhere else; otherwise, the *iterable* could get advanced without the " "tee objects being informed." msgstr "" +"一旦建立了 :func:`tee`,原始的 *iterable* 不應在其他地方使用;否則," +"*iterable* 可能會在 tee 物件未被通知的情況下前進。" #: ../../library/itertools.rst:698 msgid "" @@ -913,6 +928,9 @@ msgid "" "when simultaneously using iterators returned by the same :func:`tee` call, " "even if the original *iterable* is threadsafe." msgstr "" +"``tee`` 疊代器不是執行緒安全 (threadsafe) 的。當同時使用由同一個 :func:`tee` " +"呼叫所回傳的疊代器時,即使原始的 *iterable* 是執行緒安全的,也可能引發 :exc:" +"`RuntimeError`。" #: ../../library/itertools.rst:702 msgid "" @@ -921,20 +939,25 @@ msgid "" "most or all of the data before another iterator starts, it is faster to use :" "func:`list` instead of :func:`tee`." msgstr "" +"此 itertool 可能需要大量的輔助儲存空間(取決於需要儲存多少臨時資料)。通常如" +"果一個疊代器在另一個疊代器開始之前使用了大部分或全部的資料,使用 :func:" +"`list` 會比 :func:`tee` 更快。" #: ../../library/itertools.rst:710 msgid "Make an iterator that aggregates elements from each of the *iterables*." -msgstr "" +msgstr "建立一個疊代器,聚合來自每個 *iterables* 中的元素。" #: ../../library/itertools.rst:713 msgid "" "If the iterables are of uneven length, missing values are filled-in with " "*fillvalue*. If not specified, *fillvalue* defaults to ``None``." msgstr "" +"如果 iterables 的長度不一,則使用 *fillvalue* 填充缺少的值。如果未指定," +"*fillvalue* 會預設為 ``None``。" #: ../../library/itertools.rst:716 msgid "Iteration continues until the longest iterable is exhausted." -msgstr "" +msgstr "疊代將持續直到最長的可疊代物件耗盡為止。" #: ../../library/itertools.rst:742 msgid "" @@ -942,16 +965,19 @@ msgid "" "`zip_longest` function should be wrapped with something that limits the " "number of calls (for example :func:`islice` or :func:`takewhile`)." msgstr "" +"如果其中一個 iterables 可能是無限的,那麼應該用別的可以限制呼叫次數的方法來來" +"包裝 :func:`zip_longest` 函式(例如 :func:`islice` 或 :func:`takewhile`)。" #: ../../library/itertools.rst:750 msgid "Itertools Recipes" -msgstr "" +msgstr "Itertools 應用技巧" #: ../../library/itertools.rst:752 msgid "" "This section shows recipes for creating an extended toolset using the " "existing itertools as building blocks." msgstr "" +"此段落展示了使用現有的 itertools 作為構建塊來建立擴展工具集的應用技巧。" #: ../../library/itertools.rst:755 msgid "" @@ -964,6 +990,12 @@ msgid "" "`collections` modules as well as with the built-in itertools such as " "``map()``, ``filter()``, ``reversed()``, and ``enumerate()``." msgstr "" +"itertools 應用技巧的主要目的是教學。這些應用技巧展示了對單個工具進行思考的各" +"種方式 —— 例如,``chain.from_iterable`` 與攤平 (flattening) 的概念相關。這些" +"應用技巧還提供了組合使用工具的想法 —— 例如,``starmap()`` 和 ``repeat()`` 如" +"何一起工作。另外還展示了將 itertools 與 :mod:`operator` 和 :mod:" +"`collections` 模組一同使用以及與內建 itertools(如 ``map()``、``filter()``、" +"``reversed()`` 和 ``enumerate()``)一同使用的模式。" #: ../../library/itertools.rst:764 msgid "" @@ -972,12 +1004,18 @@ msgid "" "as recipes. Currently, the ``sliding_window()``, ``iter_index()``, and " "``sieve()`` recipes are being tested to see whether they prove their worth." msgstr "" +"應用技巧的次要目的是作為 itertools 的孵化器。``accumulate()``, " +"``compress()`` 和 ``pairwise()`` itertools 最初都是作為應用技巧出現的。目前," +"``sliding_window()``, ``iter_index()`` 和 ``sieve()`` 的應用技巧正在被測試," +"以確定它們是否有價值被收錄到內建的 itertools 中。" #: ../../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 "" +"幾乎所有這些應用技巧以及許多其他應用技巧都可以從 Python Package Index 上的 :" +"pypi:`more-itertools` 專案中安裝: ::" #: ../../library/itertools.rst:775 msgid "" @@ -990,10 +1028,16 @@ msgid "" "of for-loops and :term:`generators ` which incur interpreter " "overhead." msgstr "" +"許多應用技巧提供了與底層工具集相同的高性能。通過一次處理一個元素而不是將整個" +"可疊代物件一次性引入記憶體,能保持優異的記憶體性能。以\\ `函式風格 " +"(functional style) `_ 將工具連接在一起,能將程式碼的數量維持在較少的情況。通過優先使" +"用「向量化 (vectorized)」的構建塊而不是使用會造成直譯器負擔的 for 迴圈和\\ :" +"term:`產生器 `,則能保持高速度。" #: ../../library/itertools.rst:956 msgid "The following recipes have a more mathematical flavor:" -msgstr "" +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``" From 7f6a842f8837d395969fdc359ac3e3753595f6c3 Mon Sep 17 00:00:00 2001 From: Payon Date: Fri, 16 Aug 2024 16:30:51 +0800 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Wei-Hsiang (Matt) Wang --- library/itertools.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/itertools.po b/library/itertools.po index 93554ba8c6..cbd6058e60 100644 --- a/library/itertools.po +++ b/library/itertools.po @@ -875,7 +875,7 @@ msgid "" "already been \"pre-zipped\" into tuples." msgstr "" "建立一個疊代器,使用從 *iterable* 獲取的引數計算 *function* 。當引數參數已經" -"被「預先壓縮”」成元組時,使用此方法代替 :func:`map`。" +"被「預先壓縮 (pre-zipped)」成元組時,使用此方法代替 :func:`map`。" #: ../../library/itertools.rst:641 msgid "" @@ -965,7 +965,7 @@ msgid "" "`zip_longest` function should be wrapped with something that limits the " "number of calls (for example :func:`islice` or :func:`takewhile`)." msgstr "" -"如果其中一個 iterables 可能是無限的,那麼應該用別的可以限制呼叫次數的方法來來" +"如果其中一個 iterables 可能是無限的,那麼應該用別的可以限制呼叫次數的方法來" "包裝 :func:`zip_longest` 函式(例如 :func:`islice` 或 :func:`takewhile`)。" #: ../../library/itertools.rst:750 @@ -1006,7 +1006,7 @@ msgid "" msgstr "" "應用技巧的次要目的是作為 itertools 的孵化器。``accumulate()``, " "``compress()`` 和 ``pairwise()`` itertools 最初都是作為應用技巧出現的。目前," -"``sliding_window()``, ``iter_index()`` 和 ``sieve()`` 的應用技巧正在被測試," +"``sliding_window()``、``iter_index()`` 和 ``sieve()`` 的應用技巧正在被測試," "以確定它們是否有價值被收錄到內建的 itertools 中。" #: ../../library/itertools.rst:769 @@ -1028,10 +1028,10 @@ msgid "" "of for-loops and :term:`generators ` which incur interpreter " "overhead." msgstr "" -"許多應用技巧提供了與底層工具集相同的高性能。通過一次處理一個元素而不是將整個" +"許多應用技巧提供了與底層工具集相同的高性能。透過一次處理一個元素而不是將整個" "可疊代物件一次性引入記憶體,能保持優異的記憶體性能。以\\ `函式風格 " "(functional style) `_ 將工具連接在一起,能將程式碼的數量維持在較少的情況。通過優先使" +"whyfp90.pdf>`_ 將工具連接在一起,能將程式碼的數量維持在較少的情況。透過優先使" "用「向量化 (vectorized)」的構建塊而不是使用會造成直譯器負擔的 for 迴圈和\\ :" "term:`產生器 `,則能保持高速度。"