-
-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy path2to3.po
More file actions
791 lines (672 loc) · 31.2 KB
/
2to3.po
File metadata and controls
791 lines (672 loc) · 31.2 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Sheila Gomes <sheilagomes1@gmail.com>, 2020
# Claudio Rogerio Carvalho Filho <excriptbrasil@gmail.com>, 2020
# Octavio von Sydow <ocvs00@gmail.com>, 2020
# Rafael Fontenelle <rffontenelle@gmail.com>, 2023
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-31 13:50+0000\n"
"PO-Revision-Date: 2020-05-30 11:55+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2023\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"
#: ../../library/2to3.rst:4
msgid "2to3 - Automated Python 2 to 3 code translation"
msgstr "2to3 - Tradução Automatizada de Código Python 2 para 3"
#: ../../library/2to3.rst:8
msgid ""
"2to3 is a Python program that reads Python 2.x source code and applies a "
"series of *fixers* to transform it into valid Python 3.x code. The standard "
"library contains a rich set of fixers that will handle almost all code. "
"2to3 supporting library :mod:`lib2to3` is, however, a flexible and generic "
"library, so it is possible to write your own fixers for "
"2to3. :mod:`lib2to3` could also be adapted to custom applications in which "
"Python code needs to be edited automatically."
msgstr ""
"2to3 é um programa Python que lê código-fonte Python 2.x e aplica uma série "
"de *fixers* para transformá-lo em código válido para a versão do Python 3.x. "
"A biblioteca padrão contém um conjunto rico de *fixers* que lidarão com "
"quase todos os códigos. A biblioteca de suporte :mod:`lib2to3` é, no "
"entanto, uma biblioteca genérica e flexível, por isso é possível escrever "
"seus próprios fixers para o 2to3. O módulo :mod:`lib2to3` também pode ser "
"adaptado a aplicativos personalizados em que o código Python precisa ser "
"editado automaticamente."
#: ../../library/2to3.rst:20
msgid "Using 2to3"
msgstr "Usando o 2to3"
#: ../../library/2to3.rst:22
msgid ""
"2to3 will usually be installed with the Python interpreter as a script. It "
"is also located in the :file:`Tools/scripts` directory of the Python root."
msgstr ""
"O 2to3 geralmente será instalado junto com o interpretador Python como se "
"fosse um script. Ele também está localizado no diretório :file:`Tools/"
"scripts` na raiz da instalação do Python."
#: ../../library/2to3.rst:25
msgid ""
"2to3's basic arguments are a list of files or directories to transform. The "
"directories are recursively traversed for Python sources."
msgstr ""
"Os argumentos básicos de 2to3 são uma lista de arquivos ou diretórios a "
"serem transformados. Os diretórios são recursivamente percorridos pelos "
"fontes Python."
#: ../../library/2to3.rst:28
msgid "Here is a sample Python 2.x source file, :file:`example.py`::"
msgstr ""
"Aqui temos um exemplo de arquivo fonte Python 2.x, :file:`example.py`::"
#: ../../library/2to3.rst:36
msgid "It can be converted to Python 3.x code via 2to3 on the command line:"
msgstr ""
"O mesmo pode ser convertido para código Python 3.x através de 2to3 através "
"da linha de comando:"
#: ../../library/2to3.rst:42
msgid ""
"A diff against the original source file is printed. 2to3 can also write the "
"needed modifications right back to the source file. (A backup of the "
"original file is made unless :option:`!-n` is also given.) Writing the "
"changes back is enabled with the :option:`!-w` flag:"
msgstr ""
"É impresso um diff contra o arquivo original. O 2to3 também pode escrever as "
"modificações necessárias de volta ao arquivo de origem. (Um backup do "
"arquivo original sempre será feito, salvo se a opção: :option:`!-n` for "
"utilizada.) Escrever as alterações de volta está disponível com o uso do "
"sinalizador :option:`!-w`:"
#: ../../library/2to3.rst:51
msgid "After transformation, :file:`example.py` looks like this::"
msgstr ""
"Após a transformação, o arquivo :file:`example.py` se parecerá com isso::"
#: ../../library/2to3.rst:59
msgid ""
"Comments and exact indentation are preserved throughout the translation "
"process."
msgstr ""
"Os comentários e recuo exato são preservados ao longo do processo de "
"tradução."
#: ../../library/2to3.rst:61
msgid ""
"By default, 2to3 runs a set of :ref:`predefined fixers <2to3-fixers>`. "
"The :option:`!-l` flag lists all available fixers. An explicit set of "
"fixers to run can be given with :option:`!-f`. Likewise the :option:`!-x` "
"explicitly disables a fixer. The following example runs only the "
"``imports`` and ``has_key`` fixers:"
msgstr ""
"Por padrão, 2to3 executa um conjunto de :ref:`fixadores predefinidos <2to3-"
"fixers>`. O sinalizador :option:`!-l` lista todos os fixadores disponíveis. "
"Um conjunto explícito de fixadores para execução pode ser fornecido com a "
"opção: :option:`!-f`. Da mesma forma, a opção :option:`!-x` desabilita "
"explicitamente um fixadores. O exemplo a seguir executa apenas os fixadores "
"``imports`` e ``has_key``:"
#: ../../library/2to3.rst:70
msgid "This command runs every fixer except the ``apply`` fixer:"
msgstr "Este comando executa todos os fixadores, exceto o fixadores ``apply``:"
#: ../../library/2to3.rst:76
msgid ""
"Some fixers are *explicit*, meaning they aren't run by default and must be "
"listed on the command line to be run. Here, in addition to the default "
"fixers, the ``idioms`` fixer is run:"
msgstr ""
"Alguns fixadores são *explícitos*, o que significa que eles não são "
"executados por padrão e devem estar listados na linha de comando a para "
"serem executados. Aqui, além dos fixadores padrão, o fixador ``idioms`` "
"também será executado:"
#: ../../library/2to3.rst:84
msgid "Notice how passing ``all`` enables all default fixers."
msgstr "Observe como a passagem de ``all`` permite todos os fixadores padrão."
#: ../../library/2to3.rst:86
msgid ""
"Sometimes 2to3 will find a place in your source code that needs to be "
"changed, but 2to3 cannot fix automatically. In this case, 2to3 will print a "
"warning beneath the diff for a file. You should address the warning in "
"order to have compliant 3.x code."
msgstr ""
"Às vezes, 2to3 encontrará um lugar em seu código-fonte que precisa ser "
"alterado, mas o 2to3 não pode corrigir automaticamente. Nesse caso, o 2to3 "
"imprimirá um aviso abaixo do diff para um arquivo. Você deve endereçar o "
"aviso para ter o código 3.x compatível."
#: ../../library/2to3.rst:91
msgid ""
"2to3 can also refactor doctests. To enable this mode, use the :option:`!-d` "
"flag. Note that *only* doctests will be refactored. This also doesn't "
"require the module to be valid Python. For example, doctest like examples "
"in a reST document could also be refactored with this option."
msgstr ""
"O 2to3 também pode refatorar o doctests. Para ativar este modo, use o "
"sinalizador :option:`!-d`. Observe que os doctests *somente* serão "
"refatorados. Isso também não exige que o módulo Python seja válido. Por "
"exemplo, os exemplos doctest como em um documento reST também podem ser "
"refatorados com esta opção."
#: ../../library/2to3.rst:96
msgid ""
"The :option:`!-v` option enables output of more information on the "
"translation process."
msgstr ""
"A opção :option:`!-v` permite a saída de mais informações sobre o processo "
"de tradução."
#: ../../library/2to3.rst:99
msgid ""
"Since some print statements can be parsed as function calls or statements, "
"2to3 cannot always read files containing the print function. When 2to3 "
"detects the presence of the ``from __future__ import print_function`` "
"compiler directive, it modifies its internal grammar to "
"interpret :func:`print` as a function. This change can also be enabled "
"manually with the :option:`!-p` flag. Use :option:`!-p` to run fixers on "
"code that already has had its print statements converted."
msgstr ""
"Uma vez que algumas declarações de impressão podem ser analisadas como "
"chamadas de função ou declarações, 2to3 nem sempre pode ler arquivos que "
"contêm a função de impressão. Quando 2to3 detecta a presença da diretiva de "
"compilação ``from __future__ import print_function``, ele modifica sua "
"gramática interna para interpretar funções :func:`print` como uma função. "
"Esta alteração também pode ser ativada manualmente com o "
"sinalizador :option:`!-p`. Use o sinalizador :option:`!-p` para executar "
"fixadores no código que já tiveram suas declarações impressas convertidas."
#: ../../library/2to3.rst:107
msgid ""
"The :option:`!-o` or :option:`!--output-dir` option allows specification of "
"an alternate directory for processed output files to be written to. "
"The :option:`!-n` flag is required when using this as backup files do not "
"make sense when not overwriting the input files."
msgstr ""
"A opção :option:`!-o` ou :option:`!--output-dir` permite especificar um "
"diretório alternativo para a escrita dos arquivos de saída processados. O "
"sinalizador :option:`!-n` é necessária ao usá-lo como arquivos de backup, "
"não faz sentido quando não está sobrescrevendo os arquivos de entrada."
#: ../../library/2to3.rst:112
msgid "The :option:`!-o` option was added."
msgstr "A opção :option:`!-o` foi adicionada."
#: ../../library/2to3.rst:115
msgid ""
"The :option:`!-W` or :option:`!--write-unchanged-files` flag tells 2to3 to "
"always write output files even if no changes were required to the file. "
"This is most useful with :option:`!-o` so that an entire Python source tree "
"is copied with translation from one directory to another. This option "
"implies the :option:`!-w` flag as it would not make sense otherwise."
msgstr ""
"O sinalizador :option:`!-W` ou :option:`!--write-unchanged-files`diz ao 2to3 "
"para sempre salvar arquivos de saída, mesmo que nenhuma alteração tenha sido "
"necessária no arquivo. Isso é mais útil com: :option:`!-o`, de modo que uma "
"árvore de código Python inteiro é copiada com a tradução de um diretório "
"para outro. Esta opção implica o uso do sinalizador :option:`!-w`, pois não "
"faria sentido de outro modo."
#: ../../library/2to3.rst:121
msgid "The :option:`!-W` flag was added."
msgstr "O sinalizador :option:`!-W` foi adicionado."
#: ../../library/2to3.rst:124
msgid ""
"The :option:`!--add-suffix` option specifies a string to append to all "
"output filenames. The :option:`!-n` flag is required when specifying this "
"as backups are not necessary when writing to different filenames. Example:"
msgstr ""
"A opção :option:`!--add-suffix` determina a string que será adicionada a "
"todos os nomes de arquivos. O sinalizador :option:`!-n` é necessário quando "
"especificamos isso, pois os backups não são necessários quando escrevemos em "
"nomes de arquivos diferentes. Por exemplo:"
#: ../../library/2to3.rst:132
msgid "Will cause a converted file named ``example.py3`` to be written."
msgstr ""
"Resultará num arquivo convertido de nome ``example.py3`` a ser escrito."
#: ../../library/2to3.rst:134
msgid "The :option:`!--add-suffix` option was added."
msgstr "A opção :option:`!--add-suffix` foi adicionada."
#: ../../library/2to3.rst:137
msgid "To translate an entire project from one directory tree to another use:"
msgstr ""
"Para traduzir um projeto inteiro de uma árvore de diretório para outra, use:"
#: ../../library/2to3.rst:147
msgid "Fixers"
msgstr "Fixadores"
#: ../../library/2to3.rst:149
msgid ""
"Each step of transforming code is encapsulated in a fixer. The command "
"``2to3 -l`` lists them. As :ref:`documented above <2to3-using>`, each can "
"be turned on and off individually. They are described here in more detail."
msgstr ""
"Cada passo de transformação do código é encapsulado em um fixador. O comando "
"``2to3 -l`` lista todos. Assim como :ref:`documentado acima<2to3-using>`, "
"cada um pode ser ativado ou desativado individualmente. Eles são descritos "
"aqui com mais detalhes."
#: ../../library/2to3.rst:156
msgid ""
"Removes usage of :func:`apply`. For example ``apply(function, *args, "
"**kwargs)`` is converted to ``function(*args, **kwargs)``."
msgstr ""
"Remove o uso de :func:`apply`. Por exemplo ``apply(function, *args, "
"**kwargs)`` é convertido para ``function(*args, **kwargs)``."
#: ../../library/2to3.rst:161
msgid "Replaces deprecated :mod:`unittest` method names with the correct ones."
msgstr ""
"Substitui o nome de método descontinuado :mod:`unittest` pelo nome correto."
#: ../../library/2to3.rst:164 ../../library/2to3.rst:352
msgid "From"
msgstr "De"
#: ../../library/2to3.rst:164 ../../library/2to3.rst:352
msgid "To"
msgstr "Para"
#: ../../library/2to3.rst:166
msgid "``failUnlessEqual(a, b)``"
msgstr "``failUnlessEqual(a, b)``"
#: ../../library/2to3.rst:166 ../../library/2to3.rst:168
msgid ":meth:`assertEqual(a, b) <unittest.TestCase.assertEqual>`"
msgstr ":meth:`assertEqual(a, b) <unittest.TestCase.assertEqual>`"
#: ../../library/2to3.rst:168
msgid "``assertEquals(a, b)``"
msgstr "``assertEquals(a, b)``"
#: ../../library/2to3.rst:170
msgid "``failIfEqual(a, b)``"
msgstr "``failIfEqual(a, b)``"
#: ../../library/2to3.rst:170 ../../library/2to3.rst:172
msgid ":meth:`assertNotEqual(a, b) <unittest.TestCase.assertNotEqual>`"
msgstr ":meth:`assertNotEqual(a, b) <unittest.TestCase.assertNotEqual>`"
#: ../../library/2to3.rst:172
msgid "``assertNotEquals(a, b)``"
msgstr "``assertNotEquals(a, b)``"
#: ../../library/2to3.rst:174
msgid "``failUnless(a)``"
msgstr "``failUnless(a)``"
#: ../../library/2to3.rst:174 ../../library/2to3.rst:176
msgid ":meth:`assertTrue(a) <unittest.TestCase.assertTrue>`"
msgstr ":meth:`assertTrue(a) <unittest.TestCase.assertTrue>`"
#: ../../library/2to3.rst:176
msgid "``assert_(a)``"
msgstr "``assert_(a)``"
#: ../../library/2to3.rst:178
msgid "``failIf(a)``"
msgstr "``failIf(a)``"
#: ../../library/2to3.rst:178
msgid ":meth:`assertFalse(a) <unittest.TestCase.assertFalse>`"
msgstr ":meth:`assertFalse(a) <unittest.TestCase.assertFalse>`"
#: ../../library/2to3.rst:180
msgid "``failUnlessRaises(exc, cal)``"
msgstr "``failUnlessRaises(exc, cal)``"
#: ../../library/2to3.rst:180
msgid ":meth:`assertRaises(exc, cal) <unittest.TestCase.assertRaises>`"
msgstr ":meth:`assertRaises(exc, cal) <unittest.TestCase.assertRaises>`"
#: ../../library/2to3.rst:182
msgid "``failUnlessAlmostEqual(a, b)``"
msgstr "``failUnlessAlmostEqual(a, b)``"
#: ../../library/2to3.rst:182 ../../library/2to3.rst:184
msgid ":meth:`assertAlmostEqual(a, b) <unittest.TestCase.assertAlmostEqual>`"
msgstr ":meth:`assertAlmostEqual(a, b) <unittest.TestCase.assertAlmostEqual>`"
#: ../../library/2to3.rst:184
msgid "``assertAlmostEquals(a, b)``"
msgstr "``assertAlmostEquals(a, b)``"
#: ../../library/2to3.rst:186
msgid "``failIfAlmostEqual(a, b)``"
msgstr "``failIfAlmostEqual(a, b)``"
#: ../../library/2to3.rst:186 ../../library/2to3.rst:188
msgid ""
":meth:`assertNotAlmostEqual(a, b) <unittest.TestCase.assertNotAlmostEqual>`"
msgstr ""
":meth:`assertNotAlmostEqual(a, b) <unittest.TestCase.assertNotAlmostEqual>`"
#: ../../library/2to3.rst:188
msgid "``assertNotAlmostEquals(a, b)``"
msgstr "``assertNotAlmostEquals(a, b)``"
#: ../../library/2to3.rst:194
msgid "Converts :class:`basestring` to :class:`str`."
msgstr "Converte a classe :class:`basestring` para a classe :class:`str`."
#: ../../library/2to3.rst:198
msgid ""
"Converts :class:`buffer` to :class:`memoryview`. This fixer is optional "
"because the :class:`memoryview` API is similar but not exactly the same as "
"that of :class:`buffer`."
msgstr ""
"Converte a classe :class:`buffer` para :class:`memoryview`. Este fixador é "
"opcional porque a a API da classe :class:`memoryview` é semelhante, mas não "
"exatamente a mesma que a da classe :class:`buffer`."
#: ../../library/2to3.rst:204
msgid ""
"Fixes dictionary iteration methods. :meth:`dict.iteritems` is converted "
"to :meth:`dict.items`, :meth:`dict.iterkeys` to :meth:`dict.keys`, "
"and :meth:`dict.itervalues` to :meth:`dict.values`. "
"Similarly, :meth:`dict.viewitems`, :meth:`dict.viewkeys` "
"and :meth:`dict.viewvalues` are converted respectively "
"to :meth:`dict.items`, :meth:`dict.keys` and :meth:`dict.values`. It also "
"wraps existing usages of :meth:`dict.items`, :meth:`dict.keys`, "
"and :meth:`dict.values` in a call to :class:`list`."
msgstr ""
"Corrige os métodos de iteração de dicionário. :meth:`dict.iteritems` é "
"convertido para :meth:`dict.items`, :meth:`dict.iterkeys` "
"para :meth:`dict.keys`, e :meth:`dict.itervalues` para :meth:`dict.values`. "
"Similarmente temos o método, :meth:`dict.viewitems`, :meth:`dict.viewkeys` "
"e :meth:`dict.viewvalues` que são convertidos respectivamente "
"para :meth:`dict.items`, :meth:`dict.keys` e :meth:`dict.values`. Também "
"encapsula os usos existentes de :meth:`dict.items`, :meth:`dict.keys`, "
"e :meth:`dict.values` em uma chamada para :class:`list`."
#: ../../library/2to3.rst:214
msgid "Converts ``except X, T`` to ``except X as T``."
msgstr "Converte ``except X, T`` para ``except X as T``."
#: ../../library/2to3.rst:218
msgid "Converts the ``exec`` statement to the :func:`exec` function."
msgstr "Converte a ``exec`` declaração para a função :func:`exec`."
#: ../../library/2to3.rst:222
msgid ""
"Removes usage of :func:`execfile`. The argument to :func:`execfile` is "
"wrapped in calls to :func:`open`, :func:`compile`, and :func:`exec`."
msgstr ""
"Remove o uso da função :func:`execfile`. O argumento para :func:`execfile` é "
"encapsulado pelas funções :func:`open`, :func:`compile`, e :func:`exec`."
#: ../../library/2to3.rst:227
msgid ""
"Changes assignment of :attr:`sys.exitfunc` to use of the :mod:`atexit` "
"module."
msgstr ""
"Mudança de declaração de :attr:`sys.exitfunc` para usar o "
"módulo :mod:`atexit`."
#: ../../library/2to3.rst:232
msgid "Wraps :func:`filter` usage in a :class:`list` call."
msgstr ""
"Encapsula a função :func:`filter` usando uma chamada para a "
"classe :class:`list`."
#: ../../library/2to3.rst:236
msgid ""
"Fixes function attributes that have been renamed. For example, "
"``my_function.func_closure`` is converted to ``my_function.__closure__``."
msgstr ""
"Corrige atributos de funções que foram renomeados. Por exemplo, "
"``my_function.func_closure`` é convertido para ``my_function.__closure__``."
#: ../../library/2to3.rst:241
msgid "Removes ``from __future__ import new_feature`` statements."
msgstr "Remove a declaração ``from __future__ import new_feature``."
#: ../../library/2to3.rst:245
msgid "Renames :func:`os.getcwdu` to :func:`os.getcwd`."
msgstr "Renomeia a função :func:`os.getcwdu` para :func:`os.getcwd`."
#: ../../library/2to3.rst:249
msgid "Changes ``dict.has_key(key)`` to ``key in dict``."
msgstr "Modifica ``dict.has_key(key)`` para ``key in dict``."
#: ../../library/2to3.rst:253
msgid ""
"This optional fixer performs several transformations that make Python code "
"more idiomatic. Type comparisons like ``type(x) is SomeClass`` and "
"``type(x) == SomeClass`` are converted to ``isinstance(x, SomeClass)``. "
"``while 1`` becomes ``while True``. This fixer also tries to make use "
"of :func:`sorted` in appropriate places. For example, this block ::"
msgstr ""
"Este fixador opcional executa várias transformações que tornam o código "
"Python mais idiomático. Comparações de tipo como ``type(x) is SomeClass`` e "
"``type(x) == SomeClass`` são convertidas para ``isinstance(x, SomeClass)``. "
"``while 1`` vira ``while True``. Este fixador também tenta "
"usar :func:`sorted` nos lugares apropriados. Por exemplo, este bloco ::"
#: ../../library/2to3.rst:262
msgid "is changed to ::"
msgstr "é alterado para::"
#: ../../library/2to3.rst:268
msgid "Detects sibling imports and converts them to relative imports."
msgstr "Detecta importações de irmãos e as converte em importações relativas."
#: ../../library/2to3.rst:272
msgid "Handles module renames in the standard library."
msgstr "Muda o nome do módulo na biblioteca padrão."
#: ../../library/2to3.rst:276
msgid ""
"Handles other modules renames in the standard library. It is separate from "
"the :2to3fixer:`imports` fixer only because of technical limitations."
msgstr ""
"Lida com outras renomeações de módulos na biblioteca padrão. É separado do "
"fixador :2to3fixer:`imports` apenas por causa de limitações técnicas."
#: ../../library/2to3.rst:281
msgid "Converts ``input(prompt)`` to ``eval(input(prompt))``."
msgstr "Converte ``input(prompt)`` para ``eval(input(prompt))``."
#: ../../library/2to3.rst:285
msgid "Converts :func:`intern` to :func:`sys.intern`."
msgstr "Converte a função :func:`intern` para :func:`sys.intern`."
#: ../../library/2to3.rst:289
msgid ""
"Fixes duplicate types in the second argument of :func:`isinstance`. For "
"example, ``isinstance(x, (int, int))`` is converted to ``isinstance(x, "
"int)`` and ``isinstance(x, (int, float, int))`` is converted to "
"``isinstance(x, (int, float))``."
msgstr ""
"Corrige tipos duplicados no segundo argumento de :func:`isinstance`. Por "
"exemplo, ``isinstance(x, (int, int))`` é convertido para ``isinstance(x, "
"int)`` e ``isinstance(x, (int, float, int))`` é convertido para "
"``isinstance(x, (int, float))``."
#: ../../library/2to3.rst:296
msgid ""
"Removes imports of :func:`itertools.ifilter`, :func:`itertools.izip`, "
"and :func:`itertools.imap`. Imports of :func:`itertools.ifilterfalse` are "
"also changed to :func:`itertools.filterfalse`."
msgstr ""
"Remove importações de :func:`itertools.ifilter`, :func:`itertools.izip`, "
"e :func:`itertools.imap`. Importações de :func:`itertools.ifilterfalse` "
"também são alteradas para :func:`itertools.filterfalse`."
#: ../../library/2to3.rst:302
msgid ""
"Changes usage of :func:`itertools.ifilter`, :func:`itertools.izip`, "
"and :func:`itertools.imap` to their built-in "
"equivalents. :func:`itertools.ifilterfalse` is changed "
"to :func:`itertools.filterfalse`."
msgstr ""
"Altera o uso de :func:`itertools.ifilter`, :func:`itertools.izip`, "
"e :func:`itertools.imap` para os seus equivalentes "
"embutidos. :func:`itertools.ifilterfalse` é alterado "
"para :func:`itertools.filterfalse`."
#: ../../library/2to3.rst:308
msgid "Renames :class:`long` to :class:`int`."
msgstr "Renomeia a classe :class:`long` para :class:`int`."
#: ../../library/2to3.rst:312
msgid ""
"Wraps :func:`map` in a :class:`list` call. It also changes ``map(None, x)`` "
"to ``list(x)``. Using ``from future_builtins import map`` disables this "
"fixer."
msgstr ""
"Encapsula a função :func:`map` numa chamada a classe :class:`list`. Isso "
"também altera ``map(None, x)`` para ``list(x)``. Usando ``from "
"future_builtins import map`` desabilitará esse fixador."
#: ../../library/2to3.rst:318
msgid ""
"Converts the old metaclass syntax (``__metaclass__ = Meta`` in the class "
"body) to the new (``class X(metaclass=Meta)``)."
msgstr ""
"Converte a sintaxe da metaclasse antiga (``__metaclass__ = Meta`` no corpo "
"da classe) para o novo formato (``class X(metaclass=Meta)``)."
#: ../../library/2to3.rst:323
msgid ""
"Fixes old method attribute names. For example, ``meth.im_func`` is "
"converted to ``meth.__func__``."
msgstr ""
"Corrige nomes de atributos de métodos antigos. Por exemplo ``meth.im_func`` "
"é convertido para ``meth.__func__``."
#: ../../library/2to3.rst:328
msgid "Converts the old not-equal syntax, ``<>``, to ``!=``."
msgstr "Converte a sintaxe antiga \"diferente\", ``<>``, para ``!=``."
#: ../../library/2to3.rst:332
msgid ""
"Converts the use of iterator's :meth:`~iterator.next` methods to "
"the :func:`next` function. It also renames :meth:`next` methods "
"to :meth:`~iterator.__next__`."
msgstr ""
"Converte o uso de métodos de iterador :meth:`~iterator.next` para a "
"função :func:`next`. Também renomeia métodos :meth:`next` "
"para :meth:`~iterator.__next__`."
#: ../../library/2to3.rst:338
msgid "Renames :meth:`__nonzero__` to :meth:`~object.__bool__`."
msgstr "Renomeia o método :meth:`__nonzero__` para :meth:`~object.__bool__`."
#: ../../library/2to3.rst:342
msgid "Converts octal literals into the new syntax."
msgstr "Converte os literais octal para a nova sintaxe."
#: ../../library/2to3.rst:346
msgid ""
"Converts calls to various functions in the :mod:`operator` module to other, "
"but equivalent, function calls. When needed, the appropriate ``import`` "
"statements are added, e.g. ``import collections.abc``. The following "
"mapping are made:"
msgstr ""
"Converte chamadas para várias funções no módulo :mod:`operator` para "
"chamadas de função diferentes, mas equivalentes. Quando necessário, são "
"adicionadas as declarações ``import`` adequadas, por exemplo ``import "
"collections.abc``. Os seguintes mapeamento são feitos:"
#: ../../library/2to3.rst:354
msgid "``operator.isCallable(obj)``"
msgstr "``operator.isCallable(obj)``"
#: ../../library/2to3.rst:354
msgid "``callable(obj)``"
msgstr "``callable(obj)``"
#: ../../library/2to3.rst:355
msgid "``operator.sequenceIncludes(obj)``"
msgstr "``operator.sequenceIncludes(obj)``"
#: ../../library/2to3.rst:355
msgid "``operator.contains(obj)``"
msgstr "``operator.contains(obj)``"
#: ../../library/2to3.rst:356
msgid "``operator.isSequenceType(obj)``"
msgstr "``operator.isSequenceType(obj)``"
#: ../../library/2to3.rst:356
msgid "``isinstance(obj, collections.abc.Sequence)``"
msgstr "``isinstance(obj, collections.abc.Sequence)``"
#: ../../library/2to3.rst:357
msgid "``operator.isMappingType(obj)``"
msgstr "``operator.isMappingType(obj)``"
#: ../../library/2to3.rst:357
msgid "``isinstance(obj, collections.abc.Mapping)``"
msgstr "``isinstance(obj, collections.abc.Mapping)``"
#: ../../library/2to3.rst:358
msgid "``operator.isNumberType(obj)``"
msgstr "``operator.isNumberType(obj)``"
#: ../../library/2to3.rst:358
msgid "``isinstance(obj, numbers.Number)``"
msgstr "``isinstance(obj, numbers.Number)``"
#: ../../library/2to3.rst:359
msgid "``operator.repeat(obj, n)``"
msgstr "``operator.repeat(obj, n)``"
#: ../../library/2to3.rst:359
msgid "``operator.mul(obj, n)``"
msgstr "``operator.mul(obj, n)``"
#: ../../library/2to3.rst:360
msgid "``operator.irepeat(obj, n)``"
msgstr "``operator.irepeat(obj, n)``"
#: ../../library/2to3.rst:360
msgid "``operator.imul(obj, n)``"
msgstr "``operator.imul(obj, n)``"
#: ../../library/2to3.rst:365
msgid ""
"Add extra parenthesis where they are required in list comprehensions. For "
"example, ``[x for x in 1, 2]`` becomes ``[x for x in (1, 2)]``."
msgstr ""
"Adiciona parênteses onde os mesmos não eram necessários em lista "
"comprehensions. Por exemplo, ``[x for x in 1, 2]`` se torna ``[x for x in "
"(1, 2)]``."
#: ../../library/2to3.rst:370
msgid "Converts the ``print`` statement to the :func:`print` function."
msgstr "Converte a declaração ``print`` para a função :func:`print`."
#: ../../library/2to3.rst:374
msgid ""
"Converts ``raise E, V`` to ``raise E(V)``, and ``raise E, V, T`` to ``raise "
"E(V).with_traceback(T)``. If ``E`` is a tuple, the translation will be "
"incorrect because substituting tuples for exceptions has been removed in 3.0."
msgstr ""
"Converte ``raise E, V`` para ``raise E(V)``, e ``raise E, V, T`` para "
"``raise E(V).with_traceback(T)``. Se ``E`` for uma tupla, a tradução ficará "
"incorreta porque a substituição de tuplas por exceções foi removida no "
"Python 3x."
#: ../../library/2to3.rst:380
msgid "Converts :func:`raw_input` to :func:`input`."
msgstr "Converte a função :func:`raw_input` para :func:`input`."
#: ../../library/2to3.rst:384
msgid "Handles the move of :func:`reduce` to :func:`functools.reduce`."
msgstr "Manipula o movimento de :func:`reduce` para :func:`functools.reduce`."
#: ../../library/2to3.rst:388
msgid "Converts :func:`reload` to :func:`importlib.reload`."
msgstr "Converte a função :func:`reload` para :func:`importlib:reload`."
#: ../../library/2to3.rst:392
msgid "Changes :data:`sys.maxint` to :data:`sys.maxsize`."
msgstr "Altera o :data:`sys.maxint` para :data:`sys.maxsize`."
#: ../../library/2to3.rst:396
msgid "Replaces backtick repr with the :func:`repr` function."
msgstr "Substitui o repr de backtick pela função :func:`repr`."
#: ../../library/2to3.rst:400
msgid ""
"Replaces use of the :class:`set` constructor with set literals. This fixer "
"is optional."
msgstr ""
"Substitui o uso da classe :class:`set` construtor pelo seu literal. Este "
"fixador é opcional."
#: ../../library/2to3.rst:405
msgid "Renames :exc:`StandardError` to :exc:`Exception`."
msgstr "Renomeia :exc:`StandardError` para :exc:`Exception`."
#: ../../library/2to3.rst:409
msgid ""
"Changes the "
"deprecated :data:`sys.exc_value`, :data:`sys.exc_type`, :data:`sys.exc_traceback` "
"to use :func:`sys.exc_info`."
msgstr ""
"Altera os "
"descontinuados :data:`sys.exc_value`, :data:`sys.exc_type`, :data:`sys.exc_traceback` "
"para utilizar agora a função :func:`sys.exc_info`."
#: ../../library/2to3.rst:414
msgid "Fixes the API change in generator's :meth:`throw` method."
msgstr "Corrige a mudança de API no método gerador :meth:`throw`."
#: ../../library/2to3.rst:418
msgid ""
"Removes implicit tuple parameter unpacking. This fixer inserts temporary "
"variables."
msgstr ""
"Remove o desempacotamento implícito do parâmetro da tupla. Este fixador "
"insere variáveis temporárias."
#: ../../library/2to3.rst:423
msgid ""
"Fixes code broken from the removal of some members in the :mod:`types` "
"module."
msgstr ""
"Corrige o código quebrado pela remoção de alguns membros no "
"módulo :mod:`types`."
#: ../../library/2to3.rst:428
msgid "Renames :class:`unicode` to :class:`str`."
msgstr "Renomeia a classe :class:`unicode` para :class:`str`."
#: ../../library/2to3.rst:432
msgid ""
"Handles the rename of :mod:`urllib` and :mod:`urllib2` to the :mod:`urllib` "
"package."
msgstr ""
"Manipula a renomeação dos módulos :mod:`urllib` e :mod:`urllib2` para o "
"pacote :mod:`urllib`."
#: ../../library/2to3.rst:437
msgid ""
"Removes excess whitespace from comma separated items. This fixer is "
"optional."
msgstr ""
"Remove o espaço excessivo de itens separados por vírgulas. Este fixador é "
"opcional."
#: ../../library/2to3.rst:442
msgid ""
"Renames :func:`xrange` to :func:`range` and wraps existing :func:`range` "
"calls with :class:`list`."
msgstr ""
"Renomeia a função :func:`xrange` para :func:`range` e encapsula a chamada "
"para função existente :func:`range` com :class:`list`."
#: ../../library/2to3.rst:447
msgid "Changes ``for x in file.xreadlines()`` to ``for x in file``."
msgstr "Altera de ``for x in file.xreadlines()`` para ``for x in file``."
#: ../../library/2to3.rst:451
msgid ""
"Wraps :func:`zip` usage in a :class:`list` call. This is disabled when "
"``from future_builtins import zip`` appears."
msgstr ""
"Encapsula o uso da função :func:`zip` na chamada a classe :class:`list`. "
"Isso está desativado quando ``from future_builtins import zip`` aparecer."
#: ../../library/2to3.rst:456
msgid ":mod:`lib2to3` - 2to3's library"
msgstr ":mod:`lib2to3` - biblioteca 2to3's"
#: ../../library/2to3.rst:465
msgid "**Source code:** :source:`Lib/lib2to3/`"
msgstr "**Código-fonte:** :source:`Lib/lib2to3/`"
#: ../../library/2to3.rst:471
msgid ""
"The :mod:`lib2to3` API should be considered unstable and may change "
"drastically in the future."
msgstr ""
"A API do módulo :mod:`lib2to3` deve ser considerado instável e pode mudar "
"drasticamente no futuro."