-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathexpressions.po
More file actions
3962 lines (3450 loc) · 170 KB
/
expressions.po
File metadata and controls
3962 lines (3450 loc) · 170 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2026, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# python-doc bot, 2025
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.11\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-01-21 16:50+0000\n"
"PO-Revision-Date: 2025-09-22 16:51+0000\n"
"Last-Translator: python-doc bot, 2025\n"
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
"teams/5390/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n == 0 || n == 1) ? 0 : n != 0 && n % "
"1000000 == 0 ? 1 : 2;\n"
#: ../../reference/expressions.rst:6
msgid "Expressions"
msgstr "Expressões"
#: ../../reference/expressions.rst:10
msgid ""
"This chapter explains the meaning of the elements of expressions in Python."
msgstr ""
"Este capítulo explica o significado dos elementos das expressões em Python."
#: ../../reference/expressions.rst:12
msgid ""
"**Syntax Notes:** In this and the following chapters, extended BNF notation "
"will be used to describe syntax, not lexical analysis. When (one "
"alternative of) a syntax rule has the form"
msgstr ""
"**Notas de sintaxe:** Neste e nos capítulos seguintes, a notação BNF "
"estendida será usada para descrever a sintaxe, não a análise lexical. Quando "
"(uma alternativa de) uma regra de sintaxe tem a forma"
#: ../../reference/expressions.rst:19
msgid ""
"and no semantics are given, the semantics of this form of ``name`` are the "
"same as for ``othername``."
msgstr ""
"e nenhuma semântica é fornecida, a semântica desta forma de ``name`` é a "
"mesma que para ``othername``."
#: ../../reference/expressions.rst:26
msgid "Arithmetic conversions"
msgstr "Conversões aritméticas"
#: ../../reference/expressions.rst:30
msgid ""
"When a description of an arithmetic operator below uses the phrase \"the "
"numeric arguments are converted to a common type\", this means that the "
"operator implementation for built-in types works as follows:"
msgstr ""
"Quando uma descrição de um operador aritmético abaixo usa a frase \"os "
"argumentos numéricos são convertidos em um tipo comum\", isso significa que "
"a implementação do operador para tipos embutidos funciona da seguinte "
"maneira:"
#: ../../reference/expressions.rst:34
msgid ""
"If either argument is a complex number, the other is converted to complex;"
msgstr ""
"Se um dos argumentos for um número complexo, o outro será convertido em "
"complexo;"
#: ../../reference/expressions.rst:36
msgid ""
"otherwise, if either argument is a floating point number, the other is "
"converted to floating point;"
msgstr ""
"caso contrário, se um dos argumentos for um número de ponto flutuante, o "
"outro será convertido em ponto flutuante;"
#: ../../reference/expressions.rst:39
msgid "otherwise, both must be integers and no conversion is necessary."
msgstr ""
"caso contrário, ambos devem ser inteiros e nenhuma conversão é necessária."
#: ../../reference/expressions.rst:41
msgid ""
"Some additional rules apply for certain operators (e.g., a string as a left "
"argument to the '%' operator). Extensions must define their own conversion "
"behavior."
msgstr ""
"Algumas regras adicionais se aplicam a certos operadores (por exemplo, uma "
"string como um argumento à esquerda para o operador '%'). As extensões devem "
"definir seu próprio comportamento de conversão."
#: ../../reference/expressions.rst:49
msgid "Atoms"
msgstr "Átomos"
#: ../../reference/expressions.rst:53
msgid ""
"Atoms are the most basic elements of expressions. The simplest atoms are "
"identifiers or literals. Forms enclosed in parentheses, brackets or braces "
"are also categorized syntactically as atoms. The syntax for atoms is:"
msgstr ""
"Os átomos são os elementos mais básicos das expressões. Os átomos mais "
"simples são identificadores ou literais. As formas entre parênteses, "
"colchetes ou chaves também são categorizadas sintaticamente como átomos. A "
"sintaxe para átomos é:"
#: ../../reference/expressions.rst:66
msgid "Identifiers (Names)"
msgstr "Identificadores (Nomes)"
#: ../../reference/expressions.rst:70
msgid ""
"An identifier occurring as an atom is a name. See section :ref:"
"`identifiers` for lexical definition and section :ref:`naming` for "
"documentation of naming and binding."
msgstr ""
"Um identificador que ocorre como um átomo é um nome. Veja a seção :ref:"
"`identifiers` para a definição lexical e a seção :ref:`naming` para "
"documentação de nomenclatura e ligação."
#: ../../reference/expressions.rst:76
msgid ""
"When the name is bound to an object, evaluation of the atom yields that "
"object. When a name is not bound, an attempt to evaluate it raises a :exc:"
"`NameError` exception."
msgstr ""
"Quando o nome está vinculado a um objeto, a avaliação do átomo produz esse "
"objeto. Quando um nome não está vinculado, uma tentativa de avaliá-lo "
"levanta uma exceção :exc:`NameError`."
#: ../../reference/expressions.rst:86
msgid ""
"**Private name mangling:** When an identifier that textually occurs in a "
"class definition begins with two or more underscore characters and does not "
"end in two or more underscores, it is considered a :dfn:`private name` of "
"that class. Private names are transformed to a longer form before code is "
"generated for them. The transformation inserts the class name, with leading "
"underscores removed and a single underscore inserted, in front of the name. "
"For example, the identifier ``__spam`` occurring in a class named ``Ham`` "
"will be transformed to ``_Ham__spam``. This transformation is independent "
"of the syntactical context in which the identifier is used. If the "
"transformed name is extremely long (longer than 255 characters), "
"implementation defined truncation may happen. If the class name consists "
"only of underscores, no transformation is done."
msgstr ""
"**Mangling de nome privado:** Quando um identificador que ocorre "
"textualmente em uma definição de classe começa com dois ou mais caracteres "
"de sublinhado e não termina em dois ou mais sublinhados, ele é considerado "
"um :dfn:`nome privado` dessa classe. Os nomes privados são transformados em "
"um formato mais longo antes que o código seja gerado para eles. A "
"transformação insere o nome da classe, com sublinhados à esquerda removidos "
"e um único sublinhado inserido na frente do nome. Por exemplo, o "
"identificador ``__spam`` que ocorre em uma classe chamada ``Ham`` será "
"transformado em ``_Ham__spam``. Essa transformação é independente do "
"contexto sintático em que o identificador é usado. Se o nome transformado "
"for extremamente longo (mais de 255 caracteres), poderá ocorrer truncamento "
"definido pela implementação. Se o nome da classe consistir apenas em "
"sublinhados, nenhuma transformação será feita."
#: ../../reference/expressions.rst:102
msgid "Literals"
msgstr "Literais"
#: ../../reference/expressions.rst:106
msgid "Python supports string and bytes literals and various numeric literals:"
msgstr ""
"Python oferece suporte a strings e bytes literais e vários literais "
"numéricos:"
#: ../../reference/expressions.rst:112
msgid ""
"Evaluation of a literal yields an object of the given type (string, bytes, "
"integer, floating point number, complex number) with the given value. The "
"value may be approximated in the case of floating point and imaginary "
"(complex) literals. See section :ref:`literals` for details."
msgstr ""
"A avaliação de um literal produz um objeto do tipo fornecido (string, bytes, "
"inteiro, número de ponto flutuante, número complexo) com o valor fornecido. "
"O valor pode ser aproximado no caso de ponto flutuante e literais "
"imaginários (complexos). Veja a seção :ref:`literals` para detalhes."
#: ../../reference/expressions.rst:121
msgid ""
"All literals correspond to immutable data types, and hence the object's "
"identity is less important than its value. Multiple evaluations of literals "
"with the same value (either the same occurrence in the program text or a "
"different occurrence) may obtain the same object or a different object with "
"the same value."
msgstr ""
"Todos os literais correspondem a tipos de dados imutáveis e, portanto, a "
"identidade do objeto é menos importante que seu valor. Múltiplas avaliações "
"de literais com o mesmo valor (seja a mesma ocorrência no texto do programa "
"ou uma ocorrência diferente) podem obter o mesmo objeto ou um objeto "
"diferente com o mesmo valor."
#: ../../reference/expressions.rst:131
msgid "Parenthesized forms"
msgstr "Formas de parênteses"
#: ../../reference/expressions.rst:137
msgid ""
"A parenthesized form is an optional expression list enclosed in parentheses:"
msgstr ""
"Um forma entre parênteses é uma lista de expressões opcional entre "
"parênteses:"
#: ../../reference/expressions.rst:142
msgid ""
"A parenthesized expression list yields whatever that expression list yields: "
"if the list contains at least one comma, it yields a tuple; otherwise, it "
"yields the single expression that makes up the expression list."
msgstr ""
"Uma lista de expressões entre parênteses produz tudo o que aquela lista de "
"expressões produz: se a lista contiver pelo menos uma vírgula, ela produzirá "
"uma tupla; caso contrário, produz a única expressão que compõe a lista de "
"expressões."
#: ../../reference/expressions.rst:148
msgid ""
"An empty pair of parentheses yields an empty tuple object. Since tuples are "
"immutable, the same rules as for literals apply (i.e., two occurrences of "
"the empty tuple may or may not yield the same object)."
msgstr ""
"Um par de parênteses vazio produz um objeto tupla vazio. Como as tuplas são "
"imutáveis, aplicam-se as mesmas regras dos literais (isto é, duas "
"ocorrências da tupla vazia podem ou não produzir o mesmo objeto)."
#: ../../reference/expressions.rst:156
msgid ""
"Note that tuples are not formed by the parentheses, but rather by use of the "
"comma. The exception is the empty tuple, for which parentheses *are* "
"required --- allowing unparenthesized \"nothing\" in expressions would cause "
"ambiguities and allow common typos to pass uncaught."
msgstr ""
"Observe que as tuplas não são formadas pelos parênteses, mas sim pelo uso da "
"vírgula. A exceção é a tupla vazia, para a qual os parênteses *são* "
"obrigatórios -- permitir \"nada\" sem parênteses em expressões causaria "
"ambiguidades e permitiria que erros de digitação comuns passassem sem serem "
"detectados."
#: ../../reference/expressions.rst:165
msgid "Displays for lists, sets and dictionaries"
msgstr "Sintaxe de criação de listas, conjuntos e dicionários"
#: ../../reference/expressions.rst:169
msgid ""
"For constructing a list, a set or a dictionary Python provides special "
"syntax called \"displays\", each of them in two flavors:"
msgstr ""
"Para construir uma lista, um conjunto ou um dicionário, o Python fornece uma "
"sintaxe especial chamada \"sintaxes de criação\" (em inglês, *displays*), "
"cada uma delas em dois tipos:"
#: ../../reference/expressions.rst:172
msgid "either the container contents are listed explicitly, or"
msgstr "o conteúdo do contêiner é listado explicitamente ou"
#: ../../reference/expressions.rst:174
msgid ""
"they are computed via a set of looping and filtering instructions, called a :"
"dfn:`comprehension`."
msgstr ""
"eles são calculados por meio de um conjunto de instruções de laço e "
"filtragem, chamado de :dfn:`compreensão`."
#: ../../reference/expressions.rst:182
msgid "Common syntax elements for comprehensions are:"
msgstr "Elementos de sintaxe comuns para compreensões são:"
#: ../../reference/expressions.rst:190
msgid ""
"The comprehension consists of a single expression followed by at least one :"
"keyword:`!for` clause and zero or more :keyword:`!for` or :keyword:`!if` "
"clauses. In this case, the elements of the new container are those that "
"would be produced by considering each of the :keyword:`!for` or :keyword:`!"
"if` clauses a block, nesting from left to right, and evaluating the "
"expression to produce an element each time the innermost block is reached."
msgstr ""
"A compreensão consiste em uma única expressão seguida por pelo menos uma "
"cláusula :keyword:`!for` e zero ou mais cláusulas :keyword:`!for` ou :"
"keyword:`!if`. Neste caso, os elementos do novo contêiner são aqueles que "
"seriam produzidos considerando cada uma das cláusulas :keyword:`!for` ou :"
"keyword:`!if` de um bloco, aninhando da esquerda para a direita, e avaliando "
"a expressão para produzir um elemento cada vez que o bloco mais interno é "
"alcançado."
#: ../../reference/expressions.rst:197
msgid ""
"However, aside from the iterable expression in the leftmost :keyword:`!for` "
"clause, the comprehension is executed in a separate implicitly nested scope. "
"This ensures that names assigned to in the target list don't \"leak\" into "
"the enclosing scope."
msgstr ""
"No entanto, além da expressão iterável na cláusula :keyword:`!for` mais à "
"esquerda, a compreensão é executada em um escopo aninhado implicitamente "
"separado. Isso garante que os nomes atribuídos na lista de destino não "
"\"vazem\" para o escopo delimitador."
#: ../../reference/expressions.rst:201
msgid ""
"The iterable expression in the leftmost :keyword:`!for` clause is evaluated "
"directly in the enclosing scope and then passed as an argument to the "
"implicitly nested scope. Subsequent :keyword:`!for` clauses and any filter "
"condition in the leftmost :keyword:`!for` clause cannot be evaluated in the "
"enclosing scope as they may depend on the values obtained from the leftmost "
"iterable. For example: ``[x*y for x in range(10) for y in range(x, x+10)]``."
msgstr ""
"A expressão iterável na cláusula :keyword:`!for` mais à esquerda é avaliada "
"diretamente no escopo envolvente e então passada como um argumento para o "
"escopo aninhado implicitamente. Cláusulas :keyword:`!for` subsequentes e "
"qualquer condição de filtro na cláusula :keyword:`!for` mais à esquerda não "
"podem ser avaliadas no escopo delimitador, pois podem depender dos valores "
"obtidos do iterável mais à esquerda. Por exemplo: ``[x*y for x in range(10) "
"for y in range(x, x+10)]``."
#: ../../reference/expressions.rst:208
msgid ""
"To ensure the comprehension always results in a container of the appropriate "
"type, ``yield`` and ``yield from`` expressions are prohibited in the "
"implicitly nested scope."
msgstr ""
"Para garantir que a compreensão sempre resulte em um contêiner do tipo "
"apropriado, as expressões ``yield`` e ``yield from`` são proibidas no escopo "
"aninhado implicitamente."
#: ../../reference/expressions.rst:215
msgid ""
"Since Python 3.6, in an :keyword:`async def` function, an :keyword:`!async "
"for` clause may be used to iterate over a :term:`asynchronous iterator`. A "
"comprehension in an :keyword:`!async def` function may consist of either a :"
"keyword:`!for` or :keyword:`!async for` clause following the leading "
"expression, may contain additional :keyword:`!for` or :keyword:`!async for` "
"clauses, and may also use :keyword:`await` expressions. If a comprehension "
"contains either :keyword:`!async for` clauses or :keyword:`!await` "
"expressions or other asynchronous comprehensions it is called an :dfn:"
"`asynchronous comprehension`. An asynchronous comprehension may suspend the "
"execution of the coroutine function in which it appears. See also :pep:`530`."
msgstr ""
"Desde o Python 3.6, em uma função :keyword:`async def`, uma cláusula :"
"keyword:`!async for` pode ser usada para iterar sobre um :term:`iterador "
"assíncrono`. Uma compreensão em uma função :keyword:`!async def` pode "
"consistir em uma cláusula :keyword:`!for` ou :keyword:`!async for` seguindo "
"a expressão principal, pode conter :keyword:`!for` ou cláusulas :keyword:`!"
"async for`, e também pode usar expressões :keyword:`await`. Se uma "
"compreensão contém cláusulas :keyword:`!async for` ou expressões :keyword:`!"
"await` ou outras compreensões assíncronas, ela é chamada de :dfn:"
"`compreensão assíncrona`. Uma compreensão assíncrona pode suspender a "
"execução da função de corrotina na qual ela aparece. Veja também a :pep:"
"`530`."
#: ../../reference/expressions.rst:227
msgid "Asynchronous comprehensions were introduced."
msgstr "Compreensões assíncronas foram introduzidas."
#: ../../reference/expressions.rst:230 ../../reference/expressions.rst:408
msgid "``yield`` and ``yield from`` prohibited in the implicitly nested scope."
msgstr "``yield`` e ``yield from`` proibidos no escopo aninhado implícito."
#: ../../reference/expressions.rst:233
msgid ""
"Asynchronous comprehensions are now allowed inside comprehensions in "
"asynchronous functions. Outer comprehensions implicitly become asynchronous."
msgstr ""
"Compreensões assíncronas agora são permitidas dentro de compreensões em "
"funções assíncronas. As compreensões externas tornam-se implicitamente "
"assíncronas."
#: ../../reference/expressions.rst:242
msgid "List displays"
msgstr "Sintaxes de criação de lista"
#: ../../reference/expressions.rst:252
msgid ""
"A list display is a possibly empty series of expressions enclosed in square "
"brackets:"
msgstr ""
"Uma sintaxe de criação de lista é uma série possivelmente vazia de "
"expressões entre colchetes:"
#: ../../reference/expressions.rst:258
msgid ""
"A list display yields a new list object, the contents being specified by "
"either a list of expressions or a comprehension. When a comma-separated "
"list of expressions is supplied, its elements are evaluated from left to "
"right and placed into the list object in that order. When a comprehension "
"is supplied, the list is constructed from the elements resulting from the "
"comprehension."
msgstr ""
"Uma sintaxe de criação de lista produz um novo objeto de lista, sendo o "
"conteúdo especificado por uma lista de expressões ou uma compreensão. Quando "
"uma lista de expressões separadas por vírgulas é fornecida, seus elementos "
"são avaliados da esquerda para a direita e colocados no objeto de lista "
"nessa ordem. Quando uma compreensão é fornecida, a lista é construída a "
"partir dos elementos resultantes da compreensão."
#: ../../reference/expressions.rst:268
msgid "Set displays"
msgstr "Sintaxes de criação de conjunto"
#: ../../reference/expressions.rst:277
msgid ""
"A set display is denoted by curly braces and distinguishable from dictionary "
"displays by the lack of colons separating keys and values:"
msgstr ""
"Uma sintaxe de criação definida é denotada por chaves e distinguível de "
"sintaxes de criação de dicionário pela falta de caractere de dois pontos "
"separando chaves e valores:"
#: ../../reference/expressions.rst:283
msgid ""
"A set display yields a new mutable set object, the contents being specified "
"by either a sequence of expressions or a comprehension. When a comma-"
"separated list of expressions is supplied, its elements are evaluated from "
"left to right and added to the set object. When a comprehension is "
"supplied, the set is constructed from the elements resulting from the "
"comprehension."
msgstr ""
"Uma sintaxe de criação de conjunto produz um novo objeto de conjunto "
"mutável, sendo o conteúdo especificado por uma sequência de expressões ou "
"uma compreensão. Quando uma lista de expressões separadas por vírgula é "
"fornecida, seus elementos são avaliados da esquerda para a direita e "
"adicionados ao objeto definido. Quando uma compreensão é fornecida, o "
"conjunto é construído a partir dos elementos resultantes da compreensão."
#: ../../reference/expressions.rst:289
msgid ""
"An empty set cannot be constructed with ``{}``; this literal constructs an "
"empty dictionary."
msgstr ""
"Um conjunto vazio não pode ser construído com ``{}``; este literal constrói "
"um dicionário vazio."
#: ../../reference/expressions.rst:296
msgid "Dictionary displays"
msgstr "Sintaxes de criação de dicionário"
#: ../../reference/expressions.rst:307
msgid ""
"A dictionary display is a possibly empty series of dict items (key/value "
"pairs) enclosed in curly braces:"
msgstr ""
"Uma sintaxe de criação de dicionário é uma série possivelmente vazia de "
"itens de dicionário (pares chave/valor) envolto entre chaves:"
#: ../../reference/expressions.rst:316
msgid "A dictionary display yields a new dictionary object."
msgstr "Uma sintaxe de criação de dicionário produz um novo objeto dicionário."
#: ../../reference/expressions.rst:318
msgid ""
"If a comma-separated sequence of dict items is given, they are evaluated "
"from left to right to define the entries of the dictionary: each key object "
"is used as a key into the dictionary to store the corresponding value. This "
"means that you can specify the same key multiple times in the dict item "
"list, and the final dictionary's value for that key will be the last one "
"given."
msgstr ""
"Se for fornecida uma sequência separada por vírgulas de itens de dicionário, "
"eles são avaliados da esquerda para a direita para definir as entradas do "
"dicionário: cada objeto chave é usado como uma chave no dicionário para "
"armazenar o valor correspondente. Isso significa que você pode especificar a "
"mesma chave várias vezes na lista de itens de dicionário, e o valor final do "
"dicionário para essa chave será o último dado."
#: ../../reference/expressions.rst:328
msgid ""
"A double asterisk ``**`` denotes :dfn:`dictionary unpacking`. Its operand "
"must be a :term:`mapping`. Each mapping item is added to the new "
"dictionary. Later values replace values already set by earlier dict items "
"and earlier dictionary unpackings."
msgstr ""
"Um asterisco duplo ``**`` denota :dfn:`desempacotamento do dicionário`. Seu "
"operando deve ser um :term:`mapeamento`. Cada item de mapeamento é "
"adicionado ao novo dicionário. Os valores posteriores substituem os valores "
"já definidos por itens de dicionário anteriores e desempacotamentos de "
"dicionário anteriores."
#: ../../reference/expressions.rst:333
msgid "Unpacking into dictionary displays, originally proposed by :pep:`448`."
msgstr ""
"Desempacotando em sintaxes de criação de dicionário, originalmente proposto "
"pela :pep:`448`."
#: ../../reference/expressions.rst:336
msgid ""
"A dict comprehension, in contrast to list and set comprehensions, needs two "
"expressions separated with a colon followed by the usual \"for\" and \"if\" "
"clauses. When the comprehension is run, the resulting key and value elements "
"are inserted in the new dictionary in the order they are produced."
msgstr ""
"Uma compreensão de dict, em contraste com as compreensões de lista e "
"conjunto, precisa de duas expressões separadas por dois pontos, seguidas "
"pelas cláusulas usuais \"for\" e \"if\". Quando a compreensão é executada, "
"os elementos chave e valor resultantes são inseridos no novo dicionário na "
"ordem em que são produzidos."
#: ../../reference/expressions.rst:344
msgid ""
"Restrictions on the types of the key values are listed earlier in section :"
"ref:`types`. (To summarize, the key type should be :term:`hashable`, which "
"excludes all mutable objects.) Clashes between duplicate keys are not "
"detected; the last value (textually rightmost in the display) stored for a "
"given key value prevails."
msgstr ""
"Restrições nos tipos de valores de chave são listadas anteriormente na "
"seção :ref:`types`. (Para resumir, o tipo de chave deve ser :term:"
"`hasheável`, que exclui todos os objetos mutáveis.) Não são detectadas "
"colisões entre chaves duplicadas; o último valor (textualmente mais à "
"direita na sintaxe de criação) armazenado para um determinado valor de chave "
"prevalece."
#: ../../reference/expressions.rst:350
msgid ""
"Prior to Python 3.8, in dict comprehensions, the evaluation order of key and "
"value was not well-defined. In CPython, the value was evaluated before the "
"key. Starting with 3.8, the key is evaluated before the value, as proposed "
"by :pep:`572`."
msgstr ""
"Antes do Python 3.8, em compreensões de dict, a ordem de avaliação de chave "
"e valor não era bem definida. No CPython, o valor foi avaliado antes da "
"chave. A partir de 3.8, a chave é avaliada antes do valor, conforme proposto "
"pela :pep:`572`."
#: ../../reference/expressions.rst:360
msgid "Generator expressions"
msgstr "Expressões geradoras"
#: ../../reference/expressions.rst:367
msgid "A generator expression is a compact generator notation in parentheses:"
msgstr ""
"Uma expressão geradora é uma notação geradora compacta entre parênteses:"
#: ../../reference/expressions.rst:372
msgid ""
"A generator expression yields a new generator object. Its syntax is the "
"same as for comprehensions, except that it is enclosed in parentheses "
"instead of brackets or curly braces."
msgstr ""
"Uma expressão geradora produz um novo objeto gerador. Sua sintaxe é a mesma "
"das compreensões, exceto pelo fato de estar entre parênteses em vez de "
"colchetes ou chaves."
#: ../../reference/expressions.rst:376
msgid ""
"Variables used in the generator expression are evaluated lazily when the :"
"meth:`~generator.__next__` method is called for the generator object (in the "
"same fashion as normal generators). However, the iterable expression in the "
"leftmost :keyword:`!for` clause is immediately evaluated, so that an error "
"produced by it will be emitted at the point where the generator expression "
"is defined, rather than at the point where the first value is retrieved. "
"Subsequent :keyword:`!for` clauses and any filter condition in the leftmost :"
"keyword:`!for` clause cannot be evaluated in the enclosing scope as they may "
"depend on the values obtained from the leftmost iterable. For example: "
"``(x*y for x in range(10) for y in range(x, x+10))``."
msgstr ""
"As variáveis usadas na expressão geradora são avaliadas lentamente quando o "
"método :meth:`~generator.__next__` é chamado para o objeto gerador (da mesma "
"forma que os geradores normais). No entanto, a expressão iterável na "
"cláusula :keyword:`!for` mais à esquerda é avaliada imediatamente, de modo "
"que um erro produzido por ela será emitido no ponto em que a expressão do "
"gerador é definida, em vez de no ponto em que o primeiro valor é recuperado. "
"Cláusulas :keyword:`!for` subsequentes e qualquer condição de filtro na "
"cláusula :keyword:`!for` mais à esquerda não podem ser avaliadas no escopo "
"delimitador, pois podem depender dos valores obtidos do iterável mais à "
"esquerda. Por exemplo: ``(x*y for x in range(10) for y in range(x, x+10))``."
#: ../../reference/expressions.rst:387
msgid ""
"The parentheses can be omitted on calls with only one argument. See "
"section :ref:`calls` for details."
msgstr ""
"Os parênteses podem ser omitidos em chamadas com apenas um argumento. Veja a "
"seção :ref:`calls` para detalhes."
#: ../../reference/expressions.rst:390
msgid ""
"To avoid interfering with the expected operation of the generator expression "
"itself, ``yield`` and ``yield from`` expressions are prohibited in the "
"implicitly defined generator."
msgstr ""
"Para evitar interferir com a operação esperada da própria expressão "
"geradora, as expressões ``yield`` e ``yield from`` são proibidas no gerador "
"definido implicitamente."
#: ../../reference/expressions.rst:394
msgid ""
"If a generator expression contains either :keyword:`!async for` clauses or :"
"keyword:`await` expressions it is called an :dfn:`asynchronous generator "
"expression`. An asynchronous generator expression returns a new "
"asynchronous generator object, which is an asynchronous iterator (see :ref:"
"`async-iterators`)."
msgstr ""
"Se uma expressão geradora contém cláusulas :keyword:`!async for` ou "
"expressões :keyword:`await`, ela é chamada de :dfn:`expressão geradora "
"assíncrona`. Uma expressão geradora assíncrona retorna um novo objeto "
"gerador assíncrono, que é um iterador assíncrono (consulte :ref:`async-"
"iterators`)."
#: ../../reference/expressions.rst:400
msgid "Asynchronous generator expressions were introduced."
msgstr "Expressões geradoras assíncronas foram introduzidas."
#: ../../reference/expressions.rst:403
msgid ""
"Prior to Python 3.7, asynchronous generator expressions could only appear "
"in :keyword:`async def` coroutines. Starting with 3.7, any function can use "
"asynchronous generator expressions."
msgstr ""
"Antes do Python 3.7, as expressões geradoras assíncronas só podiam aparecer "
"em corrotinas :keyword:`async def`. A partir da versão 3.7, qualquer função "
"pode usar expressões geradoras assíncronas."
#: ../../reference/expressions.rst:415
msgid "Yield expressions"
msgstr "Expressões yield"
#: ../../reference/expressions.rst:428
msgid ""
"The yield expression is used when defining a :term:`generator` function or "
"an :term:`asynchronous generator` function and thus can only be used in the "
"body of a function definition. Using a yield expression in a function's "
"body causes that function to be a generator function, and using it in an :"
"keyword:`async def` function's body causes that coroutine function to be an "
"asynchronous generator function. For example::"
msgstr ""
"A expressão yield é usada ao definir uma função :term:`geradora <gerador>` "
"ou uma função :term:`geradora assíncrona <gerador assíncrono>` e, portanto, "
"só pode ser usada no corpo de uma definição de função. Usar uma expressão "
"yield no corpo de uma função faz com que essa função seja uma função "
"geradora, e usá-la no corpo de uma função :keyword:`async def` faz com que "
"essa função de corrotina seja uma função geradora assíncrona. Por exemplo::"
#: ../../reference/expressions.rst:441
msgid ""
"Due to their side effects on the containing scope, ``yield`` expressions are "
"not permitted as part of the implicitly defined scopes used to implement "
"comprehensions and generator expressions."
msgstr ""
"Devido a seus efeitos colaterais no escopo recipiente, as expressões "
"``yield`` não são permitidas como parte dos escopos definidos implicitamente "
"usados para implementar compreensões e expressões geradoras."
#: ../../reference/expressions.rst:445
msgid ""
"Yield expressions prohibited in the implicitly nested scopes used to "
"implement comprehensions and generator expressions."
msgstr ""
"Expressões yield proibidas nos escopos aninhados implicitamente usados para "
"implementar compreensões e expressões geradoras."
#: ../../reference/expressions.rst:449
msgid ""
"Generator functions are described below, while asynchronous generator "
"functions are described separately in section :ref:`asynchronous-generator-"
"functions`."
msgstr ""
"As funções geradoras são descritas abaixo, enquanto as funções geradoras "
"assíncronas são descritas separadamente na seção :ref:`asynchronous-"
"generator-functions`"
#: ../../reference/expressions.rst:453
msgid ""
"When a generator function is called, it returns an iterator known as a "
"generator. That generator then controls the execution of the generator "
"function. The execution starts when one of the generator's methods is "
"called. At that time, the execution proceeds to the first yield expression, "
"where it is suspended again, returning the value of :token:`~python-grammar:"
"expression_list` to the generator's caller, or ``None`` if :token:`~python-"
"grammar:expression_list` is omitted. By suspended, we mean that all local "
"state is retained, including the current bindings of local variables, the "
"instruction pointer, the internal evaluation stack, and the state of any "
"exception handling. When the execution is resumed by calling one of the "
"generator's methods, the function can proceed exactly as if the yield "
"expression were just another external call. The value of the yield "
"expression after resuming depends on the method which resumed the "
"execution. If :meth:`~generator.__next__` is used (typically via either a :"
"keyword:`for` or the :func:`next` builtin) then the result is :const:"
"`None`. Otherwise, if :meth:`~generator.send` is used, then the result will "
"be the value passed in to that method."
msgstr ""
"Quando uma função geradora é chamada, ela retorna um iterador conhecido como "
"gerador. Esse gerador então controla a execução da função geradora. A "
"execução começa quando um dos métodos do gerador é chamado. Nesse momento, a "
"execução segue para a primeira expressão yield, onde é suspensa novamente, "
"retornando o valor de :token:`~python-grammar:expression_list` ao chamador "
"do gerador, ou ``None`` se :token:`~python-grammar:expression_list` é "
"omitido. Por suspenso, queremos dizer que todo o estado local é retido, "
"incluindo as chamadas atuais de variáveis locais, o ponteiro de instrução, a "
"pilha de avaliação interna e o estado de qualquer tratamento de exceção. "
"Quando a execução é retomada chamando um dos métodos do gerador, a função "
"pode prosseguir exatamente como se a expressão yield fosse apenas outra "
"chamada externa. O valor da expressão yield após a retomada depende do "
"método que retomou a execução. Se :meth:`~generator.__next__` for usado "
"(tipicamente através de uma :keyword:`for` ou do :func:`next` embutido) "
"então o resultado será :const:`None`. Caso contrário, se :meth:`~generator."
"send` for usado, o resultado será o valor passado para esse método."
#: ../../reference/expressions.rst:473
msgid ""
"All of this makes generator functions quite similar to coroutines; they "
"yield multiple times, they have more than one entry point and their "
"execution can be suspended. The only difference is that a generator "
"function cannot control where the execution should continue after it yields; "
"the control is always transferred to the generator's caller."
msgstr ""
"Tudo isso torna as funções geradoras bastante semelhantes às corrotinas; "
"cedem múltiplas vezes, possuem mais de um ponto de entrada e sua execução "
"pode ser suspensa. A única diferença é que uma função geradora não pode "
"controlar onde a execução deve continuar após o seu rendimento; o controle é "
"sempre transferido para o chamador do gerador."
#: ../../reference/expressions.rst:479
msgid ""
"Yield expressions are allowed anywhere in a :keyword:`try` construct. If "
"the generator is not resumed before it is finalized (by reaching a zero "
"reference count or by being garbage collected), the generator-iterator's :"
"meth:`~generator.close` method will be called, allowing any pending :keyword:"
"`finally` clauses to execute."
msgstr ""
"Expressões yield são permitidas em qualquer lugar em uma construção :keyword:"
"`try`. Se o gerador não for retomado antes de ser finalizado (ao atingir uma "
"contagem de referências zero ou ao ser coletado como lixo), o método :meth:"
"`~generator.close` do iterador de gerador será chamado, permitindo que "
"quaisquer cláusulas :keyword:`finally` pendentes sejam executadas."
#: ../../reference/expressions.rst:488
msgid ""
"When ``yield from <expr>`` is used, the supplied expression must be an "
"iterable. The values produced by iterating that iterable are passed directly "
"to the caller of the current generator's methods. Any values passed in with :"
"meth:`~generator.send` and any exceptions passed in with :meth:`~generator."
"throw` are passed to the underlying iterator if it has the appropriate "
"methods. If this is not the case, then :meth:`~generator.send` will raise :"
"exc:`AttributeError` or :exc:`TypeError`, while :meth:`~generator.throw` "
"will just raise the passed in exception immediately."
msgstr ""
"Quando ``yield from <expr>`` é usado, a expressão fornecida deve ser "
"iterável. Os valores produzidos pela iteração desse iterável são passados "
"diretamente para o chamador dos métodos do gerador atual. Quaisquer valores "
"passados com :meth:`~generator.send` e quaisquer exceções passadas com :meth:"
"`~generator.throw` são passados para o iterador subjacente se ele tiver os "
"métodos apropriados. Se este não for o caso, então :meth:`~generator.send` "
"irá levantar :exc:`AttributeError` ou :exc:`TypeError`, enquanto :meth:"
"`~generator.throw` irá apenas levantar a exceção passada imediatamente."
#: ../../reference/expressions.rst:497
msgid ""
"When the underlying iterator is complete, the :attr:`~StopIteration.value` "
"attribute of the raised :exc:`StopIteration` instance becomes the value of "
"the yield expression. It can be either set explicitly when raising :exc:"
"`StopIteration`, or automatically when the subiterator is a generator (by "
"returning a value from the subgenerator)."
msgstr ""
"Quando o iterador subjacente estiver completo, o atributo :attr:"
"`~StopIteration.value` da instância :exc:`StopIteration` gerada torna-se o "
"valor da expressão yield. Ele pode ser definido explicitamente ao levantar :"
"exc:`StopIteration` ou automaticamente quando o subiterador é um gerador "
"(retornando um valor do subgerador)."
#: ../../reference/expressions.rst:503
msgid "Added ``yield from <expr>`` to delegate control flow to a subiterator."
msgstr ""
"Adicionado ``yield from <expr>`` para delegar o fluxo de controle a um "
"subiterador."
#: ../../reference/expressions.rst:506
msgid ""
"The parentheses may be omitted when the yield expression is the sole "
"expression on the right hand side of an assignment statement."
msgstr ""
"Os parênteses podem ser omitidos quando a expressão yield é a única "
"expressão no lado direito de uma instrução de atribuição."
#: ../../reference/expressions.rst:512
msgid ":pep:`255` - Simple Generators"
msgstr ":pep:`255` - Simple Generators"
#: ../../reference/expressions.rst:512
msgid ""
"The proposal for adding generators and the :keyword:`yield` statement to "
"Python."
msgstr ""
"A proposta para adicionar geradores e a instrução :keyword:`yield` ao Python."
#: ../../reference/expressions.rst:516
msgid ":pep:`342` - Coroutines via Enhanced Generators"
msgstr ":pep:`342` - Corrotinas via Geradores Aprimorados"
#: ../../reference/expressions.rst:515
msgid ""
"The proposal to enhance the API and syntax of generators, making them usable "
"as simple coroutines."
msgstr ""
"A proposta de aprimorar a API e a sintaxe dos geradores, tornando-os "
"utilizáveis como simples corrotinas."
#: ../../reference/expressions.rst:520
msgid ":pep:`380` - Syntax for Delegating to a Subgenerator"
msgstr ":pep:`380` - Sintaxe para Delegar a um Subgerador"
#: ../../reference/expressions.rst:519
msgid ""
"The proposal to introduce the :token:`~python-grammar:yield_from` syntax, "
"making delegation to subgenerators easy."
msgstr ""
"A proposta de introduzir a sintaxe :token:`~python-grammar:yield_from`, "
"facilitando a delegação a subgeradores."
#: ../../reference/expressions.rst:523
msgid ":pep:`525` - Asynchronous Generators"
msgstr ":pep:`525` - Geradores assíncronos"
#: ../../reference/expressions.rst:523
msgid ""
"The proposal that expanded on :pep:`492` by adding generator capabilities to "
"coroutine functions."
msgstr ""
"A proposta que se expandiu em :pep:`492` adicionando recursos de gerador a "
"funções de corrotina."
#: ../../reference/expressions.rst:530
msgid "Generator-iterator methods"
msgstr "Métodos de iterador gerador"
#: ../../reference/expressions.rst:532
msgid ""
"This subsection describes the methods of a generator iterator. They can be "
"used to control the execution of a generator function."
msgstr ""
"Esta subseção descreve os métodos de um iterador gerador. Eles podem ser "
"usados para controlar a execução de uma função geradora."
#: ../../reference/expressions.rst:535
msgid ""
"Note that calling any of the generator methods below when the generator is "
"already executing raises a :exc:`ValueError` exception."
msgstr ""
"Observe que chamar qualquer um dos métodos do gerador abaixo quando o "
"gerador já estiver em execução levanta uma exceção :exc:`ValueError`."
#: ../../reference/expressions.rst:543
msgid ""
"Starts the execution of a generator function or resumes it at the last "
"executed yield expression. When a generator function is resumed with a :"
"meth:`~generator.__next__` method, the current yield expression always "
"evaluates to :const:`None`. The execution then continues to the next yield "
"expression, where the generator is suspended again, and the value of the :"
"token:`~python-grammar:expression_list` is returned to :meth:`__next__`'s "
"caller. If the generator exits without yielding another value, a :exc:"
"`StopIteration` exception is raised."
msgstr ""
"Inicia a execução de uma função geradora ou a retoma na última expressão "
"yield executada. Quando uma função geradora é retomada com um método :meth:"
"`~generator.__next__`, a expressão yield atual sempre é avaliada como :const:"
"`None`. A execução então continua para a próxima expressão yield, onde o "
"gerador é suspenso novamente, e o valor de :token:`~python-grammar:"
"expression_list` é retornado para o chamador de :meth:`__next__`. Se o "
"gerador sair sem produzir outro valor, uma exceção :exc:`StopIteration` será "
"levantada."
#: ../../reference/expressions.rst:552
msgid ""
"This method is normally called implicitly, e.g. by a :keyword:`for` loop, or "
"by the built-in :func:`next` function."
msgstr ""
"Este método é normalmente chamado implicitamente, por exemplo por um laço :"
"keyword:`for`, ou pela função embutida :func:`next`."
#: ../../reference/expressions.rst:558
msgid ""
"Resumes the execution and \"sends\" a value into the generator function. "
"The *value* argument becomes the result of the current yield expression. "
"The :meth:`send` method returns the next value yielded by the generator, or "
"raises :exc:`StopIteration` if the generator exits without yielding another "
"value. When :meth:`send` is called to start the generator, it must be "
"called with :const:`None` as the argument, because there is no yield "
"expression that could receive the value."
msgstr ""
"Retoma a execução e \"envia\" um valor para a função geradora. O argumento "
"*value* torna-se o resultado da expressão yield atual. O método :meth:`send` "
"retorna o próximo valor gerado pelo gerador, ou levanta :exc:`StopIteration` "
"se o gerador sair sem produzir outro valor. Quando :meth:`send` é chamado "
"para iniciar o gerador, ele deve ser chamado com :const:`None` como "
"argumento, porque não há nenhuma expressão yield que possa receber o valor."
#: ../../reference/expressions.rst:570
msgid ""
"Raises an exception at the point where the generator was paused, and returns "
"the next value yielded by the generator function. If the generator exits "
"without yielding another value, a :exc:`StopIteration` exception is raised. "
"If the generator function does not catch the passed-in exception, or raises "
"a different exception, then that exception propagates to the caller."
msgstr ""
"Levanta uma exceção no ponto em que o gerador foi pausado e retorna o "
"próximo valor gerado pela função geradora. Se o gerador sair sem gerar outro "
"valor, uma exceção :exc:`StopIteration` será levantada. Se a função geradora "
"não detectar a exceção passada ou levanta uma exceção diferente, essa "
"exceção se propagará para o chamador."
#: ../../reference/expressions.rst:576
msgid ""
"In typical use, this is called with a single exception instance similar to "
"the way the :keyword:`raise` keyword is used."
msgstr ""
"Em uso típico, isso é chamado com uma única instância de exceção semelhante "
"à forma como a palavra reservada :keyword:`raise` é usada."
#: ../../reference/expressions.rst:579
msgid ""
"For backwards compatibility, however, the second signature is supported, "
"following a convention from older versions of Python. The *type* argument "
"should be an exception class, and *value* should be an exception instance. "
"If the *value* is not provided, the *type* constructor is called to get an "
"instance. If *traceback* is provided, it is set on the exception, otherwise "
"any existing :attr:`~BaseException.__traceback__` attribute stored in "
"*value* may be cleared."
msgstr ""
"Para compatibilidade com versões anteriores, no entanto, a segunda "
"assinatura é suportada, seguindo uma convenção de versões mais antigas do "
"Python. O argumento *type* deve ser uma classe de exceção e *value* deve ser "
"uma instância de exceção. Se o *valor* não for fornecido, o construtor "
"*tipo* será chamado para obter uma instância. Se *traceback* for fornecido, "
"ele será definido na exceção, caso contrário, qualquer atributo :attr:"
"`~BaseException.__traceback__` existente armazenado em *value* poderá ser "
"limpo."
#: ../../reference/expressions.rst:593
msgid ""
"Raises a :exc:`GeneratorExit` at the point where the generator function was "
"paused. If the generator function then exits gracefully, is already closed, "
"or raises :exc:`GeneratorExit` (by not catching the exception), close "
"returns to its caller. If the generator yields a value, a :exc:"
"`RuntimeError` is raised. If the generator raises any other exception, it "
"is propagated to the caller. :meth:`close` does nothing if the generator "
"has already exited due to an exception or normal exit."
msgstr ""
"Levanta uma :exc:`GeneratorExit` no ponto onde a função geradora foi "
"pausada. Se a função geradora então sair graciosamente, já estiver fechada "
"ou levantar :exc:`GeneratorExit` (por não capturar a exceção), close retorna "
"para seu chamador. Se o gerador produzir um valor, um :exc:`RuntimeError` é "
"levantada. Se o gerador levantar qualquer outra exceção, ela será propagada "
"para o chamador. :meth:`close` não faz nada se o gerador já tiver saído "
"devido a uma exceção ou saída normal."
#: ../../reference/expressions.rst:604
msgid "Examples"
msgstr "Exemplos"
#: ../../reference/expressions.rst:606
msgid ""
"Here is a simple example that demonstrates the behavior of generators and "
"generator functions::"
msgstr ""
"Aqui está um exemplo simples que demonstra o comportamento de geradores e "
"funções geradoras::"
#: ../../reference/expressions.rst:633
msgid ""
"For examples using ``yield from``, see :ref:`pep-380` in \"What's New in "
"Python.\""
msgstr ""
"Para exemplos usando ``yield from``, consulte a :ref:`pep-380` em \"O que há "
"de novo no Python.\""
#: ../../reference/expressions.rst:639
msgid "Asynchronous generator functions"
msgstr "Funções geradoras assíncronas"
#: ../../reference/expressions.rst:641
msgid ""
"The presence of a yield expression in a function or method defined using :"
"keyword:`async def` further defines the function as an :term:`asynchronous "
"generator` function."
msgstr ""
"A presença de uma expressão yield em uma função ou método definido usando a :"
"keyword:`async def` define ainda mais a função como uma função :term:"
"`geradora assíncrona <gerador assíncrono>`."
#: ../../reference/expressions.rst:645
msgid ""
"When an asynchronous generator function is called, it returns an "
"asynchronous iterator known as an asynchronous generator object. That object "
"then controls the execution of the generator function. An asynchronous "
"generator object is typically used in an :keyword:`async for` statement in a "
"coroutine function analogously to how a generator object would be used in a :"
"keyword:`for` statement."
msgstr ""
"Quando uma função geradora assíncrona é chamada, ela retorna um iterador "
"assíncrono conhecido como objeto gerador assíncrono. Esse objeto controla a "
"execução da função geradora. Um objeto gerador assíncrono é normalmente "
"usado em uma instrução :keyword:`async for` em uma função de corrotina de "
"forma análoga a como um objeto gerador seria usado em uma instrução :keyword:"
"`for`."