@@ -8,7 +8,7 @@ msgstr ""
8
8
"Project-Id-Version : Python 3.12\n "
9
9
"Report-Msgid-Bugs-To : \n "
10
10
"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 "
12
12
"
Last-Translator :
Adrian Liaw <[email protected] >\n "
13
13
"Language-Team : Chinese - TAIWAN (https://github.com/python/python-docs-zh- "
14
14
"tw)\n "
@@ -520,7 +520,7 @@ msgid ""
520
520
"sequence. Roughly equivalent to::"
521
521
msgstr ""
522
522
"建立一個疊代器,從第一個可疊代物件回傳元素直到其耗盡,然後繼續處理下一個可疊"
523
- "代物件,直到所有可疊代物件都耗盡。用於將連續的序列做為單一序列處理。大致等同 "
523
+ "代物件,直到所有可疊代物件都耗盡。用於將連續的序列做為單一序列處理。大致等價 "
524
524
"於: ::"
525
525
526
526
#: ../../library/itertools.rst:210
@@ -529,7 +529,7 @@ msgid ""
529
529
"iterable argument that is evaluated lazily. Roughly equivalent to::"
530
530
msgstr ""
531
531
":func:`chain` 的另一個建構函式。從單個可疊代的引數中得到鏈接的輸入,該引數是"
532
- "惰性計算的。大致等同於 :"
532
+ "惰性計算的。大致等價於 :"
533
533
534
534
#: ../../library/itertools.rst:221
535
535
msgid "Return *r* length subsequences of elements from the input *iterable*."
@@ -637,32 +637,40 @@ msgid ""
637
637
"each. When the iterable is exhausted, return elements from the saved copy. "
638
638
"Repeats indefinitely. Roughly equivalent to::"
639
639
msgstr ""
640
+ "建立一個疊代器,回傳 *iterable* 中的元素並保存每個元素的副本。當可疊代物件耗"
641
+ "盡時,從保存的副本中回傳元素。會無限次的重複。大致等價於: ::"
640
642
641
643
#: ../../library/itertools.rst:356
642
644
msgid ""
643
645
"This itertool may require significant auxiliary storage (depending on the "
644
646
"length of the iterable)."
645
- msgstr ""
647
+ msgstr "此 itertool 可能需要大量的輔助儲存空間(取決於可疊代物件的長度)。 "
646
648
647
649
#: ../../library/itertools.rst:362
648
650
msgid ""
649
651
"Make an iterator that drops elements from the *iterable* while the "
650
652
"*predicate* is true and afterwards returns every element. Roughly "
651
653
"equivalent to::"
652
654
msgstr ""
655
+ "建立一個疊代器,在 *predicate* 為真時丟棄 *iterable* 中的元素,之後回傳每個元"
656
+ "素。大致等價於:"
653
657
654
658
#: ../../library/itertools.rst:378
655
659
msgid ""
656
660
"Note this does not produce *any* output until the predicate first becomes "
657
661
"false, so this itertool may have a lengthy start-up time."
658
662
msgstr ""
663
+ "注意,在 predicate 首次變為 False 之前,這不會產生\\ *任何*\\ 輸出,所以此 "
664
+ "itertool 可能會有較長的啟動時間。"
659
665
660
666
#: ../../library/itertools.rst:384
661
667
msgid ""
662
668
"Make an iterator that filters elements from the *iterable* returning only "
663
669
"those for which the *predicate* returns a false value. If *predicate* is "
664
670
"``None``, returns the items that are false. Roughly equivalent to::"
665
671
msgstr ""
672
+ "建立一個疊代器,過濾 *iterable* 中的元素,僅回傳 *predicate* 為 False 值的元"
673
+ "素。如果 *predicate* 是 ``None``,則回傳為 False 的項目。大致等價於: ::"
666
674
667
675
#: ../../library/itertools.rst:400
668
676
msgid ""
@@ -672,6 +680,10 @@ msgid ""
672
680
"returns the element unchanged. Generally, the iterable needs to already be "
673
681
"sorted on the same key function."
674
682
msgstr ""
683
+ "建立一個疊代器,回傳 *iterable* 中連續的鍵和群組。*key* 是一個為每個元素計算"
684
+ "鍵值的函式。如果其未指定或為 ``None``,則 *key* 預設為一個識別性函式 "
685
+ "(identity function ),並回傳未被更改的元素。一般來說,可疊代物件需要已經用相"
686
+ "同的鍵函式進行排序。"
675
687
676
688
#: ../../library/itertools.rst:406
677
689
msgid ""
@@ -681,6 +693,10 @@ msgid ""
681
693
"the same key function). That behavior differs from SQL's GROUP BY which "
682
694
"aggregates common elements regardless of their input order."
683
695
msgstr ""
696
+ ":func:`groupby` 的操作類似於 Unix 中的 ``uniq`` 過濾器。每當鍵函式的值發生變"
697
+ "化時,它會產生一個 break 或新的群組(這就是為什麼通常需要使用相同的鍵函式對資"
698
+ "料進行排序)。這種行為不同於 SQL 的 GROUP BY,其無論輸入順序如何都會聚合相同"
699
+ "的元素。"
684
700
685
701
#: ../../library/itertools.rst:412
686
702
msgid ""
@@ -689,6 +705,9 @@ msgid ""
689
705
"`groupby` object is advanced, the previous group is no longer visible. So, "
690
706
"if that data is needed later, it should be stored as a list::"
691
707
msgstr ""
708
+ "回傳的群組本身是一個與 :func:`groupby` 共享底層可疊代物件的疊代器。由於來源是"
709
+ "共享的,當 :func:`groupby` 物件前進時,前一個群組將不再可見。因此,如果之後需"
710
+ "要該資料,應將其儲存為串列: ::"
692
711
693
712
#: ../../library/itertools.rst:424
694
713
msgid ":func:`groupby` is roughly equivalent to::"
0 commit comments