8000 pomerge from 3.9 branch into 3.8 · python/python-docs-pt-br@feb4d43 · GitHub
[go: up one dir, main page]

Skip to content

Commit feb4d43

Browse files
pomerge from 3.9 branch into 3.8
1 parent 6dc743b commit feb4d43

File tree

3 files changed

+87
-18
lines changed

3 files changed

+87
-18
lines changed

library/asyncio-subprocess.po

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,8 @@ msgid ""
242242
"unlike Popen, Process instances do not have an equivalent to the :meth:"
243243
"`~subprocess.Popen.poll` method;"
244244
msgstr ""
245+
"ao contrário de Popen, Instâncias de Process não tem um equivalente ao "
246+
"método :meth:`~subprocess.Popen.poll`;"
245247

246248
#: ../../library/asyncio-subprocess.rst:177
247249
msgid ""

library/contextvars.po

Lines changed: 84 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ msgstr ""
2525

2626
#: ../../library/contextvars.rst:2
2727
msgid ":mod:`contextvars` --- Context Variables"
28-
msgstr ""
28+
msgstr ":mod:`contextvars` --- Variáveis de contexto"
2929

3030
#: ../../library/contextvars.rst:11
3131
msgid ""
@@ -35,37 +35,51 @@ msgid ""
3535
"the :class:`~contextvars.Context` class should be used to manage the current "
3636
"context in asynchronous frameworks."
3737
msgstr ""
38+
"Este módulo fornece APIs para gerenciar, armazenar e acessar o estado local "
39+
"do contexto. A classe :class:`~contextvars.ContextVar` é usada para declarar "
40+
"e trabalhar com *Variáveis de Contexto*. A função :func:`~contextvars."
41+
"copy_context` e a classe :class:`~contextvars.Context` devem ser usadas para "
42+
"gerenciar o contexto atual em frameworks assíncronos."
3843

3944
#: ../../library/contextvars.rst:17
4045
msgid ""
4146
"Context managers that have state should use Context Variables instead of :"
4247
"func:`threading.local()` to prevent their state from bleeding to other code "
4348
"unexpectedly, when used in concurrent code."
4449
msgstr ""
50+
"Os gerenciadores de contexto que possuem estado devem usar Variáveis de "
51+
"Contexto ao invés de :func:`threading.local()` para evitar que seu estado "
52+
"vaze para outro código inesperadamente, quando usado em código concorrente."
4553

4654
#: ../../library/contextvars.rst:21
4755
msgid "See also :pep:`567` for additional details."
48-
msgstr ""
56+
msgstr "Veja também a :pep:`567` para detalhes adicionais."
4957

5058
#: ../../library/contextvars.rst:27
5159
msgid "Context Variables"
52-
msgstr ""
60+
msgstr "Variáveis de contexto"
5361

5462
#: ../../library/contextvars.rst:31
5563
msgid "This class is used to declare a new Context Variable, e.g.::"
5664
msgstr ""
65+
"Esta classe é usada para declarar uma nova variável de contexto, como, por "
66+
"exemplo::"
5767

5868
#: ../../library/contextvars.rst:35
5969
msgid ""
6070
"The required *name* parameter is used for introspection and debug purposes."
6171
msgstr ""
72+
"O parâmetro obrigatório *name* é usado para fins de introspecção e depuração."
6273

6374
#: ../../library/contextvars.rst:38
6475
msgid ""
6576
"The optional keyword-only *default* parameter is returned by :meth:"
6677
"`ContextVar.get` when no value for the variable is found in the current "
6778
"context."
6879
msgstr ""
80+
"O parâmetro somente-nomeado opcional *default* é retornado por :meth:"
81+
"`ContextVar.get` quando nenhum valor para a variável é encontrado no "
82+
"contexto atual."
6983

7084
#: ../../library/contextvars.rst:42
7185
msgid ""
@@ -74,57 +88,71 @@ msgid ""
7488
"context variables which prevents context variables from being properly "
7589
"garbage collected."
7690
msgstr ""
91+
"**Importante:** Variáveis de Contexto devem ser criadas no nível do módulo "
92+
"superior e nunca em fechamentos. Os objetos :class:`Context` contêm "
93+
"referências fortes a variáveis de contexto que evitam que as variáveis de "
94+
"contexto sejam coletadas como lixo corretamente."
7795

7896
#: ../../library/contextvars.rst:49
7997
msgid "The name of the variable. This is a read-only property."
80-
msgstr ""
98+
msgstr "O nome da variável. Esta é uma propriedade somente leitura."
8199

82100
#: ../../library/contextvars.rst:55
83101
msgid "Return a value for the context variable for the current context."
84-
msgstr ""
102+
msgstr "Retorna um valor para a variável de contexto para o contexto atual."
85103

86104
#: ../../library/contextvars.rst:57
87105
msgid ""
88106
"If there is no value for the variable in the current context, the method "
89107
"will:"
90-
msgstr ""
108+
msgstr "Se não houver valor para a variável no contexto atual, o método vai:"
91109

92110
#: ../../library/contextvars.rst:60
93111
msgid ""
94112
"return the value of the *default* argument of the method, if provided; or"
95-
msgstr ""
113+
msgstr "retornar o valor do argumento *default* do método, se fornecido; ou"
96114

97115
#: ../../library/contextvars.rst:63
98116
msgid ""
99117
"return the default value for the context variable, if it was created with "
100118
"one; or"
101119
msgstr ""
120+
"retornar o valor padrão para a variável de contexto, se ela foi criada com "
121+
"uma; ou"
102122

103123
#: ../../library/contextvars.rst:66
104124
msgid "raise a :exc:`LookupError`."
105-
msgstr ""
125+
msgstr "levantar uma :exc:`LookupError`."
106126

107127
#: ../../library/contextvars.rst:70
108128
msgid ""
109129
"Call to set a new value for the context variable in the current context."
110130
msgstr ""
131+
"Chame para definir um novo valor para a variável de contexto no contexto "
132+
"atual."
111133

112134
#: ../../library/contextvars.rst:73
113135
msgid ""
114136
"The required *value* argument is the new value for the context variable."
115137
msgstr ""
138+
"O argumento *value* obrigatório é o novo valor para a variável de contexto."
116139

117140
#: ../../library/contextvars.rst:76
118141
msgid ""
119142
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
120143
"variable to its previous value via the :meth:`ContextVar.reset` method."
121144
msgstr ""
145+
"Retorna um objeto :class:`~contextvars.Token` que pode ser usado para "
146+
"restaurar a variável ao seu valor anterior através do método :meth:"
147+
"`ContextVar.reset`."
122148

123149
#: ../../library/contextvars.rst:82
124150
msgid ""
125151
"Reset the context variable to the value it had before the :meth:`ContextVar."
126152
"set` that created the *token* was used."
127153
msgstr ""
154+
"Redefine a variável de contexto para o valor que tinha antes de :meth: "
155+
"`ContextVar.set`. que criou o *token*, ser usado."
128156

129157
#: ../../library/contextvars.rst:85
130158
msgid "For example::"
@@ -136,120 +164,154 @@ msgid ""
136164
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
137165
"variable to what it was before the corresponding *set*."
138166
msgstr ""
167+
"Objetos *token* são retornados pelo método :meth:`ContextVar.set`. Eles "
168+
"podem ser passados para o método :meth:`ContextVar.reset` para reverter o "
169+
"valor da variável para o que era antes do *set* correspondente."
139170

140171
#: ../../library/contextvars.rst:106
141172
msgid ""
142173
"A read-only property. Points to the :class:`ContextVar` object that created "
143174
"the token."
144175
msgstr ""
176+
"Uma propriedade somente leitura. Aponta para o objeto :class:`ContextVar` "
177+
"que criou o token."
145178

146179
#: ../../library/contextvars.rst:111
147180
msgid ""
148181
"A read-only property. Set to the value the variable had before the :meth:"
149182
"`ContextVar.set` method call that created the token. It points to :attr:"
150183
"`Token.MISSING` is the variable was not set before the call."
151184
msgstr ""
185+
"Uma propriedade somente leitura. Defina com o valor que a variável tinha "
186+
"antes da chamada do método :meth:`ContextVar.set` que criou o token. Ele "
187+
"aponta para :attr:`Token.MISSING` é a variável não foi definida antes da "
188+
"chamada."
152189

153190
#: ../../library/contextvars.rst:118
154191
msgid "A marker object used by :attr:`Token.old_value`."
155-
msgstr ""
192+
msgstr "Um objeto marcador usado por :attr:`Token.old_value`."
156193

157194
#: ../../library/contextvars.rst:122
158195
msgid "Manual Context Management"
159-
msgstr "Gerenciamento de Contexto Manual"
196+
msgstr "Gerenciamento de contexto manual"
160197

161198
#: ../../library/contextvars.rst:126
162199
msgid "Returns a copy of the current :class:`~contextvars.Context` object."
163-
msgstr ""
200+
msgstr "Retorna uma cópia do objeto :class:`~contextvars.Context` atual."
164201

165202
#: ../../library/contextvars.rst:128
166203
msgid ""
167204
"The following snippet gets a copy of the current context and prints all "
168205
"variables and their values that are set in it::"
169206
msgstr ""
207+
"O trecho a seguir obtém uma cópia do contexto atual e imprime todas as "
208+
"variáveis e seus valores que são definidos nele::"
170209

171210
#: ../../library/contextvars.rst:134
172211
msgid ""
173212
"The function has an O(1) complexity, i.e. works equally fast for contexts "
174213
"with a few context variables and for contexts that have a lot of them."
175214
msgstr ""
215+
"A função tem uma complexidade O(1), ou seja, funciona igualmente rápido para "
216+
"contextos com algumas variáveis de contexto e para contextos que têm muitas "
217+
"delas."
176218

177219
#: ../../library/contextvars.rst:141
178220
msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
179-
msgstr ""
221+
msgstr "Um mapeamento de :class:`ContextVars <ContextVar>` para seus valores."
180222

181223
#: ../../library/contextvars.rst:143
182224
msgid ""
183225
"``Context()`` creates an empty context with no values in it. To get a copy "
184226
"of the current context use the :func:`~contextvars.copy_context` function."
185227
msgstr ""
228+
"``Context()`` cria um contexto vazio sem valores nele. Para obter uma cópia "
229+
"do contexto atual, use a função :func:`~contextvars.copy_context`."
186230

187231
#: ../../library/contextvars.rst:147
188232
msgid "Context implements the :class:`collections.abc.Mapping` interface."
189-
msgstr ""
233+
msgstr "Context implementa a interface :class:`collections.abc.Mapping`."
190234

191235
#: ../../library/contextvars.rst:151
192236
msgid ""
193237
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
194238
"method is called on. Return the result of the execution or propagate an "
195239
"exception if one occurred."
196240
msgstr ""
241+
"Executa o código ``callable(*args, **kwargs)`` no objeto contexto em que o "
242+
"método *run* é chamado. Retorna o resultado da execução ou propaga uma "
243+
"exceção, se ocorrer."
197244

198245
#: ../../library/contextvars.rst:155
199246
msgid ""
200247
"Any changes to any context variables that *callable* makes will be contained "
201248
"in the context object::"
202249
msgstr ""
250+
"Quaisquer mudanças em quaisquer variáveis de contexto que *callable* faça "
251+
"estarão contidas no objeto de contexto::"
203252

204253
#: ../../library/contextvars.rst:184
205254
msgid ""
206255
"The method raises a :exc:`RuntimeError` when called on the same context "
207256
"object from more than one OS thread, or when called recursively."
208257
msgstr ""
258+
"O método levanta uma :exc:`RuntimeError` quando chamado no mesmo objeto de "
259+
"contexto de mais de uma thread do sistema operacional, ou quando chamado "
260+
"recursivamente."
209261

210262
#: ../../library/contextvars.rst:190
211263
msgid "Return a shallow copy of the context object."
212-
msgstr ""
264+
msgstr "Retorna uma cópia rasa do objeto contexto."
213265

214266
#: ../../library/contextvars.rst:194
215267
msgid ""
216268
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
217269
"otherwise."
218270
msgstr ""
271+
"Retorna ``True`` se *context* tem uma variável para *var* definida; do "
272+
"contrário, retorna ``False``."
219273

220274
#: ../../library/contextvars.rst:199
221275
msgid ""
222276
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
223277
"is not set in the context object, a :exc:`KeyError` is raised."
224278
msgstr ""
279+
"Retorna o valor da variável :class:`ContextVar` *var*. Se a variável não for "
280+
"definida no objeto contexto, uma :exc:`KeyError` é levantada."
225281

226282
#: ../../library/contextvars.rst:205
227283
msgid ""
228284
"Return the value for *var* if *var* has the value in the context object. "
229285
"Return *default* otherwise. If *default* is not given, return ``None``."
230286
msgstr ""
287+
"Retorna o valor para *var* se *var* tiver o valor no objeto contexto. Caso "
288+
"contrário, retorna *default*. Se *default* não for fornecido, retorna "
289+
"``None``."
231290

232291
#: ../../library/contextvars.rst:211
233292
msgid "Return an iterator over the variables stored in the context object."
234-
msgstr ""
293+
msgstr "Retorna um iterador sobre as variáveis armazenadas no objeto contexto."
235294

236295
#: ../../library/contextvars.rst:216
237296
msgid "Return the number of variables set in the context object."
238-
msgstr ""
297+
msgstr "Retorna o número das variáveis definidas no objeto contexto."
239298

240299
#: ../../library/contextvars.rst:220
241300
msgid "Return a list of all variables in the context object."
242-
msgstr ""
301+
msgstr "Retorna uma lista de todas as variáveis no objeto contexto."
243302

244303
#: ../../library/contextvars.rst:224
245304
msgid "Return a list of all variables' values in the context object."
246305
msgstr ""
306+
"Retorna uma lista dos valores de todas as variáveis no objeto contexto."
247307

248308
#: ../../library/contextvars.rst:229
249309
msgid ""
250310
"Return a list of 2-tuples containing all variables and their values in the "
251311
"context object."
252312
msgstr ""
313+
"Retorna uma lista de tuplas de 2 elementos contendo todas as variáveis e "
314+
"seus valores no objeto contexto."
253315

254316
#: ../../library/contextvars.rst:234
255317
msgid "asyncio support"
@@ -262,3 +324,8 @@ msgid ""
262324
"server, that uses a context variable to make the address of a remote client "
263325
"available in the Task that handles that client::"
264326
msgstr ""
327+
"Variáveis de contexto encontram suporte nativo em :mod:`asyncio` e estão "
328+
"prontas para serem usadas sem qualquer configuração extra. Por exemplo, aqui "
329+
"está um servidor simples de eco, que usa uma variável de contexto para "
330+
"disponibilizar o endereço de um cliente remoto na Task que lida com esse "
331+
"cliente::"

library/json.po

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

919919
#: ../../library/json.rst:632
920920
msgid "Top-level Non-Object, Non-Array Values"
921-
msgstr "Valores não object e não array de nível superior"
921+
msgstr "Valores não objeto e não vetor de nível superior"
922922

923923
#: ../../library/json.rst:634
924924
msgid ""

0 commit comments

Comments
 (0)
0