@@ -18,26 +18,35 @@ msgstr ""
18
18
19
19
#: ../Doc/tutorial/inputoutput.rst:5
20
20
msgid "Input and Output"
21
- msgstr ""
21
+ msgstr "Entrada y salida "
22
22
23
23
#: ../Doc/tutorial/inputoutput.rst:7
24
24
msgid ""
25
25
"There are several ways to present the output of a program; data can be "
26
26
"printed in a human-readable form, or written to a file for future use. This "
27
27
"chapter will discuss some of the possibilities."
28
28
msgstr ""
29
+ "Hay diferentes métodos de presentar la salida de un programa; los datos "
30
+ "pueden ser impresos de una forma legible por humanos, o escritos a un "
31
+ "archivo para uso futuro. Este capítulo discutirá algunas de las "
32
+ "posibilidades."
29
33
30
34
#: ../Doc/tutorial/inputoutput.rst:15
31
35
msgid "Fancier Output Formatting"
32
- msgstr ""
36
+ msgstr "Formateo elegante de la salida "
33
37
34
38
#: ../Doc/tutorial/inputoutput.rst:17
35
39
msgid ""
36
- "So far we've encountered two ways of writing values: *expression statements* "
37
- "and the :func:`print` function. (A third way is using the :meth:`write` "
38
- "method of file objects; the standard output file can be referenced as ``sys. "
39
- "stdout``. See the Library Reference for more information on this.)"
40
+ "So far we've encountered two ways of writing values: *expression statements*"
41
+ " and the :func:`print` function. (A third way is using the :meth:`write` "
42
+ "method of file objects; the standard output file can be referenced as "
43
+ "``sys. stdout``. See the Library Reference for more information on this.)"
40
44
msgstr ""
45
+ "Hasta ahora encontramos dos maneras de escribir valores: *declaraciones de "
46
+ "expresión* y la función :func:`print`. (Una tercer manera es usando el "
47
+ "método :meth:`write` de los objetos tipo archivo; el archivo de salida "
48
+ "estándar puede referenciarse como ``sys.stdout``. Mirá la Referencia de la "
49
+ "Biblioteca para más información sobre esto.)"
41
50
42
51
#: ../Doc/tutorial/inputoutput.rst:22
43
52
msgid ""
@@ -81,17 +90,26 @@ msgstr ""
81
90
msgid ""
82
91
"The :func:`str` function is meant to return representations of values which "
83
92
"are fairly human-readable, while :func:`repr` is meant to generate "
84
- "representations which can be read by the interpreter (or will force a :exc: "
85
- "`SyntaxError` if there is no equivalent syntax). For objects which don't "
86
- "have a particular representation for human consumption, :func:`str` will "
87
- "return the same value as :func:`repr`. Many values, such as numbers or "
88
- "structures like lists and dictionaries, have the same representation using "
93
+ "representations which can be read by the interpreter (or will force a "
94
+ ":exc: `SyntaxError` if there is no equivalent syntax). For objects which "
95
+ "don't have a particular representation for human consumption, :func:`str` "
96
+ "will return the same value as :func:`repr`. Many values, such as numbers or"
97
+ " structures like lists and dictionaries, have the same representation using "
89
98
"either function. Strings, in particular, have two distinct representations."
90
99
msgstr ""
100
+ "La función :func:`str` devuelve representaciones de los valores que son "
101
+ "bastante legibles por humanos, mientras que :func:`repr` genera "
102
+ "representaciones que pueden ser leídas por el el intérprete (o forzarían un "
103
+ ":exc:`SyntaxError` si no hay sintáxis equivalente). Para objetos que no "
104
+ "tienen una representación en particular para consumo humano, :func:`str` "
105
+ "devolverá el mismo valor que :func:`repr`. Muchos valores, como números o "
106
+ "estructuras como listas y diccionarios, tienen la misma representación "
107
+ "usando cualquiera de las dos funciones. Las cadenas, en particular, tienen "
108
+ "dos representaciones distintas."
91
109
92
110
#: ../Doc/tutorial/inputoutput.rst:68
93
111
msgid "Some examples::"
94
- msgstr ""
112
+ msgstr "Algunos ejemplos:: "
95
113
96
114
#: ../Doc/tutorial/inputoutput.rst:91
97
115
msgid ""
@@ -145,25 +163,32 @@ msgstr ""
145
163
146
164
#: ../Doc/tutorial/inputoutput.rst:144
147
165
msgid "Basic usage of the :meth:`str.format` method looks like this::"
148
- msgstr ""
166
+ msgstr "El uso básico del método :meth:`str.format` es como esto:: "
149
167
150
168
#: ../Doc/tutorial/inputoutput.rst:149
151
169
msgid ""
152
170
"The brackets and characters within them (called format fields) are replaced "
153
- "with the objects passed into the :meth:`str.format` method. A number in the "
154
- "brackets can be used to refer to the position of the object passed into the : "
155
- "meth:`str.format` method. ::"
171
+ "with the objects passed into the :meth:`str.format` method. A number in the"
172
+ " brackets can be used to refer to the position of the object passed into the"
173
+ " : meth:`str.format` method. ::"
156
174
msgstr ""
175
+ "Las llaves y caracteres dentro de las mismas (llamados campos de formato) "
176
+ "son reemplazadas con los objetos pasados en el método :meth:`str.format`. "
177
+ "Un número en las llaves se refiere a la posición del objeto pasado en el "
178
+ "método. ::"
157
179
158
180
#: ../Doc/tutorial/inputoutput.rst:159
159
181
msgid ""
160
- "If keyword arguments are used in the :meth:`str.format` method, their values "
161
- "are referred to by using the name of the argument. ::"
182
+ "If keyword arguments are used in the :meth:`str.format` method, their values"
183
+ " are referred to by using the name of the argument. ::"
162
184
msgstr ""
185
+ "Si se usan argumentos nombrados en el método :meth:`str.format`, sus valores"
186
+ " serán referidos usando el nombre del argumento. ::"
163
187
164
188
#: ../Doc/tutorial/inputoutput.rst:166
165
189
msgid "Positional and keyword arguments can be arbitrarily combined::"
166
190
msgstr ""
191
+ "Se pueden combinar arbitrariamente argumentos posicionales y nombrados::"
167
192
168
193
#: ../Doc/tutorial/inputoutput.rst:172
169
194
msgid ""
@@ -172,18 +197,28 @@ msgid ""
172
197
"instead of by position. This can be done by simply passing the dict and "
173
198
"using square brackets ``'[]'`` to access the keys ::"
174
199
msgstr ""
200
+ "Si tenés una cadena de formateo realmente larga que no querés separar, "
201
+ "podría ser bueno que puedas hacer referencia a las variables a ser "
202
+ "formateadas por el nombre en vez de la posición. Esto puede hacerse "
203
+ "simplemente pasando el diccionario y usando corchetes ``'[]'`` para acceder "
204
+ "a las claves ::"
175
205
176
206
#: ../Doc/tutorial/inputoutput.rst:182
177
207
msgid ""
178
208
"This could also be done by passing the table as keyword arguments with the "
179
209
"'**' notation. ::"
180
210
msgstr ""
211
+ "Esto se podría también hacer pasando la tabla como argumentos nombrados con "
212
+ "la notación '**'. ::"
181
213
182
214
#: ../Doc/tutorial/inputoutput.rst:189
183
215
msgid ""
184
- "This is particularly useful in combination with the built-in function :func: "
185
- "`vars`, which returns a dictionary containing all local variables."
216
+ "This is particularly useful in combination with the built-in function "
217
+ ":func: `vars`, which returns a dictionary containing all local variables."
186
218
msgstr ""
219
+ "Esto es particularmente útil en combinación con la función integrada "
220
+ ":func:`vars`, que devuelve un diccionario conteniendo todas las variables "
221
+ "locales."
187
222
188
223
#: ../Doc/tutorial/inputoutput.rst:192
189
224
msgid ""
@@ -193,9 +228,11 @@ msgstr ""
193
228
194
229
#: ../Doc/tutorial/inputoutput.rst:209
195
230
msgid ""
196
- "For a complete overview of string formatting with :meth:`str.format`, see : "
197
- "ref:`formatstrings`."
231
+ "For a complete overview of string formatting with :meth:`str.format`, see "
232
+ ": ref:`formatstrings`."
198
233
msgstr ""
234
+ "Para una completa descripción del formateo de cadenas con "
235
+ ":meth:`str.format`, mirá en :ref:`string-formatting`."
199
236
200
237
#: ../Doc/tutorial/inputoutput.rst:214
201
238
msgid "Manual String Formatting"
@@ -228,55 +265,76 @@ msgid ""
228
265
"There is another method, :meth:`str.zfill`, which pads a numeric string on "
229
266
"the left with zeros. It understands about plus and minus signs::"
230
267
msgstr ""
268
+ "Hay otro método, :meth:`str.zfill`, el cual rellena una cadena numérica a la"
269
+ " izquierda con ceros. Entiende signos positivos y negativos::"
231
270
232
271
#: ../Doc/tutorial/inputoutput.rst:258
233
272
msgid "Old string formatting"
234
- msgstr ""
273
+ msgstr "Viejo formateo de cadenas "
235
274
236
275
#: ../Doc/tutorial/inputoutput.rst:260
237
276
msgid ""
238
- "The ``%`` operator can also be used for string formatting. It interprets the "
239
- "left argument much like a :c:func:`sprintf`\\ -style format string to be "
277
+ "The ``%`` operator can also be used for string formatting. It interprets the"
278
+ " left argument much like a :c:func:`sprintf`\\ -style format string to be "
240
279
"applied to the right argument, and returns the string resulting from this "
241
280
"formatting operation. For example::"
242
281
msgstr ""
282
+ "El operador ``%`` también puede usarse para formateo de cadenas. Interpreta"
283
+ " el argumento de la izquierda con el estilo de formateo de :c:func:`sprintf`"
284
+ " para ser aplicado al argumento de la derecha, y devuelve la cadena "
285
+ "resultante de esta operación de formateo. Por ejemplo::"
243
286
244
287
#: ../Doc/tutorial/inputoutput.rst:269
245
288
msgid ""
246
289
"More information can be found in the :ref:`old-string-formatting` section."
247
290
msgstr ""
291
+ "Podés encontrar más información en la sección :ref:`old-string-formatting`."
248
292
249
293
#: ../Doc/tutorial/inputoutput.rst:275
250
294
msgid "Reading and Writing Files"
251
- msgstr ""
295
+ msgstr "Leyendo y escribiendo archivos "
252
296
253
297
#: ../Doc/tutorial/inputoutput.rst:281
254
298
msgid ""
255
299
":func:`open` returns a :term:`file object`, and is most commonly used with "
256
300
"two arguments: ``open(filename, mode)``."
257
301
msgstr ""
302
+ "La función :func:`open` devuelve un `objeto archivo`, y se usa normalmente "
303
+ "con dos argumentos: ``open(nombre_de_archivo, modo)``. ::"
258
304
259
305
#: ../Doc/tutorial/inputoutput.rst:293
260
306
msgid ""
261
- "The first argument is a string containing the filename. The second argument "
262
- "is another string containing a few characters describing the way in which "
307
+ "The first argument is a string containing the filename. The second argument"
308
+ " is another string containing a few characters describing the way in which "
263
309
"the file will be used. *mode* can be ``'r'`` when the file will only be "
264
310
"read, ``'w'`` for only writing (an existing file with the same name will be "
265
311
"erased), and ``'a'`` opens the file for appending; any data written to the "
266
312
"file is automatically added to the end. ``'r+'`` opens the file for both "
267
313
"reading and writing. The *mode* argument is optional; ``'r'`` will be "
268
314
"assumed if it's omitted."
269
315
msgstr ""
316
+ "Cuando se lee en modo texto, por defecto se convierten los fines de lineas "
317
+ "que son específicos a las plataformas (``\\ n`` en Unix, ``\\ r\\ n`` en "
318
+ "Windows) a solamente ``\\ n``. Cuando se escribe en modo texto, por defecto "
319
+ "se convierten los ``\\ n`` a los finales de linea específicos de la "
320
+ "plataforma. Este cambio automático está bien para archivos de texto, pero "
321
+ "corrompería datos binarios como los de archivos :file:`JPEG` o :file:`EXE`."
322
+ " Asegurate de usar modo binario cuando leas y escribas tales archivos."
270
323
271
324
#: ../Doc/tutorial/inputoutput.rst:302
272
325
msgid ""
273
326
"Normally, files are opened in :dfn:`text mode`, that means, you read and "
274
327
"write strings from and to the file, which are encoded in a specific "
275
328
"encoding. If encoding is not specified, the default is platform dependent "
276
- "(see :func:`open`). ``'b'`` appended to the mode opens the file in :dfn: "
277
- "`binary mode`: now the data is read and written in the form of bytes "
329
+ "(see :func:`open`). ``'b'`` appended to the mode opens the file in "
330
+ ":dfn: `binary mode`: now the data is read and written in the form of bytes "
278
331
"objects. This mode should be used for all files that don't contain text."
279
332
msgstr ""
333
+ "Es una buena práctica usar la declaración :keyword:`with` cuando manejamos "
334
+ "objetos archivo. Tiene la ventaja que el archivo es cerrado apropiadamente "
335
+ "luego de que el bloque termina, incluso si se generó una excepción. También"
336
+ " es mucho más corto que escribir los equivalentes bloques :keyword:`try`\\ "
337
+ "-\\ :keyword:`finally` ::"
280
338
281
339
#: ../Doc/tutorial/inputoutput.rst:309
282
340
msgid ""
0 commit comments