Skip to content

Commit 9809e8b

Browse files
pomerge from 3.8 branch into 3.7
1 parent 82962af commit 9809e8b

2 files changed

Lines changed: 51 additions & 7 deletions

File tree

library/dataclasses.po

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,17 @@ msgid ""
3939
"`__repr__` to user-defined classes. It was originally described in :pep:"
4040
"`557`."
4141
msgstr ""
42+
"Este módulo fornece um decorador e funções para adicionar automaticamente :"
43+
"term:`método especial`\\s tais como :meth:`__init__` e :meth:`__repr__` a "
44+
"classes definidas pelo usuário. Foi originalmente descrita em :pep:`557`."
4245

4346
#: ../../library/dataclasses.rst:19
4447
msgid ""
4548
"The member variables to use in these generated methods are defined using :"
4649
"pep:`526` type annotations. For example this code::"
4750
msgstr ""
51+
"As variáveis de membro a serem usadas nesses métodos gerados são definidas "
52+
"usando :pep:`526` anotações de tipo. Por exemplo, este código::"
4853

4954
#: ../../library/dataclasses.rst:32
5055
msgid "Will add, among other things, a :meth:`__init__` that looks like::"
@@ -57,16 +62,20 @@ msgid ""
5762
"Note that this method is automatically added to the class: it is not "
5863
"directly specified in the ``InventoryItem`` definition shown above."
5964
msgstr ""
65+
"Observe que este método é adicionado automaticamente à classe: ele não é "
66+
"especificado diretamente na definição ``InventoryItem`` mostrada acima."
6067

6168
#: ../../library/dataclasses.rst:45
6269
msgid "Module-level decorators, classes, and functions"
63-
msgstr ""
70+
msgstr "Decoradores no nível do módulo, classes e funções."
6471

6572
#: ../../library/dataclasses.rst:49
6673
msgid ""
6774
"This function is a :term:`decorator` that is used to add generated :term:"
6875
"`special method`\\s to classes, as described below."
6976
msgstr ""
77+
"Esta função é um :term:`decorador` que é usado para adicionar :term:`método "
78+
"especial`\\s para classes, conforme descrito abaixo."
7079

7180
#: ../../library/dataclasses.rst:52
7281
msgid ""
@@ -75,12 +84,19 @@ msgid ""
7584
"<variable annotation>`. With two exceptions described below, nothing in :"
7685
"func:`dataclass` examines the type specified in the variable annotation."
7786
msgstr ""
87+
"O decorador :func:`dataclass` examina a classe para encontrar ``field``\\s. "
88+
"Um ``field`` é definido como uma variável de classe que possui uma :term:"
89+
"`anotação de tipo <variable annotation>`. Com duas exceções descritas "
90+
"abaixo, nada em :func:`dataclass` examina o tipo especificado na anotação de "
91+
"variável."
7892

7993
#: ../../library/dataclasses.rst:58
8094
msgid ""
8195
"The order of the fields in all of the generated methods is the order in "
8296
"which they appear in the class definition."
8397
msgstr ""
98+
"A ordem dos campos em todos os métodos gerados é a ordem em que eles "
99+
"aparecem na definição de classe."
84100

85101
#: ../../library/dataclasses.rst:61
86102
msgid ""
@@ -89,13 +105,20 @@ msgid ""
89105
"class, the behavior depends on the parameter, as documented below. The "
90106
"decorator returns the same class that is called on; no new class is created."
91107
msgstr ""
108+
"O decorador :func:`dataclass` adicionará vários métodos \"dunder\" à classe, "
109+
"descritos abaixo. Se algum dos métodos adicionados já existir na classe, o "
110+
"comportamento dependerá do parâmetro, conforme documentado abaixo. O "
111+
"decorador retorna a mesma classe que é chamado; nenhuma nova classe é criada."
92112

93113
#: ../../library/dataclasses.rst:67
94114
msgid ""
95115
"If :func:`dataclass` is used just as a simple decorator with no parameters, "
96116
"it acts as if it has the default values documented in this signature. That "
97117
"is, these three uses of :func:`dataclass` are equivalent::"
98118
msgstr ""
119+
"Se :func:`dataclass` for usado apenas como um simples decorador, sem "
120+
"parâmetros, ele age como se tivesse os valores padrão documentados nessa "
121+
"assinatura. Ou seja, esses três usos de :func:`dataclass` são equivalentes::"
99122

100123
#: ../../library/dataclasses.rst:84
101124
msgid "The parameters to :func:`dataclass` are:"
@@ -123,6 +146,11 @@ msgid ""
123146
"example: ``InventoryItem(name='widget', unit_price=3.0, "
124147
"quantity_on_hand=10)``."
125148
msgstr ""
149+
"``repr``: Se verdadeiro (o padrão), um método :meth:`__repr__` será gerado. "
150+
"A sequência de string repr gerada terá o nome da classe e o nome e repr de "
151+
"cada campo, na ordem em que são definidos na classe. Os campos marcados como "
152+
"excluídos do repr não são incluidos. Por exemplo: "
153+
"``InventoryItem(name='widget', unit_price=3.0, quantity_on_hand=10)``."
126154

127155
#: ../../library/dataclasses.rst:99
128156
msgid ""
@@ -136,6 +164,9 @@ msgid ""
136164
"This method compares the class as if it were a tuple of its fields, in "
137165
"order. Both instances in the comparison must be of the identical type."
138166
msgstr ""
167+
"``eq``: Se verdadeiro (o padrão), um método :meth:`__eq__` será gerado. Este "
168+
"método compara a classe como se fosse uma tupla de campos, em ordem. Ambas "
169+
"as instâncias na comparação devem ser de tipo idêntico."
139170

140171
#: ../../library/dataclasses.rst:107
141172
msgid "If the class already defines :meth:`__eq__`, this parameter is ignored."

library/stdtypes.po

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5665,7 +5665,7 @@ msgstr ""
56655665

56665666
#: ../../library/stdtypes.rst:3983
56675667
msgid "Return a shallow copy of the set."
5668-
msgstr ""
5668+
msgstr "Retorna uma cópia rasa do set."
56695669

56705670
#: ../../library/stdtypes.rst:3986
56715671
msgid ""
@@ -5734,6 +5734,8 @@ msgstr ""
57345734
#: ../../library/stdtypes.rst:4012
57355735
msgid "Set elements, like dictionary keys, must be :term:`hashable`."
57365736
msgstr ""
5737+
"Elementos set, assim como chaves de dicionário, devem ser :term:`hasheáveis "
5738+
"<hashable>`."
57375739

57385740
#: ../../library/stdtypes.rst:4014
57395741
msgid ""
@@ -5750,47 +5752,56 @@ msgid ""
57505752
"The following table lists operations available for :class:`set` that do not "
57515753
"apply to immutable instances of :class:`frozenset`:"
57525754
msgstr ""
5755+
"A seguinte tabela lista operações disponíveis para :class:`set` que não se "
5756+
"aplicam para instâncias imutáveis de :class:`frozenset`:"
57535757

57545758
#: ../../library/stdtypes.rst:4024
57555759
msgid "Update the set, adding elements from all others."
5756-
msgstr ""
5760+
msgstr "Atualiza o set, adicionando elementos de others."
57575761

57585762
#: ../../library/stdtypes.rst:4029
57595763
msgid "Update the set, keeping only elements found in it and all others."
57605764
msgstr ""
5765+
"Atualiza o set, mantendo somente elementos encontrados nele e em others."
57615766

57625767
#: ../../library/stdtypes.rst:4034
57635768
msgid "Update the set, removing elements found in others."
5764-
msgstr ""
5769+
msgstr "Atualiza o set, removendo elementos encontrados em others."
57655770

57665771
#: ../../library/stdtypes.rst:4039
57675772
msgid ""
57685773
"Update the set, keeping only elements found in either set, but not in both."
57695774
msgstr ""
5775+
"Atualiza o set, mantendo somente elementos encontrados em qualquer set, mas "
5776+
"não em ambos."
57705777

57715778
#: ../../library/stdtypes.rst:4043
57725779
msgid "Add element *elem* to the set."
5773-
msgstr ""
5780+
msgstr "Adiciona o elemento *elem* ao set."
57745781

57755782
#: ../../library/stdtypes.rst:4047
57765783
msgid ""
57775784
"Remove element *elem* from the set. Raises :exc:`KeyError` if *elem* is not "
57785785
"contained in the set."
57795786
msgstr ""
5787+
"Remove o elemento *elem* do set. Levanta :exc:`KeyError` se *elem* não "
5788+
"estiver contido no set."
57805789

57815790
#: ../../library/stdtypes.rst:4052
57825791
msgid "Remove element *elem* from the set if it is present."
5783-
msgstr ""
5792+
msgstr "Remove o elemento *elem* do set se ele estiver presente."
57845793

57855794
#: ../../library/stdtypes.rst:4056
57865795
msgid ""
57875796
"Remove and return an arbitrary element from the set. Raises :exc:`KeyError` "
57885797
"if the set is empty."
57895798
msgstr ""
5799+
"Remove e retorna um elemento arbitrário do set. Levanta :exc:`KeyError` se o "
5800+
"set estiver vazio."
57905801

57915802
#: ../../library/stdtypes.rst:4061
57925803
msgid "Remove all elements from the set."
5793-
msgstr ""
5804+
msgstr "Remove todos os elementos do set."
57945805

57955806
#: ../../library/stdtypes.rst:4064
57965807
msgid ""
@@ -5870,6 +5881,8 @@ msgid ""
58705881
"Return a new dictionary initialized from an optional positional argument and "
58715882
"a possibly empty set of keyword arguments."
58725883
msgstr ""
5884+
"Retorna um novo dicionário inicializado a partir de um argumento posicional "
5885+
"opcional, e um set de argumentos nomeados possivelmente vazio."
58735886

58745887
#: ../../library/stdtypes.rst:4113
58755888
msgid ""

0 commit comments

Comments
 (0)