-
-
Notifications
You must be signed in to change notification settings - Fork 405
Expand file tree
/
Copy path2.5.po
More file actions
4046 lines (3659 loc) · 194 KB
/
2.5.po
File metadata and controls
4046 lines (3659 loc) · 194 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright (C) 2001-2020, Python Software Foundation
# This file is distributed under the same license as the Python package.
# Maintained by the python-doc-es workteam.
# docs-es@python.org /
# https://mail.python.org/mailman3/lists/docs-es.python.org/
# Check https://github.com/python/python-docs-es/blob/3.8/TRANSLATORS to
# get the list of volunteers
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-25 19:47+0200\n"
"PO-Revision-Date: 2021-10-03 10:57-0300\n"
"Last-Translator: Claudia Millan <clmilneb@gmail.com>\n"
"Language: es\n"
"Language-Team: python-doc-es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.10.3\n"
#: ../Doc/whatsnew/2.5.rst:3
msgid "What's New in Python 2.5"
msgstr "Novedades de Python 2.5"
#: ../Doc/whatsnew/2.5.rst
msgid "Author"
msgstr "Autor"
#: ../Doc/whatsnew/2.5.rst:5
msgid "A.M. Kuchling"
msgstr "A.M. Kuchling"
#: ../Doc/whatsnew/2.5.rst:12
#, fuzzy
msgid ""
"This article explains the new features in Python 2.5. The final release of "
"Python 2.5 is scheduled for August 2006; :pep:`356` describes the planned "
"release schedule. Python 2.5 was released on September 19, 2006."
msgstr ""
"Este artículo explica las nuevas características de Python 2.5. La versión "
"final de Python 2.5 está prevista para agosto de 2006; :pep:`356` describe "
"el calendario de publicación previsto."
#: ../Doc/whatsnew/2.5.rst:16
#, fuzzy
msgid ""
"The changes in Python 2.5 are an interesting mix of language and library "
"improvements. The library enhancements will be more important to Python's "
"user community, I think, because several widely useful packages were added. "
"New modules include ElementTree for XML processing (:mod:`xml.etree`), the "
"SQLite database module (:mod:`sqlite`), and the :mod:`ctypes` module for "
"calling C functions."
msgstr ""
"Los cambios en Python 2.5 son una interesante mezcla de mejoras en el "
"lenguaje y en las bibliotecas. Las mejoras de la biblioteca serán más "
"importantes para la comunidad de usuarios de Python, creo, porque se han "
"añadido varios paquetes muy útiles. Los nuevos módulos incluyen ElementTree "
"para el procesamiento de XML (:mod:`xml.etree`), el módulo de base de datos "
"SQLite (:mod:`sqlite`), y el módulo :mod:`ctypes` para llamar a funciones C."
#: ../Doc/whatsnew/2.5.rst:23
msgid ""
"The language changes are of middling significance. Some pleasant new "
"features were added, but most of them aren't features that you'll use every "
"day. Conditional expressions were finally added to the language using a "
"novel syntax; see section :ref:`pep-308`. The new ':keyword:`with`' "
"statement will make writing cleanup code easier (section :ref:`pep-343`). "
"Values can now be passed into generators (section :ref:`pep-342`). Imports "
"are now visible as either absolute or relative (section :ref:`pep-328`). "
"Some corner cases of exception handling are handled better (section :ref:"
"`pep-341`). All these improvements are worthwhile, but they're improvements "
"to one specific language feature or another; none of them are broad "
"modifications to Python's semantics."
msgstr ""
"Los cambios en el lenguaje son de mediana importancia. Se han añadido "
"algunas características nuevas y agradables, pero la mayoría de ellas no son "
"características que vaya a utilizar todos los días. Las expresiones "
"condicionales fueron finalmente añadidas al lenguaje usando una nueva "
"sintaxis; ver sección :ref:`pep-308`. La nueva sentencia ':keyword:`with`' "
"facilitará la escritura de código de limpieza (sección :ref:`pep-343`). "
"Ahora se pueden pasar valores a los generadores (sección :ref:`pep-342`). "
"Las importaciones son ahora visibles como absolutas o relativas (sección :"
"ref:`pep-328`). Se han mejorado algunos casos de manejo de excepciones "
"(sección :ref:`pep-341`). Todas estas mejoras merecen la pena, pero son "
"mejoras de una u otra característica específica del lenguaje; ninguna de "
"ellas es una modificación amplia de la semántica de Python."
#: ../Doc/whatsnew/2.5.rst:34
msgid ""
"As well as the language and library additions, other improvements and "
"bugfixes were made throughout the source tree. A search through the SVN "
"change logs finds there were 353 patches applied and 458 bugs fixed between "
"Python 2.4 and 2.5. (Both figures are likely to be underestimates.)"
msgstr ""
"Además de las adiciones al lenguaje y a la biblioteca, se han realizado "
"otras mejoras y correcciones de errores en todo el árbol de código fuente. "
"Una búsqueda en los registros de cambios del SVN revela que se aplicaron 353 "
"parches y se corrigieron 458 errores entre Python 2.4 y 2.5. (Es probable "
"que ambas cifras estén subestimadas)"
#: ../Doc/whatsnew/2.5.rst:39
msgid ""
"This article doesn't try to be a complete specification of the new features; "
"instead changes are briefly introduced using helpful examples. For full "
"details, you should always refer to the documentation for Python 2.5 at "
"https://docs.python.org. If you want to understand the complete "
"implementation and design rationale, refer to the PEP for a particular new "
"feature."
msgstr ""
"Este artículo no pretende ser una especificación completa de las nuevas "
"características; en su lugar, los cambios se introducen brevemente "
"utilizando ejemplos útiles. Para obtener todos los detalles, siempre debes "
"consultar la documentación de Python 2.5 en https://docs.python.org. Si "
"quieres entender la implementación completa y los fundamentos del diseño, "
"consulta el PEP de una nueva característica en particular."
#: ../Doc/whatsnew/2.5.rst:45
msgid ""
"Comments, suggestions, and error reports for this document are welcome; "
"please e-mail them to the author or open a bug in the Python bug tracker."
msgstr ""
"Son bienvenidos los comentarios, las sugerencias y los informes de errores "
"para este documento; por favor, envíelos por correo electrónico al autor o "
"abra un error en el rastreador de errores de Python."
#: ../Doc/whatsnew/2.5.rst:54
msgid "PEP 308: Conditional Expressions"
msgstr "PEP 308: Expresiones condicionales"
#: ../Doc/whatsnew/2.5.rst:56
msgid ""
"For a long time, people have been requesting a way to write conditional "
"expressions, which are expressions that return value A or value B depending "
"on whether a Boolean value is true or false. A conditional expression lets "
"you write a single assignment statement that has the same effect as the "
"following::"
msgstr ""
"Durante mucho tiempo, la gente ha solicitado una forma de escribir "
"expresiones condicionales, que son expresiones que devuelven el valor A o el "
"valor B dependiendo de si un valor booleano es verdadero o falso. Una "
"expresión condicional le permite escribir una única sentencia de asignación "
"que tiene el mismo efecto que la siguiente::"
#: ../Doc/whatsnew/2.5.rst:66
msgid ""
"There have been endless tedious discussions of syntax on both python-dev and "
"comp.lang.python. A vote was even held that found the majority of voters "
"wanted conditional expressions in some form, but there was no syntax that "
"was preferred by a clear majority. Candidates included C's ``cond ? true_v : "
"false_v``, ``if cond then true_v else false_v``, and 16 other variations."
msgstr ""
"Ha habido interminables y tediosas discusiones sobre la sintaxis tanto en "
"python-dev como en comp.lang.python. Incluso se llevó a cabo una votación "
"en la que se descubrió que la mayoría de los votantes querían expresiones "
"condicionales de alguna forma, pero no había ninguna sintaxis que fuera "
"preferida por una clara mayoría. Los candidatos incluían ``cond ? true_v : "
"false_v``, ``if cond then true_v else false_v``, y otras 16 variaciones."
#: ../Doc/whatsnew/2.5.rst:72
msgid "Guido van Rossum eventually chose a surprising syntax::"
msgstr "Guido van Rossum eligió finalmente una sintaxis sorprendente::"
#: ../Doc/whatsnew/2.5.rst:76
msgid ""
"Evaluation is still lazy as in existing Boolean expressions, so the order of "
"evaluation jumps around a bit. The *condition* expression in the middle is "
"evaluated first, and the *true_value* expression is evaluated only if the "
"condition was true. Similarly, the *false_value* expression is only "
"evaluated when the condition is false."
msgstr ""
"La evaluación sigue siendo perezosa como en las expresiones booleanas "
"existentes, por lo que el orden de evaluación salta un poco. La expresión "
"*condición* del medio se evalúa primero, y la expresión *valor_verdadero* se "
"evalúa sólo si la condición es verdadera. Del mismo modo, la expresión "
"*valor_falso* sólo se evalúa cuando la condición es falsa."
#: ../Doc/whatsnew/2.5.rst:82
msgid ""
"This syntax may seem strange and backwards; why does the condition go in the "
"*middle* of the expression, and not in the front as in C's ``c ? x : y``? "
"The decision was checked by applying the new syntax to the modules in the "
"standard library and seeing how the resulting code read. In many cases "
"where a conditional expression is used, one value seems to be the 'common "
"case' and one value is an 'exceptional case', used only on rarer occasions "
"when the condition isn't met. The conditional syntax makes this pattern a "
"bit more obvious::"
msgstr ""
"Esta sintaxis puede parecer extraña y retrógrada; ¿por qué la condición va "
"en el *medio* de la expresión, y no en la parte delantera como en ``c ? x : "
"y`` de C? La decisión se comprobó aplicando la nueva sintaxis a los módulos "
"de la biblioteca estándar y viendo cómo se leía el código resultante. En "
"muchos casos en los que se utiliza una expresión condicional, un valor "
"parece ser el \"caso común\" y otro valor es un \"caso excepcional\", "
"utilizado sólo en las raras ocasiones en las que no se cumple la condición. "
"La sintaxis condicional hace que este patrón sea un poco más obvio::"
#: ../Doc/whatsnew/2.5.rst:92
msgid ""
"I read the above statement as meaning \"here *contents* is usually assigned "
"a value of ``doc+'\\n'``; sometimes *doc* is empty, in which special case "
"an empty string is returned.\" I doubt I will use conditional expressions "
"very often where there isn't a clear common and uncommon case."
msgstr ""
"Leo la afirmación anterior en el sentido de que \"aquí se asigna a "
"*contents* un valor de ``doc+'\\n'``; a veces *doc* está vacío, en cuyo caso "
"especial se devuelve una cadena vacía\" Dudo que use expresiones "
"condicionales muy a menudo donde no hay un caso común y no común claro."
#: ../Doc/whatsnew/2.5.rst:97
msgid ""
"There was some discussion of whether the language should require surrounding "
"conditional expressions with parentheses. The decision was made to *not* "
"require parentheses in the Python language's grammar, but as a matter of "
"style I think you should always use them. Consider these two statements::"
msgstr ""
"Hubo alguna discusión sobre si el lenguaje debería requerir rodear las "
"expresiones condicionales con paréntesis. Se tomó la decisión de *no* "
"requerir paréntesis en la gramática del lenguaje Python, pero como una "
"cuestión de estilo creo que siempre deberías usarlos. Considere estas dos "
"declaraciones::"
#: ../Doc/whatsnew/2.5.rst:108
msgid ""
"In the first version, I think a reader's eye might group the statement into "
"'level = 1', 'if logging', 'else 0', and think that the condition decides "
"whether the assignment to *level* is performed. The second version reads "
"better, in my opinion, because it makes it clear that the assignment is "
"always performed and the choice is being made between two values."
msgstr ""
"En la primera versión, creo que el ojo de un lector podría agrupar la "
"sentencia en 'nivel = 1', 'si registro', 'si no 0', y pensar que la "
"condición decide si se realiza la asignación a *nivel*. La segunda versión "
"se lee mejor, en mi opinión, porque deja claro que la asignación se realiza "
"siempre y que se está eligiendo entre dos valores."
#: ../Doc/whatsnew/2.5.rst:114
msgid ""
"Another reason for including the brackets: a few odd combinations of list "
"comprehensions and lambdas could look like incorrect conditional "
"expressions. See :pep:`308` for some examples. If you put parentheses "
"around your conditional expressions, you won't run into this case."
msgstr ""
"Otra razón para incluir los paréntesis: algunas combinaciones extrañas de "
"comprensiones de listas y lambdas podrían parecer expresiones condicionales "
"incorrectas. Véase :pep:`308` para algunos ejemplos. Si pone paréntesis "
"alrededor de sus expresiones condicionales, no se encontrará con este caso."
#: ../Doc/whatsnew/2.5.rst:123
msgid ":pep:`308` - Conditional Expressions"
msgstr ":pep:`308` - Expresiones condicionales"
#: ../Doc/whatsnew/2.5.rst:123
msgid ""
"PEP written by Guido van Rossum and Raymond D. Hettinger; implemented by "
"Thomas Wouters."
msgstr ""
"PEP escrito por Guido van Rossum y Raymond D. Hettinger; implementado por "
"Thomas Wouters."
#: ../Doc/whatsnew/2.5.rst:132
msgid "PEP 309: Partial Function Application"
msgstr "PEP 309: Aplicación parcial de funciones"
#: ../Doc/whatsnew/2.5.rst:134
msgid ""
"The :mod:`functools` module is intended to contain tools for functional-"
"style programming."
msgstr ""
"El módulo :mod:`functools` está destinado a contener herramientas para la "
"programación de estilo funcional."
#: ../Doc/whatsnew/2.5.rst:137
msgid ""
"One useful tool in this module is the :func:`partial` function. For programs "
"written in a functional style, you'll sometimes want to construct variants "
"of existing functions that have some of the parameters filled in. Consider "
"a Python function ``f(a, b, c)``; you could create a new function ``g(b, "
"c)`` that was equivalent to ``f(1, b, c)``. This is called \"partial "
"function application\"."
msgstr ""
"Una herramienta útil de este módulo es la función :func:`partial`. Para los "
"programas escritos en un estilo funcional, a veces querrá construir "
"variantes de funciones existentes que tengan algunos de los parámetros "
"rellenados. Considere una función Python ``f(a, b, c)``; podría crear una "
"nueva función ``g(b, c)`` que fuera equivalente a ``f(1, b, c)``. Esto se "
"llama \"aplicación parcial de funciones\"."
#: ../Doc/whatsnew/2.5.rst:144
msgid ""
":func:`partial` takes the arguments ``(function, arg1, arg2, ... "
"kwarg1=value1, kwarg2=value2)``. The resulting object is callable, so you "
"can just call it to invoke *function* with the filled-in arguments."
msgstr ""
":func:`parcial` toma los argumentos ``(function, arg1, arg2, ... "
"kwarg1=valor1, kwarg2=valor2)``. El objeto resultante es invocable, por lo "
"que puedes llamarlo para invocar la *función* con los argumentos rellenados."
#: ../Doc/whatsnew/2.5.rst:148
msgid "Here's a small but realistic example::"
msgstr "He aquí un pequeño pero realista ejemplo::"
#: ../Doc/whatsnew/2.5.rst:160
msgid ""
"Here's another example, from a program that uses PyGTK. Here a context-"
"sensitive pop-up menu is being constructed dynamically. The callback "
"provided for the menu option is a partially applied version of the :meth:"
"`open_item` method, where the first argument has been provided. ::"
msgstr ""
"Aquí hay otro ejemplo, de un programa que utiliza PyGTK. Aquí se está "
"construyendo dinámicamente un menú emergente sensible al contexto. El "
"callback proporcionado para la opción de menú es una versión parcialmente "
"aplicada del método :meth:`open_item`, donde se ha proporcionado el primer "
"argumento ::"
#: ../Doc/whatsnew/2.5.rst:173
msgid ""
"Another function in the :mod:`functools` module is the "
"``update_wrapper(wrapper, wrapped)`` function that helps you write well-"
"behaved decorators. :func:`update_wrapper` copies the name, module, and "
"docstring attribute to a wrapper function so that tracebacks inside the "
"wrapped function are easier to understand. For example, you might write::"
msgstr ""
"Otra función del módulo :mod:`functools` es la función "
"``update_wrapper(wrapper, wrapped)`` que le ayuda a escribir decoradores con "
"un buen comportamiento. :func:`update_wrapper` copia el nombre, el módulo y "
"el atributo docstring a una función wrapper para que las trazas dentro de la "
"función envuelta sean más fáciles de entender. Por ejemplo, puedes "
"escribir::"
#: ../Doc/whatsnew/2.5.rst:186
msgid ""
":func:`wraps` is a decorator that can be used inside your own decorators to "
"copy the wrapped function's information. An alternate version of the "
"previous example would be::"
msgstr ""
":func:`wraps` es un decorador que se puede utilizar dentro de sus propios "
"decoradores para copiar la información de la función envuelta. Una versión "
"alternativa del ejemplo anterior sería::"
#: ../Doc/whatsnew/2.5.rst:201
msgid ":pep:`309` - Partial Function Application"
msgstr ":pep:`309` - Aplicación parcial de funciones"
#: ../Doc/whatsnew/2.5.rst:201
msgid ""
"PEP proposed and written by Peter Harris; implemented by Hye-Shik Chang and "
"Nick Coghlan, with adaptations by Raymond Hettinger."
msgstr ""
"PEP propuesto y escrito por Peter Harris; implementado por Hye-Shik Chang y "
"Nick Coghlan, con adaptaciones de Raymond Hettinger."
#: ../Doc/whatsnew/2.5.rst:210
msgid "PEP 314: Metadata for Python Software Packages v1.1"
msgstr "PEP 314: Metadatos para paquetes de software Python v1.1"
#: ../Doc/whatsnew/2.5.rst:212
msgid ""
"Some simple dependency support was added to Distutils. The :func:`setup` "
"function now has ``requires``, ``provides``, and ``obsoletes`` keyword "
"parameters. When you build a source distribution using the ``sdist`` "
"command, the dependency information will be recorded in the :file:`PKG-INFO` "
"file."
msgstr ""
"Se ha añadido a Distutils un sencillo soporte de dependencias. La función :"
"func:`setup` ahora tiene parámetros de palabras clave ``requires``, "
"``provides`` y ``obsoletes``. Cuando se construye una distribución de "
"origen utilizando el comando ``sdist``, la información de las dependencias "
"se registrará en el archivo :file:`PKG-INFO`."
#: ../Doc/whatsnew/2.5.rst:217
msgid ""
"Another new keyword parameter is ``download_url``, which should be set to a "
"URL for the package's source code. This means it's now possible to look up "
"an entry in the package index, determine the dependencies for a package, and "
"download the required packages. ::"
msgstr ""
"Otro nuevo parámetro de palabra clave es ``download_url``, que debe "
"establecerse como una URL para el código fuente del paquete. Esto significa "
"que ahora es posible buscar una entrada en el índice de paquetes, determinar "
"las dependencias de un paquete y descargar los paquetes necesarios. ::"
#: ../Doc/whatsnew/2.5.rst:231
msgid ""
"Another new enhancement to the Python package index at https://pypi.org is "
"storing source and binary archives for a package. The new :command:`upload` "
"Distutils command will upload a package to the repository."
msgstr ""
"Otra nueva mejora en el índice de paquetes de Python en https://pypi.org es "
"el almacenamiento de archivos fuente y binarios de un paquete. El nuevo "
"comando :command:`upload` de Distutils subirá un paquete al repositorio."
#: ../Doc/whatsnew/2.5.rst:236
msgid ""
"Before a package can be uploaded, you must be able to build a distribution "
"using the :command:`sdist` Distutils command. Once that works, you can run "
"``python setup.py upload`` to add your package to the PyPI archive. "
"Optionally you can GPG-sign the package by supplying the :option:`!--sign` "
"and :option:`!--identity` options."
msgstr ""
"Antes de poder subir un paquete, debes ser capaz de construir una "
"distribución usando el comando :command:`sdist` de Distutils. Una vez que "
"funcione, puedes ejecutar ``python setup.py upload`` para añadir tu paquete "
"al archivo PyPI. Opcionalmente puedes firmar el paquete con GPG "
"suministrando las opciones :option:`!--sign` y :option:`!--identity`."
#: ../Doc/whatsnew/2.5.rst:242
msgid ""
"Package uploading was implemented by Martin von Löwis and Richard Jones."
msgstr ""
"La carga de paquetes fue implementada por Martin von Löwis y Richard Jones."
#: ../Doc/whatsnew/2.5.rst:248
msgid ":pep:`314` - Metadata for Python Software Packages v1.1"
msgstr ":pep:`314` - Metadatos para paquetes de software Python v1.1"
#: ../Doc/whatsnew/2.5.rst:248
msgid ""
"PEP proposed and written by A.M. Kuchling, Richard Jones, and Fred Drake; "
"implemented by Richard Jones and Fred Drake."
msgstr ""
"PEP propuesto y redactado por A.M. Kuchling, Richard Jones y Fred Drake; "
"aplicado por Richard Jones y Fred Drake."
#: ../Doc/whatsnew/2.5.rst:257
msgid "PEP 328: Absolute and Relative Imports"
msgstr "PEP 328: Importaciones absolutas y relativas"
#: ../Doc/whatsnew/2.5.rst:259
msgid ""
"The simpler part of :pep:`328` was implemented in Python 2.4: parentheses "
"could now be used to enclose the names imported from a module using the "
"``from ... import ...`` statement, making it easier to import many different "
"names."
msgstr ""
"La parte más sencilla de :pep:`328` se implementó en Python 2.4: los "
"paréntesis podían utilizarse ahora para encerrar los nombres importados de "
"un módulo utilizando la sentencia ``from ... import ...``, facilitando la "
"importación de muchos nombres diferentes."
#: ../Doc/whatsnew/2.5.rst:263
msgid ""
"The more complicated part has been implemented in Python 2.5: importing a "
"module can be specified to use absolute or package-relative imports. The "
"plan is to move toward making absolute imports the default in future "
"versions of Python."
msgstr ""
"La parte más complicada se ha implementado en Python 2.5: la importación de "
"un módulo puede especificarse para utilizar importaciones absolutas o "
"relativas al paquete. El plan es hacer que las importaciones absolutas sean "
"el valor por defecto en futuras versiones de Python."
#: ../Doc/whatsnew/2.5.rst:267
msgid "Let's say you have a package directory like this::"
msgstr "Digamos que tienes un directorio de paquetes como este::"
#: ../Doc/whatsnew/2.5.rst:274
msgid ""
"This defines a package named :mod:`pkg` containing the :mod:`pkg.main` and :"
"mod:`pkg.string` submodules."
msgstr ""
"Esto define un paquete llamado :mod:`pkg` que contiene los submódulos :mod:"
"`pkg.main` y :mod:`pkg.string`."
#: ../Doc/whatsnew/2.5.rst:277
msgid ""
"Consider the code in the :file:`main.py` module. What happens if it "
"executes the statement ``import string``? In Python 2.4 and earlier, it "
"will first look in the package's directory to perform a relative import, "
"finds :file:`pkg/string.py`, imports the contents of that file as the :mod:"
"`pkg.string` module, and that module is bound to the name ``string`` in the :"
"mod:`pkg.main` module's namespace."
msgstr ""
"Considera el código del módulo :file:`main.py`. ¿Qué ocurre si ejecuta la "
"sentencia ``importar cadena``? En Python 2.4 y anteriores, primero buscará "
"en el directorio del paquete para realizar una importación relativa, "
"encuentra :file:`pkg/string.py`, importa el contenido de ese archivo como el "
"módulo :mod:`pkg.string`, y ese módulo se vincula al nombre ``string`` en el "
"espacio de nombres del módulo :mod:`pkg.main`."
#: ../Doc/whatsnew/2.5.rst:284
msgid ""
"That's fine if :mod:`pkg.string` was what you wanted. But what if you "
"wanted Python's standard :mod:`string` module? There's no clean way to "
"ignore :mod:`pkg.string` and look for the standard module; generally you had "
"to look at the contents of ``sys.modules``, which is slightly unclean. "
"Holger Krekel's :mod:`py.std` package provides a tidier way to perform "
"imports from the standard library, ``import py; py.std.string.join()``, but "
"that package isn't available on all Python installations."
msgstr ""
"Eso está bien si :mod:`pkg.string` era lo que querías. ¿Pero qué pasa si "
"quieres el módulo estándar de Python :mod:`string`? No hay una forma limpia "
"de ignorar :mod:`pkg.string` y buscar el módulo estándar; generalmente "
"tienes que mirar el contenido de ``sys.modules``, lo cual es ligeramente "
"sucio. El paquete :mod:`py.std` de Holger Krekel proporciona una forma "
"más ordenada de realizar importaciones desde la biblioteca estándar, "
"``import py; py.std.string.join()``, pero ese paquete no está disponible en "
"todas las instalaciones de Python."
#: ../Doc/whatsnew/2.5.rst:292
msgid ""
"Reading code which relies on relative imports is also less clear, because a "
"reader may be confused about which module, :mod:`string` or :mod:`pkg."
"string`, is intended to be used. Python users soon learned not to duplicate "
"the names of standard library modules in the names of their packages' "
"submodules, but you can't protect against having your submodule's name being "
"used for a new module added in a future version of Python."
msgstr ""
"La lectura de código que depende de importaciones relativas también es menos "
"clara, porque un lector puede confundirse sobre qué módulo, :mod:`cadena` o :"
"mod:`cadena.pkg`, se pretende utilizar. Los usuarios de Python aprendieron "
"pronto a no duplicar los nombres de los módulos de la biblioteca estándar en "
"los nombres de los submódulos de sus paquetes, pero no puedes protegerte de "
"que el nombre de tu submódulo se utilice para un nuevo módulo añadido en una "
"futura versión de Python."
#: ../Doc/whatsnew/2.5.rst:299
msgid ""
"In Python 2.5, you can switch :keyword:`import`'s behaviour to absolute "
"imports using a ``from __future__ import absolute_import`` directive. This "
"absolute-import behaviour will become the default in a future version "
"(probably Python 2.7). Once absolute imports are the default, ``import "
"string`` will always find the standard library's version. It's suggested "
"that users should begin using absolute imports as much as possible, so it's "
"preferable to begin writing ``from pkg import string`` in your code."
msgstr ""
"En Python 2.5, puedes cambiar el comportamiento de :keyword:`import` a "
"importaciones absolutas usando una directiva ``from __future__ import "
"absolute_import``. Este comportamiento de importación absoluta será el "
"predeterminado en una versión futura (probablemente Python 2.7). Una vez "
"que las importaciones absolutas sean el valor por defecto, ``import string`` "
"siempre encontrará la versión de la biblioteca estándar. Se sugiere que los "
"usuarios comiencen a usar importaciones absolutas tanto como sea posible, "
"así que es preferible comenzar a escribir ``de pkg import string`` en su "
"código."
#: ../Doc/whatsnew/2.5.rst:307
msgid ""
"Relative imports are still possible by adding a leading period to the "
"module name when using the ``from ... import`` form::"
msgstr ""
"Las importaciones relativas siguen siendo posibles añadiendo un punto "
"inicial al nombre del módulo cuando se utiliza la forma ``from ... import``::"
#: ../Doc/whatsnew/2.5.rst:315
msgid ""
"This imports the :mod:`string` module relative to the current package, so "
"in :mod:`pkg.main` this will import *name1* and *name2* from :mod:`pkg."
"string`. Additional leading periods perform the relative import starting "
"from the parent of the current package. For example, code in the :mod:`A.B."
"C` module can do::"
msgstr ""
"Esto importa el módulo :mod:`string` relativo al paquete actual, así que en :"
"mod:`pkg.main` esto importará *nombre1* y *nombre2* de :mod:`pkg.string`. "
"Los puntos iniciales adicionales realizan la importación relativa empezando "
"por el padre del paquete actual. Por ejemplo, el código en el módulo :mod:"
"`A.B.C` puede hacer::"
#: ../Doc/whatsnew/2.5.rst:324
msgid ""
"Leading periods cannot be used with the ``import modname`` form of the "
"import statement, only the ``from ... import`` form."
msgstr ""
"Los puntos suspensivos no pueden usarse con la forma ``importar nombre de "
"modelo`` de la sentencia import, sólo con la forma ``de ... import``."
#: ../Doc/whatsnew/2.5.rst:331
msgid ":pep:`328` - Imports: Multi-Line and Absolute/Relative"
msgstr ":pep:`328` - Importaciones: Multilínea y Absoluto/Relativo"
#: ../Doc/whatsnew/2.5.rst:331
msgid "PEP written by Aahz; implemented by Thomas Wouters."
msgstr "PEP escrito por Aahz; implementado por Thomas Wouters."
#: ../Doc/whatsnew/2.5.rst:333
msgid "https://pylib.readthedocs.io/"
msgstr "https://pylib.readthedocs.io/"
#: ../Doc/whatsnew/2.5.rst:334
msgid ""
"The py library by Holger Krekel, which contains the :mod:`py.std` package."
msgstr ""
"La biblioteca py de Holger Krekel, que contiene el paquete :mod:`py.std`."
#: ../Doc/whatsnew/2.5.rst:342
msgid "PEP 338: Executing Modules as Scripts"
msgstr "PEP 338: Ejecutando Módulos como Scripts"
#: ../Doc/whatsnew/2.5.rst:344
msgid ""
"The :option:`-m` switch added in Python 2.4 to execute a module as a script "
"gained a few more abilities. Instead of being implemented in C code inside "
"the Python interpreter, the switch now uses an implementation in a new "
"module, :mod:`runpy`."
msgstr ""
"El conmutador :option:`-m` añadido en Python 2.4 para ejecutar un módulo "
"como un script ganó algunas habilidades más. En lugar de estar implementado "
"en código C dentro del intérprete de Python, el interruptor ahora utiliza "
"una implementación en un nuevo módulo, :mod:`runpy`."
#: ../Doc/whatsnew/2.5.rst:349
msgid ""
"The :mod:`runpy` module implements a more sophisticated import mechanism so "
"that it's now possible to run modules in a package such as :mod:`pychecker."
"checker`. The module also supports alternative import mechanisms such as "
"the :mod:`zipimport` module. This means you can add a .zip archive's path "
"to ``sys.path`` and then use the :option:`-m` switch to execute code from "
"the archive."
msgstr ""
"El módulo :mod:`runpy` implementa un mecanismo de importación más "
"sofisticado de forma que ahora es posible ejecutar módulos en un paquete "
"como :mod:`pychecker.checker`. El módulo también soporta mecanismos de "
"importación alternativos como el módulo :mod:`zipimport`. Esto significa "
"que puede añadir la ruta de un archivo .zip a ``sys.path`` y luego utilizar "
"el modificador :option:`-m` para ejecutar el código del archivo."
#: ../Doc/whatsnew/2.5.rst:359
msgid ":pep:`338` - Executing modules as scripts"
msgstr ":pep:`338` - Ejecución de módulos como scripts"
#: ../Doc/whatsnew/2.5.rst:360
msgid "PEP written and implemented by Nick Coghlan."
msgstr "PEP escrito e implementado por Nick Coghlan."
#: ../Doc/whatsnew/2.5.rst:368
msgid "PEP 341: Unified try/except/finally"
msgstr "PEP 341: Try/except/finally unificados"
#: ../Doc/whatsnew/2.5.rst:370
msgid ""
"Until Python 2.5, the :keyword:`try` statement came in two flavours. You "
"could use a :keyword:`finally` block to ensure that code is always executed, "
"or one or more :keyword:`except` blocks to catch specific exceptions. You "
"couldn't combine both :keyword:`!except` blocks and a :keyword:`!finally` "
"block, because generating the right bytecode for the combined version was "
"complicated and it wasn't clear what the semantics of the combined statement "
"should be."
msgstr ""
"Hasta la versión 2.5 de Python, la sentencia :keyword:`try` tenía dos "
"variantes. Podías usar un bloque :keyword:`finally` para asegurarte de que "
"el código se ejecutaba siempre, o uno o más bloques :keyword:`except` para "
"capturar excepciones específicas. No podías combinar ambos bloques :keyword:"
"`!except` y un bloque :keyword:`!finally`, porque generar el bytecode "
"correcto para la versión combinada era complicado y no estaba claro cuál "
"debía ser la semántica de la sentencia combinada."
#: ../Doc/whatsnew/2.5.rst:377
msgid ""
"Guido van Rossum spent some time working with Java, which does support the "
"equivalent of combining :keyword:`except` blocks and a :keyword:`finally` "
"block, and this clarified what the statement should mean. In Python 2.5, "
"you can now write::"
msgstr ""
"Guido van Rossum pasó algún tiempo trabajando con Java, que sí soporta el "
"equivalente de combinar bloques :keyword:`except` y un bloque :keyword:"
"`finally`, y esto aclaró lo que debería significar la declaración. En "
"Python 2.5, ahora se puede escribir::"
#: ../Doc/whatsnew/2.5.rst:393
msgid ""
"The code in *block-1* is executed. If the code raises an exception, the "
"various :keyword:`except` blocks are tested: if the exception is of class :"
"class:`Exception1`, *handler-1* is executed; otherwise if it's of class :"
"class:`Exception2`, *handler-2* is executed, and so forth. If no exception "
"is raised, the *else-block* is executed."
msgstr ""
"Se ejecuta el código del *bloque-1*. Si el código lanza una excepción, se "
"comprueban los distintos bloques :keyword:`except`: si la excepción es de "
"clase :class:`Exception1`, se ejecuta *handler-1*; en caso contrario, si es "
"de clase :class:`Exception2`, se ejecuta *handler-2*, y así sucesivamente. "
"Si no se produce ninguna excepción, se ejecuta el bloque *else*."
#: ../Doc/whatsnew/2.5.rst:399
msgid ""
"No matter what happened previously, the *final-block* is executed once the "
"code block is complete and any raised exceptions handled. Even if there's an "
"error in an exception handler or the *else-block* and a new exception is "
"raised, the code in the *final-block* is still run."
msgstr ""
"No importa lo que haya sucedido previamente, el *bloque final* se ejecuta "
"una vez que el bloque de código se ha completado y se han manejado las "
"excepciones planteadas. Incluso si hay un error en un manejador de "
"excepciones o en el *bloque else* y se lanza una nueva excepción, el código "
"del *bloque final* se sigue ejecutando."
#: ../Doc/whatsnew/2.5.rst:407
msgid ":pep:`341` - Unifying try-except and try-finally"
msgstr ":pep:`341` - Unificar try-except y try-finally"
#: ../Doc/whatsnew/2.5.rst:408
msgid "PEP written by Georg Brandl; implementation by Thomas Lee."
msgstr "PEP escrito por Georg Brandl; implementación por Thomas Lee."
#: ../Doc/whatsnew/2.5.rst:416
msgid "PEP 342: New Generator Features"
msgstr "PEP 342: Nuevas funciones del generador"
#: ../Doc/whatsnew/2.5.rst:418
msgid ""
"Python 2.5 adds a simple way to pass values *into* a generator. As "
"introduced in Python 2.3, generators only produce output; once a generator's "
"code was invoked to create an iterator, there was no way to pass any new "
"information into the function when its execution is resumed. Sometimes the "
"ability to pass in some information would be useful. Hackish solutions to "
"this include making the generator's code look at a global variable and then "
"changing the global variable's value, or passing in some mutable object that "
"callers then modify."
msgstr ""
"Python 2.5 añade una forma sencilla de pasar valores *a* un generador. Tal y "
"como se introdujo en Python 2.3, los generadores sólo producen salida; una "
"vez que se invoca el código de un generador para crear un iterador, no hay "
"forma de pasar ninguna información nueva a la función cuando se reanuda su "
"ejecución. A veces, la capacidad de pasar alguna información sería útil. "
"Las soluciones más ingeniosas para esto incluyen hacer que el código del "
"generador mire a una variable global y luego cambie el valor de la variable "
"global, o pasar algún objeto mutable que los llamadores luego modifiquen."
#: ../Doc/whatsnew/2.5.rst:426
msgid "To refresh your memory of basic generators, here's a simple example::"
msgstr ""
"Para refrescar la memoria de los generadores básicos, he aquí un ejemplo "
"sencillo::"
#: ../Doc/whatsnew/2.5.rst:434
msgid ""
"When you call ``counter(10)``, the result is an iterator that returns the "
"values from 0 up to 9. On encountering the :keyword:`yield` statement, the "
"iterator returns the provided value and suspends the function's execution, "
"preserving the local variables. Execution resumes on the following call to "
"the iterator's :meth:`next` method, picking up after the :keyword:`!yield` "
"statement."
msgstr ""
"Cuando se llama a ``contador(10)``, el resultado es un iterador que devuelve "
"los valores de 0 a 9. Al encontrar la sentencia :keyword:`yield`, el "
"iterador devuelve el valor proporcionado y suspende la ejecución de la "
"función, preservando las variables locales. La ejecución se reanuda en la "
"siguiente llamada al método :meth:`next` del iterador, retomando después de "
"la sentencia :keyword:`!yield`."
#: ../Doc/whatsnew/2.5.rst:440
msgid ""
"In Python 2.3, :keyword:`yield` was a statement; it didn't return any "
"value. In 2.5, :keyword:`!yield` is now an expression, returning a value "
"that can be assigned to a variable or otherwise operated on::"
msgstr ""
"En Python 2.3, :keyword:`yield` era una declaración; no devolvía ningún "
"valor. En 2.5, :keyword:`!yield` es ahora una expresión, que devuelve un "
"valor que se puede asignar a una variable o que se puede operar de otra "
"manera::"
#: ../Doc/whatsnew/2.5.rst:446
msgid ""
"I recommend that you always put parentheses around a :keyword:`yield` "
"expression when you're doing something with the returned value, as in the "
"above example. The parentheses aren't always necessary, but it's easier to "
"always add them instead of having to remember when they're needed."
msgstr ""
"Te recomiendo que siempre pongas paréntesis alrededor de una expresión :"
"keyword:`yield` cuando estés haciendo algo con el valor devuelto, como en el "
"ejemplo anterior. Los paréntesis no siempre son necesarios, pero es más "
"fácil añadirlos siempre en lugar de tener que recordar cuándo son necesarios."
#: ../Doc/whatsnew/2.5.rst:451
msgid ""
"(:pep:`342` explains the exact rules, which are that a :keyword:`yield`\\ -"
"expression must always be parenthesized except when it occurs at the top-"
"level expression on the right-hand side of an assignment. This means you "
"can write ``val = yield i`` but have to use parentheses when there's an "
"operation, as in ``val = (yield i) + 12``.)"
msgstr ""
"(:pep:`342` explica las reglas exactas, que consisten en que una expresión :"
"keyword:`yield`\\ debe ir siempre entre paréntesis, excepto cuando ocurre en "
"la expresión de nivel superior en el lado derecho de una asignación. Esto "
"significa que puedes escribir ``val = yield i`` pero tienes que usar "
"paréntesis cuando hay una operación, como en ``val = (yield i) + 12``)"
#: ../Doc/whatsnew/2.5.rst:458
msgid ""
"Values are sent into a generator by calling its ``send(value)`` method. The "
"generator's code is then resumed and the :keyword:`yield` expression returns "
"the specified *value*. If the regular :meth:`next` method is called, the :"
"keyword:`!yield` returns :const:`None`."
msgstr ""
"Los valores se envían a un generador llamando a su método ``send(value)``. "
"El código del generador se reanuda y la expresión :keyword:`yield` devuelve "
"el *valor* especificado. Si se llama al método regular :meth:`next`, la "
"expresión :keyword:`!yield` devuelve :const:`None`."
#: ../Doc/whatsnew/2.5.rst:463
msgid ""
"Here's the previous example, modified to allow changing the value of the "
"internal counter. ::"
msgstr ""
"Aquí está el ejemplo anterior, modificado para permitir cambiar el valor del "
"contador interno. ::"
#: ../Doc/whatsnew/2.5.rst:476
msgid "And here's an example of changing the counter::"
msgstr "Y aquí hay un ejemplo de cambio de contador::"
#: ../Doc/whatsnew/2.5.rst:493
msgid ""
":keyword:`yield` will usually return :const:`None`, so you should always "
"check for this case. Don't just use its value in expressions unless you're "
"sure that the :meth:`send` method will be the only method used to resume "
"your generator function."
msgstr ""
":keyword:`yield` normalmente devolverá :const:`None`, por lo que siempre "
"debes comprobar este caso. No utilices su valor en las expresiones sin más, "
"a menos que estés seguro de que el método :meth:`send` será el único "
"utilizado para reanudar tu función generadora."
#: ../Doc/whatsnew/2.5.rst:498
msgid ""
"In addition to :meth:`send`, there are two other new methods on generators:"
msgstr ""
"Además de :meth:`send`, hay otros dos nuevos métodos en los generadores:"
#: ../Doc/whatsnew/2.5.rst:500
msgid ""
"``throw(type, value=None, traceback=None)`` is used to raise an exception "
"inside the generator; the exception is raised by the :keyword:`yield` "
"expression where the generator's execution is paused."
msgstr ""
"``throw(type, value=None, traceback=None)`` se utiliza para lanzar una "
"excepción dentro del generador; la excepción es lanzada por la expresión :"
"keyword:`yield` donde la ejecución del generador se pausa."
#: ../Doc/whatsnew/2.5.rst:504
msgid ""
":meth:`close` raises a new :exc:`GeneratorExit` exception inside the "
"generator to terminate the iteration. On receiving this exception, the "
"generator's code must either raise :exc:`GeneratorExit` or :exc:"
"`StopIteration`. Catching the :exc:`GeneratorExit` exception and returning "
"a value is illegal and will trigger a :exc:`RuntimeError`; if the function "
"raises some other exception, that exception is propagated to the caller. :"
"meth:`close` will also be called by Python's garbage collector when the "
"generator is garbage-collected."
msgstr ""
":meth:`close` lanza una nueva excepción :exc:`GeneratorExit` dentro del "
"generador para terminar la iteración. Al recibir esta excepción, el código "
"del generador debe lanzar :exc:`GeneratorExit` o :exc:`StopIteration`. "
"Capturar la excepción :exc:`GeneratorExit` y devolver un valor es ilegal y "
"provocará un :exc:`RuntimeError`; si la función lanza alguna otra excepción, "
"esa excepción se propaga a quien la llama. :meth:`close` también será "
"llamado por el recolector de basura de Python cuando el generador sea "
"recolectado."
#: ../Doc/whatsnew/2.5.rst:512
msgid ""
"If you need to run cleanup code when a :exc:`GeneratorExit` occurs, I "
"suggest using a ``try: ... finally:`` suite instead of catching :exc:"
"`GeneratorExit`."
msgstr ""
"Si necesitas ejecutar código de limpieza cuando se produce un :exc:"
"`GeneratorExit`, te sugiero que utilices un conjunto ``try: ... finally:`` "
"en lugar de atrapar :exc:`GeneratorExit`."
#: ../Doc/whatsnew/2.5.rst:515
msgid ""
"The cumulative effect of these changes is to turn generators from one-way "
"producers of information into both producers and consumers."
msgstr ""
"El efecto acumulativo de estos cambios es que los generadores pasan de ser "
"productores unidireccionales de información a ser tanto productores como "
"consumidores."
#: ../Doc/whatsnew/2.5.rst:518
msgid ""
"Generators also become *coroutines*, a more generalized form of subroutines. "
"Subroutines are entered at one point and exited at another point (the top of "
"the function, and a :keyword:`return` statement), but coroutines can be "
"entered, exited, and resumed at many different points (the :keyword:`yield` "
"statements). We'll have to figure out patterns for using coroutines "
"effectively in Python."
msgstr ""
"Los generadores también se convierten en *corutinas*, una forma más "
"generalizada de subrutinas. Las subrutinas se introducen en un punto y se "
"salen en otro (la parte superior de la función, y una declaración :keyword:"
"`return`), pero las coroutines pueden introducirse, salirse y reanudarse en "
"muchos puntos diferentes (las declaraciones :keyword:`yield`). Tendremos que "
"descubrir patrones para usar coroutines de forma efectiva en Python."
#: ../Doc/whatsnew/2.5.rst:524
msgid ""
"The addition of the :meth:`close` method has one side effect that isn't "
"obvious. :meth:`close` is called when a generator is garbage-collected, so "
"this means the generator's code gets one last chance to run before the "
"generator is destroyed. This last chance means that ``try...finally`` "
"statements in generators can now be guaranteed to work; the :keyword:"
"`finally` clause will now always get a chance to run. The syntactic "
"restriction that you couldn't mix :keyword:`yield` statements with a ``try..."
"finally`` suite has therefore been removed. This seems like a minor bit of "
"language trivia, but using generators and ``try...finally`` is actually "
"necessary in order to implement the :keyword:`with` statement described by :"
"pep:`343`. I'll look at this new statement in the following section."
msgstr ""
"La adición del método :meth:`close` tiene un efecto secundario que no es "
"obvio. :meth:`close` es llamado cuando un generador es recogido por la "
"basura, lo que significa que el código del generador tiene una última "
"oportunidad de ejecutarse antes de que el generador sea destruido. Esta "
"última oportunidad significa que ahora se puede garantizar que las "
"sentencias ``intentar...finalmente`` en los generadores funcionen; la "
"cláusula :keyword:`finally` ahora siempre tendrá una oportunidad de "
"ejecutarse. Por lo tanto, se ha eliminado la restricción sintáctica que "
"impedía mezclar sentencias :keyword:`yield` con un conjunto ``try..."
"finally``. Esto parece una trivialidad menor del lenguaje, pero el uso de "
"generadores y ``try...finally`` es realmente necesario para implementar la "
"sentencia :keyword:`with` descrita por :pep:`343`. Veré esta nueva "
"sentencia en la siguiente sección."
#: ../Doc/whatsnew/2.5.rst:536
msgid ""
"Another even more esoteric effect of this change: previously, the :attr:"
"`gi_frame` attribute of a generator was always a frame object. It's now "
"possible for :attr:`gi_frame` to be ``None`` once the generator has been "
"exhausted."
msgstr ""
"Otro efecto aún más esotérico de este cambio: antes, el atributo :attr:"
"`gi_frame` de un generador era siempre un objeto frame. Ahora es posible "
"que :attr:`gi_frame` sea ``None`` una vez que el generador se ha agotado."
#: ../Doc/whatsnew/2.5.rst:549
msgid ":pep:`342` - Coroutines via Enhanced Generators"
msgstr ":pep:`342` - Coroutines mediante generadores mejorados"
#: ../Doc/whatsnew/2.5.rst:545
msgid ""
"PEP written by Guido van Rossum and Phillip J. Eby; implemented by Phillip "
"J. Eby. Includes examples of some fancier uses of generators as coroutines."
msgstr ""
"PEP escrito por Guido van Rossum y Phillip J. Eby; implementado por Phillip "
"J. Eby. Incluye ejemplos de algunos usos más sofisticados de los "
"generadores como coroutines."
#: ../Doc/whatsnew/2.5.rst:548
msgid ""
"Earlier versions of these features were proposed in :pep:`288` by Raymond "
"Hettinger and :pep:`325` by Samuele Pedroni."
msgstr ""
"Versiones anteriores de estas características fueron propuestas en :pep:"
"`288` por Raymond Hettinger y :pep:`325` por Samuele Pedroni."
#: ../Doc/whatsnew/2.5.rst:552
msgid "https://en.wikipedia.org/wiki/Coroutine"
msgstr "https://en.wikipedia.org/wiki/Coroutine"
#: ../Doc/whatsnew/2.5.rst:552
msgid "The Wikipedia entry for coroutines."
msgstr "La entrada de Wikipedia para las coroutines."
#: ../Doc/whatsnew/2.5.rst:554
#, fuzzy
msgid ""
"https://web.archive.org/web/20160321211320/http://www.sidhe.org/~dan/blog/"
"archives/000178.html"
msgstr "http://www.sidhe.org/~dan/blog/archivos/000178.html"
#: ../Doc/whatsnew/2.5.rst:555
msgid ""
"An explanation of coroutines from a Perl point of view, written by Dan "
"Sugalski."
msgstr ""
"Una explicación de las coroutines desde el punto de vista de Perl, escrita "
"por Dan Sugalski."
#: ../Doc/whatsnew/2.5.rst:563
msgid "PEP 343: The 'with' statement"
msgstr "PEP 343: La declaración \"con"
#: ../Doc/whatsnew/2.5.rst:565
msgid ""
"The ':keyword:`with`' statement clarifies code that previously would use "
"``try...finally`` blocks to ensure that clean-up code is executed. In this "
"section, I'll discuss the statement as it will commonly be used. In the "
"next section, I'll examine the implementation details and show how to write "
"objects for use with this statement."
msgstr ""
"La sentencia ':keyword:`with`' aclara el código que antes utilizaba bloques "
"``try...finally``' para asegurar que se ejecuta el código de limpieza. En "
"esta sección, hablaré de la sentencia tal y como se utiliza habitualmente. "
"En la siguiente sección, examinaré los detalles de la implementación y "
"mostraré cómo escribir objetos para usar con esta sentencia."
#: ../Doc/whatsnew/2.5.rst:571
msgid ""
"The ':keyword:`with`' statement is a new control-flow structure whose basic "
"structure is::"
msgstr ""
"La declaración ':keyword:`with`' es una nueva estructura de flujo de control "
"cuya estructura básica es::"
#: ../Doc/whatsnew/2.5.rst:577
msgid ""
"The expression is evaluated, and it should result in an object that supports "
"the context management protocol (that is, has :meth:`__enter__` and :meth:"
"`__exit__` methods."
msgstr ""