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

Commit6a69bd1

Browse files
Update translations
1 parent64f45e1 commit6a69bd1

File tree

6 files changed

+340
-27
lines changed

6 files changed

+340
-27
lines changed

‎library/fcntl.po

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

401401
#:../../library/fcntl.rst:198
402402
msgid"Release an existing lock."
@@ -415,6 +415,8 @@ msgid ""
415415
"Bitwise OR with any of the other three ``LOCK_*`` constants to make the "
416416
"request non-blocking."
417417
msgstr""
418+
"Aplica OU (OR) bit a bit com qualquer uma das outras três constantes "
419+
"``LOCK_*`` para tornar a solicitação não bloqueante."
418420

419421
#:../../library/fcntl.rst:213
420422
msgid""
@@ -438,25 +440,31 @@ msgid ""
438440
"the lock starts, relative to *whence*, and *whence* is as with :func:`io."
439441
"IOBase.seek`, specifically:"
440442
msgstr""
443+
"*len* é o número de bytes para travar, *start* é o deslocamento de bytes em "
444+
"que a trava começa, em relação a *whence*, e *whence* é como em :func:`io."
445+
"IOBase.seek`, especificamente:"
441446

442447
#:../../library/fcntl.rst:224
443448
msgid"``0`` -- relative to the start of the file (:const:`os.SEEK_SET`)"
444-
msgstr""
449+
msgstr"``0`` -- relativo ao início do arquivo (:const:`os.SEEK_SET`)"
445450

446451
#:../../library/fcntl.rst:225
447452
msgid"``1`` -- relative to the current buffer position (:const:`os.SEEK_CUR`)"
448-
msgstr""
453+
msgstr"``1`` -- relativo à posição atual do buffer (:const:`os.SEEK_CUR`)"
449454

450455
#:../../library/fcntl.rst:226
451456
msgid"``2`` -- relative to the end of the file (:const:`os.SEEK_END`)"
452-
msgstr""
457+
msgstr"``2`` -- relativo ao fim do arquivo (:const:`os.SEEK_END`)"
453458

454459
#:../../library/fcntl.rst:228
455460
msgid""
456461
"The default for *start* is 0, which means to start at the beginning of the "
457462
"file. The default for *len* is 0 which means to lock to the end of the "
458463
"file. The default for *whence* is also 0."
459464
msgstr""
465+
"O padrão para *start* é 0, o que significa iniciar no início do arquivo. O "
466+
"padrão para *len* é 0, o que significa travar no final do arquivo. O padrão "
467+
"para *whence* também é 0."
460468

461469
#:../../library/fcntl.rst:232
462470
msgid""
@@ -468,7 +476,7 @@ msgstr ""
468476

469477
#:../../library/fcntl.rst:234
470478
msgid"Examples (all on a SVR4 compliant system)::"
471-
msgstr""
479+
msgstr"Exemplos (todos em um sistema compatível com SVR4)::"
472480

473481
#:../../library/fcntl.rst:236
474482
msgid""
@@ -480,6 +488,13 @@ msgid ""
480488
"lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)\n"
481489
"rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)"
482490
msgstr""
491+
"import struct, fcntl, os\n"
492+
"\n"
493+
"f = open(...)\n"
494+
"rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)\n"
495+
"\n"
496+
"lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)\n"
497+
"rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)"
483498

484499
#:../../library/fcntl.rst:244
485500
msgid""
@@ -488,6 +503,10 @@ msgid ""
488503
"The structure lay-out for the *lockdata* variable is system dependent --- "
489504
"therefore using the :func:`flock` call may be better."
490505
msgstr""
506+
"Observe que, no primeiro exemplo, a variável de valor de retorno *rv* "
507+
"conterá um valor inteiro; no segundo exemplo, ela conterá um objeto :class:"
508+
"`bytes`. O layout da estrutura da variável *lockdata* depende do sistema --- "
509+
"portanto, usar a chamada :func:`flock` pode ser melhor."
491510

492511
#:../../library/fcntl.rst:252
493512
msgid"Module :mod:`os`"
@@ -499,14 +518,17 @@ msgid ""
499518
"present in the :mod:`os` module (on BSD only), the :func:`os.open` function "
500519
"provides an alternative to the :func:`lockf` and :func:`flock` functions."
501520
msgstr""
521+
"Se os sinalizadores de trava :const:`~os.O_SHLOCK` e :const:`~os.O_EXLOCK` "
522+
"estiverem presentes no módulo :mod:`os` (somente no BSD), a função :func:`os."
523+
"open` fornece uma alternativa às funções :func:`lockf` e :func:`flock`."
502524

503525
#:../../library/fcntl.rst:10
504526
msgid"UNIX"
505527
msgstr"UNIX"
506528

507529
#:../../library/fcntl.rst:10
508530
msgid"file control"
509-
msgstr""
531+
msgstr"controle de arquivo"
510532

511533
#:../../library/fcntl.rst:10
512534
msgid"I/O control"

‎library/itertools.po

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,9 @@ msgid ""
914914
"each. When the iterable is exhausted, return elements from the saved copy. "
915915
"Repeats indefinitely. Roughly equivalent to::"
916916
msgstr""
917+
"Crie um iterador que devolve elementos do *iterable* assim como salva uma "
918+
"cópia de cada um. Quando o iterável é esgotado, devolve elementos da cópia "
919+
"salva. Repete indefinidamente. Aproximadamente equivalente a::"
917920

918921
#:../../library/itertools.rst:350
919922
msgid""
@@ -929,19 +932,34 @@ msgid ""
929932
" for element in saved:\n"
930933
" yield element"
931934
msgstr""
935+
"def cycle(iterable):\n"
936+
" # cycle('ABCD') → A B C D A B C D A B C D ...\n"
937+
"\n"
938+
" saved = []\n"
939+
" for element in iterable:\n"
940+
" yield element\n"
941+
" saved.append(element)\n"
942+
"\n"
943+
" while saved:\n"
944+
" for element in saved:\n"
945+
" yield element"
932946

933947
#:../../library/itertools.rst:362
934948
msgid""
935949
"This itertool may require significant auxiliary storage (depending on the "
936950
"length of the iterable)."
937951
msgstr""
952+
"Esta itertool pode exigir armazenamento auxiliar significativo (dependendo "
953+
"do comprimento do iterável)."
938954

939955
#:../../library/itertools.rst:368
940956
msgid""
941957
"Make an iterator that drops elements from the *iterable* while the "
942958
"*predicate* is true and afterwards returns every element. Roughly "
943959
"equivalent to::"
944960
msgstr""
961+
"Cria um iterador que remove elementos do *iterable* enquanto o *predicate* "
962+
"for verdadeiro e, em seguida, retorna todos os elementos. Equivalente a:"
945963

946964
#:../../library/itertools.rst:372
947965
msgid""
@@ -957,19 +975,35 @@ msgid ""
957975
" for x in iterator:\n"
958976
" yield x"
959977
msgstr""
978+
"def dropwhile(predicate, iterable):\n"
979+
" # dropwhile(lambda x: x<5, [1,4,6,3,8]) → 6 3 8\n"
980+
"\n"
981+
" iterator = iter(iterable)\n"
982+
" for x in iterator:\n"
983+
" if not predicate(x):\n"
984+
" yield x\n"
985+
" break\n"
986+
"\n"
987+
" for x in iterator:\n"
988+
" yield x"
960989

961990
#:../../library/itertools.rst:384
962991
msgid""
963992
"Note this does not produce *any* output until the predicate first becomes "
964993
"false, so this itertool may have a lengthy start-up time."
965994
msgstr""
995+
"Observe que isso não produz *nenhuma* saída até que o predicado se torne "
996+
"falso, portanto, esta itertool pode ter um longo tempo de inicialização."
966997

967998
#:../../library/itertools.rst:390
968999
msgid""
9691000
"Make an iterator that filters elements from the *iterable* returning only "
9701001
"those for which the *predicate* returns a false value. If *predicate* is "
9711002
"``None``, returns the items that are false. Roughly equivalent to::"
9721003
msgstr""
1004+
"Cria um iterador que filtre elementos do *iterable*, retornando apenas "
1005+
"aqueles para os quais o *predicate* retorna um valor falso. Se o *predicate* "
1006+
"for ``None``, retorna os itens que são falsos. Equivalente aproximadamente a:"
9731007

9741008
#:../../library/itertools.rst:395
9751009
msgid""
@@ -983,6 +1017,15 @@ msgid ""
9831017
" if not predicate(x):\n"
9841018
" yield x"
9851019
msgstr""
1020+
"def filterfalse(predicate, iterable):\n"
1021+
" # filterfalse(lambda x: x<5, [1,4,6,3,8]) → 6 8\n"
1022+
"\n"
1023+
" if predicate is None:\n"
1024+
" predicate = bool\n"
1025+
"\n"
1026+
" for x in iterable:\n"
1027+
" if not predicate(x):\n"
1028+
" yield x"
9861029

9871030
#:../../library/itertools.rst:408
9881031
msgid""
@@ -992,6 +1035,11 @@ msgid ""
9921035
"returns the element unchanged. Generally, the iterable needs to already be "
9931036
"sorted on the same key function."
9941037
msgstr""
1038+
"Cria um iterador que retorna chaves e grupos consecutivos do *iterable*. A "
1039+
"*key* é uma função que calcula um valor-chave para cada elemento. Se não for "
1040+
"especificado ou for ``None``, *key* assume como padrão uma função de "
1041+
"identidade e retorna o elemento inalterado. Geralmente, o iterável precisa "
1042+
"já estar ordenado na mesma função chave."
9951043

9961044
#:../../library/itertools.rst:414
9971045
msgid""
@@ -1001,6 +1049,11 @@ msgid ""
10011049
"the same key function). That behavior differs from SQL's GROUP BY which "
10021050
"aggregates common elements regardless of their input order."
10031051
msgstr""
1052+
"O funcionamento de :func:`groupby` é semelhante ao filtro ``uniq`` no Unix. "
1053+
"Ele gera uma quebra ou um novo grupo sempre que o valor da função da tecla "
1054+
"muda (razão pela qual geralmente é necessário ordenar os dados usando a "
1055+
"mesma função da tecla). Esse comportamento difere do GROUP BY do SQL, que "
1056+
"agrega elementos comuns independentemente da ordem de entrada."
10041057

10051058
#:../../library/itertools.rst:420
10061059
msgid""
@@ -1009,6 +1062,11 @@ msgid ""
10091062
"`groupby` object is advanced, the previous group is no longer visible. So, "
10101063
"if that data is needed later, it should be stored as a list::"
10111064
msgstr""
1065+
"O grupo retornado é, ele próprio, um iterador que compartilha o iterável "
1066+
"subjacente com :func:`groupby`. Como a origem é compartilhada, quando o "
1067+
"objeto :func:`groupby` avança, o grupo anterior não fica mais visível. "
1068+
"Portanto, se esses dados forem necessários posteriormente, eles devem ser "
1069+
"armazenados como uma lista:"
10121070

10131071
#:../../library/itertools.rst:425
10141072
msgid""
@@ -1019,6 +1077,13 @@ msgid ""
10191077
" groups.append(list(g)) # Store group iterator as a list\n"
10201078
" uniquekeys.append(k)"
10211079
msgstr""
1080+
"groups = []\n"
1081+
"uniquekeys = []\n"
1082+
"data = sorted(data, key=keyfunc)\n"
1083+
"for k, g in groupby(data, keyfunc):\n"
1084+
" groups.append(list(g)) # armazena um iterador de grupo como uma "
1085+
"lista\n"
1086+
" uniquekeys.append(k)"
10221087

10231088
#:../../library/itertools.rst:432
10241089
msgid":func:`groupby` is roughly equivalent to::"
@@ -1058,32 +1123,73 @@ msgid ""
10581123
" for _ in curr_group:\n"
10591124
" pass"
10601125
msgstr""
1126+
"def groupby(iterable, key=None):\n"
1127+
" # [k for k, g in groupby('AAAABBBCCDAABBB')] → A B C D A B\n"
1128+
" # [list(g) for k, g in groupby('AAAABBBCCD')] → AAAA BBB CC D\n"
1129+
"\n"
1130+
" keyfunc = (lambda x: x) if key is None else key\n"
1131+
" iterator = iter(iterable)\n"
1132+
" exhausted = False\n"
1133+
"\n"
1134+
" def _grouper(target_key):\n"
1135+
" nonlocal curr_value, curr_key, exhausted\n"
1136+
" yield curr_value\n"
1137+
" for curr_value in iterator:\n"
1138+
" curr_key = keyfunc(curr_value)\n"
1139+
" if curr_key != target_key:\n"
1140+
" return\n"
1141+
" yield curr_value\n"
1142+
" exhausted = True\n"
1143+
"\n"
1144+
" try:\n"
1145+
" curr_value = next(iterator)\n"
1146+
" except StopIteration:\n"
1147+
" return\n"
1148+
" curr_key = keyfunc(curr_value)\n"
1149+
"\n"
1150+
" while not exhausted:\n"
1151+
" target_key = curr_key\n"
1152+
" curr_group = _grouper(target_key)\n"
1153+
" yield curr_key, curr_group\n"
1154+
" if curr_key == target_key:\n"
1155+
" for _ in curr_group:\n"
1156+
" pass"
10611157

10621158
#:../../library/itertools.rst:470
10631159
msgid""
10641160
"Make an iterator that returns selected elements from the iterable. Works "
10651161
"like sequence slicing but does not support negative values for *start*, "
10661162
"*stop*, or *step*."
10671163
msgstr""
1164+
"Cria um iterador que retorna os elementos selecionados do iterável. Funciona "
1165+
"como o fatiamento de sequência, mas não oferece suporte a valores negativos "
1166+
"para *start*, *stop* ou *step*."
10681167

10691168
#:../../library/itertools.rst:474
10701169
msgid""
10711170
"If *start* is zero or ``None``, iteration starts at zero. Otherwise, "
10721171
"elements from the iterable are skipped until *start* is reached."
10731172
msgstr""
1173+
"Se *start* for zero ou ``None``, a iteração começa em zero. Caso contrário, "
1174+
"os elementos do iterável são pulados até que *start* seja alcançado."
10741175

10751176
#:../../library/itertools.rst:477
10761177
msgid""
10771178
"If *stop* is ``None``, iteration continues until the input is exhausted, if "
10781179
"at all. Otherwise, it stops at the specified position."
10791180
msgstr""
1181+
"Se *stop* for ``None``, a iteração continua até que a entrada se esgote, se "
1182+
"for o caso. Caso contrário, ela para na posição especificada."
10801183

10811184
#:../../library/itertools.rst:480
10821185
msgid""
10831186
"If *step* is ``None``, the step defaults to one. Elements are returned "
10841187
"consecutively unless *step* is set higher than one which results in items "
10851188
"being skipped."
10861189
msgstr""
1190+
"Se *step* for ``None``, o padrão do passo é 1. Os elementos são retornados "
1191+
"consecutivamente, a menos que *step* seja definido como maior que um, o que "
1192+
"resulta na omissão de itens."
10871193

10881194
#:../../library/itertools.rst:486
10891195
msgid""
@@ -1107,12 +1213,34 @@ msgid ""
11071213
" yield element\n"
11081214
" next_i += step"
11091215
msgstr""
1216+
"def islice(iterable, *args):\n"
1217+
" # islice('ABCDEFG', 2) → A B\n"
1218+
" # islice('ABCDEFG', 2, 4) → C D\n"
1219+
" # islice('ABCDEFG', 2, None) → C D E F G\n"
1220+
" # islice('ABCDEFG', 0, None, 2) → A C E G\n"
1221+
"\n"
1222+
" s = slice(*args)\n"
1223+
" start = 0 if s.start is None else s.start\n"
1224+
" stop = s.stop\n"
1225+
" step = 1 if s.step is None else s.step\n"
1226+
" if start < 0 or (stop is not None and stop < 0) or step <= 0:\n"
1227+
" raise ValueError\n"
1228+
"\n"
1229+
" indices = count() if stop is None else range(max(start, stop))\n"
1230+
" next_i = start\n"
1231+
" for i, element in zip(indices, iterable):\n"
1232+
" if i == next_i:\n"
1233+
" yield element\n"
1234+
" next_i += step"
11101235

11111236
#:../../library/itertools.rst:506
11121237
msgid""
11131238
"If the input is an iterator, then fully consuming the *islice* advances the "
11141239
"input iterator by ``max(start, stop)`` steps regardless of the *step* value."
11151240
msgstr""
1241+
"Se a entrada for um iterador, o consumo total do *islice* avança o iterador "
1242+
"de entrada em ``max(start, stop)`` passos, independentemente do valor do "
1243+
"*step*."
11161244

11171245
#:../../library/itertools.rst:513
11181246
msgid"Return successive overlapping pairs taken from the input *iterable*."

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp