88msgstr ""
99"Project-Id-Version : Python 3.14\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2026-01-11 14:14 +0000\n "
11+ "POT-Creation-Date : 2026-01-13 14:20 +0000\n "
1212"PO-Revision-Date : 2025-09-16 00:01+0000\n "
1313"Language-Team : Hungarian (https://app.transifex.com/python-doc/teams/5390/ "
1414"hu/)\n "
@@ -1113,7 +1113,7 @@ msgstr ""
11131113msgid ""
11141114"A secondary purpose of the recipes is to serve as an incubator. The "
11151115"``accumulate()``, ``compress()``, and ``pairwise()`` itertools started out "
1116- "as recipes. Currently, the ``sliding_window()``, ``iter_index ()``, and "
1116+ "as recipes. Currently, the ``sliding_window()``, ``derangements ()``, and "
11171117"``sieve()`` recipes are being tested to see whether they prove their worth."
11181118msgstr ""
11191119
@@ -1137,11 +1137,16 @@ msgid ""
11371137msgstr ""
11381138
11391139msgid ""
1140+ "from itertools import (accumulate, batched, chain, combinations, compress,\n"
1141+ " count, cycle, filterfalse, groupby, islice, permutations, product,\n"
1142+ " repeat, starmap, tee, zip_longest)\n"
11401143"from collections import Counter, deque\n"
11411144"from contextlib import suppress\n"
11421145"from functools import reduce\n"
1143- "from math import comb, prod, sumprod, isqrt\n"
1144- "from operator import is_not, itemgetter, getitem, mul, neg\n"
1146+ "from math import comb, isqrt, prod, sumprod\n"
1147+ "from operator import getitem, is_not, itemgetter, mul, neg\n"
1148+ "\n"
1149+ "# ==== Basic one liners ====\n"
11451150"\n"
11461151"def take(n, iterable):\n"
11471152" \" Return first n items of the iterable as a list.\" \n"
@@ -1200,15 +1205,17 @@ msgid ""
12001205"def first_true(iterable, default=False, predicate=None):\n"
12011206" \" Returns the first true value or the *default* if there is no true "
12021207"value.\" \n"
1203- " # first_true([a,b, c], x) → a or b or c or x\n"
1204- " # first_true([a,b], x, f) → a if f(a) else b if f(b) else x\n"
1208+ " # first_true([a, b, c], x) → a or b or c or x\n"
1209+ " # first_true([a, b], x, f) → a if f(a) else b if f(b) else x\n"
12051210" return next(filter(predicate, iterable), default)\n"
12061211"\n"
12071212"def all_equal(iterable, key=None):\n"
12081213" \" Returns True if all the elements are equal to each other.\" \n"
12091214" # all_equal('4٤௪౪໔', key=int) → True\n"
12101215" return len(take(2, groupby(iterable, key))) <= 1\n"
12111216"\n"
1217+ "# ==== Data pipelines ====\n"
1218+ "\n"
12121219"def unique_justseen(iterable, key=None):\n"
12131220" \" Yield unique elements, preserving order. Remember only the element "
12141221"just seen.\" \n"
@@ -1243,7 +1250,7 @@ msgid ""
12431250"\n"
12441251"def sliding_window(iterable, n):\n"
12451252" \" Collect data into overlapping fixed-length chunks or blocks.\" \n"
1246- " # sliding_window('ABCDEFG', 4 ) → ABCD BCDE CDEF DEFG \n"
1253+ " # sliding_window('ABCDEFG', 3 ) → ABC BCD CDE DEF EFG \n"
12471254" iterator = iter(iterable)\n"
12481255" window = deque(islice(iterator, n - 1), maxlen=n)\n"
12491256" for x in iterator:\n"
@@ -1252,7 +1259,7 @@ msgid ""
12521259"\n"
12531260"def grouper(iterable, n, *, incomplete='fill', fillvalue=None):\n"
12541261" \" Collect data into non-overlapping fixed-length chunks or blocks.\" \n"
1255- " # grouper('ABCDEFG', 3, fillvalue='x') → ABC DEF Gxx\n"
1262+ " # grouper('ABCDEFG', 3, fillvalue='x') → ABC DEF Gxx\n"
12561263" # grouper('ABCDEFG', 3, incomplete='strict') → ABC DEF ValueError\n"
12571264" # grouper('ABCDEFG', 3, incomplete='ignore') → ABC DEF\n"
12581265" iterators = [iter(iterable)] * n\n"
@@ -1316,13 +1323,10 @@ msgid ""
13161323" if first is not None:\n"
13171324" yield first()\n"
13181325" while True:\n"
1319- " yield function()"
1320- msgstr ""
1321-
1322- msgid "The following recipes have a more mathematical flavor:"
1323- msgstr ""
1324-
1325- msgid ""
1326+ " yield function()\n"
1327+ "\n"
1328+ "# ==== Mathematical operations ====\n"
1329+ "\n"
13261330"def multinomial(*counts):\n"
13271331" \" Number of distinct arrangements of a multiset.\" \n"
13281332" # Counter('abracadabra').values() → 5 2 2 1 1\n"
@@ -1340,9 +1344,11 @@ msgid ""
13401344" # sum_of_squares([10, 20, 30]) → 1400\n"
13411345" return sumprod(*tee(iterable))\n"
13421346"\n"
1347+ "# ==== Matrix operations ====\n"
1348+ "\n"
13431349"def reshape(matrix, columns):\n"
13441350" \" Reshape a 2-D matrix to have a given number of columns.\" \n"
1345- " # reshape([(0, 1), (2, 3), (4, 5)], 3) → (0, 1, 2), (3, 4, 5)\n"
1351+ " # reshape([(0, 1), (2, 3), (4, 5)], 3) → (0, 1, 2) (3, 4, 5)\n"
13461352" return batched(chain.from_iterable(matrix), columns, strict=True)\n"
13471353"\n"
13481354"def transpose(matrix):\n"
@@ -1352,10 +1358,12 @@ msgid ""
13521358"\n"
13531359"def matmul(m1, m2):\n"
13541360" \" Multiply two matrices.\" \n"
1355- " # matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)]) → (49, 80), (41, 60)\n"
1361+ " # matmul([(7, 5), (3, 5)], [(2, 5), (7, 9)]) → (49, 80) (41, 60)\n"
13561362" n = len(m2[0])\n"
13571363" return batched(starmap(sumprod, product(m1, transpose(m2))), n)\n"
13581364"\n"
1365+ "# ==== Polynomial arithmetic ====\n"
1366+ "\n"
13591367"def convolve(signal, kernel):\n"
13601368" \"\"\" Discrete linear convolution of two iterables.\n"
13611369" Equivalent to polynomial multiplication.\n"
@@ -1410,6 +1418,8 @@ msgid ""
14101418" powers = reversed(range(1, n))\n"
14111419" return list(map(mul, coefficients, powers))\n"
14121420"\n"
1421+ "# ==== Number theory ====\n"
1422+ "\n"
14131423"def sieve(n):\n"
14141424" \" Primes less than n.\" \n"
14151425" # sieve(30) → 2 3 5 7 11 13 17 19 23 29\n"
0 commit comments