-
-
Notifications
You must be signed in to change notification settings - Fork 405
Expand file tree
/
Copy path2.0.po
More file actions
2363 lines (2181 loc) · 123 KB
/
2.0.po
File metadata and controls
2363 lines (2181 loc) · 123 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-12-08 21:38+0100\n"
"Last-Translator: Cristián Maureira-Fredes <cmaureirafredes@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.0.rst:3
msgid "What's New in Python 2.0"
msgstr "Novedades de Python 2.0"
#: ../Doc/whatsnew/2.0.rst
msgid "Author"
msgstr "Autor"
#: ../Doc/whatsnew/2.0.rst:5
msgid "A.M. Kuchling and Moshe Zadka"
msgstr "A.M. Kuchling y Moshe Zadka"
#: ../Doc/whatsnew/2.0.rst:13
msgid "Introduction"
msgstr "Introducción"
#: ../Doc/whatsnew/2.0.rst:15
msgid ""
"A new release of Python, version 2.0, was released on October 16, 2000. This "
"article covers the exciting new features in 2.0, highlights some other "
"useful changes, and points out a few incompatible changes that may require "
"rewriting code."
msgstr ""
"El 16 de octubre de 2000 se publicó una nueva versión de Python, la 2.0. "
"Este artículo cubre las emocionantes nuevas características de la 2.0, "
"destaca algunos otros cambios útiles y señala algunos cambios incompatibles "
"que pueden requerir reescribir el código."
#: ../Doc/whatsnew/2.0.rst:20
#, fuzzy
msgid ""
"Python's development never completely stops between releases, and a steady "
"flow of bug fixes and improvements are always being submitted. A host of "
"minor fixes, a few optimizations, additional docstrings, and better error "
"messages went into 2.0; to list them all would be impossible, but they're "
"certainly significant. Consult the publicly available CVS logs if you want "
"to see the full list. This progress is due to the five developers working "
"for PythonLabs are now getting paid to spend their days fixing bugs, and "
"also due to the improved communication resulting from moving to SourceForge."
msgstr ""
"El desarrollo de Python nunca se detiene por completo entre versiones, y "
"siempre se presenta un flujo constante de correcciones de errores y mejoras. "
"Una gran cantidad de correcciones menores, algunas optimizaciones, "
"docstrings adicionales y mejores mensajes de error fueron incluidos en la "
"versión 2.0; sería imposible enumerarlos todos, pero son ciertamente "
"significativos. Consulte los registros CVS disponibles públicamente si desea "
"ver la lista completa. Este progreso se debe a que los cinco desarrolladores "
"que trabajan para PythonLabs reciben ahora una remuneración por pasar sus "
"días arreglando errores, y también a la mejora de la comunicación resultante "
"del traslado a SourceForge."
#: ../Doc/whatsnew/2.0.rst:33
msgid "What About Python 1.6?"
msgstr "¿Qué pasa con Python 1.6?"
#: ../Doc/whatsnew/2.0.rst:35
msgid ""
"Python 1.6 can be thought of as the Contractual Obligations Python release. "
"After the core development team left CNRI in May 2000, CNRI requested that a "
"1.6 release be created, containing all the work on Python that had been "
"performed at CNRI. Python 1.6 therefore represents the state of the CVS "
"tree as of May 2000, with the most significant new feature being Unicode "
"support. Development continued after May, of course, so the 1.6 tree "
"received a few fixes to ensure that it's forward-compatible with Python "
"2.0. 1.6 is therefore part of Python's evolution, and not a side branch."
msgstr ""
"Python 1.6 puede considerarse como la versión de Python de las Obligaciones "
"Contractuales. Después de que el equipo principal de desarrollo dejara el "
"CNRI en mayo de 2000, el CNRI pidió que se creara una versión 1.6 que "
"contuviera todo el trabajo sobre Python que se había realizado en el CNRI. "
"Por lo tanto, Python 1.6 representa el estado del árbol CVS en mayo de 2000, "
"siendo la novedad más importante el soporte de Unicode. El desarrollo "
"continuó después de mayo, por supuesto, así que el árbol 1.6 recibió algunas "
"correcciones para asegurar que es compatible con Python 2.0. 1.Por lo tanto, "
"la 6 es parte de la evolución de Python, y no una rama lateral."
#: ../Doc/whatsnew/2.0.rst:44
msgid ""
"So, should you take much interest in Python 1.6? Probably not. The "
"1.6final and 2.0beta1 releases were made on the same day (September 5, "
"2000), the plan being to finalize Python 2.0 within a month or so. If you "
"have applications to maintain, there seems little point in breaking things "
"by moving to 1.6, fixing them, and then having another round of breakage "
"within a month by moving to 2.0; you're better off just going straight to "
"2.0. Most of the really interesting features described in this document are "
"only in 2.0, because a lot of work was done between May and September."
msgstr ""
"Entonces, ¿deberías interesarte mucho por Python 1.6? Probablemente no. Las "
"versiones 1.6final y 2.0beta1 se publicaron el mismo día (5 de septiembre de "
"2000), y el plan es finalizar Python 2.0 en un mes más o menos. Si tienes "
"aplicaciones que mantener, no parece que tenga mucho sentido romper cosas al "
"pasar a la 1.6, arreglarlas, y luego tener otra ronda de roturas dentro de "
"un mes al pasar a la 2.0; es mejor pasar directamente a la 2.0. La mayoría "
"de las características realmente interesantes descritas en este documento "
"sólo están en la 2.0, porque se hizo mucho trabajo entre mayo y septiembre."
#: ../Doc/whatsnew/2.0.rst:57
msgid "New Development Process"
msgstr "Nuevo proceso de desarrollo"
#: ../Doc/whatsnew/2.0.rst:59
msgid ""
"The most important change in Python 2.0 may not be to the code at all, but "
"to how Python is developed: in May 2000 the Python developers began using "
"the tools made available by SourceForge for storing source code, tracking "
"bug reports, and managing the queue of patch submissions. To report bugs or "
"submit patches for Python 2.0, use the bug tracking and patch manager tools "
"available from Python's project page, located at https://sourceforge.net/"
"projects/python/."
msgstr ""
"El cambio más importante en Python 2.0 puede que no sea en el código en "
"absoluto, sino en la forma de desarrollar Python: en mayo de 2000 los "
"desarrolladores de Python comenzaron a utilizar las herramientas puestas a "
"disposición por SourceForge para almacenar el código fuente, rastrear los "
"informes de errores y gestionar la cola de envíos de parches. Para informar "
"de errores o enviar parches para Python 2.0, utilice las herramientas de "
"seguimiento de errores y gestión de parches disponibles en la página del "
"proyecto Python, situada en https://sourceforge.net/projects/python/."
#: ../Doc/whatsnew/2.0.rst:66
msgid ""
"The most important of the services now hosted at SourceForge is the Python "
"CVS tree, the version-controlled repository containing the source code for "
"Python. Previously, there were roughly 7 or so people who had write access "
"to the CVS tree, and all patches had to be inspected and checked in by one "
"of the people on this short list. Obviously, this wasn't very scalable. By "
"moving the CVS tree to SourceForge, it became possible to grant write access "
"to more people; as of September 2000 there were 27 people able to check in "
"changes, a fourfold increase. This makes possible large-scale changes that "
"wouldn't be attempted if they'd have to be filtered through the small group "
"of core developers. For example, one day Peter Schneider-Kamp took it into "
"his head to drop K&R C compatibility and convert the C source for Python to "
"ANSI C. After getting approval on the python-dev mailing list, he launched "
"into a flurry of checkins that lasted about a week, other developers joined "
"in to help, and the job was done. If there were only 5 people with write "
"access, probably that task would have been viewed as \"nice, but not worth "
"the time and effort needed\" and it would never have gotten done."
msgstr ""
"El más importante de los servicios alojados ahora en SourceForge es el árbol "
"CVS de Python, el repositorio de versiones controladas que contiene el "
"código fuente de Python. Anteriormente, había unas 7 personas que tenían "
"acceso de escritura al árbol CVS, y todos los parches tenían que ser "
"inspeccionados y comprobados por una de las personas de esta corta lista. "
"Obviamente, esto no era muy escalable. Al trasladar el árbol CVS a "
"SourceForge, fue posible conceder acceso de escritura a más personas; en "
"septiembre de 2000 había 27 personas que podían revisar los cambios, un "
"aumento de cuatro veces. Esto hace posible cambios a gran escala que no se "
"intentarían si tuvieran que pasar por el pequeño grupo de desarrolladores "
"del núcleo. Por ejemplo, un día a Peter Schneider-Kamp se le ocurrió dejar "
"de lado la compatibilidad con K&R C y convertir el código fuente de Python a "
"ANSI C. Después de obtener la aprobación en la lista de correo de python-"
"dev, se lanzó a una ráfaga de revisiones que duró aproximadamente una "
"semana, otros desarrolladores se unieron para ayudar, y el trabajo estaba "
"hecho. Si sólo hubiera habido 5 personas con acceso de escritura, "
"probablemente esa tarea habría sido considerada como \"agradable, pero no "
"vale la pena el tiempo y el esfuerzo necesarios\" y nunca se habría "
"realizado."
#: ../Doc/whatsnew/2.0.rst:83
msgid ""
"The shift to using SourceForge's services has resulted in a remarkable "
"increase in the speed of development. Patches now get submitted, commented "
"on, revised by people other than the original submitter, and bounced back "
"and forth between people until the patch is deemed worth checking in. Bugs "
"are tracked in one central location and can be assigned to a specific person "
"for fixing, and we can count the number of open bugs to measure progress. "
"This didn't come without a cost: developers now have more e-mail to deal "
"with, more mailing lists to follow, and special tools had to be written for "
"the new environment. For example, SourceForge sends default patch and bug "
"notification e-mail messages that are completely unhelpful, so Ka-Ping Yee "
"wrote an HTML screen-scraper that sends more useful messages."
msgstr ""
"El cambio al uso de los servicios de SourceForge ha dado lugar a un notable "
"aumento de la velocidad de desarrollo. Ahora los parches se envían, se "
"comentan, son revisados por otras personas además del remitente original, y "
"van de un lado a otro hasta que se considera que el parche merece ser "
"revisado. Los errores se rastrean en una ubicación central y se pueden "
"asignar a una persona específica para que los corrija, y podemos contar el "
"número de errores abiertos para medir el progreso. Esto no ha tenido un "
"coste: los desarrolladores tienen ahora más correo electrónico con el que "
"lidiar, más listas de correo que seguir, y se han tenido que escribir "
"herramientas especiales para el nuevo entorno. Por ejemplo, SourceForge "
"envía por defecto mensajes de correo electrónico de notificación de parches "
"y errores que son completamente inútiles, por lo que Ka-Ping Yee escribió un "
"raspador de pantalla HTML que envía mensajes más útiles."
#: ../Doc/whatsnew/2.0.rst:95
msgid ""
"The ease of adding code caused a few initial growing pains, such as code was "
"checked in before it was ready or without getting clear agreement from the "
"developer group. The approval process that has emerged is somewhat similar "
"to that used by the Apache group. Developers can vote +1, +0, -0, or -1 on a "
"patch; +1 and -1 denote acceptance or rejection, while +0 and -0 mean the "
"developer is mostly indifferent to the change, though with a slight positive "
"or negative slant. The most significant change from the Apache model is "
"that the voting is essentially advisory, letting Guido van Rossum, who has "
"Benevolent Dictator For Life status, know what the general opinion is. He "
"can still ignore the result of a vote, and approve or reject a change even "
"if the community disagrees with him."
msgstr ""
"La facilidad para añadir código provocó algunos problemas iniciales de "
"crecimiento, como el hecho de que el código se registrara antes de estar "
"listo o sin obtener un acuerdo claro del grupo de desarrolladores. El "
"proceso de aprobación que ha surgido es algo similar al utilizado por el "
"grupo Apache. Los desarrolladores pueden votar +1, +0, -0 o -1 sobre un "
"parche; +1 y -1 denotan aceptación o rechazo, mientras que +0 y -0 "
"significan que el desarrollador es mayormente indiferente al cambio, aunque "
"con un ligero sesgo positivo o negativo. El cambio más significativo con "
"respecto al modelo de Apache es que la votación es esencialmente consultiva, "
"lo que permite a Guido van Rossum, que tiene el estatus de Dictador "
"Benevolente Vitalicio, saber cuál es la opinión general. Puede seguir "
"ignorando el resultado de una votación y aprobar o rechazar un cambio aunque "
"la comunidad no esté de acuerdo con él."
#: ../Doc/whatsnew/2.0.rst:106
msgid ""
"Producing an actual patch is the last step in adding a new feature, and is "
"usually easy compared to the earlier task of coming up with a good design. "
"Discussions of new features can often explode into lengthy mailing list "
"threads, making the discussion hard to follow, and no one can read every "
"posting to python-dev. Therefore, a relatively formal process has been set "
"up to write Python Enhancement Proposals (PEPs), modelled on the internet "
"RFC process. PEPs are draft documents that describe a proposed new feature, "
"and are continually revised until the community reaches a consensus, either "
"accepting or rejecting the proposal. Quoting from the introduction to :pep:"
"`1`, \"PEP Purpose and Guidelines\":"
msgstr ""
"Producir un parche real es el último paso en la adición de una nueva "
"característica, y suele ser fácil en comparación con la tarea anterior de "
"llegar a un buen diseño. Las discusiones sobre nuevas funcionalidades a "
"menudo pueden explotar en largos hilos de la lista de correo, haciendo que "
"la discusión sea difícil de seguir, y nadie puede leer todos los mensajes en "
"python-dev. Por lo tanto, se ha establecido un proceso relativamente formal "
"para escribir Propuestas de Mejora de Python (PEPs), siguiendo el modelo del "
"proceso RFC de Internet. Las PEP son borradores de documentos que describen "
"una nueva característica propuesta, y se revisan continuamente hasta que la "
"comunidad llega a un consenso, aceptando o rechazando la propuesta. Cita de "
"la introducción de :pep:`1`, \"PEP Purpose and Guidelines\":"
#: ../Doc/whatsnew/2.0.rst:120
msgid ""
"PEP stands for Python Enhancement Proposal. A PEP is a design document "
"providing information to the Python community, or describing a new feature "
"for Python. The PEP should provide a concise technical specification of the "
"feature and a rationale for the feature."
msgstr ""
"PEP son las siglas de Python Enhancement Proposal. Un PEP es un documento de "
"diseño que proporciona información a la comunidad de Python, o que describe "
"una nueva característica para Python. El PEP debe proporcionar una "
"especificación técnica concisa de la característica y una justificación de "
"la misma."
#: ../Doc/whatsnew/2.0.rst:125
msgid ""
"We intend PEPs to be the primary mechanisms for proposing new features, for "
"collecting community input on an issue, and for documenting the design "
"decisions that have gone into Python. The PEP author is responsible for "
"building consensus within the community and documenting dissenting opinions."
msgstr ""
"Pretendemos que los PEPs sean los mecanismos principales para proponer "
"nuevas características, para recoger las opiniones de la comunidad sobre un "
"tema y para documentar las decisiones de diseño que se han tomado en Python. "
"El autor del PEP es responsable de crear consenso dentro de la comunidad y "
"de documentar las opiniones discrepantes."
#: ../Doc/whatsnew/2.0.rst:130
#, fuzzy
msgid ""
"Read the rest of :pep:`1` for the details of the PEP editorial process, "
"style, and format. PEPs are kept in the Python CVS tree on SourceForge, "
"though they're not part of the Python 2.0 distribution, and are also "
"available in HTML form from https://peps.python.org/. As of September 2000, "
"there are 25 PEPS, ranging from :pep:`201`, \"Lockstep Iteration\", to PEP "
"225, \"Elementwise/Objectwise Operators\"."
msgstr ""
"Lee el resto de :pep:`1` para conocer los detalles del proceso editorial, el "
"estilo y el formato de los PEP. Los PEP se mantienen en el árbol CVS de "
"Python en SourceForge, aunque no forman parte de la distribución de Python "
"2.0, y también están disponibles en formato HTML en https://www.python.org/"
"dev/peps/. En septiembre de 2000, había 25 PEPS, desde :pep:`201`, "
"\"Lockstep Iteration\", hasta PEP 225, \"Elementwise/Objectwise Operators\"."
#: ../Doc/whatsnew/2.0.rst:141
msgid "Unicode"
msgstr "Unicode"
#: ../Doc/whatsnew/2.0.rst:143
msgid ""
"The largest new feature in Python 2.0 is a new fundamental data type: "
"Unicode strings. Unicode uses 16-bit numbers to represent characters "
"instead of the 8-bit number used by ASCII, meaning that 65,536 distinct "
"characters can be supported."
msgstr ""
"La mayor novedad de Python 2.0 es un nuevo tipo de datos fundamental: Las "
"cadenas Unicode. Unicode utiliza números de 16 bits para representar los "
"caracteres en lugar de los 8 bits utilizados por ASCII, lo que significa que "
"se pueden admitir 65.536 caracteres distintos."
#: ../Doc/whatsnew/2.0.rst:148
msgid ""
"The final interface for Unicode support was arrived at through countless "
"often-stormy discussions on the python-dev mailing list, and mostly "
"implemented by Marc-André Lemburg, based on a Unicode string type "
"implementation by Fredrik Lundh. A detailed explanation of the interface "
"was written up as :pep:`100`, \"Python Unicode Integration\". This article "
"will simply cover the most significant points about the Unicode interfaces."
msgstr ""
"La interfaz final para el soporte de Unicode se alcanzó a través de "
"innumerables discusiones, a menudo tormentosas, en la lista de correo de "
"python-dev, y fue implementada en su mayor parte por Marc-André Lemburg, "
"basándose en una implementación del tipo de cadena Unicode de Fredrik Lundh. "
"Una explicación detallada de la interfaz fue escrita como :pep:`100`, "
"\"Python Unicode Integration\". Este artículo se limitará a cubrir los "
"puntos más significativos de las interfaces Unicode."
#: ../Doc/whatsnew/2.0.rst:155
msgid ""
"In Python source code, Unicode strings are written as ``u\"string\"``. "
"Arbitrary Unicode characters can be written using a new escape sequence, "
"``\\uHHHH``, where *HHHH* is a 4-digit hexadecimal number from 0000 to "
"FFFF. The existing ``\\xHHHH`` escape sequence can also be used, and octal "
"escapes can be used for characters up to U+01FF, which is represented by "
"``\\777``."
msgstr ""
"En el código fuente de Python, las cadenas Unicode se escriben como ``u "
"\"cadena\"``. Los caracteres Unicode arbitrarios pueden escribirse "
"utilizando una nueva secuencia de escape, ``uHHHH``, donde *HHHH* es un "
"número hexadecimal de 4 dígitos desde 0000 hasta FFFF. También se puede "
"utilizar la secuencia de escape existente ``xHHHH``, y se pueden utilizar "
"escapes octales para caracteres hasta U+01FF, que se representa con ``777``."
#: ../Doc/whatsnew/2.0.rst:161
msgid ""
"Unicode strings, just like regular strings, are an immutable sequence type. "
"They can be indexed and sliced, but not modified in place. Unicode strings "
"have an ``encode( [encoding] )`` method that returns an 8-bit string in the "
"desired encoding. Encodings are named by strings, such as ``'ascii'``, "
"``'utf-8'``, ``'iso-8859-1'``, or whatever. A codec API is defined for "
"implementing and registering new encodings that are then available "
"throughout a Python program. If an encoding isn't specified, the default "
"encoding is usually 7-bit ASCII, though it can be changed for your Python "
"installation by calling the ``sys.setdefaultencoding(encoding)`` function in "
"a customized version of :file:`site.py`."
msgstr ""
"Las cadenas Unicode, al igual que las cadenas normales, son un tipo de "
"secuencia inmutable. Pueden ser indexadas y cortadas, pero no modificadas en "
"su lugar. Las cadenas Unicode tienen un método ``encode( [encoding] )`` que "
"retorna una cadena de 8 bits en la codificación deseada. Las codificaciones "
"son nombradas por cadenas, como ``'ascii'``, ``'utf-8'``, ``'iso-8859-1'``, "
"o lo que sea. Se define una API de códecs para implementar y registrar "
"nuevas codificaciones que luego están disponibles en todo el programa "
"Python. Si no se especifica una codificación, la codificación por defecto "
"suele ser ASCII de 7 bits, aunque puede cambiarse para tu instalación de "
"Python llamando a la función ``sys.setdefaultencoding(encoding)`` en una "
"versión personalizada de :file:`site.py`."
#: ../Doc/whatsnew/2.0.rst:172
msgid ""
"Combining 8-bit and Unicode strings always coerces to Unicode, using the "
"default ASCII encoding; the result of ``'a' + u'bc'`` is ``u'abc'``."
msgstr ""
"La combinación de cadenas de 8 bits y Unicode siempre fuerza conversión a "
"Unicode, utilizando la codificación ASCII por defecto; el resultado de ``'a' "
"+ u'bc'`` es ``u'abc'``."
#: ../Doc/whatsnew/2.0.rst:175
msgid ""
"New built-in functions have been added, and existing built-ins modified to "
"support Unicode:"
msgstr ""
"Se han añadido nuevas funciones incorporadas y se han modificado las "
"existentes para que sean compatibles con Unicode:"
#: ../Doc/whatsnew/2.0.rst:178
msgid ""
"``unichr(ch)`` returns a Unicode string 1 character long, containing the "
"character *ch*."
msgstr ""
"``unichr(ch)`` retorna una cadena Unicode de 1 carácter, que contiene el "
"carácter *ch*."
#: ../Doc/whatsnew/2.0.rst:181
msgid ""
"``ord(u)``, where *u* is a 1-character regular or Unicode string, returns "
"the number of the character as an integer."
msgstr ""
"``ord(u)``, donde *u* es una cadena regular o Unicode de 1 carácter, retorna "
"el número del carácter como un entero."
#: ../Doc/whatsnew/2.0.rst:184
msgid ""
"``unicode(string [, encoding] [, errors] )`` creates a Unicode string from "
"an 8-bit string. ``encoding`` is a string naming the encoding to use. The "
"``errors`` parameter specifies the treatment of characters that are invalid "
"for the current encoding; passing ``'strict'`` as the value causes an "
"exception to be raised on any encoding error, while ``'ignore'`` causes "
"errors to be silently ignored and ``'replace'`` uses U+FFFD, the official "
"replacement character, in case of any problems."
msgstr ""
"``unicode(string [, encoding] [, errors] )`` crea una cadena Unicode a "
"partir de una cadena de 8 bits. ``encoding`` es una cadena que nombra la "
"codificación a utilizar. El parámetro ``errors`` especifica el tratamiento "
"de los caracteres que no son válidos para la codificación actual; pasar "
"``'strict`` como valor hace que se lance una excepción en cualquier error de "
"codificación, mientras que ``'ignore`` hace que los errores se ignoren "
"silenciosamente y ``'replace`` utiliza U+FFFD, el carácter oficial de "
"reemplazo, en caso de cualquier problema."
#: ../Doc/whatsnew/2.0.rst:192
msgid ""
"The ``exec`` statement, and various built-ins such as ``eval()``, "
"``getattr()``, and ``setattr()`` will also accept Unicode strings as well as "
"regular strings. (It's possible that the process of fixing this missed some "
"built-ins; if you find a built-in function that accepts strings but doesn't "
"accept Unicode strings at all, please report it as a bug.)"
msgstr ""
"La sentencia ``exec``, y varias funciones integradas como ``eval()``, "
"``getattr()``, y ``setattr()`` también aceptarán cadenas Unicode así como "
"cadenas regulares. (Es posible que en el proceso de corrección de esto se "
"hayan pasado por alto algunas funciones incorporadas; si encuentra una "
"función incorporada que acepte cadenas pero que no acepte cadenas Unicode en "
"absoluto, por favor, infórmelo como un error)"
#: ../Doc/whatsnew/2.0.rst:198
msgid ""
"A new module, :mod:`unicodedata`, provides an interface to Unicode character "
"properties. For example, ``unicodedata.category(u'A')`` returns the 2-"
"character string 'Lu', the 'L' denoting it's a letter, and 'u' meaning that "
"it's uppercase. ``unicodedata.bidirectional(u'\\u0660')`` returns 'AN', "
"meaning that U+0660 is an Arabic number."
msgstr ""
"Un nuevo módulo, :mod:`unicodedata`, proporciona una interfaz para las "
"propiedades de los caracteres Unicode. Por ejemplo, ``unicodedata."
"category(u'A')`` retorna la cadena de 2 caracteres 'Lu', la 'L' denota que "
"es una letra, y la 'u' significa que es mayúscula. ``unicodedata."
"bidirectional(u'\\u0660')`` retorna 'AN', lo que significa que U+0660 es un "
"número árabe."
#: ../Doc/whatsnew/2.0.rst:204
msgid ""
"The :mod:`codecs` module contains functions to look up existing encodings "
"and register new ones. Unless you want to implement a new encoding, you'll "
"most often use the ``codecs.lookup(encoding)`` function, which returns a 4-"
"element tuple: ``(encode_func, decode_func, stream_reader, stream_writer)``."
msgstr ""
"El módulo :mod:`codecs` contiene funciones para buscar codificaciones "
"existentes y registrar otras nuevas. A menos que quiera implementar una "
"nueva codificación, lo más habitual es que utilice la función ``codecs."
"lookup(encoding)``, que retorna una tupla de 4 elementos: ``(encode_func, "
"decode_func, stream_reader, stream_writer)``."
#: ../Doc/whatsnew/2.0.rst:209
msgid ""
"*encode_func* is a function that takes a Unicode string, and returns a 2-"
"tuple ``(string, length)``. *string* is an 8-bit string containing a "
"portion (perhaps all) of the Unicode string converted into the given "
"encoding, and *length* tells you how much of the Unicode string was "
"converted."
msgstr ""
"*encode_func* es una función que toma una cadena Unicode, y retorna una 2-"
"tupla ``(string, length)``. *string* es una cadena de 8 bits que contiene "
"una porción (tal vez toda) de la cadena Unicode convertida a la codificación "
"dada, y *longitud* indica la cantidad de cadena Unicode convertida."
#: ../Doc/whatsnew/2.0.rst:214
msgid ""
"*decode_func* is the opposite of *encode_func*, taking an 8-bit string and "
"returning a 2-tuple ``(ustring, length)``, consisting of the resulting "
"Unicode string *ustring* and the integer *length* telling how much of the 8-"
"bit string was consumed."
msgstr ""
"*decode_func* es lo opuesto a *encode_func*, tomando una cadena de 8 bits y "
"retornando una 2-tupla ``(ustring, length)``, que consiste en la cadena "
"Unicode resultante *ustring* y el entero *length* que dice cuánto de la "
"cadena de 8 bits se consumió."
#: ../Doc/whatsnew/2.0.rst:219
msgid ""
"*stream_reader* is a class that supports decoding input from a stream. "
"*stream_reader(file_obj)* returns an object that supports the :meth:`read`, :"
"meth:`readline`, and :meth:`readlines` methods. These methods will all "
"translate from the given encoding and return Unicode strings."
msgstr ""
"*stream_reader* es una clase que soporta la decodificación de la entrada de "
"un flujo. *stream_reader(file_obj)* retorna un objeto que soporta los "
"métodos :meth:`read`, :meth:`readline` y :meth:`readlines`. Todos estos "
"métodos traducirán desde la codificación dada y retornarán cadenas Unicode."
#: ../Doc/whatsnew/2.0.rst:224
msgid ""
"*stream_writer*, similarly, is a class that supports encoding output to a "
"stream. *stream_writer(file_obj)* returns an object that supports the :meth:"
"`write` and :meth:`writelines` methods. These methods expect Unicode "
"strings, translating them to the given encoding on output."
msgstr ""
"*stream_writer*, de forma similar, es una clase que soporta la codificación "
"de la salida a un flujo. *stream_writer(file_obj)* retorna un objeto que "
"soporta los métodos :meth:`write` y :meth:`writelines`. Estos métodos "
"esperan cadenas Unicode, traduciéndolas a la codificación dada en la salida."
#: ../Doc/whatsnew/2.0.rst:229
msgid ""
"For example, the following code writes a Unicode string into a file, "
"encoding it as UTF-8::"
msgstr ""
"Por ejemplo, el siguiente código escribe una cadena Unicode en un archivo, "
"codificándola como UTF-8::"
#: ../Doc/whatsnew/2.0.rst:243
msgid "The following code would then read UTF-8 input from the file::"
msgstr "El siguiente código leería la entrada UTF-8 del archivo::"
#: ../Doc/whatsnew/2.0.rst:249
msgid ""
"Unicode-aware regular expressions are available through the :mod:`re` "
"module, which has a new underlying implementation called SRE written by "
"Fredrik Lundh of Secret Labs AB."
msgstr ""
"Las expresiones regulares compatibles con Unicode están disponibles a través "
"del módulo :mod:`re`, que tiene una nueva implementación subyacente llamada "
"SRE escrita por Fredrik Lundh de Secret Labs AB."
#: ../Doc/whatsnew/2.0.rst:253
msgid ""
"A ``-U`` command line option was added which causes the Python compiler to "
"interpret all string literals as Unicode string literals. This is intended "
"to be used in testing and future-proofing your Python code, since some "
"future version of Python may drop support for 8-bit strings and provide only "
"Unicode strings."
msgstr ""
"Se ha añadido una opción de línea de comandos ``-U`` que hace que el "
"compilador de Python interprete todos los literales de cadena como literales "
"de cadena Unicode. Esta opción está pensada para ser utilizada en las "
"pruebas y para asegurar el futuro de su código Python, ya que alguna versión "
"futura de Python puede dejar de soportar cadenas de 8 bits y proporcionar "
"sólo cadenas Unicode."
#: ../Doc/whatsnew/2.0.rst:262
msgid "List Comprehensions"
msgstr "Comprensión de listas"
#: ../Doc/whatsnew/2.0.rst:264
msgid ""
"Lists are a workhorse data type in Python, and many programs manipulate a "
"list at some point. Two common operations on lists are to loop over them, "
"and either pick out the elements that meet a certain criterion, or apply "
"some function to each element. For example, given a list of strings, you "
"might want to pull out all the strings containing a given substring, or "
"strip off trailing whitespace from each line."
msgstr ""
"Las listas son un tipo de datos muy útil en Python, y muchos programas "
"manipulan una lista en algún momento. Dos operaciones comunes en las listas "
"son hacer un bucle sobre ellas, y escoger los elementos que cumplen un "
"cierto criterio, o aplicar alguna función a cada elemento. Por ejemplo, dada "
"una lista de cadenas, podrías querer sacar todas las cadenas que contengan "
"una determinada subcadena, o quitar los espacios en blanco de cada línea."
#: ../Doc/whatsnew/2.0.rst:271
msgid ""
"The existing :func:`map` and :func:`filter` functions can be used for this "
"purpose, but they require a function as one of their arguments. This is "
"fine if there's an existing built-in function that can be passed directly, "
"but if there isn't, you have to create a little function to do the required "
"work, and Python's scoping rules make the result ugly if the little function "
"needs additional information. Take the first example in the previous "
"paragraph, finding all the strings in the list containing a given "
"substring. You could write the following to do it::"
msgstr ""
"Las funciones :func:`map` y :func:`filter` existentes pueden usarse para "
"este propósito, pero requieren una función como uno de sus argumentos. Esto "
"está bien si hay una función incorporada que se puede pasar directamente, "
"pero si no la hay, hay que crear una pequeña función para hacer el trabajo "
"requerido, y las reglas de ámbito de Python hacen que el resultado sea feo "
"si la pequeña función necesita información adicional. Tomemos el primer "
"ejemplo del párrafo anterior, encontrar todas las cadenas de la lista que "
"contienen una subcadena dada. Podrías escribir lo siguiente para hacerlo::"
#: ../Doc/whatsnew/2.0.rst:286
msgid ""
"Because of Python's scoping rules, a default argument is used so that the "
"anonymous function created by the :keyword:`lambda` expression knows what "
"substring is being searched for. List comprehensions make this cleaner::"
msgstr ""
"Debido a las reglas de ámbito de Python, se utiliza un argumento por defecto "
"para que la función anónima creada por la expresión :keyword:`lambda` sepa "
"qué subcadena se está buscando. Las comprensiones de lista hacen esto más "
"limpio::"
#: ../Doc/whatsnew/2.0.rst:292
msgid "List comprehensions have the form::"
msgstr "Las comprensiones de listas tienen la forma::"
#: ../Doc/whatsnew/2.0.rst:299
msgid ""
"The :keyword:`!for`...\\ :keyword:`!in` clauses contain the sequences to be "
"iterated over. The sequences do not have to be the same length, because "
"they are *not* iterated over in parallel, but from left to right; this is "
"explained more clearly in the following paragraphs. The elements of the "
"generated list will be the successive values of *expression*. The final :"
"keyword:`!if` clause is optional; if present, *expression* is only evaluated "
"and added to the result if *condition* is true."
msgstr ""
"Las cláusulas :keyword:`!for`...\\ :keyword:`!in` contienen las secuencias a "
"iterar. Las secuencias no tienen por qué tener la misma longitud, ya que no "
"se itera sobre ellas en paralelo, sino de izquierda a derecha; esto se "
"explica más claramente en los párrafos siguientes. Los elementos de la lista "
"generada serán los valores sucesivos de la *expresión*. La cláusula final :"
"keyword:`!if` es opcional; si está presente, la *expresión* sólo se evalúa y "
"se añade al resultado si la *condición* es verdadera."
#: ../Doc/whatsnew/2.0.rst:307
msgid ""
"To make the semantics very clear, a list comprehension is equivalent to the "
"following Python code::"
msgstr ""
"Para dejar muy clara la semántica, una comprensión de lista equivale al "
"siguiente código de Python::"
#: ../Doc/whatsnew/2.0.rst:319
msgid ""
"This means that when there are multiple :keyword:`!for`...\\ :keyword:`!in` "
"clauses, the resulting list will be equal to the product of the lengths of "
"all the sequences. If you have two lists of length 3, the output list is 9 "
"elements long::"
msgstr ""
"Esto significa que cuando hay múltiples cláusulas :keyword:`!for`...\\ :"
"keyword:`!in`, la lista resultante será igual al producto de las longitudes "
"de todas las secuencias. Si tiene dos listas de longitud 3, la lista de "
"salida tendrá 9 elementos::"
#: ../Doc/whatsnew/2.0.rst:330
msgid ""
"To avoid introducing an ambiguity into Python's grammar, if *expression* is "
"creating a tuple, it must be surrounded with parentheses. The first list "
"comprehension below is a syntax error, while the second one is correct::"
msgstr ""
"Para evitar introducir una ambigüedad en la gramática de Python, si "
"*expresión* está creando una tupla, debe estar rodeada de paréntesis. La "
"primera comprensión de la lista a continuación es un error de sintaxis, "
"mientras que la segunda es correcta::"
#: ../Doc/whatsnew/2.0.rst:339
msgid ""
"The idea of list comprehensions originally comes from the functional "
"programming language Haskell (https://www.haskell.org). Greg Ewing argued "
"most effectively for adding them to Python and wrote the initial list "
"comprehension patch, which was then discussed for a seemingly endless time "
"on the python-dev mailing list and kept up-to-date by Skip Montanaro."
msgstr ""
"La idea de las comprensiones de listas procede originalmente del lenguaje de "
"programación funcional Haskell (https://www.haskell.org). Greg Ewing fue el "
"que más abogó por añadirlas a Python y escribió el parche inicial de "
"comprensión de listas, que luego se discutió durante un tiempo aparentemente "
"interminable en la lista de correo de python-dev y se mantuvo actualizada "
"por Skip Montanaro."
#: ../Doc/whatsnew/2.0.rst:349
msgid "Augmented Assignment"
msgstr "Asignación aumentada"
#: ../Doc/whatsnew/2.0.rst:351
msgid ""
"Augmented assignment operators, another long-requested feature, have been "
"added to Python 2.0. Augmented assignment operators include ``+=``, ``-=``, "
"``*=``, and so forth. For example, the statement ``a += 2`` increments the "
"value of the variable ``a`` by 2, equivalent to the slightly lengthier ``a "
"= a + 2``."
msgstr ""
"Los operadores de asignación aumentados, otra característica largamente "
"solicitada, han sido añadidos a Python 2.0. Los operadores de asignación "
"aumentados incluyen ``+=``, ``-=``, ``*=``, etc. Por ejemplo, la sentencia "
"``a += 2`` incrementa el valor de la variable ``a`` en 2, lo que equivale a "
"la sentencia algo más larga ``a = a + 2``."
#: ../Doc/whatsnew/2.0.rst:356
msgid ""
"The full list of supported assignment operators is ``+=``, ``-=``, ``*=``, "
"``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, and ``<<=``. "
"Python classes can override the augmented assignment operators by defining "
"methods named :meth:`__iadd__`, :meth:`__isub__`, etc. For example, the "
"following :class:`Number` class stores a number and supports using += to "
"create a new instance with an incremented value."
msgstr ""
"La lista completa de operadores de asignación soportados es ``+=``, ``-=``, "
"``*=``, ``/=``, ``%=``, ``**=``, ``&=``, ``|=``, ``^=``, ``>>=``, y ``<=``. "
"Las clases de Python pueden anular los operadores de asignación aumentados "
"definiendo métodos llamados :meth:`__iadd__`, :meth:`__isub__`, etc. Por "
"ejemplo, la siguiente clase :class:`Number` almacena un número y soporta el "
"uso de += para crear una nueva instancia con un valor incrementado."
#: ../Doc/whatsnew/2.0.rst:377
msgid ""
"The :meth:`__iadd__` special method is called with the value of the "
"increment, and should return a new instance with an appropriately modified "
"value; this return value is bound as the new value of the variable on the "
"left-hand side."
msgstr ""
"El método especial :meth:`__iadd__` es llamado con el valor del incremento, "
"y debe retornar una nueva instancia con un valor adecuadamente modificado; "
"este valor de retorno se vincula como el nuevo valor de la variable del lado "
"izquierdo."
#: ../Doc/whatsnew/2.0.rst:381
msgid ""
"Augmented assignment operators were first introduced in the C programming "
"language, and most C-derived languages, such as :program:`awk`, C++, Java, "
"Perl, and PHP also support them. The augmented assignment patch was "
"implemented by Thomas Wouters."
msgstr ""
"Los operadores de asignación aumentada se introdujeron por primera vez en el "
"lenguaje de programación C, y la mayoría de los lenguajes derivados de C, "
"como :program:`awk`, C++, Java, Perl y PHP también los soportan. El parche "
"de asignación aumentada fue implementado por Thomas Wouters."
#: ../Doc/whatsnew/2.0.rst:390
msgid "String Methods"
msgstr "Métodos de cadena de caracteres"
#: ../Doc/whatsnew/2.0.rst:392
msgid ""
"Until now string-manipulation functionality was in the :mod:`string` module, "
"which was usually a front-end for the :mod:`strop` module written in C. The "
"addition of Unicode posed a difficulty for the :mod:`strop` module, because "
"the functions would all need to be rewritten in order to accept either 8-bit "
"or Unicode strings. For functions such as :func:`string.replace`, which "
"takes 3 string arguments, that means eight possible permutations, and "
"correspondingly complicated code."
msgstr ""
"Hasta ahora, la funcionalidad de manipulación de cadenas de caracteres "
"estaba en el módulo :mod:`string`, que normalmente era un front-end para el "
"módulo :mod:`strop` escrito en C. La adición de Unicode supuso una "
"dificultad para el módulo :mod:`strop`, porque todas las funciones tendrían "
"que ser reescritas para aceptar cadenas de 8 bits o Unicode. Para funciones "
"como :func:`string.replace`, que toma 3 argumentos de cadena, eso significa "
"ocho posibles permutaciones, y el correspondiente código complicado."
#: ../Doc/whatsnew/2.0.rst:400
msgid ""
"Instead, Python 2.0 pushes the problem onto the string type, making string "
"manipulation functionality available through methods on both 8-bit strings "
"and Unicode strings. ::"
msgstr ""
"En cambio, Python 2.0 traslada el problema al tipo de cadena de caracteres, "
"haciendo que la funcionalidad de manipulación de cadenas esté disponible a "
"través de métodos tanto en cadenas de 8 bits como en cadenas Unicode. ::"
#: ../Doc/whatsnew/2.0.rst:411
msgid ""
"One thing that hasn't changed, a noteworthy April Fools' joke "
"notwithstanding, is that Python strings are immutable. Thus, the string "
"methods return new strings, and do not modify the string on which they "
"operate."
msgstr ""
"Una cosa que no ha cambiado, a pesar de una notable broma de April Fools, es "
"que las cadenas de Python son inmutables. Así, los métodos de cadenas "
"retornan cadenas nuevas, y no modifican la cadena sobre la que operan."
#: ../Doc/whatsnew/2.0.rst:415
msgid ""
"The old :mod:`string` module is still around for backwards compatibility, "
"but it mostly acts as a front-end to the new string methods."
msgstr ""
"El antiguo módulo :mod:`string` sigue existiendo por compatibilidad con el "
"pasado, pero actúa principalmente como un front-end para los nuevos métodos "
"de cadena de caracteres."
#: ../Doc/whatsnew/2.0.rst:418
msgid ""
"Two methods which have no parallel in pre-2.0 versions, although they did "
"exist in JPython for quite some time, are :meth:`startswith` and :meth:"
"`endswith`. ``s.startswith(t)`` is equivalent to ``s[:len(t)] == t``, while "
"``s.endswith(t)`` is equivalent to ``s[-len(t):] == t``."
msgstr ""
"Dos métodos que no tienen paralelo en las versiones anteriores a la 2.0, "
"aunque existieron en JPython durante bastante tiempo, son :meth:`startswith` "
"y :meth:`endswith`. ``s.startswith(t)`` es equivalente a ``s[:len(t)] == "
"t``, mientras que ``s.endswith(t)`` es equivalente a ``s[-len(t):] == t``."
#: ../Doc/whatsnew/2.0.rst:423
msgid ""
"One other method which deserves special mention is :meth:`join`. The :meth:"
"`join` method of a string receives one parameter, a sequence of strings, and "
"is equivalent to the :func:`string.join` function from the old :mod:`string` "
"module, with the arguments reversed. In other words, ``s.join(seq)`` is "
"equivalent to the old ``string.join(seq, s)``."
msgstr ""
"Otro método que merece una mención especial es :meth:`join`. El método :meth:"
"`join` de una cadena recibe un parámetro, una secuencia de cadenas, y es "
"equivalente a la función :func:`string.join` del antiguo módulo :mod:"
"`string`, con los argumentos invertidos. En otras palabras, ``s.join(seq)`` "
"es equivalente a la antigua ``string.join(seq, s)``."
#: ../Doc/whatsnew/2.0.rst:433
msgid "Garbage Collection of Cycles"
msgstr "Recogida de basura de los ciclos"
#: ../Doc/whatsnew/2.0.rst:435
msgid ""
"The C implementation of Python uses reference counting to implement garbage "
"collection. Every Python object maintains a count of the number of "
"references pointing to itself, and adjusts the count as references are "
"created or destroyed. Once the reference count reaches zero, the object is "
"no longer accessible, since you need to have a reference to an object to "
"access it, and if the count is zero, no references exist any longer."
msgstr ""
"La implementación en C de Python utiliza el conteo de referencias para "
"implementar la recolección de basura. Cada objeto de Python mantiene un "
"recuento del número de referencias que apuntan a sí mismo, y ajusta el "
"recuento a medida que se crean o destruyen referencias. Una vez que el "
"recuento de referencias llega a cero, el objeto deja de ser accesible, ya "
"que es necesario tener una referencia a un objeto para acceder a él, y si el "
"recuento es cero, ya no existen referencias."
#: ../Doc/whatsnew/2.0.rst:442
msgid ""
"Reference counting has some pleasant properties: it's easy to understand and "
"implement, and the resulting implementation is portable, fairly fast, and "
"reacts well with other libraries that implement their own memory handling "
"schemes. The major problem with reference counting is that it sometimes "
"doesn't realise that objects are no longer accessible, resulting in a memory "
"leak. This happens when there are cycles of references."
msgstr ""
"El conteo de referencias tiene algunas propiedades agradables: es fácil de "
"entender e implementar, y la implementación resultante es portable, bastante "
"rápida, y reacciona bien con otras bibliotecas que implementan sus propios "
"esquemas de manejo de memoria. El mayor problema del conteo de referencias "
"es que a veces no se da cuenta de que los objetos ya no son accesibles, lo "
"que provoca una fuga de memoria. Esto ocurre cuando hay ciclos de "
"referencias."
#: ../Doc/whatsnew/2.0.rst:449
msgid ""
"Consider the simplest possible cycle, a class instance which has a "
"reference to itself::"
msgstr ""
"Consideremos el ciclo más simple posible, una instancia de clase que tiene "
"una referencia a sí misma::"
#: ../Doc/whatsnew/2.0.rst:455
msgid ""
"After the above two lines of code have been executed, the reference count of "
"``instance`` is 2; one reference is from the variable named ``'instance'``, "
"and the other is from the ``myself`` attribute of the instance."
msgstr ""
"Después de ejecutar las dos líneas de código anteriores, la cuenta de "
"referencias de ``instance`` es 2; una referencia es de la variable llamada "
"``'instance``, y la otra es del atributo ``myself`` de la instancia."
#: ../Doc/whatsnew/2.0.rst:459
msgid ""
"If the next line of code is ``del instance``, what happens? The reference "
"count of ``instance`` is decreased by 1, so it has a reference count of 1; "
"the reference in the ``myself`` attribute still exists. Yet the instance is "
"no longer accessible through Python code, and it could be deleted. Several "
"objects can participate in a cycle if they have references to each other, "
"causing all of the objects to be leaked."
msgstr ""
"Si la siguiente línea de código es ``del instance``, ¿qué ocurre? La cuenta "
"de referencias de ``instance`` se reduce en 1, por lo que tiene una cuenta "
"de referencias de 1; la referencia en el atributo ``myself`` sigue "
"existiendo. Sin embargo, la instancia ya no es accesible a través del código "
"de Python, y podría ser eliminada. Varios objetos pueden participar en un "
"ciclo si tienen referencias entre sí, haciendo que todos los objetos se "
"filtren."
#: ../Doc/whatsnew/2.0.rst:466
msgid ""
"Python 2.0 fixes this problem by periodically executing a cycle detection "
"algorithm which looks for inaccessible cycles and deletes the objects "
"involved. A new :mod:`gc` module provides functions to perform a garbage "
"collection, obtain debugging statistics, and tuning the collector's "
"parameters."
msgstr ""
"Python 2.0 soluciona este problema ejecutando periódicamente un algoritmo de "
"detección de ciclos que busca los ciclos inaccesibles y borra los objetos "
"implicados. Un nuevo módulo :mod:`gc` proporciona funciones para realizar "
"una recolección de basura, obtener estadísticas de depuración y afinar los "
"parámetros del recolector."
#: ../Doc/whatsnew/2.0.rst:471
msgid ""
"Running the cycle detection algorithm takes some time, and therefore will "
"result in some additional overhead. It is hoped that after we've gotten "
"experience with the cycle collection from using 2.0, Python 2.1 will be able "
"to minimize the overhead with careful tuning. It's not yet obvious how much "
"performance is lost, because benchmarking this is tricky and depends "
"crucially on how often the program creates and destroys objects. The "
"detection of cycles can be disabled when Python is compiled, if you can't "
"afford even a tiny speed penalty or suspect that the cycle collection is "
"buggy, by specifying the :option:`!--without-cycle-gc` switch when running "
"the :program:`configure` script."
msgstr ""
"Ejecutar el algoritmo de detección de ciclos lleva algo de tiempo, y por lo "
"tanto resultará en una sobrecarga adicional. Se espera que después de que "
"hayamos adquirido experiencia con la recogida de ciclos al utilizar la "
"versión 2.0, Python 2.1 sea capaz de minimizar la sobrecarga con un "
"cuidadoso ajuste. Todavía no es obvio cuánto rendimiento se pierde, porque "
"la evaluación comparativa de esto es difícil y depende crucialmente de la "
"frecuencia con la que el programa crea y destruye objetos. La detección de "
"ciclos puede ser desactivada cuando Python es compilado, si no puede "
"permitirse ni siquiera una pequeña penalización de velocidad o sospecha que "
"la recolección de ciclos es un error, especificando la opción :option:`!--"
"without-cycle-gc` cuando se ejecuta el script :program:`configure`."
#: ../Doc/whatsnew/2.0.rst:482
msgid ""
"Several people tackled this problem and contributed to a solution. An early "
"implementation of the cycle detection approach was written by Toby Kelsey. "
"The current algorithm was suggested by Eric Tiedemann during a visit to "
"CNRI, and Guido van Rossum and Neil Schemenauer wrote two different "
"implementations, which were later integrated by Neil. Lots of other people "
"offered suggestions along the way; the March 2000 archives of the python-dev "
"mailing list contain most of the relevant discussion, especially in the "
"threads titled \"Reference cycle collection for Python\" and \"Finalization "
"again\"."
msgstr ""
"Varias personas abordaron este problema y contribuyeron a una solución. Una "
"primera implementación del enfoque de detección de ciclos fue escrita por "
"Toby Kelsey. El algoritmo actual fue sugerido por Eric Tiedemann durante una "
"visita al CNRI, y Guido van Rossum y Neil Schemenauer escribieron dos "
"implementaciones diferentes, que posteriormente fueron integradas por Neil. "
"Muchas otras personas ofrecieron sugerencias a lo largo del camino; los "
"archivos de marzo de 2000 de la lista de correo python-dev contienen la "
"mayor parte de la discusión relevante, especialmente en los hilos titulados "
"\"Colección de ciclos de referencia para Python\" y \"Finalización de "
"nuevo\"."
#: ../Doc/whatsnew/2.0.rst:495
msgid "Other Core Changes"
msgstr "Otros cambios en el núcleo"
#: ../Doc/whatsnew/2.0.rst:497
msgid ""
"Various minor changes have been made to Python's syntax and built-in "
"functions. None of the changes are very far-reaching, but they're handy "
"conveniences."
msgstr ""
"Se han realizado varios cambios menores en la sintaxis y las funciones "
"incorporadas de Python. Ninguno de los cambios es de gran alcance, pero son "
"conveniencias prácticas."
#: ../Doc/whatsnew/2.0.rst:502
msgid "Minor Language Changes"
msgstr "Cambios menores del lenguaje"
#: ../Doc/whatsnew/2.0.rst:504
msgid ""
"A new syntax makes it more convenient to call a given function with a tuple "
"of arguments and/or a dictionary of keyword arguments. In Python 1.5 and "
"earlier, you'd use the :func:`apply` built-in function: ``apply(f, args, "
"kw)`` calls the function :func:`f` with the argument tuple *args* and the "
"keyword arguments in the dictionary *kw*. :func:`apply` is the same in "
"2.0, but thanks to a patch from Greg Ewing, ``f(*args, **kw)`` is a shorter "
"and clearer way to achieve the same effect. This syntax is symmetrical with "
"the syntax for defining functions::"
msgstr ""
"Una nueva sintaxis hace más conveniente llamar a una función dada con una "
"tupla de argumentos y/o un diccionario de argumentos de palabras clave. En "
"Python 1.5 y anteriores, se utilizaba la función incorporada :func:`apply`: "
"``apply(f, args, kw)`` llama a la función :func:`f` con la tupla de "
"argumentos *args* y los argumentos de palabras clave en el diccionario "
"*kw*. :func:`apply` es lo mismo en 2.0, pero gracias a un parche de Greg "
"Ewing, ``f(*args, **kw)`` es una forma más corta y clara de conseguir el "
"mismo efecto. Esta sintaxis es simétrica con la sintaxis para definir "
"funciones::"
#: ../Doc/whatsnew/2.0.rst:518
msgid ""
"The ``print`` statement can now have its output directed to a file-like "
"object by following the ``print`` with ``>> file``, similar to the "
"redirection operator in Unix shells. Previously you'd either have to use "
"the :meth:`write` method of the file-like object, which lacks the "
"convenience and simplicity of ``print``, or you could assign a new value to "
"``sys.stdout`` and then restore the old value. For sending output to "
"standard error, it's much easier to write this::"
msgstr ""
"La sentencia ``print`` puede ahora tener su salida dirigida a un objeto tipo "