Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit636d087

Browse files
Update translations
1 parentae4e9b1 commit636d087

File tree

6 files changed

+318
-28
lines changed

6 files changed

+318
-28
lines changed

‎library/fcntl.po

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,8 @@ msgid ""
292292
msgstr""
293293
"Este é essencialmente um invólucro em torno das chamadas de trava :func:"
294294
"`~fcntl.fcntl`. *fd* é o descritor de arquivo (objetos arquivo que fornecem "
295-
"um método :meth:`~io.IOBase.fileno` também são aceitos) do arquivoa ser "
296-
"travado oudestravado, e *cmd* é um dos seguintes valores:"
295+
"um método :meth:`~io.IOBase.fileno` também são aceitos) do arquivopara "
296+
"travar oudestravar, e *cmd* é um dos seguintes valores:"
297297

298298
#:../../library/fcntl.rst:160
299299
msgid"Release an existing lock."
@@ -312,6 +312,8 @@ msgid ""
312312
"Bitwise OR with any of the other three ``LOCK_*`` constants to make the "
313313
"request non-blocking."
314314
msgstr""
315+
"Aplica OU (OR) bit a bit com qualquer uma das outras três constantes "
316+
"``LOCK_*`` para tornar a solicitação não bloqueante."
315317

316318
#:../../library/fcntl.rst:175
317319
msgid""
@@ -335,25 +337,31 @@ msgid ""
335337
"the lock starts, relative to *whence*, and *whence* is as with :func:`io."
336338
"IOBase.seek`, specifically:"
337339
msgstr""
340+
"*len* é o número de bytes para travar, *start* é o deslocamento de bytes em "
341+
"que a trava começa, em relação a *whence*, e *whence* é como em :func:`io."
342+
"IOBase.seek`, especificamente:"
338343

339344
#:../../library/fcntl.rst:186
340345
msgid"``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)"
341-
msgstr""
346+
msgstr"``0`` -- relativo ao início do arquivo (:const:`os.SEEK_SET`)"
342347

343348
#:../../library/fcntl.rst:187
344349
msgid"``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)"
345-
msgstr""
350+
msgstr"``1`` -- relativo à posição atual do buffer (:const:`os.SEEK_CUR`)"
346351

347352
#:../../library/fcntl.rst:188
348353
msgid"``2`` -- relative to the end of the file (:const:`os.SEEK_END`)"
349-
msgstr""
354+
msgstr"``2`` -- relativo ao fim do arquivo (:const:`os.SEEK_END`)"
350355

351356
#:../../library/fcntl.rst:190
352357
msgid""
353358
"The default for *start* is 0, which means to start at the beginning of the "
354359
"file. The default for *len* is 0 which means to lock to the end of the "
355360
"file. The default for *whence* is also 0."
356361
msgstr""
362+
"O padrão para *start* é 0, o que significa iniciar no início do arquivo. O "
363+
"padrão para *len* é 0, o que significa travar no final do arquivo. O padrão "
364+
"para *whence* também é 0."
357365

358366
#:../../library/fcntl.rst:194
359367
msgid""
@@ -365,7 +373,7 @@ msgstr ""
365373

366374
#:../../library/fcntl.rst:196
367375
msgid"Examples (all on a SVR4 compliant system)::"
368-
msgstr""
376+
msgstr"Exemplos (todos em um sistema compatível com SVR4)::"
369377

370378
#:../../library/fcntl.rst:198
371379
msgid""
@@ -377,6 +385,13 @@ msgid ""
377385
"lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)\n"
378386
"rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)"
379387
msgstr""
388+
"import struct, fcntl, os\n"
389+
"\n"
390+
"f = open(...)\n"
391+
"rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)\n"
392+
"\n"
393+
"lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)\n"
394+
"rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)"
380395

381396
#:../../library/fcntl.rst:206
382397
msgid""
@@ -385,6 +400,10 @@ msgid ""
385400
"The structure lay-out for the *lockdata* variable is system dependent --- "
386401
"therefore using the :func:`flock` call may be better."
387402
msgstr""
403+
"Observe que, no primeiro exemplo, a variável de valor de retorno *rv* "
404+
"conterá um valor inteiro; no segundo exemplo, ela conterá um objeto :class:"
405+
"`bytes`. O layout da estrutura da variável *lockdata* depende do sistema --- "
406+
"portanto, usar a chamada :func:`flock` pode ser melhor."
388407

389408
#:../../library/fcntl.rst:214
390409
msgid"Module :mod:`os`"
@@ -396,14 +415,17 @@ msgid ""
396415
"present in the :mod:`os` module (on BSD only), the :func:`os.open` function "
397416
"provides an alternative to the :func:`lockf` and :func:`flock` functions."
398417
msgstr""
418+
"Se os sinalizadores de trava :const:`~os.O_SHLOCK` e :const:`~os.O_EXLOCK` "
419+
"estiverem presentes no módulo :mod:`os` (somente no BSD), a função :func:`os."
420+
"open` fornece uma alternativa às funções :func:`lockf` e :func:`flock`."
399421

400422
#:../../library/fcntl.rst:10
401423
msgid"UNIX"
402424
msgstr"UNIX"
403425

404426
#:../../library/fcntl.rst:10
405427
msgid"file control"
406-
msgstr""
428+
msgstr"controle de arquivo"
407429

408430
#:../../library/fcntl.rst:10
409431
msgid"I/O control"

‎library/itertools.po

Lines changed: 104 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version:Python 3.12\n"
1313
"Report-Msgid-Bugs-To:\n"
14-
"POT-Creation-Date:2025-02-21 14:51+0000\n"
14+
"POT-Creation-Date:2025-04-11 14:54+0000\n"
1515
"PO-Revision-Date:2024-05-11 00:33+0000\n"
1616
"Last-Translator:Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team:Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -889,6 +889,9 @@ msgid ""
889889
"each. When the iterable is exhausted, return elements from the saved copy. "
890890
"Repeats indefinitely. Roughly equivalent to::"
891891
msgstr""
892+
"Crie um iterador que devolve elementos do *iterable* assim como salva uma "
893+
"cópia de cada um. Quando o iterável é esgotado, devolve elementos da cópia "
894+
"salva. Repete indefinidamente. Aproximadamente equivalente a::"
892895

893896
#:../../library/itertools.rst:346
894897
msgid""
@@ -908,13 +911,17 @@ msgid ""
908911
"This itertool may require significant auxiliary storage (depending on the "
909912
"length of the iterable)."
910913
msgstr""
914+
"Esta itertool pode exigir armazenamento auxiliar significativo (dependendo "
915+
"do comprimento do iterável)."
911916

912917
#:../../library/itertools.rst:362
913918
msgid""
914919
"Make an iterator that drops elements from the *iterable* while the "
915920
"*predicate* is true and afterwards returns every element. Roughly "
916921
"equivalent to::"
917922
msgstr""
923+
"Cria um iterador que remove elementos do *iterable* enquanto o *predicate* "
924+
"for verdadeiro e, em seguida, retorna todos os elementos. Equivalente a:"
918925

919926
#:../../library/itertools.rst:366
920927
msgid""
@@ -930,19 +937,35 @@ msgid ""
930937
" for x in iterator:\n"
931938
" yield x"
932939
msgstr""
940+
"def dropwhile(predicate, iterable):\n"
941+
" # dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8\n"
942+
"\n"
943+
" iterator = iter(iterable)\n"
944+
" for x in iterator:\n"
945+
" if not predicate(x):\n"
946+
" yield x\n"
947+
" break\n"
948+
"\n"
949+
" for x in iterator:\n"
950+
" yield x"
933951

934952
#:../../library/itertools.rst:378
935953
msgid""
936954
"Note this does not produce *any* output until the predicate first becomes "
937955
"false, so this itertool may have a lengthy start-up time."
938956
msgstr""
957+
"Observe que isso não produz *nenhuma* saída até que o predicado se torne "
958+
"falso, portanto, esta itertool pode ter um longo tempo de inicialização."
939959

940960
#:../../library/itertools.rst:384
941961
msgid""
942962
"Make an iterator that filters elements from the *iterable* returning only "
943963
"those for which the *predicate* returns a false value. If *predicate* is "
944964
"``None``, returns the items that are false. Roughly equivalent to::"
945965
msgstr""
966+
"Cria um iterador que filtre elementos do *iterable*, retornando apenas "
967+
"aqueles para os quais o *predicate* retorna um valor falso. Se o *predicate* "
968+
"for ``None``, retorna os itens que são falsos. Equivalente aproximadamente a:"
946969

947970
#:../../library/itertools.rst:389
948971
msgid""
@@ -963,6 +986,11 @@ msgid ""
963986
"returns the element unchanged. Generally, the iterable needs to already be "
964987
"sorted on the same key function."
965988
msgstr""
989+
"Cria um iterador que retorna chaves e grupos consecutivos do *iterable*. A "
990+
"*key* é uma função que calcula um valor-chave para cada elemento. Se não for "
991+
"especificado ou for ``None``, *key* assume como padrão uma função de "
992+
"identidade e retorna o elemento inalterado. Geralmente, o iterável precisa "
993+
"já estar ordenado na mesma função chave."
966994

967995
#:../../library/itertools.rst:406
968996
msgid""
@@ -972,6 +1000,11 @@ msgid ""
9721000
"the same key function). That behavior differs from SQL's GROUP BY which "
9731001
"aggregates common elements regardless of their input order."
9741002
msgstr""
1003+
"O funcionamento de :func:`groupby` é semelhante ao filtro ``uniq`` no Unix. "
1004+
"Ele gera uma quebra ou um novo grupo sempre que o valor da função da tecla "
1005+
"muda (razão pela qual geralmente é necessário ordenar os dados usando a "
1006+
"mesma função da tecla). Esse comportamento difere do GROUP BY do SQL, que "
1007+
"agrega elementos comuns independentemente da ordem de entrada."
9751008

9761009
#:../../library/itertools.rst:412
9771010
msgid""
@@ -980,6 +1013,11 @@ msgid ""
9801013
"`groupby` object is advanced, the previous group is no longer visible. So, "
9811014
"if that data is needed later, it should be stored as a list::"
9821015
msgstr""
1016+
"O grupo retornado é, ele próprio, um iterador que compartilha o iterável "
1017+
"subjacente com :func:`groupby`. Como a origem é compartilhada, quando o "
1018+
"objeto :func:`groupby` avança, o grupo anterior não fica mais visível. "
1019+
"Portanto, se esses dados forem necessários posteriormente, eles devem ser "
1020+
"armazenados como uma lista:"
9831021

9841022
#:../../library/itertools.rst:417
9851023
msgid""
@@ -990,6 +1028,13 @@ msgid ""
9901028
" groups.append(list(g)) # Store group iterator as a list\n"
9911029
" uniquekeys.append(k)"
9921030
msgstr""
1031+
"groups = []\n"
1032+
"uniquekeys = []\n"
1033+
"data = sorted(data, key=keyfunc)\n"
1034+
"for k, g in groupby(data, keyfunc):\n"
1035+
" groups.append(list(g)) # armazena um iterador de grupo como uma "
1036+
"lista\n"
1037+
" uniquekeys.append(k)"
9931038

9941039
#:../../library/itertools.rst:424
9951040
msgid":func:`groupby` is roughly equivalent to::"
@@ -1029,19 +1074,55 @@ msgid ""
10291074
" for _ in curr_group:\n"
10301075
" pass"
10311076
msgstr""
1077+
"def groupby(iterable, key=None):\n"
1078+
" # [k for k, g in groupby('AAAABBBCCDAABBB')] → A B C D A B\n"
1079+
" # [list(g) for k, g in groupby('AAAABBBCCD')] → AAAA BBB CC D\n"
1080+
"\n"
1081+
" keyfunc = (lambda x: x) if key is None else key\n"
1082+
" iterator = iter(iterable)\n"
1083+
" exhausted = False\n"
1084+
"\n"
1085+
" def _grouper(target_key):\n"
1086+
" nonlocal curr_value, curr_key, exhausted\n"
1087+
" yield curr_value\n"
1088+
" for curr_value in iterator:\n"
1089+
" curr_key = keyfunc(curr_value)\n"
1090+
" if curr_key != target_key:\n"
1091+
" return\n"
1092+
" yield curr_value\n"
1093+
" exhausted = True\n"
1094+
"\n"
1095+
" try:\n"
1096+
" curr_value = next(iterator)\n"
1097+
" except StopIteration:\n"
1098+
" return\n"
1099+
" curr_key = keyfunc(curr_value)\n"
1100+
"\n"
1101+
" while not exhausted:\n"
1102+
" target_key = curr_key\n"
1103+
" curr_group = _grouper(target_key)\n"
1104+
" yield curr_key, curr_group\n"
1105+
" if curr_key == target_key:\n"
1106+
" for _ in curr_group:\n"
1107+
" pass"
10321108

10331109
#:../../library/itertools.rst:462
10341110
msgid""
10351111
"Make an iterator that returns selected elements from the iterable. Works "
10361112
"like sequence slicing but does not support negative values for *start*, "
10371113
"*stop*, or *step*."
10381114
msgstr""
1115+
"Cria um iterador que retorna os elementos selecionados do iterável. Funciona "
1116+
"como o fatiamento de sequência, mas não oferece suporte a valores negativos "
1117+
"para *start*, *stop* ou *step*."
10391118

10401119
#:../../library/itertools.rst:466
10411120
msgid""
10421121
"If *start* is zero or ``None``, iteration starts at zero. Otherwise, "
10431122
"elements from the iterable are skipped until *start* is reached."
10441123
msgstr""
1124+
"Se *start* for zero ou ``None``, a iteração começa em zero. Caso contrário, "
1125+
"os elementos do iterável são pulados até que *start* seja alcançado."
10451126

10461127
#:../../library/itertools.rst:469
10471128
msgid""
@@ -1055,6 +1136,9 @@ msgid ""
10551136
"consecutively unless *step* is set higher than one which results in items "
10561137
"being skipped."
10571138
msgstr""
1139+
"Se *step* for ``None``, o padrão do passo é 1. Os elementos são retornados "
1140+
"consecutivamente, a menos que *step* seja definido como maior que um, o que "
1141+
"resulta na omissão de itens."
10581142

10591143
#:../../library/itertools.rst:478
10601144
msgid""
@@ -1078,6 +1162,25 @@ msgid ""
10781162
" yield element\n"
10791163
" next_i += step"
10801164
msgstr""
1165+
"def islice(iterable, *args):\n"
1166+
" # islice('ABCDEFG', 2) → A B\n"
1167+
" # islice('ABCDEFG', 2, 4) → C D\n"
1168+
" # islice('ABCDEFG', 2, None) → C D E F G\n"
1169+
" # islice('ABCDEFG', 0, None, 2) → A C E G\n"
1170+
"\n"
1171+
" s = slice(*args)\n"
1172+
" start = 0 if s.start is None else s.start\n"
1173+
" stop = s.stop\n"
1174+
" step = 1 if s.step is None else s.step\n"
1175+
" if start < 0 or (stop is not None and stop < 0) or step <= 0:\n"
1176+
" raise ValueError\n"
1177+
"\n"
1178+
" indices = count() if stop is None else range(max(start, stop))\n"
1179+
" next_i = start\n"
1180+
" for i, element in zip(indices, iterable):\n"
1181+
" if i == next_i:\n"
1182+
" yield element\n"
1183+
" next_i += step"
10811184

10821185
#:../../library/itertools.rst:501
10831186
msgid"Return successive overlapping pairs taken from the input *iterable*."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp