Skip to content

Commit 573d7b2

Browse files
committed
feat: to rst:412
1 parent a6bb41d commit 573d7b2

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

library/itertools.po

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version: Python 3.12\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2024-06-02 00:03+0000\n"
11-
"PO-Revision-Date: 2024-07-08 20:17+0800\n"
11+
"PO-Revision-Date: 2024-07-08 22:13+0800\n"
1212
"Last-Translator: Adrian Liaw <[email protected]>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -520,7 +520,7 @@ msgid ""
520520
"sequence. Roughly equivalent to::"
521521
msgstr ""
522522
"建立一個疊代器,從第一個可疊代物件回傳元素直到其耗盡,然後繼續處理下一個可疊"
523-
"代物件,直到所有可疊代物件都耗盡。用於將連續的序列做為單一序列處理。大致等同"
523+
"代物件,直到所有可疊代物件都耗盡。用於將連續的序列做為單一序列處理。大致等價"
524524
"於: ::"
525525

526526
#: ../../library/itertools.rst:210
@@ -529,7 +529,7 @@ msgid ""
529529
"iterable argument that is evaluated lazily. Roughly equivalent to::"
530530
msgstr ""
531531
":func:`chain` 的另一個建構函式。從單個可疊代的引數中得到鏈接的輸入,該引數是"
532-
"惰性計算的。大致等同於:"
532+
"惰性計算的。大致等價於:"
533533

534534
#: ../../library/itertools.rst:221
535535
msgid "Return *r* length subsequences of elements from the input *iterable*."
@@ -637,32 +637,40 @@ msgid ""
637637
"each. When the iterable is exhausted, return elements from the saved copy. "
638638
"Repeats indefinitely. Roughly equivalent to::"
639639
msgstr ""
640+
"建立一個疊代器,回傳 *iterable* 中的元素並保存每個元素的副本。當可疊代物件耗"
641+
"盡時,從保存的副本中回傳元素。會無限次的重複。大致等價於: ::"
640642

641643
#: ../../library/itertools.rst:356
642644
msgid ""
643645
"This itertool may require significant auxiliary storage (depending on the "
644646
"length of the iterable)."
645-
msgstr ""
647+
msgstr "此 itertool 可能需要大量的輔助儲存空間(取決於可疊代物件的長度)。"
646648

647649
#: ../../library/itertools.rst:362
648650
msgid ""
649651
"Make an iterator that drops elements from the *iterable* while the "
650652
"*predicate* is true and afterwards returns every element. Roughly "
651653
"equivalent to::"
652654
msgstr ""
655+
"建立一個疊代器,在 *predicate* 為真時丟棄 *iterable* 中的元素,之後回傳每個元"
656+
"素。大致等價於:"
653657

654658
#: ../../library/itertools.rst:378
655659
msgid ""
656660
"Note this does not produce *any* output until the predicate first becomes "
657661
"false, so this itertool may have a lengthy start-up time."
658662
msgstr ""
663+
"注意,在 predicate 首次變為 False 之前,這不會產生\\ *任何*\\ 輸出,所以此 "
664+
"itertool 可能會有較長的啟動時間。"
659665

660666
#: ../../library/itertools.rst:384
661667
msgid ""
662668
"Make an iterator that filters elements from the *iterable* returning only "
663669
"those for which the *predicate* returns a false value. If *predicate* is "
664670
"``None``, returns the items that are false. Roughly equivalent to::"
665671
msgstr ""
672+
"建立一個疊代器,過濾 *iterable* 中的元素,僅回傳 *predicate* 為 False 值的元"
673+
"素。如果 *predicate* 是 ``None``,則回傳為 False 的項目。大致等價於: ::"
666674

667675
#: ../../library/itertools.rst:400
668676
msgid ""
@@ -672,6 +680,10 @@ msgid ""
672680
"returns the element unchanged. Generally, the iterable needs to already be "
673681
"sorted on the same key function."
674682
msgstr ""
683+
"建立一個疊代器,回傳 *iterable* 中連續的鍵和群組。*key* 是一個為每個元素計算"
684+
"鍵值的函式。如果其未指定或為 ``None``,則 *key* 預設為一個識別性函式 "
685+
"(identity function ),並回傳未被更改的元素。一般來說,可疊代物件需要已經用相"
686+
"同的鍵函式進行排序。"
675687

676688
#: ../../library/itertools.rst:406
677689
msgid ""
@@ -681,6 +693,10 @@ msgid ""
681693
"the same key function). That behavior differs from SQL's GROUP BY which "
682694
"aggregates common elements regardless of their input order."
683695
msgstr ""
696+
":func:`groupby` 的操作類似於 Unix 中的 ``uniq`` 過濾器。每當鍵函式的值發生變"
697+
"化時,它會產生一個 break 或新的群組(這就是為什麼通常需要使用相同的鍵函式對資"
698+
"料進行排序)。這種行為不同於 SQL 的 GROUP BY,其無論輸入順序如何都會聚合相同"
699+
"的元素。"
684700

685701
#: ../../library/itertools.rst:412
686702
msgid ""
@@ -689,6 +705,9 @@ msgid ""
689705
"`groupby` object is advanced, the previous group is no longer visible. So, "
690706
"if that data is needed later, it should be stored as a list::"
691707
msgstr ""
708+
"回傳的群組本身是一個與 :func:`groupby` 共享底層可疊代物件的疊代器。由於來源是"
709+
"共享的,當 :func:`groupby` 物件前進時,前一個群組將不再可見。因此,如果之後需"
710+
"要該資料,應將其儲存為串列: ::"
692711

693712
#: ../../library/itertools.rst:424
694713
msgid ":func:`groupby` is roughly equivalent to::"

0 commit comments

Comments
 (0)