Skip to content

Commit e0845fc

Browse files
pomerge from 3.9 branch into 2.7
1 parent c99e239 commit e0845fc

File tree

4 files changed

+93
-3
lines changed

4 files changed

+93
-3
lines changed

library/contextlib.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,5 @@ msgid ""
171171
"The specification, background, and examples for the Python :keyword:`with` "
172172
"statement."
173173
msgstr ""
174+
"A especificação, o histórico e os exemplos para a instrução Python :keyword:"
175+
"`with`."

library/sys.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ msgstr ""
2020

2121
#: ../../library/sys.rst:2
2222
msgid ":mod:`sys` --- System-specific parameters and functions"
23-
msgstr ""
23+
msgstr ":mod:`sys` --- Parâmetros e funções específicas do sistema"
2424

2525
#: ../../library/sys.rst:8
2626
msgid ""

reference/compound_stmts.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ msgid ""
420420
"The specification, background, and examples for the Python :keyword:`with` "
421421
"statement."
422422
msgstr ""
423+
"A especificação, o histórico e os exemplos para a instrução Python :keyword:"
424+
"`with`."
423425

424426
#: ../../reference/compound_stmts.rst:435
425427
msgid "Function definitions"

reference/datamodel.po

Lines changed: 88 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,12 +2545,23 @@ msgid ""
25452545
"negative values), :exc:`IndexError` should be raised. For mapping types, if "
25462546
"*key* is missing (not in the container), :exc:`KeyError` should be raised."
25472547
msgstr ""
2548+
"Chamado para implementar a avaliação de ``self[key]``. Para tipos de "
2549+
"sequência, as chaves aceitas devem ser inteiros e objetos fatia. Observe que "
2550+
"a interpretação especial de índices negativos (se a classe deseja emular um "
2551+
"tipo de sequência) depende do método :meth:`__getitem__`. Se *key* for de um "
2552+
"tipo impróprio, :exc:`TypeError` pode ser levantada; se de um valor fora do "
2553+
"conjunto de índices para a sequência (após qualquer interpretação especial "
2554+
"de valores negativos), :exc:`IndexError` deve ser levantada. Para tipos de "
2555+
"mapeamento, se *key* estiver faltando (não no contêiner), :exc:`KeyError` "
2556+
"deve ser levantada."
25482557

25492558
#: ../../reference/datamodel.rst:1918
25502559
msgid ""
25512560
":keyword:`for` loops expect that an :exc:`IndexError` will be raised for "
25522561
"illegal indexes to allow proper detection of the end of the sequence."
25532562
msgstr ""
2563+
"Os loops :keyword:`for` esperam que uma :exc:`IndexError` seja levantada "
2564+
"para índices ilegais para permitir a detecção apropriada do fim da sequência."
25542565

25552566
#: ../../reference/datamodel.rst:1924
25562567
msgid ""
@@ -2560,6 +2571,12 @@ msgid ""
25602571
"sequences if elements can be replaced. The same exceptions should be raised "
25612572
"for improper *key* values as for the :meth:`__getitem__` method."
25622573
msgstr ""
2574+
"Chamado para implementar a atribuição de ``self[key]``. Mesma nota que para :"
2575+
"meth:`__getitem__`. Isso só deve ser implementado para mapeamentos se os "
2576+
"objetos suportarem alterações nos valores das chaves, ou se novas chaves "
2577+
"puderem ser adicionadas, ou para sequências se os elementos puderem ser "
2578+
"substituídos. As mesmas exceções devem ser levantadas para valores *key* "
2579+
"impróprios do método :meth:`__getitem__`."
25632580

25642581
#: ../../reference/datamodel.rst:1933
25652582
msgid ""
@@ -2569,12 +2586,20 @@ msgid ""
25692586
"the sequence. The same exceptions should be raised for improper *key* "
25702587
"values as for the :meth:`__getitem__` method."
25712588
msgstr ""
2589+
"Chamado para implementar a exclusão de ``self[key]``. Mesma nota que para :"
2590+
"meth:`__getitem__`. Isso só deve ser implementado para mapeamentos se os "
2591+
"objetos suportarem remoções de chaves, ou para sequências se os elementos "
2592+
"puderem ser removidos da sequência. As mesmas exceções devem ser levantadas "
2593+
"para valores *key* impróprios do método :meth:`__getitem__`."
25722594

25732595
#: ../../reference/datamodel.rst:1942
25742596
msgid ""
25752597
"Called by :class:`dict`\\ .\\ :meth:`__getitem__` to implement ``self[key]`` "
25762598
"for dict subclasses when key is not in the dictionary."
25772599
msgstr ""
2600+
"Chamado por :class:`dict`\\ .\\ :meth:`__getitem__` para implementar "
2601+
"``self[key]`` para subclasses de dicionário quando a chave não estiver no "
2602+
"dicionário."
25782603

25792604
#: ../../reference/datamodel.rst:1948
25802605
msgid ""
@@ -2591,13 +2616,19 @@ msgid ""
25912616
"return themselves. For more information on iterator objects, see :ref:"
25922617
"`typeiter`."
25932618
msgstr ""
2619+
"Os objetos iteradores também precisam implementar este método; eles são "
2620+
"obrigados a retornar. Para obter mais informações sobre objetos iteradores, "
2621+
"consulte :ref:`typeiter`."
25942622

25952623
#: ../../reference/datamodel.rst:1959
25962624
msgid ""
25972625
"Called (if present) by the :func:`reversed` built-in to implement reverse "
25982626
"iteration. It should return a new iterator object that iterates over all "
25992627
"the objects in the container in reverse order."
26002628
msgstr ""
2629+
"Chamado (se presente) pelo :func:`reversed` embutido para implementar a "
2630+
"iteração reversa. Ele deve retornar um novo objeto iterador que itera sobre "
2631+
"todos os objetos no contêiner na ordem reversa."
26012632

26022633
#: ../../reference/datamodel.rst:1963
26032634
msgid ""
@@ -2607,6 +2638,11 @@ msgid ""
26072638
"provide :meth:`__reversed__` if they can provide an implementation that is "
26082639
"more efficient than the one provided by :func:`reversed`."
26092640
msgstr ""
2641+
"Se o método :meth:`__reversed__` não for fornecido, o :func:`reversed` "
2642+
"embutido voltará a usar o protocolo de sequência (:meth:`__len__` e :meth:"
2643+
"`__getitem__`). Objetos que suportam o protocolo de sequência só devem "
2644+
"fornecer :meth:`__reversed__` se eles puderem fornecer uma implementação que "
2645+
"seja mais eficiente do que aquela fornecida por :func:`reversed`."
26102646

26112647
#: ../../reference/datamodel.rst:1972
26122648
msgid ""
@@ -2622,6 +2658,10 @@ msgid ""
26222658
"is in *self*, false otherwise. For mapping objects, this should consider "
26232659
"the keys of the mapping rather than the values or the key-item pairs."
26242660
msgstr ""
2661+
"Chamado para implementar operadores de teste de associação. Deve retornar "
2662+
"verdadeiro se *item* estiver em *self*, falso caso contrário. Para objetos "
2663+
"de mapeamento, isso deve considerar as chaves do mapeamento em vez dos "
2664+
"valores ou pares de itens-chave."
26252665

26262666
#: ../../reference/datamodel.rst:1983
26272667
msgid ""
@@ -2630,6 +2670,10 @@ msgid ""
26302670
"protocol via :meth:`__getitem__`, see :ref:`this section in the language "
26312671
"reference <membership-test-details>`."
26322672
msgstr ""
2673+
"Para objetos que não definem :meth:`__contains__`, o teste de associação "
2674+
"primeiro tenta a iteração via :meth:`__iter__`, depois o protocolo de "
2675+
"iteração de sequência antigo via :meth:`__getitem__`, consulte :ref:`esta "
2676+
"seção em a referência da linguagem <membership-test-details>`."
26332677

26342678
#: ../../reference/datamodel.rst:1992
26352679
msgid "Additional methods for emulation of sequence types"
@@ -2721,7 +2765,7 @@ msgstr ""
27212765

27222766
#: ../../reference/datamodel.rst:2084
27232767
msgid "Emulating numeric types"
2724-
msgstr ""
2768+
msgstr "Emulando tipos numéricos"
27252769

27262770
#: ../../reference/datamodel.rst:2086
27272771
msgid ""
@@ -2730,6 +2774,10 @@ msgid ""
27302774
"number implemented (e.g., bitwise operations for non-integral numbers) "
27312775
"should be left undefined."
27322776
msgstr ""
2777+
"Os métodos a seguir podem ser definidos para emular objetos numéricos. "
2778+
"Métodos correspondentes a operações que não são suportadas pelo tipo "
2779+
"particular de número implementado (por exemplo, operações bit a bit para "
2780+
"números não inteiros) devem ser deixados indefinidos."
27332781

27342782
#: ../../reference/datamodel.rst:2110
27352783
msgid ""
@@ -2750,6 +2798,8 @@ msgid ""
27502798
"If one of those methods does not support the operation with the supplied "
27512799
"arguments, it should return ``NotImplemented``."
27522800
msgstr ""
2801+
"Se um desses métodos não suporta a operação com os argumentos fornecidos, "
2802+
"ele deve retornar ``NotImplemented``."
27532803

27542804
#: ../../reference/datamodel.rst:2127
27552805
msgid ""
@@ -2777,6 +2827,8 @@ msgid ""
27772827
"Note that ternary :func:`pow` will not try calling :meth:`__rpow__` (the "
27782828
"coercion rules would become too complicated)."
27792829
msgstr ""
2830+
"Note que ternário :func:`pow` não tentará chamar :meth:`__rpow__` (as regras "
2831+
"de coerção se tornariam muito complicadas)."
27802832

27812833
#: ../../reference/datamodel.rst:2169
27822834
msgid ""
@@ -2805,6 +2857,8 @@ msgid ""
28052857
"Called to implement the unary arithmetic operations (``-``, ``+``, :func:"
28062858
"`abs` and ``~``)."
28072859
msgstr ""
2860+
"Chamado para implementar as operações aritméticas unárias (``-``, ``+``, :"
2861+
"func:`abs` e ``~``)."
28082862

28092863
#: ../../reference/datamodel.rst:2223
28102864
msgid ""
@@ -2965,7 +3019,7 @@ msgstr ""
29653019

29663020
#: ../../reference/datamodel.rst:2367
29673021
msgid "With Statement Context Managers"
2968-
msgstr ""
3022+
msgstr "Com gerenciadores de contexto de instruções"
29693023

29703024
#: ../../reference/datamodel.rst:2371
29713025
msgid ""
@@ -2982,11 +3036,16 @@ msgid ""
29823036
"Typical uses of context managers include saving and restoring various kinds "
29833037
"of global state, locking and unlocking resources, closing opened files, etc."
29843038
msgstr ""
3039+
"Os usos típicos de gerenciadores de contexto incluem salvar e restaurar "
3040+
"vários tipos de estado global, bloquear e desbloquear recursos, fechar "
3041+
"arquivos abertos, etc."
29853042

29863043
#: ../../reference/datamodel.rst:2385
29873044
msgid ""
29883045
"For more information on context managers, see :ref:`typecontextmanager`."
29893046
msgstr ""
3047+
"Para obter mais informações sobre gerenciadores de contexto, consulte :ref:"
3048+
"`typecontextmanager`."
29903049

29913050
#: ../../reference/datamodel.rst:2390
29923051
msgid ""
@@ -3001,6 +3060,10 @@ msgid ""
30013060
"exception that caused the context to be exited. If the context was exited "
30023061
"without an exception, all three arguments will be :const:`None`."
30033062
msgstr ""
3063+
"Sai do contexto de tempo de execução relacionado a este objeto. Os "
3064+
"parâmetros descrevem a exceção que fez com que o contexto fosse encerrado. "
3065+
"Se o contexto foi encerrado sem exceção, todos os três argumentos serão :"
3066+
"const:`None`."
30043067

30053068
#: ../../reference/datamodel.rst:2401
30063069
msgid ""
@@ -3009,12 +3072,17 @@ msgid ""
30093072
"Otherwise, the exception will be processed normally upon exit from this "
30103073
"method."
30113074
msgstr ""
3075+
"Se uma exceção for fornecida e o método desejar suprimir a exceção (ou seja, "
3076+
"evitar que ela seja propagada), ele deve retornar um valor verdadeiro. Caso "
3077+
"contrário, a exceção será processada normalmente ao sair deste método."
30123078

30133079
#: ../../reference/datamodel.rst:2405
30143080
msgid ""
30153081
"Note that :meth:`__exit__` methods should not reraise the passed-in "
30163082
"exception; this is the caller's responsibility."
30173083
msgstr ""
3084+
"Observe que os métodos :meth:`__exit__` não devem relançar a exceção "
3085+
"passada; esta é a responsabilidade do chamador."
30183086

30193087
#: ../../reference/datamodel.rst:2412
30203088
msgid ":pep:`343` - The \"with\" statement"
@@ -3025,6 +3093,8 @@ msgid ""
30253093
"The specification, background, and examples for the Python :keyword:`with` "
30263094
"statement."
30273095
msgstr ""
3096+
"A especificação, o histórico e os exemplos para a instrução Python :keyword:"
3097+
"`with`."
30283098

30293099
#: ../../reference/datamodel.rst:2419
30303100
msgid "Special method lookup for old-style classes"
@@ -3066,20 +3136,31 @@ msgid ""
30663136
"used the conventional lookup process, they would fail when invoked on the "
30673137
"type object itself::"
30683138
msgstr ""
3139+
"A justificativa por trás desse comportamento está em uma série de métodos "
3140+
"especiais como :meth:`__hash__` e :meth:`__repr__` que são implementados por "
3141+
"todos os objetos, incluindo objetos de tipo. Se a pesquisa implícita desses "
3142+
"métodos usasse o processo de pesquisa convencional, eles falhariam quando "
3143+
"chamados no próprio objeto do tipo::"
30693144

30703145
#: ../../reference/datamodel.rst:2476
30713146
msgid ""
30723147
"Incorrectly attempting to invoke an unbound method of a class in this way is "
30733148
"sometimes referred to as 'metaclass confusion', and is avoided by bypassing "
30743149
"the instance when looking up special methods::"
30753150
msgstr ""
3151+
"A tentativa incorreta de invocar um método não vinculado de uma classe dessa "
3152+
"maneira é às vezes referida como \"confusão de metaclasse\" e é evitada "
3153+
"ignorando a instância ao pesquisar métodos especiais::"
30763154

30773155
#: ../../reference/datamodel.rst:2485
30783156
msgid ""
30793157
"In addition to bypassing any instance attributes in the interest of "
30803158
"correctness, implicit special method lookup generally also bypasses the :"
30813159
"meth:`__getattribute__` method even of the object's metaclass::"
30823160
msgstr ""
3161+
"Além de contornar quaisquer atributos de instância no interesse da correção, "
3162+
"a pesquisa de método especial implícita geralmente também contorna o método :"
3163+
"meth:`__getattribute__` mesmo da metaclasse do objeto::"
30833164

30843165
#: ../../reference/datamodel.rst:2512
30853166
msgid ""
@@ -3089,6 +3170,11 @@ msgid ""
30893170
"method *must* be set on the class object itself in order to be consistently "
30903171
"invoked by the interpreter)."
30913172
msgstr ""
3173+
"Ignorar a maquinaria de :meth:`__getattribute__` desta forma fornece um "
3174+
"escopo significativo para otimizações de velocidade dentro do interpretador, "
3175+
"ao custo de alguma flexibilidade no tratamento de métodos especiais (o "
3176+
"método especial *deve* ser definido no próprio objeto classe em ordem ser "
3177+
"invocado de forma consistente pelo interpretador)."
30923178

30933179
#: ../../reference/datamodel.rst:2520
30943180
msgid "Footnotes"

0 commit comments

Comments
 (0)