1
1
# Copyright (C) 2001-2020, Python Software Foundation
2
2
# This file is distributed under the same license as the Python package.
3
- # Maintained by the python-doc-es workteam.
3
+ # Maintained by the python-doc-es workteam.
4
4
# docs-es@python.org / https://mail.python.org/mailman3/lists/docs-es.python.org/
5
5
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to get the list of volunteers
6
6
#
7
- #, fuzzy
8
7
msgid ""
9
8
msgstr ""
10
9
"Project-Id-Version : Python 3.8\n "
11
10
"Report-Msgid-Bugs-To : \n "
12
11
"POT-Creation-Date : 2019-05-06 11:59-0400\n "
13
- "PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
14
- "Last-Translator : FULL NAME <EMAIL@ADDRESS>\n "
12
+ "PO-Revision-Date : 2020-10-09 10:52+0200\n "
15
13
"Language-Team : python-doc-es\n "
16
14
"MIME-Version : 1.0\n "
17
15
"Content-Type : text/plain; charset=UTF-8\n "
18
16
"Content-Transfer-Encoding : 8bit\n "
17
+ "Plural-Forms : nplurals=2; plural=(n != 1);\n "
18
+ "Last-Translator : \n "
19
+ "Language : es\n "
20
+ "X-Generator : Poedit 2.4.1\n "
19
21
20
22
#: ../Doc/library/contextvars.rst:2
21
23
msgid ":mod:`contextvars` --- Context Variables"
22
- msgstr ""
24
+ msgstr ":mod:`contextvars` --- Variables de Contexto "
23
25
24
26
#: ../Doc/library/contextvars.rst:11
25
27
msgid ""
@@ -29,37 +31,53 @@ msgid ""
29
31
"the :class:`~contextvars.Context` class should be used to manage the current "
30
32
"context in asynchronous frameworks."
31
33
msgstr ""
34
+ "Este módulo proporciona APIs para gestionar, almacenar y acceder a estados "
35
+ "en el contexto local. La clase :class:`~contextvars.ContextVar` se utiliza "
36
+ "para declarar y trabajar con Variables de Contexto (*Context Variables*). La "
37
+ "función :func:`~contextvars.copy_context` y la clase :class:`~contextvars."
38
+ "Context` deberían ser utilizadas para gestionar el contexto actual en "
39
+ "frameworks asíncronos."
32
40
33
41
#: ../Doc/library/contextvars.rst:17
34
42
msgid ""
35
43
"Context managers that have state should use Context Variables instead of :"
36
44
"func:`threading.local()` to prevent their state from bleeding to other code "
37
45
"unexpectedly, when used in concurrent code."
38
46
msgstr ""
47
+ "Los gestores de contexto que tienen un estado establecido deberían utilizar "
48
+ "Variables de Contexto en lugar de :func:`threading.local()`, para así evitar "
49
+ "que este estado se inyecte inesperadamente a otro código, cuando se utilice "
50
+ "en código concurrente."
39
51
40
52
#: ../Doc/library/contextvars.rst:21
41
53
msgid "See also :pep:`567` for additional details."
42
- msgstr ""
54
+ msgstr "Ver :pep:`567` para más detalles. "
43
55
44
56
#: ../Doc/library/contextvars.rst:27
45
57
msgid "Context Variables"
46
- msgstr ""
58
+ msgstr "Variables de Contexto "
47
59
48
60
#: ../Doc/library/contextvars.rst:31
49
61
msgid "This class is used to declare a new Context Variable, e.g.::"
50
62
msgstr ""
63
+ "Esta clase se utiliza para declarar una nueva Variable de Contexto, por "
64
+ "ejemplo::"
51
65
52
66
#: ../Doc/library/contextvars.rst:35
53
67
msgid ""
54
68
"The required *name* parameter is used for introspection and debug purposes."
55
69
msgstr ""
70
+ "El parámetro obligatorio *name* se utiliza para introspección y depuración."
56
71
57
72
#: ../Doc/library/contextvars.rst:38
58
73
msgid ""
59
74
"The optional keyword-only *default* parameter is returned by :meth:"
60
75
"`ContextVar.get` when no value for the variable is found in the current "
61
76
"context."
62
77
msgstr ""
78
+ "El parámetro opcional de sólo palabra clave *default* es utilizado por :meth:"
79
+ "`ContextVar.get`, cuando en el contexto actual no se encuentra ningún valor "
80
+ "para la variable."
63
81
64
82
#: ../Doc/library/contextvars.rst:42
65
83
msgid ""
@@ -68,186 +86,239 @@ msgid ""
68
86
"context variables which prevents context variables from being properly "
69
87
"garbage collected."
70
88
msgstr ""
89
+ "**Importante:** las Variables de Contexto deberían ser creadas en lo más "
90
+ "alto a nivel de módulo y nunca en clausura. Los objetos :class:`Context` "
91
+ "mantienen referencias a variables de contexto, lo cual no permitiría que "
92
+ "estas variables de contexto sean limpiadas por el recolector de basura."
71
93
72
94
#: ../Doc/library/contextvars.rst:49
73
95
msgid "The name of the variable. This is a read-only property."
74
- msgstr ""
96
+ msgstr "El nombre de la variable. Propiedad de sólo lectura. "
75
97
76
98
#: ../Doc/library/contextvars.rst:55
77
99
msgid "Return a value for the context variable for the current context."
78
- msgstr ""
100
+ msgstr "Retorna un valor para la variable de contexto en el contexto actual. "
79
101
80
102
#: ../Doc/library/contextvars.rst:57
81
103
msgid ""
82
104
"If there is no value for the variable in the current context, the method "
83
105
"will:"
84
- msgstr ""
106
+ msgstr "Si la variable no tiene ningún valor en el contexto actual, el método: "
85
107
86
108
#: ../Doc/library/contextvars.rst:60
87
109
msgid ""
88
110
"return the value of the *default* argument of the method, if provided; or"
89
111
msgstr ""
112
+ "retornará el valor del argumento *default* del método, si alguno fue dado; o"
90
113
91
114
#: ../Doc/library/contextvars.rst:63
92
115
msgid ""
93
116
"return the default value for the context variable, if it was created with "
94
117
"one; or"
95
118
msgstr ""
119
+ "retornará el valor por defecto de la variable de contexto, si ésta fue "
120
+ "creada con alguno; o"
96
121
97
122
#: ../Doc/library/contextvars.rst:66
98
123
msgid "raise a :exc:`LookupError`."
99
- msgstr ""
124
+ msgstr "lanzará :exc:`LookupError`. "
100
125
101
126
#: ../Doc/library/contextvars.rst:70
102
127
msgid ""
103
128
"Call to set a new value for the context variable in the current context."
104
129
msgstr ""
130
+ "Establece un nuevo valor para la variable de contexto en el contexto actual."
105
131
106
132
#: ../Doc/library/contextvars.rst:73
107
133
msgid ""
108
134
"The required *value* argument is the new value for the context variable."
109
135
msgstr ""
136
+ "El argumento obligatorio *value* es el nuevo valor de la variable de "
137
+ "contexto."
110
138
111
139
#: ../Doc/library/contextvars.rst:76
112
140
msgid ""
113
141
"Returns a :class:`~contextvars.Token` object that can be used to restore the "
114
142
"variable to its previous value via the :meth:`ContextVar.reset` method."
115
143
msgstr ""
144
+ "Retorna un objeto :class:`~contextvars.Token` que puede utilizarse para "
145
+ "restaurar la variable a su valor anterior, utilizando el método :meth:"
146
+ "`ContextVar.reset`."
116
147
117
148
#: ../Doc/library/contextvars.rst:82
118
149
msgid ""
119
150
"Reset the context variable to the value it had before the :meth:`ContextVar."
120
151
"set` that created the *token* was used."
121
152
msgstr ""
153
+ "Restablece la variable de contexto al valor que tenía antes de llamar al "
154
+ "método :meth:`ContextVar.set`, que creó el *token* utilizado."
122
155
123
156
#: ../Doc/library/contextvars.rst:85
124
157
msgid "For example::"
125
- msgstr ""
158
+ msgstr "Por ejemplo:: "
126
159
127
160
#: ../Doc/library/contextvars.rst:99
128
161
msgid ""
129
162
"*Token* objects are returned by the :meth:`ContextVar.set` method. They can "
130
163
"be passed to the :meth:`ContextVar.reset` method to revert the value of the "
131
164
"variable to what it was before the corresponding *set*."
132
165
msgstr ""
166
+ "Los objetos *token* son retornados por el método :meth:`ContextVar.set`. Se "
167
+ "le pueden dar al método :meth:`ContextVar.reset` para restablecer el valor "
168
+ "de la variable al que estuviese dado antes del *set* correspondiente."
133
169
134
170
#: ../Doc/library/contextvars.rst:106
135
171
msgid ""
136
172
"A read-only property. Points to the :class:`ContextVar` object that created "
137
173
"the token."
138
174
msgstr ""
175
+ "Propiedad de sólo lectura. Apunta al objeto :class:`ContextVar` que creó el "
176
+ "*token*."
139
177
140
178
#: ../Doc/library/contextvars.rst:111
141
179
msgid ""
142
180
"A read-only property. Set to the value the variable had before the :meth:"
143
181
"`ContextVar.set` method call that created the token. It points to :attr:"
144
182
"`Token.MISSING` is the variable was not set before the call."
145
183
msgstr ""
184
+ "Propiedad de sólo lectura. Es el valor que la variable tenía antes de llamar "
185
+ "al método :meth:`ContextVar.set` que creó el *token*. Apunta a :attr:`Token."
186
+ "MISSING` si la variable no estaba establecida antes de la llamada."
146
187
147
188
#: ../Doc/library/contextvars.rst:118
148
189
msgid "A marker object used by :attr:`Token.old_value`."
149
- msgstr ""
190
+ msgstr "Marcador utilizado por :attr:`Token.old_value`. "
150
191
151
192
#: ../Doc/library/contextvars.rst:122
152
193
msgid "Manual Context Management"
153
- msgstr ""
194
+ msgstr "Gestión de Contexto Manual "
154
195
155
196
#: ../Doc/library/contextvars.rst:126
156
197
msgid "Returns a copy of the current :class:`~contextvars.Context` object."
157
- msgstr ""
198
+ msgstr "Retorna una copia del objeto :class:`~contextvars.Context` actual. "
158
199
159
200
#: ../Doc/library/contextvars.rst:128
160
201
msgid ""
161
202
"The following snippet gets a copy of the current context and prints all "
162
203
"variables and their values that are set in it::"
163
204
msgstr ""
205
+ "El siguiente código obtiene una copia del contexto actual e imprime todas "
206
+ "las variables y sus valores establecidos en el contexto::"
164
207
165
208
#: ../Doc/library/contextvars.rst:134
166
209
msgid ""
167
210
"The function has an O(1) complexity, i.e. works equally fast for contexts "
168
211
"with a few context variables and for contexts that have a lot of them."
169
212
msgstr ""
213
+ "La función tiene una complejidad de O(1); es decir, trabaja a la misma "
214
+ "velocidad en contextos con pocas o con muchas variables de contexto."
170
215
171
216
#: ../Doc/library/contextvars.rst:141
172
217
msgid "A mapping of :class:`ContextVars <ContextVar>` to their values."
173
- msgstr ""
218
+ msgstr "Mapeo de :class:`ContextVars <ContextVar>` con sus valores. "
174
219
175
220
#: ../Doc/library/contextvars.rst:143
176
221
msgid ""
177
222
"``Context()`` creates an empty context with no values in it. To get a copy "
178
223
"of the current context use the :func:`~contextvars.copy_context` function."
179
224
msgstr ""
225
+ "``Context()`` crea un contexto vacío sin valores. Para obtener una copia del "
226
+ "contexto actual, se puede utilizar la función :func:`~contextvars."
227
+ "copy_context`."
180
228
181
229
#: ../Doc/library/contextvars.rst:147
182
230
msgid "Context implements the :class:`collections.abc.Mapping` interface."
183
- msgstr ""
231
+ msgstr "*Context* implementa la interfaz :class:`collections.abc.Mapping`. "
184
232
185
233
#: ../Doc/library/contextvars.rst:151
186
234
msgid ""
187
235
"Execute ``callable(*args, **kwargs)`` code in the context object the *run* "
188
236
"method is called on. Return the result of the execution or propagate an "
189
237
"exception if one occurred."
190
238
msgstr ""
239
+ "Ejecuta el código de ``callable(*args, **kwargs)`` en el objeto de contexto "
240
+ "del cual se llama al método *run*. Retorna el resultado de la ejecución, o "
241
+ "propaga una excepción si alguna ocurre."
191
242
192
243
#: ../Doc/library/contextvars.rst:155
193
244
msgid ""
194
245
"Any changes to any context variables that *callable* makes will be contained "
195
246
"in the context object::"
196
247
msgstr ""
248
+ "Cualquier cambio realizado por *callable* sobre cualquier variable de "
249
+ "contexto será contenido en el objeto de contexto::"
197
250
198
251
#: ../Doc/library/contextvars.rst:184
199
252
msgid ""
200
253
"The method raises a :exc:`RuntimeError` when called on the same context "
201
254
"object from more than one OS thread, or when called recursively."
202
255
msgstr ""
256
+ "El método lanzará :exc:`RuntimeError` cuando es llamado desde el mismo "
257
+ "objeto de contexto desde más de un hilo del sistema operativo, o si se llama "
258
+ "recursivamente."
203
259
260
+ # ¿"shallow copy"?
261
+ # (añadir a Memoria de traducción?)
204
262
#: ../Doc/library/contextvars.rst:190
263
+ #, fuzzy
205
264
msgid "Return a shallow copy of the context object."
206
- msgstr ""
265
+ msgstr "Retorna una copia superficial (*shallow copy*) del objeto de contexto. "
207
266
208
267
#: ../Doc/library/contextvars.rst:194
209
268
msgid ""
210
269
"Return ``True`` if the *context* has a value for *var* set; return ``False`` "
211
270
"otherwise."
212
271
msgstr ""
272
+ "Retorna ``True`` si *context* tiene un valor establecido para *var*; de lo "
273
+ "contrario, retorna ``False``."
213
274
214
275
#: ../Doc/library/contextvars.rst:199
215
276
msgid ""
216
277
"Return the value of the *var* :class:`ContextVar` variable. If the variable "
217
278
"is not set in the context object, a :exc:`KeyError` is raised."
218
279
msgstr ""
280
+ "Retorna el valor de la variable :class:`ContextVar` *var*. Si la variable no "
281
+ "está establecida en el contexto actual, se lanzará :exc:`KeyError`."
219
282
220
283
#: ../Doc/library/contextvars.rst:205
221
284
msgid ""
222
285
"Return the value for *var* if *var* has the value in the context object. "
223
286
"Return *default* otherwise. If *default* is not given, return ``None``."
224
287
msgstr ""
288
+ "Retorna el valor de *var*, si *var* tiene el valor en el objeto de contexto; "
289
+ "de lo contrario, retorna *default*. Si *default* no es dado, retorna "
290
+ "``None``."
225
291
226
292
#: ../Doc/library/contextvars.rst:211
227
293
msgid "Return an iterator over the variables stored in the context object."
228
294
msgstr ""
295
+ "Retorna un iterador de las variables almacenadas en el objeto de contexto."
229
296
230
297
#: ../Doc/library/contextvars.rst:216
231
298
msgid "Return the number of variables set in the context object."
232
- msgstr ""
299
+ msgstr "Retorna el número de variables establecidas en el objeto de contexto. "
233
300
234
301
#: ../Doc/library/contextvars.rst:220
235
302
msgid "Return a list of all variables in the context object."
236
- msgstr ""
303
+ msgstr "Retorna un listado de todas las variables en el objeto de contexto. "
237
304
238
305
#: ../Doc/library/contextvars.rst:224
239
306
msgid "Return a list of all variables' values in the context object."
240
307
msgstr ""
308
+ "Retorna un listado de los valores de todas las variables en el objeto de "
309
+ "contexto."
241
310
242
311
#: ../Doc/library/contextvars.rst:229
243
312
msgid ""
244
313
"Return a list of 2-tuples containing all variables and their values in the "
245
314
"context object."
246
315
msgstr ""
316
+ "Retorna un listado de dos tuplas que contienen todas las variables y sus "
317
+ "variables en el contexto actual."
247
318
248
319
#: ../Doc/library/contextvars.rst:234
249
320
msgid "asyncio support"
250
- msgstr ""
321
+ msgstr "Soporte *asyncio* "
251
322
252
323
#: ../Doc/library/contextvars.rst:236
253
324
msgid ""
@@ -256,3 +327,8 @@ msgid ""
256
327
"server, that uses a context variable to make the address of a remote client "
257
328
"available in the Task that handles that client::"
258
329
msgstr ""
330
+ "Las variables de contexto están soportadas de forma nativa en :mod:`asyncio` "
331
+ "y se pueden utilizar sin ninguna configuración adicional. Por ejemplo, el "
332
+ "siguiente código crea un servidor simple de respuesta, que utiliza una "
333
+ "variable de contexto que hace que la dirección del cliente remoto esté "
334
+ "disponible en la *Task* que gestiona al cliente::"
0 commit comments