Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8bb4c9c

Browse files
Update translations
1 parent 83f92ee commit 8bb4c9c

File tree

3 files changed

+98
-4
lines changed

3 files changed

+98
-4
lines changed

library/itertools.po

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,8 @@ msgid ""
573573
"Batch data from the *iterable* into tuples of length *n*. The last batch may "
574574
"be shorter than *n*."
575575
msgstr ""
576+
"Dados de lote do *iterable* em tuplas de comprimento *n*. O último lote pode "
577+
"ser menor que *n*."
576578

577579
#: ../../library/itertools.rst:170
578580
msgid ""
@@ -581,6 +583,10 @@ msgid ""
581583
"is yielded as soon as the batch is full or when the input iterable is "
582584
"exhausted:"
583585
msgstr ""
586+
"Faz um laço sobre o iterável de entrada e acumula dados em tuplas de até o "
587+
"tamanho *n*. A entrada é consumida preguiçosamente, apenas o suficiente para "
588+
"preencher um lote. O resultado é produzido assim que o lote estiver cheio ou "
589+
"quando o iterável de entrada estiver esgotado:"
584590

585591
#: ../../library/itertools.rst:175
586592
msgid ""
@@ -589,6 +595,10 @@ msgid ""
589595
">>> unflattened\n"
590596
"[('roses', 'red'), ('violets', 'blue'), ('sugar', 'sweet')]"
591597
msgstr ""
598+
">>> flattened_data = ['roses', 'red', 'violets', 'blue', 'sugar', 'sweet']\n"
599+
">>> unflattened = list(batched(flattened_data, 2))\n"
600+
">>> unflattened\n"
601+
"[('roses', 'red'), ('violets', 'blue'), ('sugar', 'sweet')]"
592602

593603
#: ../../library/itertools.rst:184
594604
msgid ""
@@ -620,6 +630,10 @@ msgid ""
620630
" for iterable in iterables:\n"
621631
" yield from iterable"
622632
msgstr ""
633+
"def chain(*iterables):\n"
634+
" # chain('ABC', 'DEF') → A B C D E F\n"
635+
" for iterable in iterables:\n"
636+
" yield from iterable"
623637

624638
#: ../../library/itertools.rst:210
625639
msgid ""
@@ -637,6 +651,10 @@ msgid ""
637651
" for iterable in iterables:\n"
638652
" yield from iterable"
639653
msgstr ""
654+
"def from_iterable(iterables):\n"
655+
" # chain.from_iterable(['ABC', 'DEF']) → A B C D E F\n"
656+
" for iterable in iterables:\n"
657+
" yield from iterable"
640658

641659
#: ../../library/itertools.rst:221
642660
msgid "Return *r* length subsequences of elements from the input *iterable*."
@@ -651,20 +669,30 @@ msgid ""
651669
"`math.comb` which computes ``n! / r! / (n - r)!`` when ``0 ≤ r ≤ n`` or zero "
652670
"when ``r > n``."
653671
msgstr ""
672+
"A saída é uma subsequência de :func:`product` mantendo apenas entradas que "
673+
"são subsequências do *iterable*. O comprimento da saída é dado por :func:"
674+
"`math.comb` que calcula ``n! / r! / (n - r)!`` quando ``0 ≤ r ≤ n`` ou zero "
675+
"quando ``r > n``."
654676

655677
#: ../../library/itertools.rst:228
656678
msgid ""
657679
"The combination tuples are emitted in lexicographic order according to the "
658680
"order of the input *iterable*. If the input *iterable* is sorted, the output "
659681
"tuples will be produced in sorted order."
660682
msgstr ""
683+
"As tuplas das combinações são emitidas em ordem lexicográfica de acordo com "
684+
"a ordem do iterável de entrada. Se o iterável estiver ordenado, as tuplas de "
685+
"combinação serão produzidas em sequência ordenada."
661686

662687
#: ../../library/itertools.rst:232
663688
msgid ""
664689
"Elements are treated as unique based on their position, not on their value. "
665690
"If the input elements are unique, there will be no repeated values within "
666691
"each combination."
667692
msgstr ""
693+
"Os elementos são tratados como únicos baseado em suas posições, não em seus "
694+
"valores. Se os elementos de entrada são únicos, não haverá repetição de "
695+
"valores nas sucessivas combinações."
668696

669697
#: ../../library/itertools.rst:238
670698
msgid ""
@@ -690,6 +718,27 @@ msgid ""
690718
" indices[j] = indices[j-1] + 1\n"
691719
" yield tuple(pool[i] for i in indices)"
692720
msgstr ""
721+
"def combinations(iterable, r):\n"
722+
" # combinations('ABCD', 2) → AB AC AD BC BD CD\n"
723+
" # combinations(range(4), 3) → 012 013 023 123\n"
724+
"\n"
725+
" pool = tuple(iterable)\n"
726+
" n = len(pool)\n"
727+
" if r > n:\n"
728+
" return\n"
729+
" indices = list(range(r))\n"
730+
"\n"
731+
" yield tuple(pool[i] for i in indices)\n"
732+
" while True:\n"
733+
" for i in reversed(range(r)):\n"
734+
" if indices[i] != i + n - r:\n"
735+
" break\n"
736+
" else:\n"
737+
" return\n"
738+
" indices[i] += 1\n"
739+
" for j in range(i+1, r):\n"
740+
" indices[j] = indices[j-1] + 1\n"
741+
" yield tuple(pool[i] for i in indices)"
693742

694743
#: ../../library/itertools.rst:263
695744
msgid ""
@@ -706,20 +755,30 @@ msgid ""
706755
"number of subsequence returned is ``(n + r - 1)! / r! / (n - 1)!`` when ``n "
707756
"> 0``."
708757
msgstr ""
758+
"A saída é uma subsequência de :func:`product` que mantém apenas entradas que "
759+
"são subsequências (com possíveis elementos repetidos) do *iterable*. O "
760+
"número de subsequências retornadas é ``(n + r - 1)! / r! / (n - 1)!`` quando "
761+
"``n > 0``."
709762

710763
#: ../../library/itertools.rst:271
711764
msgid ""
712765
"The combination tuples are emitted in lexicographic order according to the "
713766
"order of the input *iterable*. if the input *iterable* is sorted, the output "
714767
"tuples will be produced in sorted order."
715768
msgstr ""
769+
"As tuplas das combinações são emitidas em ordem lexicográfica de acordo com "
770+
"a ordem do iterável de entrada. Se o iterável estiver ordenado, as tuplas de "
771+
"combinação serão produzidas em sequência ordenada."
716772

717773
#: ../../library/itertools.rst:275
718774
msgid ""
719775
"Elements are treated as unique based on their position, not on their value. "
720776
"If the input elements are unique, the generated combinations will also be "
721777
"unique."
722778
msgstr ""
779+
"Os elementos são tratados como únicos baseado em suas posições, não em seus "
780+
"valores. Se os elementos de entrada forem únicos, não haverá repetição de "
781+
"valores nas combinações geradas."
723782

724783
#: ../../library/itertools.rst:281
725784
msgid ""
@@ -742,27 +801,55 @@ msgid ""
742801
" indices[i:] = [indices[i] + 1] * (r - i)\n"
743802
" yield tuple(pool[i] for i in indices)"
744803
msgstr ""
804+
"def combinations_with_replacement(iterable, r):\n"
805+
" # combinations_with_replacement('ABC', 2) → AA AB AC BB BC CC\n"
806+
"\n"
807+
" pool = tuple(iterable)\n"
808+
" n = len(pool)\n"
809+
" if not n and r:\n"
810+
" return\n"
811+
" indices = [0] * r\n"
812+
"\n"
813+
" yield tuple(pool[i] for i in indices)\n"
814+
" while True:\n"
815+
" for i in reversed(range(r)):\n"
816+
" if indices[i] != n - 1:\n"
817+
" break\n"
818+
" else:\n"
819+
" return\n"
820+
" indices[i:] = [indices[i] + 1] * (r - i)\n"
821+
" yield tuple(pool[i] for i in indices)"
745822

746823
#: ../../library/itertools.rst:305
747824
msgid ""
748825
"Make an iterator that returns elements from *data* where the corresponding "
749826
"element in *selectors* is true. Stops when either the *data* or *selectors* "
750827
"iterables have been exhausted. Roughly equivalent to::"
751828
msgstr ""
829+
"Cria um iterador que retorne elementos de *data* onde o elemento "
830+
"correspondente em *selectors* é verdadeiro. Para quando os iteráveis ​​*data* "
831+
"ou *selectors* forem esgotados. Aproximadamente equivalente a::"
752832

753833
#: ../../library/itertools.rst:310
754834
msgid ""
755835
"def compress(data, selectors):\n"
756836
" # compress('ABCDEF', [1,0,1,0,1,1]) → A C E F\n"
757837
" return (datum for datum, selector in zip(data, selectors) if selector)"
758838
msgstr ""
839+
"def compress(data, selectors):\n"
840+
" # compress('ABCDEF', [1,0,1,0,1,1]) → A C E F\n"
841+
" return (datum for datum, selector in zip(data, selectors) if selector)"
759842

760843
#: ../../library/itertools.rst:319
761844
msgid ""
762845
"Make an iterator that returns evenly spaced values beginning with *start*. "
763846
"Can be used with :func:`map` to generate consecutive data points or with :"
764847
"func:`zip` to add sequence numbers. Roughly equivalent to::"
765848
msgstr ""
849+
"Cria um iterador que retorne valores uniformemente espaçados começando com "
850+
"*start*. Pode ser usado com :func:`map` para gerar pontos de dados "
851+
"consecutivos ou com :func:`zip` para adicionar números de sequência. "
852+
"Aproximadamente equivalente a::"
766853

767854
#: ../../library/itertools.rst:324
768855
msgid ""
@@ -774,6 +861,13 @@ msgid ""
774861
" yield n\n"
775862
" n += step"
776863
msgstr ""
864+
"def count(start=0, step=1):\n"
865+
" # count(10) → 10 11 12 13 14 ...\n"
866+
" # count(2.5, 0.5) → 2.5 3.0 3.5 ...\n"
867+
" n = start\n"
868+
" while True:\n"
869+
" yield n\n"
870+
" n += step"
777871

778872
#: ../../library/itertools.rst:332
779873
msgid ""

potodo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373

7474

75-
# library (60.89% done)
75+
# library (60.93% done)
7676

7777
- 2to3.po 121 / 132 ( 91.0% translated).
7878
- argparse.po 368 / 370 ( 99.0% translated).
@@ -148,7 +148,7 @@
148148
- importlib.resources.po 40 / 47 ( 85.0% translated).
149149
- inspect.po 78 / 383 ( 20.0% translated).
150150
- io.po 21 / 271 ( 7.0% translated).
151-
- itertools.po 117 / 193 ( 60.0% translated).
151+
- itertools.po 134 / 193 ( 69.0% translated).
152152
- json.po 172 / 173 ( 99.0% translated).
153153
- logging.config.po 12 / 171 ( 7.0% translated).
154154
- logging.handlers.po 48 / 270 ( 17.0% translated).
@@ -278,5 +278,5 @@
278278
- 3.7.po 252 / 568 ( 44.0% translated).
279279

280280

281-
# TOTAL (66.55% done)
281+
# TOTAL (66.57% done)
282282

stats.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"completion": "66.55%", "translated": 41153, "entries": 61842, "updated_at": "2025-02-19T23:27:16+00:00Z"}
1+
{"completion": "66.57%", "translated": 41170, "entries": 61842, "updated_at": "2025-02-20T23:27:42+00:00Z"}

0 commit comments

Comments
 (0)