Skip to content

Commit b6c2eda

Browse files
sync with cpython 4060ef36
1 parent ccde837 commit b6c2eda

File tree

2 files changed

+101
-84
lines changed

2 files changed

+101
-84
lines changed

library/itertools.po

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: Python 3.13\n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2024-10-09 00:13+0000\n"
10+
"POT-Creation-Date: 2024-12-05 00:14+0000\n"
1111
"PO-Revision-Date: 2024-08-16 15:01+0800\n"
1212
"Last-Translator: Adrian Liaw <adrianliaw2000@gmail.com>\n"
1313
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
@@ -1725,6 +1725,11 @@ msgid ""
17251725
" \"Returns the sequence elements n times.\"\n"
17261726
" return chain.from_iterable(repeat(tuple(iterable), n))\n"
17271727
"\n"
1728+
"def loops(n):\n"
1729+
" \"Loop n times. Like range(n) but without creating integers.\"\n"
1730+
" # for _ in loops(100): ...\n"
1731+
" return repeat(None, n)\n"
1732+
"\n"
17281733
"def tail(n, iterable):\n"
17291734
" \"Return an iterator over the last n items.\"\n"
17301735
" # tail(3, 'ABCDEFG') → E F G\n"
@@ -1858,11 +1863,11 @@ msgid ""
18581863
" yield func()"
18591864
msgstr ""
18601865

1861-
#: ../../library/itertools.rst:1008
1866+
#: ../../library/itertools.rst:1013
18621867
msgid "The following recipes have a more mathematical flavor:"
18631868
msgstr "以下的應用技巧具有更多的數學風格:"
18641869

1865-
#: ../../library/itertools.rst:1010
1870+
#: ../../library/itertools.rst:1015
18661871
msgid ""
18671872
"def powerset(iterable):\n"
18681873
" \"powerset([1,2,3]) → () (1,) (2,) (3,) (1,2) (1,3) (2,3) (1,2,3)\"\n"
@@ -1954,6 +1959,11 @@ msgid ""
19541959
" data[p*p : n : p+p] = bytes(len(range(p*p, n, p+p)))\n"
19551960
" yield from iter_index(data, 1, start=3)\n"
19561961
"\n"
1962+
"def is_prime(n):\n"
1963+
" \"Return True if n is prime.\"\n"
1964+
" # is_prime(1_000_000_000_000_403) → True\n"
1965+
" return n > 1 and all(n % p for p in sieve(math.isqrt(n) + 1))\n"
1966+
"\n"
19571967
"def factor(n):\n"
19581968
" \"Prime factors of n.\"\n"
19591969
" # factor(99) → 3 3 11\n"

0 commit comments

Comments
 (0)