diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0ec9648d0f..f970c8bc1b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/JulienPalard/powrap - rev: main + rev: v0.4.0 hooks: - id: powrap - repo: local @@ -11,7 +11,7 @@ repos: language: python # This one requires package ``hunspell-es_es`` in Archlinux - repo: https://github.com/AFPy/pospell - rev: v1.0.11 + rev: v1.0.12 hooks: - id: pospell args: ['--personal-dict', 'dict.txt', '--language', 'es_ES', '--language', 'es_AR'] diff --git a/dictionaries/whatsnew_2.3.txt b/dictionaries/whatsnew_2.3.txt index 2116c7051e..c10acf94e0 100644 --- a/dictionaries/whatsnew_2.3.txt +++ b/dictionaries/whatsnew_2.3.txt @@ -1,41 +1,110 @@ +Oberkirch Age +Altis Bauer Brunning Chermside Chris +Christopher +Cliff +Connor +Craig Dalke Daniels +Denis Detlef Drake +Dörwald Francesco Fraser +Geert Gerber +Getopt +Gilfix Hans +Hetland Hindle +Hisao +Hodgson Hudson Hurd +Hylton +Icon Jansen Jeff +Jeremy +Jones Jr +Karatsuba Kelly +Labs Lalo Lambert +Lange +Language Lannert +Lauder Löwis +Magnus +Malley +Marangozov +Martelli Martin Martins +Mick +Montanaro +Moore Neal Netzer +Nicholas Niemeyer Norwitz Nowak +Ondrej +Optik +Orendorff +Otkidach +Overview +Palkovsky +Pedroni +Piers +Programming Reifschneider Ricciardi Richie +Robert Roman +Samuele +Simionato Simon +Skip Suzi +Suzuki Tishler Travis +Trent +Walter +Ward +Wells +What +Wilson +benchmark +deserializadas +desescalado +dev +empaquetarlo +enumerate frame +idna +llamables ports +pystone +reanudables +recompilara +reelaborado +reescríbalas +reformateada +sobreescrituras +topológica +xmlrpclib +Åstrand diff --git a/scripts/completed_files.py b/scripts/completed_files.py old mode 100644 new mode 100755 diff --git a/scripts/print_percentage.py b/scripts/print_percentage.py old mode 100644 new mode 100755 diff --git a/whatsnew/2.3.po b/whatsnew/2.3.po index bdd2425c3a..9b0e113686 100644 --- a/whatsnew/2.3.po +++ b/whatsnew/2.3.po @@ -9,15 +9,15 @@ msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-05-06 11:59-0400\n" -"PO-Revision-Date: 2021-04-17 07:53-0500\n" +"PO-Revision-Date: 2021-09-25 10:30+0100\n" "Language-Team: python-doc-es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Last-Translator: \n" +"Last-Translator: Claudia Millan \n" "Language: es\n" -"X-Generator: Poedit 2.2.1\n" +"X-Generator: Poedit 3.0\n" #: ../Doc/whatsnew/2.3.rst:3 msgid "What's New in Python 2.3" @@ -97,7 +97,7 @@ msgstr "" #: ../Doc/whatsnew/2.3.rst:41 msgid "PEP 218: A Standard Set Datatype" -msgstr "PEP 218: A Standard Set Datatype" +msgstr "PEP 218: Un tipo de datos de conjunto estándar" #: ../Doc/whatsnew/2.3.rst:43 msgid "" @@ -159,17 +159,19 @@ msgstr "" #: ../Doc/whatsnew/2.3.rst:117 msgid ":pep:`218` - Adding a Built-In Set Object Type" -msgstr ":pep:`218` - Adding a Built-In Set Object Type" +msgstr ":pep:`218` - Añadiendo un tipo de objeto de conjunto incorporado" #: ../Doc/whatsnew/2.3.rst:117 msgid "" "PEP written by Greg V. Wilson. Implemented by Greg V. Wilson, Alex Martelli, " "and GvR." msgstr "" +"PEP escrito por Greg V. Wilson. Implementado por Greg V. Wilson, Alex " +"Martelli y GvR." #: ../Doc/whatsnew/2.3.rst:126 msgid "PEP 255: Simple Generators" -msgstr "" +msgstr "PEP 255: Generadores simples" #: ../Doc/whatsnew/2.3.rst:128 msgid "" @@ -181,6 +183,14 @@ msgid "" "2.2\" document; if you read it back when Python 2.2 came out, you can skip " "the rest of this section." msgstr "" +"En Python 2.2, los generadores se añadieron como una característica " +"opcional, que se activaba mediante una directiva ``from __future__ import " +"generators``. En 2.3 los generadores ya no necesitan ser habilitados " +"especialmente, y ahora están siempre presentes; esto significa que :keyword:" +"`yield` es ahora siempre una palabra clave. El resto de esta sección es una " +"copia de la descripción de los generadores del documento \"What's New in " +"Python 2.2\"; si lo leíste cuando salió Python 2.2, puedes saltarte el resto " +"de esta sección." #: ../Doc/whatsnew/2.3.rst:136 msgid "" @@ -194,10 +204,20 @@ msgid "" "This is what generators provide; they can be thought of as resumable " "functions." msgstr "" +"Sin duda estás familiarizado con cómo funcionan las llamadas a funciones en " +"Python o C. Cuando llamas a una función, ésta obtiene un espacio de nombres " +"privado donde se crean sus variables locales. Cuando la función llega a una " +"declaración :keyword:`return`, las variables locales se destruyen y el valor " +"resultante se retorna a quien la llamó. Una llamada posterior a la misma " +"función obtendrá un nuevo conjunto de variables locales. Pero, ¿qué pasaría " +"si las variables locales no se tiraran al salir de una función? ¿Qué pasaría " +"si pudieras reanudar la función donde la dejaste? Esto es lo que " +"proporcionan los generadores; se puede pensar en ellos como funciones " +"reanudables." #: ../Doc/whatsnew/2.3.rst:145 msgid "Here's the simplest example of a generator function::" -msgstr "" +msgstr "Este es el ejemplo más sencillo de una función generadora::" #: ../Doc/whatsnew/2.3.rst:151 msgid "" @@ -206,6 +226,10 @@ msgid "" "this is detected by Python's bytecode compiler which compiles the function " "specially as a result." msgstr "" +"Se ha introducido una nueva palabra clave, :keyword:`yield`, para los " +"generadores. Cualquier función que contenga una declaración :keyword:`!" +"yield` es una función generadora; esto es detectado por el compilador de " +"código de bits de Python que compila la función especialmente como resultado." #: ../Doc/whatsnew/2.3.rst:156 msgid "" @@ -222,16 +246,31 @@ msgid "" "try`...\\ :keyword:`!finally` statement; read :pep:`255` for a full " "explanation of the interaction between :keyword:`!yield` and exceptions.)" msgstr "" +"Cuando se llama a una función generadora, ésta no retorna un único valor, " +"sino que retorna un objeto generador que soporta el protocolo de los " +"iteradores. Al ejecutar la sentencia :keyword:`yield`, el generador retorna " +"el valor de ``i``, de forma similar a una sentencia :keyword:`return`. La " +"gran diferencia entre :keyword:`!yield` y una sentencia :keyword:`!return` " +"es que al llegar a una sentencia :keyword:`!yield` se suspende el estado de " +"ejecución del generador y se conservan las variables locales. En la " +"siguiente llamada al método ``.next()`` del generador, la función se " +"reanudará la ejecución inmediatamente después de la sentencia :keyword:`!" +"yield`. (Por razones complicadas, la sentencia :keyword:`!yield` no está " +"permitida dentro del bloque :keyword:`try` de una sentencia :keyword:`!" +"try`...`; lea :pep:`255` para una explicación completa de la interacción " +"entre :keyword:`!yield` y las excepciones)" #: ../Doc/whatsnew/2.3.rst:169 msgid "Here's a sample usage of the :func:`generate_ints` generator::" -msgstr "" +msgstr "Este es un ejemplo de uso del generador :func:`generate_ints`::" #: ../Doc/whatsnew/2.3.rst:186 msgid "" "You could equally write ``for i in generate_ints(5)``, or ``a,b,c = " "generate_ints(3)``." msgstr "" +"También podrías escribir ``for i in generate_ints(5)``, o ``a,b,c = " +"generate_ints(3)``." #: ../Doc/whatsnew/2.3.rst:189 msgid "" @@ -243,6 +282,13 @@ msgid "" "indicated by raising :exc:`StopIteration` manually, or by just letting the " "flow of execution fall off the bottom of the function." msgstr "" +"Dentro de una función generadora, la expresión :keyword:`return` sólo puede " +"usarse sin un valor, y señala el final de la procesión de valores; después " +"el generador no puede retornar más valores. :keyword:`!return` con un valor, " +"como ``return 5``, es un error de sintaxis dentro de una función " +"generadora. El final de los resultados del generador también puede " +"indicarse levantando manualmente :exc:`StopIteration`, o simplemente dejando " +"que el flujo de ejecución caiga en el fondo de la función." #: ../Doc/whatsnew/2.3.rst:197 msgid "" @@ -256,6 +302,15 @@ msgid "" "The simplest one implements an in-order traversal of a tree using generators " "recursively. ::" msgstr "" +"Puedes conseguir el efecto de los generadores manualmente escribiendo tu " +"propia clase y almacenando todas las variables locales del generador como " +"variables de instancia. Por ejemplo, la devolución de una lista de enteros " +"podría hacerse estableciendo ``self.count`` a 0, y haciendo que el método :" +"meth:`next` incremente ``self.count`` y lo retorne. Sin embargo, para un " +"generador medianamente complicado, escribir la clase correspondiente sería " +"mucho más complicado. :file:`Lib/test/test_generators.py` contiene varios " +"ejemplos más interesantes. El más sencillo implementa un recorrido en orden " +"de un árbol utilizando generadores de forma recursiva ::" #: ../Doc/whatsnew/2.3.rst:215 msgid "" @@ -265,6 +320,11 @@ msgid "" "knight to every square of an $NxN$ chessboard without visiting any square " "twice)." msgstr "" +"Otros dos ejemplos en :file:`Lib/test/test_generators.py` producen " +"soluciones para el problema de las N reinas (colocar $N$ reinas en un " +"tablero de ajedrez $NxN$ de forma que ninguna reina amenace a otra) y el " +"recorrido del caballero (una ruta que lleva a un caballo a cada casilla de " +"un tablero de ajedrez $NxN$ sin visitar ninguna casilla dos veces)." #: ../Doc/whatsnew/2.3.rst:220 msgid "" @@ -275,6 +335,12 @@ msgid "" "\" at https://www.cs.arizona.edu/icon/docs/ipd266.htm gives an idea of what " "this looks like::" msgstr "" +"La idea de los generadores proviene de otros lenguajes de programación, " +"especialmente de Icon (https://www.cs.arizona.edu/icon/), donde la idea de " +"los generadores es fundamental. En Icon, cada expresión y llamada a una " +"función se comporta como un generador. Un ejemplo de \"*An Overview of the " +"Icon Programming Language*\" en https://www.cs.arizona.edu/icon/docs/ipd266." +"htm da una idea de cómo es esto::" #: ../Doc/whatsnew/2.3.rst:230 msgid "" @@ -284,6 +350,12 @@ msgid "" "Icon retries it with the second value of 23. 23 is greater than 5, so the " "comparison now succeeds, and the code prints the value 23 to the screen." msgstr "" +"En Icon la función :func:`find` retorna los índices en los que se encuentra " +"la subcadena \"o\": 3, 23, 33. En la expresión :keyword:`if`, a ``i`` se le " +"asigna primero un valor de 3, pero 3 es menor que 5, por lo que la " +"comparación falla, e Icon la reintenta con el segundo valor de 23. 23 es " +"mayor que 5, por lo que la comparación ahora tiene éxito, y el código " +"imprime el valor 23 en la pantalla." #: ../Doc/whatsnew/2.3.rst:236 msgid "" @@ -295,10 +367,17 @@ msgid "" "as a concrete object (the iterator) that can be passed around to other " "functions or stored in a data structure." msgstr "" +"Python no va tan lejos como Icon en la adopción de generadores como concepto " +"central. Los generadores se consideran parte del núcleo del lenguaje " +"Python, pero aprenderlos o utilizarlos no es obligatorio; si no resuelven " +"ningún problema que tengas, siéntete libre de ignorarlos. Una característica " +"novedosa de la interfaz de Python en comparación con la de Icon es que el " +"estado de un generador se representa como un objeto concreto (el iterador) " +"que puede pasarse a otras funciones o almacenarse en una estructura de datos." #: ../Doc/whatsnew/2.3.rst:248 msgid ":pep:`255` - Simple Generators" -msgstr "" +msgstr ":pep:`255` - Generadores simples" #: ../Doc/whatsnew/2.3.rst:248 msgid "" @@ -306,10 +385,13 @@ msgid "" "mostly by Neil Schemenauer and Tim Peters, with other fixes from the Python " "Labs crew." msgstr "" +"Escrito por Neil Schemenauer, Tim Peters, Magnus Lie Hetland. Implementado " +"principalmente por Neil Schemenauer y Tim Peters, con otras correcciones del " +"equipo de Python Labs." #: ../Doc/whatsnew/2.3.rst:257 msgid "PEP 263: Source Code Encodings" -msgstr "" +msgstr "PEP 263: Codificación del código fuente" #: ../Doc/whatsnew/2.3.rst:259 msgid "" @@ -318,6 +400,10 @@ msgid "" "comment in the first or second line of the source file. For example, a " "UTF-8 file can be declared with::" msgstr "" +"Los archivos fuente de Python ahora pueden declararse con diferentes " +"codificaciones de conjuntos de caracteres. Las codificaciones se declaran " +"incluyendo un comentario con formato especial en la primera o segunda línea " +"del archivo fuente. Por ejemplo, un archivo UTF-8 puede declararse con::" #: ../Doc/whatsnew/2.3.rst:267 msgid "" @@ -327,6 +413,11 @@ msgid "" "`DeprecationWarning` being signalled by Python 2.3; in 2.4 this will be a " "syntax error." msgstr "" +"Sin esta declaración de codificación, la codificación por defecto utilizada " +"es ASCII de 7 bits. Ejecutar o importar módulos que contengan literales de " +"cadena con caracteres de 8 bits y que no tengan una declaración de " +"codificación dará lugar a un :exc:`DeprecationWarning` señalado por Python " +"2.3; en 2.4 será un error de sintaxis." #: ../Doc/whatsnew/2.3.rst:273 msgid "" @@ -335,20 +426,28 @@ msgid "" "identifiers are still restricted to ASCII characters, so you can't have " "variable names that use characters outside of the usual alphanumerics." msgstr "" +"La declaración de codificación sólo afecta a los literales de cadena " +"Unicode, que se convertirán a Unicode utilizando la codificación " +"especificada. Ten en cuenta que los identificadores de Python siguen " +"restringidos a caracteres ASCII, por lo que no puedes tener nombres de " +"variables que utilicen caracteres fuera de los alfanuméricos habituales." #: ../Doc/whatsnew/2.3.rst:282 msgid ":pep:`263` - Defining Python Source Code Encodings" msgstr "" +":pep:`263` - Definición de las codificaciones del código fuente de Python" #: ../Doc/whatsnew/2.3.rst:282 msgid "" "Written by Marc-André Lemburg and Martin von Löwis; implemented by Suzuki " "Hisao and Martin von Löwis." msgstr "" +"Escrito por Marc-André Lemburg y Martin von Löwis; realizado por Suzuki " +"Hisao y Martin von Löwis." #: ../Doc/whatsnew/2.3.rst:289 msgid "PEP 273: Importing Modules from ZIP Archives" -msgstr "" +msgstr "PEP 273: Importar módulos desde archivos ZIP" #: ../Doc/whatsnew/2.3.rst:291 msgid "" @@ -357,6 +456,10 @@ msgid "" "be automatically imported if a ZIP archive's filename is added to ``sys." "path``. For example:" msgstr "" +"El nuevo módulo :mod:`zipimport` añade soporte para importar módulos desde " +"un archivo en formato ZIP. No es necesario importar el módulo " +"explícitamente; se importará automáticamente si se añade el nombre de un " +"archivo ZIP a ``sys.path``. Por ejemplo:" #: ../Doc/whatsnew/2.3.rst:314 msgid "" @@ -367,6 +470,13 @@ msgid "" "by adding the corresponding :file:`\\*.pyc` file, meaning that if a ZIP " "archive doesn't contain :file:`\\*.pyc` files, importing may be rather slow." msgstr "" +"Una entrada en ``sys.path`` puede ser ahora el nombre de un archivo ZIP. El " +"archivo ZIP puede contener cualquier tipo de ficheros, pero sólo se pueden " +"importar los ficheros llamados :file:`\\*.py`, :file:`\\*.pyc`, o :file:`\\*." +"pyo`. Si un archivo sólo contiene ficheros :file:`\\*.py`, Python no " +"intentará modificar el archivo añadiendo el correspondiente fichero :file:`" +"\\*.pyc`, lo que significa que si un archivo ZIP no contiene ficheros :file:`" +"\\*.pyc`, la importación puede ser bastante lenta." #: ../Doc/whatsnew/2.3.rst:321 msgid "" @@ -374,10 +484,13 @@ msgid "" "subdirectory; for example, the path :file:`/tmp/example.zip/lib/` would only " "import from the :file:`lib/` subdirectory within the archive." msgstr "" +"También se puede especificar una ruta dentro del archivo para importar sólo " +"de un subdirectorio; por ejemplo, la ruta :file:`/tmp/example.zip/lib/` sólo " +"importaría del subdirectorio :file:`lib/` dentro del archivo." #: ../Doc/whatsnew/2.3.rst:331 msgid ":pep:`273` - Import Modules from Zip Archives" -msgstr "" +msgstr ":pep:`273` - Importación de módulos desde archivos Zip" #: ../Doc/whatsnew/2.3.rst:329 msgid "" @@ -387,10 +500,15 @@ msgid "" "`302`. See section :ref:`section-pep302` for a description of the new import " "hooks." msgstr "" +"Escrito por James C. Ahlstrom, que también proporcionó una implementación. " +"Python 2.3 sigue la especificación en :pep:`273`, pero utiliza una " +"implementación escrita por Just van Rossum que utiliza los ganchos de " +"importación descritos en :pep:`302`. Vea la sección :ref:`section-pep302` " +"para una descripción de los nuevos ganchos de importación." #: ../Doc/whatsnew/2.3.rst:338 msgid "PEP 277: Unicode file name support for Windows NT" -msgstr "" +msgstr "PEP 277: Soporte de nombres de archivo Unicode para Windows NT" #: ../Doc/whatsnew/2.3.rst:340 msgid "" @@ -398,6 +516,10 @@ msgid "" "strings. Traditionally, Python has represented file names as byte strings, " "which is inadequate because it renders some file names inaccessible." msgstr "" +"En Windows NT, 2000 y XP, el sistema almacena los nombres de archivo como " +"cadenas Unicode. Tradicionalmente, Python ha representado los nombres de " +"archivo como cadenas de bytes, lo cual es inadecuado porque hace que algunos " +"nombres de archivo sean inaccesibles." #: ../Doc/whatsnew/2.3.rst:344 msgid "" @@ -407,12 +529,21 @@ msgid "" "listdir`, Python now returns a list of Unicode strings. A new function, :" "func:`os.getcwdu`, returns the current directory as a Unicode string." msgstr "" +"Python permite ahora utilizar cadenas Unicode arbitrarias (dentro de las " +"limitaciones del sistema de archivos) para todas las funciones que esperan " +"nombres de archivos, sobre todo la función incorporada :func:`open`. Si se " +"pasa una cadena Unicode a :func:`os.listdir`, Python retorna ahora una lista " +"de cadenas Unicode. Una nueva función, :func:`os.getcwdu`, retorna el " +"directorio actual como una cadena Unicode." #: ../Doc/whatsnew/2.3.rst:350 msgid "" "Byte strings still work as file names, and on Windows Python will " "transparently convert them to Unicode using the ``mbcs`` encoding." msgstr "" +"Las cadenas de bytes siguen funcionando como nombres de archivo, y en " +"Windows Python las convertirá de forma transparente a Unicode utilizando la " +"codificación ``mbcs``." #: ../Doc/whatsnew/2.3.rst:353 msgid "" @@ -422,24 +553,32 @@ msgid "" "strings are supported as file names by checking :attr:`os.path." "supports_unicode_filenames`, a Boolean value." msgstr "" +"Otros sistemas también permiten cadenas Unicode como nombres de archivo, " +"pero las convierten en cadenas de bytes antes de pasarlas al sistema, lo que " +"puede provocar un :exc:`UnicodeError`. Las aplicaciones pueden comprobar si " +"se admiten cadenas Unicode arbitrarias como nombres de archivo comprobando :" +"attr:`os.path.supports_unicode_filenames`, un valor booleano." #: ../Doc/whatsnew/2.3.rst:359 msgid "Under MacOS, :func:`os.listdir` may now return Unicode filenames." msgstr "" +"En MacOS, :func:`os.listdir` ahora puede retornar nombres de archivo Unicode." #: ../Doc/whatsnew/2.3.rst:365 msgid ":pep:`277` - Unicode file name support for Windows NT" -msgstr "" +msgstr ":pep:`277` - Soporte de nombres de archivo Unicode para Windows NT" #: ../Doc/whatsnew/2.3.rst:365 msgid "" "Written by Neil Hodgson; implemented by Neil Hodgson, Martin von Löwis, and " "Mark Hammond." msgstr "" +"Escrito por Neil Hodgson; realizado por Neil Hodgson, Martin von Löwis y " +"Mark Hammond." #: ../Doc/whatsnew/2.3.rst:375 msgid "PEP 278: Universal Newline Support" -msgstr "" +msgstr "PEP 278: Soporte universal de nuevas líneas" #: ../Doc/whatsnew/2.3.rst:377 msgid "" @@ -450,6 +589,14 @@ msgid "" "character 10), MacOS uses the carriage return (ASCII character 13), and " "Windows uses a two-character sequence of a carriage return plus a newline." msgstr "" +"Los tres principales sistemas operativos que se utilizan hoy en día son " +"Microsoft Windows, el sistema operativo Macintosh de Apple y los diversos " +"derivados de Unix. Una pequeña molestia del trabajo entre plataformas es " +"que estas tres plataformas utilizan diferentes caracteres para marcar el " +"final de las líneas en los archivos de texto. Unix utiliza el salto de " +"línea (carácter ASCII 10), MacOS utiliza el retorno de carro (carácter ASCII " +"13), y Windows utiliza una secuencia de dos caracteres de un retorno de " +"carro más una nueva línea." #: ../Doc/whatsnew/2.3.rst:384 msgid "" @@ -460,6 +607,13 @@ msgid "" "translated to a ``'\\n'`` in the strings returned by the various file " "methods such as :meth:`read` and :meth:`readline`." msgstr "" +"Los objetos de archivo de Python pueden ahora soportar convenciones de fin " +"de línea distintas de la que sigue la plataforma en la que se ejecuta " +"Python. Al abrir un archivo con el modo ``'U`` o ``'rU`` se abrirá un " +"archivo para su lectura en modo :term:`universal newlines`. Las tres " +"convenciones de final de línea se traducirán a un ``'\\n'`` en las cadenas " +"retornadas por los distintos métodos de archivo como :meth:`read` y :meth:" +"`readline`." #: ../Doc/whatsnew/2.3.rst:391 msgid "" @@ -468,6 +622,10 @@ msgid "" "modules can be shared between all three operating systems without needing to " "convert the line-endings." msgstr "" +"El soporte universal de nuevas líneas también se utiliza al importar módulos " +"y al ejecutar un archivo con la función :func:`execfile`. Esto significa " +"que los módulos de Python pueden ser compartidos entre los tres sistemas " +"operativos sin necesidad de convertir los finales de línea." #: ../Doc/whatsnew/2.3.rst:396 msgid "" @@ -475,18 +633,21 @@ msgid "" "`!--without-universal-newlines` switch when running Python's :program:" "`configure` script." msgstr "" +"Esta función puede desactivarse al compilar Python especificando la opción :" +"option:`!--without-universal-newlines` al ejecutar el script :program:" +"`configure` de Python." #: ../Doc/whatsnew/2.3.rst:403 msgid ":pep:`278` - Universal Newline Support" -msgstr "" +msgstr ":pep:`278` - Soporte universal de nuevas líneas" #: ../Doc/whatsnew/2.3.rst:404 msgid "Written and implemented by Jack Jansen." -msgstr "" +msgstr "Escrito y ejecutado por Jack Jansen." #: ../Doc/whatsnew/2.3.rst:412 msgid "PEP 279: enumerate()" -msgstr "" +msgstr "PEP 279: enumerate()" #: ../Doc/whatsnew/2.3.rst:414 msgid "" @@ -495,26 +656,32 @@ msgid "" "sequence, returns an iterator that will return ``(0, thing[0])``, ``(1, " "thing[1])``, ``(2, thing[2])``, and so forth." msgstr "" +"Una nueva función incorporada, :func:`enumerate`, hará que ciertos bucles " +"sean un poco más claros. ``enumerate(cosa)``, donde *cosa* es un iterador o " +"una secuencia, retorna un iterador que retornará ``(0, cosa[0])``, ``(1, " +"cosa[1])``, ``(2, cosa[2])``, y así sucesivamente." #: ../Doc/whatsnew/2.3.rst:419 msgid "A common idiom to change every element of a list looks like this::" msgstr "" +"Un modismo común para cambiar cada elemento de una lista tiene el siguiente " +"aspecto::" #: ../Doc/whatsnew/2.3.rst:426 msgid "This can be rewritten using :func:`enumerate` as::" -msgstr "" +msgstr "Esto se puede reescribir usando :func:`enumerate` como::" #: ../Doc/whatsnew/2.3.rst:435 msgid ":pep:`279` - The enumerate() built-in function" -msgstr "" +msgstr ":pep:`279` - La función incorporada enumerate()" #: ../Doc/whatsnew/2.3.rst:436 msgid "Written and implemented by Raymond D. Hettinger." -msgstr "" +msgstr "Escrito y ejecutado por Raymond D. Hettinger." #: ../Doc/whatsnew/2.3.rst:442 msgid "PEP 282: The logging Package" -msgstr "" +msgstr "PEP 282: El paquete de registro" #: ../Doc/whatsnew/2.3.rst:444 msgid "" @@ -527,6 +694,15 @@ msgid "" "log, or even e-mail them to a particular address; of course, it's also " "possible to write your own handler classes." msgstr "" +"Se ha añadido a Python 2.3 un paquete estándar para escribir registros, :mod:" +"`logging`. Proporciona un mecanismo potente y flexible para generar salidas " +"de registro que pueden ser filtradas y procesadas de varias maneras. Se " +"puede utilizar un archivo de configuración escrito en un formato estándar " +"para controlar el comportamiento de registro de un programa. Python incluye " +"manejadores que escribirán los registros en el error estándar o en un " +"archivo o socket, los enviarán al registro del sistema, o incluso los " +"enviarán por correo electrónico a una dirección particular; por supuesto, " +"también es posible escribir tus propias clases de manejadores." #: ../Doc/whatsnew/2.3.rst:453 msgid "" @@ -542,16 +718,30 @@ msgid "" "auth`` and ``server.network``. There's also a root :class:`Logger` that's " "the parent of all other loggers." msgstr "" +"La clase :class:`Logger` es la clase principal. La mayoría del código de la " +"aplicación tratará con uno o más objetos :class:`Logger`, cada uno utilizado " +"por un subsistema particular de la aplicación. Cada :class:`Logger` se " +"identifica con un nombre, y los nombres se organizan en una jerarquía " +"utilizando ``.`` como separador de componentes. Por ejemplo, puedes tener " +"instancias de :class:`Logger` llamadas ``servidor``, ``servidor.auth`` y " +"``servidor.network``. Estas dos últimas instancias están por debajo de " +"``servidor`` en la jerarquía. Esto significa que si aumentas la verbosidad " +"de ``servidor`` o diriges los mensajes de ``servidor`` a un gestor " +"diferente, los cambios también se aplicarán a los registros de ``servidor." +"auth`` y ``servidor.network``. También hay un :class:`Logger` raíz que es el " +"padre de todos los demás loggers." #: ../Doc/whatsnew/2.3.rst:464 msgid "" "For simple uses, the :mod:`logging` package contains some convenience " "functions that always use the root log::" msgstr "" +"Para usos sencillos, el paquete :mod:`logging` contiene algunas funciones de " +"conveniencia que siempre utilizan la raíz log::" #: ../Doc/whatsnew/2.3.rst:475 ../Doc/whatsnew/2.3.rst:500 msgid "This produces the following output::" -msgstr "" +msgstr "Esto produce la siguiente salida::" #: ../Doc/whatsnew/2.3.rst:481 msgid "" @@ -560,6 +750,10 @@ msgid "" "display of informational and debugging messages by calling the :meth:" "`setLevel` method on the root logger." msgstr "" +"En la configuración por defecto, los mensajes informativos y de depuración " +"se suprimen y la salida se envía al error estándar. Puede habilitar la " +"visualización de mensajes informativos y de depuración llamando al método :" +"meth:`setLevel` del registrador raíz." #: ../Doc/whatsnew/2.3.rst:486 msgid "" @@ -567,6 +761,10 @@ msgid "" "the functions for logging messages take the arguments ``(msg, arg1, " "arg2, ...)`` and log the string resulting from ``msg % (arg1, arg2, ...)``." msgstr "" +"Observe que la llamada :func:`warning` utiliza operadores de formato de " +"cadena; todas las funciones para el registro de mensajes toman los " +"argumentos ``(msg, arg1, arg2, ...)`` y registran la cadena resultante de " +"``msg % (arg1, arg2, ...)``." #: ../Doc/whatsnew/2.3.rst:490 msgid "" @@ -574,6 +772,10 @@ msgid "" "traceback. Any of the other functions will also record the traceback if you " "specify a true value for the keyword argument *exc_info*. ::" msgstr "" +"También hay una función :func:`exception` que registra el rastro más " +"reciente. Cualquiera de las otras funciones también registrará el rastro si " +"se especifica un valor verdadero para el argumento de la palabra clave " +"*exc_info*. ::" #: ../Doc/whatsnew/2.3.rst:508 msgid "" @@ -582,6 +784,10 @@ msgid "" "creating it if it doesn't exist yet. ``getLogger(None)`` returns the root " "logger. ::" msgstr "" +"Los programas un poco más avanzados utilizarán un logger distinto del logger " +"raíz. La función ``getLogger(nombre)`` se utiliza para obtener un registro " +"en particular, creándolo si aún no existe. ``getLogger(None)`` retorna el " +"logger raíz. ::" #: ../Doc/whatsnew/2.3.rst:519 msgid "" @@ -590,6 +796,10 @@ msgid "" "`Logger` can prevent this by setting its :attr:`propagate` attribute to :" "const:`False`." msgstr "" +"Los registros se suelen propagar hacia arriba en la jerarquía, por lo que un " +"mensaje registrado en ``servidor.auth`` también es visto por ``servidor`` y " +"``root``, pero un :class:`Logger` puede evitar esto estableciendo su " +"atributo :attr:`propagate` a :const:`False`." #: ../Doc/whatsnew/2.3.rst:523 msgid "" @@ -603,6 +813,16 @@ msgid "" "by a :class:`Formatter` class. All of these classes can be replaced by your " "own specially-written classes." msgstr "" +"Hay más clases proporcionadas por el paquete :mod:`logging` que pueden ser " +"personalizadas. Cuando una instancia de :class:`Logger` recibe la orden de " +"registrar un mensaje, crea una instancia de :class:`LogRecord` que se envía " +"a cualquier número de instancias de :class:`Handler` diferentes. Los " +"loggers y handlers también pueden tener una lista adjunta de filtros, y cada " +"filtro puede hacer que el :class:`LogRecord` sea ignorado o puede modificar " +"el registro antes de pasarlo. Cuando finalmente se emiten, las instancias " +"de :class:`LogRecord` se convierten en texto mediante una clase :class:" +"`Formatter`. Todas estas clases pueden ser reemplazadas por tus propias " +"clases especialmente escritas." #: ../Doc/whatsnew/2.3.rst:533 msgid "" @@ -612,18 +832,23 @@ msgid "" "documentation for all of the details. Reading :pep:`282` will also be " "helpful." msgstr "" +"Con todas estas características, el paquete :mod:`logging` debería " +"proporcionar suficiente flexibilidad incluso para las aplicaciones más " +"complicadas. Esto es sólo un resumen incompleto de sus características, así " +"que por favor consulte la documentación de referencia del paquete para todos " +"los detalles. La lectura de :pep:`282` también será útil." #: ../Doc/whatsnew/2.3.rst:541 msgid ":pep:`282` - A Logging System" -msgstr "" +msgstr ":pep:`282` - Un sistema de registro" #: ../Doc/whatsnew/2.3.rst:542 msgid "Written by Vinay Sajip and Trent Mick; implemented by Vinay Sajip." -msgstr "" +msgstr "Escrito por Vinay Sajip y Trent Mick; implementado por Vinay Sajip." #: ../Doc/whatsnew/2.3.rst:550 msgid "PEP 285: A Boolean Type" -msgstr "" +msgstr "PEP 285: Un tipo booleano" #: ../Doc/whatsnew/2.3.rst:552 msgid "" @@ -633,6 +858,11 @@ msgid "" "2.2.1, but the 2.2.1 versions are simply set to integer values of 1 and 0 " "and aren't a different type.)" msgstr "" +"Se ha añadido un tipo booleano a Python 2.3. Se añadieron dos nuevas " +"constantes al módulo :mod:`__builtin__`, :const:`True` y :const:`False`. " +"(Las constantes :const:`True` y :const:`False` se añadieron a los módulos " +"incorporados en Python 2.2.1, pero las versiones de 2.2.1 se ajustan " +"simplemente a valores enteros de 1 y 0 y no son un tipo diferente)" #: ../Doc/whatsnew/2.3.rst:558 msgid "" @@ -640,12 +870,17 @@ msgid "" "for it takes any Python value and converts it to :const:`True` or :const:" "`False`. ::" msgstr "" +"El objeto de tipo para este nuevo tipo se denomina :class:`bool`; su " +"constructor toma cualquier valor de Python y lo convierte en :const:`True` " +"o :const:`False`. ::" #: ../Doc/whatsnew/2.3.rst:570 msgid "" "Most of the standard library modules and built-in functions have been " "changed to return Booleans. ::" msgstr "" +"La mayoría de los módulos de la biblioteca estándar y las funciones " +"incorporadas se han modificado para retornar booleanos. ::" #: ../Doc/whatsnew/2.3.rst:581 msgid "" @@ -656,6 +891,12 @@ msgid "" "the statement is ``return True``, however, the meaning of the return value " "is quite clear." msgstr "" +"Los booleanos de Python se añadieron con el objetivo principal de hacer el " +"código más claro. Por ejemplo, si estás leyendo una función y te encuentras " +"con la sentencia ``return 1``, podrías preguntarte si el ``1`` representa un " +"valor de verdad booleano, un índice o un coeficiente que multiplica alguna " +"otra cantidad. Sin embargo, si la sentencia es ``return True``, el " +"significado del valor de retorno es bastante claro." #: ../Doc/whatsnew/2.3.rst:587 msgid "" @@ -669,6 +910,15 @@ msgid "" "a subclass of the :class:`int` class so that arithmetic using a Boolean " "still works. ::" msgstr "" +"Los booleanos de Python *no* se añadieron en aras de una comprobación de " +"tipos estricta. Un lenguaje muy estricto como Pascal también le impediría " +"realizar aritmética con booleanos, y requeriría que la expresión en una " +"declaración :keyword:`if` siempre se evaluara a un resultado booleano. " +"Python no es tan estricto y nunca lo será, como dice explícitamente :pep:" +"`285`. Esto significa que puede utilizar cualquier expresión en una " +"sentencia :keyword:`!if`, incluso las que se evalúan a una lista o tupla o " +"algún objeto aleatorio. El tipo Booleano es una subclase de la clase :class:" +"`int` por lo que la aritmética que utiliza un Booleano sigue funcionando. ::" #: ../Doc/whatsnew/2.3.rst:605 msgid "" @@ -677,18 +927,22 @@ msgid "" "difference that :func:`str` and :func:`repr` return the strings ``'True'`` " "and ``'False'`` instead of ``'1'`` and ``'0'``." msgstr "" +"Para resumir :const:`True` and :const:`False` en una frase: son formas " +"alternativas de deletrear los valores enteros 1 y 0, con la única diferencia " +"de que :func:`str` y :func:`repr` retornan las cadenas ``Verdadero`` y " +"``Falso`` en lugar de ``1`` y ``0``." #: ../Doc/whatsnew/2.3.rst:613 msgid ":pep:`285` - Adding a bool type" -msgstr "" +msgstr ":pep:`285` - Añadir un tipo booleano" #: ../Doc/whatsnew/2.3.rst:614 msgid "Written and implemented by GvR." -msgstr "" +msgstr "Escrito y ejecutado por GvR." #: ../Doc/whatsnew/2.3.rst:620 msgid "PEP 293: Codec Error Handling Callbacks" -msgstr "" +msgstr "PEP 293: Llamadas de retorno para el manejo de errores del códec" #: ../Doc/whatsnew/2.3.rst:622 msgid "" @@ -701,6 +955,14 @@ msgid "" "inserting an XML character reference or HTML entity reference into the " "converted string." msgstr "" +"Al codificar una cadena Unicode en una cadena de bytes, pueden encontrarse " +"caracteres no codificables. Hasta ahora, Python ha permitido especificar el " +"procesamiento del error como \"estricto\" (lanzando :exc:`UnicodeError`), " +"\"ignorar\" (saltando el carácter), o \"reemplazar\" (usando un signo de " +"interrogación en la cadena de salida), siendo \"estricto\" el comportamiento " +"por defecto. Puede ser deseable especificar un procesamiento alternativo de " +"tales errores, como insertar una referencia de carácter XML o una referencia " +"de entidad HTML en la cadena convertida." #: ../Doc/whatsnew/2.3.rst:630 msgid "" @@ -713,6 +975,15 @@ msgid "" "target encoding. The handler can then either raise an exception or return a " "replacement string." msgstr "" +"Python tiene ahora un marco flexible para añadir diferentes estrategias de " +"procesamiento. Se pueden añadir nuevos manejadores de errores con :func:" +"`codecs.register_error`, y los códecs pueden acceder al manejador de errores " +"con :func:`codecs.lookup_error`. Se ha añadido una API en C equivalente para " +"los códecs escritos en C. El gestor de errores obtiene la información de " +"estado necesaria, como la cadena que se está convirtiendo, la posición en la " +"cadena donde se ha detectado el error y la codificación de destino. El " +"controlador puede entonces lanzar una excepción o retornar una cadena de " +"reemplazo." #: ../Doc/whatsnew/2.3.rst:638 msgid "" @@ -720,24 +991,30 @@ msgid "" "\"backslashreplace\" uses Python backslash quoting to represent unencodable " "characters and \"xmlcharrefreplace\" emits XML character references." msgstr "" +"Se han implementado dos manejadores de error adicionales utilizando este " +"marco: \"backslashreplace\" utiliza las comillas de barra invertida de " +"Python para representar los caracteres no codificables y \"xmlcharrefreplace" +"\" emite referencias de caracteres XML." #: ../Doc/whatsnew/2.3.rst:645 msgid ":pep:`293` - Codec Error Handling Callbacks" -msgstr "" +msgstr ":pep:`293` - Retrollamadas de manejo de errores del códec" #: ../Doc/whatsnew/2.3.rst:646 msgid "Written and implemented by Walter Dörwald." -msgstr "" +msgstr "Escrito y ejecutado por Walter Dörwald." #: ../Doc/whatsnew/2.3.rst:654 msgid "PEP 301: Package Index and Metadata for Distutils" -msgstr "" +msgstr "PEP 301: Índice de paquetes y metadatos para Distutils" #: ../Doc/whatsnew/2.3.rst:656 msgid "" "Support for the long-requested Python catalog makes its first appearance in " "2.3." msgstr "" +"La compatibilidad con el catálogo de Python, largamente solicitada, hace su " +"primera aparición en 2.3." #: ../Doc/whatsnew/2.3.rst:658 msgid "" @@ -747,6 +1024,11 @@ msgid "" "it to a central catalog server. The resulting catalog is available from " "https://pypi.org." msgstr "" +"El corazón del catálogo es el nuevo comando :command:`register` de " +"Distutils. Ejecutando ``python setup.py register`` se recogen los metadatos " +"que describen un paquete, como su nombre, versión, mantenedor, descripción, " +"etc., y se envían a un servidor de catálogo central. El catálogo resultante " +"está disponible en https://pypi.org." #: ../Doc/whatsnew/2.3.rst:664 msgid "" @@ -755,30 +1037,38 @@ msgid "" "`Trove `_-style strings can be supplied to help " "classify the software." msgstr "" +"Para hacer el catálogo un poco más útil, se ha añadido un nuevo argumento " +"opcional de palabra clave *clasificadores* a la función Distutils :func:" +"`setup`. Se puede suministrar una lista de cadenas de estilo `Trove `_ para ayudar a clasificar el software." #: ../Doc/whatsnew/2.3.rst:669 msgid "" "Here's an example :file:`setup.py` with classifiers, written to be " "compatible with older versions of the Distutils::" msgstr "" +"Aquí hay un ejemplo :file:`setup.py` con clasificadores, escrito para que " +"sea compatible con las versiones más antiguas de Distutils::" #: ../Doc/whatsnew/2.3.rst:688 msgid "" "The full list of classifiers can be obtained by running ``python setup.py " "register --list-classifiers``." msgstr "" +"La lista completa de clasificadores se puede obtener ejecutando ``python " +"setup.py register --list-classifiers``." #: ../Doc/whatsnew/2.3.rst:694 msgid ":pep:`301` - Package Index and Metadata for Distutils" -msgstr "" +msgstr ":pep:`301` - Índice de paquetes y metadatos para Distutils" #: ../Doc/whatsnew/2.3.rst:695 msgid "Written and implemented by Richard Jones." -msgstr "" +msgstr "Escrito y ejecutado por Richard Jones." #: ../Doc/whatsnew/2.3.rst:703 msgid "PEP 302: New Import Hooks" -msgstr "" +msgstr "PEP 302: Nuevos ganchos de importación" #: ../Doc/whatsnew/2.3.rst:705 msgid "" @@ -789,6 +1079,12 @@ msgid "" "and :mod:`iu` modules, but none of them has ever gained much acceptance, and " "none of them were easily usable from C code." msgstr "" +"Aunque ha sido posible escribir ganchos de importación personalizados desde " +"que se introdujo el módulo :mod:`ihooks` en Python 1.3, nadie ha estado " +"nunca realmente contento con él porque escribir nuevos ganchos de " +"importación es difícil y complicado. Se han propuesto varias alternativas, " +"como los módulos :mod:`imputil` y :mod:`iu`, pero ninguno de ellos ha tenido " +"mucha aceptación, y ninguno era fácilmente utilizable desde el código C." #: ../Doc/whatsnew/2.3.rst:712 msgid "" @@ -796,6 +1092,9 @@ msgid "" "McMillan's :mod:`iu` module. Three new items are added to the :mod:`sys` " "module:" msgstr "" +":pep:`302` toma prestadas ideas de sus predecesores, especialmente del " +"módulo :mod:`iu` de Gordon McMillan. Se añaden tres nuevos elementos al " +"módulo :mod:`sys`:" #: ../Doc/whatsnew/2.3.rst:716 msgid "" @@ -804,12 +1103,19 @@ msgid "" "an importer object that will handle imports from this path or raises an :exc:" "`ImportError` exception if it can't handle this path." msgstr "" +"``sys.path_hooks`` es una lista de objetos invocables; la mayoría de las " +"veces serán clases. Cada llamada toma una cadena que contiene una ruta y " +"retorna un objeto importador que manejará las importaciones desde esta ruta " +"o lanza una excepción :exc:`ImportError` si no puede manejar esta ruta." #: ../Doc/whatsnew/2.3.rst:721 msgid "" "``sys.path_importer_cache`` caches importer objects for each path, so ``sys." "path_hooks`` will only need to be traversed once for each path." msgstr "" +"``sys.path_importer_cache`` almacena en caché los objetos del importador " +"para cada ruta, por lo que ``sys.path_hooks`` sólo tendrá que ser recorrido " +"una vez para cada ruta." #: ../Doc/whatsnew/2.3.rst:724 msgid "" @@ -818,6 +1124,11 @@ msgid "" "can add objects to it. Additional built-in and frozen modules can be " "imported by an object added to this list." msgstr "" +"``sys.meta_path`` es una lista de objetos importadores que se recorrerán " +"antes de comprobar ``sys.path``. Esta lista está inicialmente vacía, pero " +"el código de usuario puede añadir objetos a ella. Los módulos adicionales " +"incorporados y congelados pueden ser importados por un objeto añadido a esta " +"lista." #: ../Doc/whatsnew/2.3.rst:729 msgid "" @@ -827,25 +1138,35 @@ msgid "" "has a single method, ``load_module(fullname)``, that creates and returns the " "corresponding module object." msgstr "" +"Los objetos importadores deben tener un único método, " +"``find_module(fullname, path=None)``. *fullname* será un nombre de módulo o " +"paquete, por ejemplo ``string`` o ``distutils.core``. :meth:`find_module` " +"debe retornar un objeto cargador que tenga un único método, " +"``load_module(fullname)``, que cree y retorne el objeto módulo " +"correspondiente." #: ../Doc/whatsnew/2.3.rst:735 msgid "" "Pseudo-code for Python's new import logic, therefore, looks something like " "this (simplified a bit; see :pep:`302` for the full details)::" msgstr "" +"Por lo tanto, el pseudocódigo de la nueva lógica de importación de Python es " +"algo así (simplificado un poco; véase :pep:`302` para los detalles " +"completos)::" #: ../Doc/whatsnew/2.3.rst:760 msgid ":pep:`302` - New Import Hooks" -msgstr "" +msgstr ":pep:`302` - Nuevos ganchos de importación" #: ../Doc/whatsnew/2.3.rst:761 msgid "" "Written by Just van Rossum and Paul Moore. Implemented by Just van Rossum." msgstr "" +"Escrito por Just van Rossum y Paul Moore. Implementado por Just van Rossum." #: ../Doc/whatsnew/2.3.rst:769 msgid "PEP 305: Comma-separated Files" -msgstr "" +msgstr "PEP 305: Archivos separados por comas" #: ../Doc/whatsnew/2.3.rst:771 msgid "" @@ -853,22 +1174,31 @@ msgid "" "databases and spreadsheets. Python 2.3 adds a parser for comma-separated " "files." msgstr "" +"Los archivos separados por comas son un formato frecuentemente utilizado " +"para exportar datos de bases de datos y hojas de cálculo. Python 2.3 añade " +"un analizador de archivos separados por comas." #: ../Doc/whatsnew/2.3.rst:774 msgid "Comma-separated format is deceptively simple at first glance::" msgstr "" +"El formato separado por comas es engañosamente sencillo a primera vista::" #: ../Doc/whatsnew/2.3.rst:778 msgid "" "Read a line and call ``line.split(',')``: what could be simpler? But toss in " "string data that can contain commas, and things get more complicated::" msgstr "" +"Leer una línea y llamar a ``line.split(',')``: ¿qué puede ser más sencillo? " +"Pero si se añaden datos de cadena que pueden contener comas, las cosas se " +"complican::" #: ../Doc/whatsnew/2.3.rst:783 msgid "" "A big ugly regular expression can parse this, but using the new :mod:`csv` " "package is much simpler::" msgstr "" +"Una expresión regular grande y fea puede analizar esto, pero usar el nuevo " +"paquete :mod:`csv` es mucho más sencillo::" #: ../Doc/whatsnew/2.3.rst:793 msgid "" @@ -876,6 +1206,9 @@ msgid "" "separator isn't limited to the comma and can be changed to any character, " "and so can the quoting and line-ending characters." msgstr "" +"La función :func:`reader` admite varias opciones. El separador de campos no " +"se limita a la coma y puede cambiarse por cualquier carácter, al igual que " +"las comillas y el final de línea." #: ../Doc/whatsnew/2.3.rst:797 msgid "" @@ -884,20 +1217,27 @@ msgid "" "class:`csv.writer` class will generate comma-separated files from a " "succession of tuples or lists, quoting strings that contain the delimiter." msgstr "" +"Se pueden definir y registrar diferentes dialectos de archivos separados por " +"comas; actualmente hay dos dialectos, ambos utilizados por Microsoft Excel. " +"Una clase :class:`csv.writer` independiente generará archivos separados por " +"comas a partir de una sucesión de tuplas o listas, citando cadenas que " +"contengan el delimitador." #: ../Doc/whatsnew/2.3.rst:806 msgid ":pep:`305` - CSV File API" -msgstr "" +msgstr ":pep:`305` - API de archivos CSV" #: ../Doc/whatsnew/2.3.rst:806 msgid "" "Written and implemented by Kevin Altis, Dave Cole, Andrew McNamara, Skip " "Montanaro, Cliff Wells." msgstr "" +"Escrito y realizado por Kevin Altis, Dave Cole, Andrew McNamara, Skip " +"Montanaro, Cliff Wells." #: ../Doc/whatsnew/2.3.rst:815 msgid "PEP 307: Pickle Enhancements" -msgstr "" +msgstr "PEP 307: Mejoras en Pickle" #: ../Doc/whatsnew/2.3.rst:817 msgid "" @@ -907,6 +1247,12 @@ msgid "" "quotes a trivial example where a new-style class results in a pickled string " "three times longer than that for a classic class." msgstr "" +"Los módulos :mod:`pickle` y :mod:`cPickle` recibieron cierta atención " +"durante el ciclo de desarrollo de la 2.3. En 2.2, las clases de estilo " +"nuevo podían ser desempaquetadas sin dificultad, pero no se desempaquetaba " +"de forma muy compacta; :pep:`307` cita un ejemplo trivial en el que una " +"clase de estilo nuevo da lugar a una cadena desempaquetada tres veces más " +"larga que la de una clase clásica." #: ../Doc/whatsnew/2.3.rst:823 msgid "" @@ -917,6 +1263,13 @@ msgid "" "format. A new constant, :const:`pickle.HIGHEST_PROTOCOL`, can be used to " "select the fanciest protocol available." msgstr "" +"La solución fue inventar un nuevo protocolo pickle. La función :func:" +"`pickle.dumps` soporta desde hace tiempo una bandera de texto o binario. En " +"la versión 2.3, esta bandera se ha redefinido, pasando de ser un booleano a " +"un entero: 0 es el antiguo formato pickle en modo texto, 1 es el antiguo " +"formato binario, y ahora 2 es un nuevo formato específico de 2.3. Una nueva " +"constante, :const:`pickle.HIGHEST_PROTOCOL`, puede utilizarse para " +"seleccionar el protocolo más elegante disponible." #: ../Doc/whatsnew/2.3.rst:830 msgid "" @@ -926,6 +1279,12 @@ msgid "" "this code was ever audited and therefore it's all been ripped out in 2.3. " "You should not unpickle untrusted data in any version of Python." msgstr "" +"El unpickling ya no se considera una operación segura. El :mod:`pickle` de " +"la versión 2.2 proporcionaba ganchos para tratar de evitar que las clases no " +"seguras fueran deserializadas (específicamente, un atributo :attr:" +"`__safe_for_unpickling__`), pero nada de este código fue nunca auditado y " +"por lo tanto todo ha sido eliminado en la versión 2.3. No se debe " +"deserializar datos no confiables en ninguna versión de Python." #: ../Doc/whatsnew/2.3.rst:836 msgid "" @@ -934,6 +1293,11 @@ msgid "" "`__getstate__`, :meth:`__setstate__`, and :meth:`__getnewargs__`. Consult :" "pep:`307` for the full semantics of these methods." msgstr "" +"Para reducir la sobrecarga de pickling de las clases de estilo nuevo, se ha " +"añadido una nueva interfaz para personalizar el pickling mediante tres " +"métodos especiales: :meth:`__getstate__`, :meth:`__setstate__`, y :meth:" +"`__getnewargs__`. Consulte :pep:`307` para conocer la semántica completa de " +"estos métodos." #: ../Doc/whatsnew/2.3.rst:841 msgid "" @@ -942,18 +1306,23 @@ msgid "" "Software Foundation will maintain a list of standardized codes; there's also " "a range of codes for private use. Currently no codes have been specified." msgstr "" +"Como forma de comprimir aún más los pickles, ahora es posible utilizar " +"códigos enteros en lugar de cadenas largas para identificar las clases " +"serializadas. La Python Software Foundation mantendrá una lista de códigos " +"estandarizados; también hay una gama de códigos para uso privado. " +"Actualmente no se ha especificado ningún código." #: ../Doc/whatsnew/2.3.rst:849 msgid ":pep:`307` - Extensions to the pickle protocol" -msgstr "" +msgstr ":pep:`307` - Extensiones del protocolo pickle" #: ../Doc/whatsnew/2.3.rst:850 msgid "Written and implemented by Guido van Rossum and Tim Peters." -msgstr "" +msgstr "Escrito y ejecutado por Guido van Rossum y Tim Peters." #: ../Doc/whatsnew/2.3.rst:858 msgid "Extended Slices" -msgstr "" +msgstr "Rebanadas ampliadas" #: ../Doc/whatsnew/2.3.rst:860 msgid "" @@ -965,21 +1334,33 @@ msgid "" "sequence types have never supported this feature, raising a :exc:`TypeError` " "if you tried it. Michael Hudson contributed a patch to fix this shortcoming." msgstr "" +"Desde la versión 1.4 de Python, la sintaxis de corte admite un tercer " +"argumento opcional \"paso\" o \"zancada\". Por ejemplo, estas son todas las " +"sintaxis legales de Python: ``L[1:10:2]``, ``L[:-1:1]``, ``L[::-1]``. Esto " +"se añadió a Python a petición de los desarrolladores de Numerical Python, " +"que utiliza ampliamente el tercer argumento. Sin embargo, los tipos de " +"secuencias de listas, tuplas y cadenas incorporados en Python nunca han " +"soportado esta característica, y lanzan un :exc:`TypeError` si lo intentas. " +"Michael Hudson ha contribuido con un parche para solucionar este problema." #: ../Doc/whatsnew/2.3.rst:868 msgid "" "For example, you can now easily extract the elements of a list that have " "even indexes::" msgstr "" +"Por ejemplo, ahora puede extraer fácilmente los elementos de una lista que " +"tengan índices pares::" #: ../Doc/whatsnew/2.3.rst:875 msgid "" "Negative values also work to make a copy of the same list in reverse order::" msgstr "" +"Los valores negativos también sirven para hacer una copia de la misma lista " +"en orden inverso::" #: ../Doc/whatsnew/2.3.rst:880 msgid "This also works for tuples, arrays, and strings::" -msgstr "" +msgstr "Esto también funciona para tuplas, arrays y cadenas::" #: ../Doc/whatsnew/2.3.rst:888 msgid "" @@ -988,6 +1369,10 @@ msgid "" "assignment to extended and regular slices. Assignment to a regular slice " "can be used to change the length of the sequence::" msgstr "" +"Si tienes una secuencia mutable, como una lista o un array, puedes asignar o " +"eliminar una rebanada extendida, pero hay algunas diferencias entre la " +"asignación a rebanadas extendidas y regulares. La asignación a una rebanada " +"regular se puede utilizar para cambiar la longitud de la secuencia::" #: ../Doc/whatsnew/2.3.rst:900 msgid "" @@ -995,20 +1380,25 @@ msgid "" "the list on the right hand side of the statement must contain the same " "number of items as the slice it is replacing::" msgstr "" +"Las rebanadas extendidas no son tan flexibles. Cuando se asigna a una " +"rebanada extendida, la lista a la derecha de la declaración debe contener el " +"mismo número de elementos que la rebanada que está reemplazando::" #: ../Doc/whatsnew/2.3.rst:917 msgid "Deletion is more straightforward::" -msgstr "" +msgstr "La eliminación es más sencilla::" #: ../Doc/whatsnew/2.3.rst:928 msgid "" "One can also now pass slice objects to the :meth:`__getitem__` methods of " "the built-in sequences::" msgstr "" +"Ahora también se pueden pasar objetos slice a los métodos :meth:" +"`__getitem__` de las secuencias incorporadas::" #: ../Doc/whatsnew/2.3.rst:934 msgid "Or use slice objects directly in subscripts::" -msgstr "" +msgstr "O utilizar los objetos de corte directamente en los subíndices::" #: ../Doc/whatsnew/2.3.rst:939 msgid "" @@ -1020,6 +1410,13 @@ msgid "" "phrase hides a welter of confusing details!). The method is intended to be " "used like this::" msgstr "" +"Para simplificar la implementación de secuencias que soportan el corte " +"extendido, los objetos slice tienen ahora un método ``indices(length)`` que, " +"dada la longitud de una secuencia, retorna una tupla ``(start, stop, step)`` " +"que puede pasarse directamente a :func:`range`. :meth:`indices` maneja los " +"índices omitidos y los que están fuera de los límites de una manera " +"consistente con los slices regulares (¡y esta frase inocua esconde un montón " +"de detalles confusos!). El método está pensado para ser utilizado así::" #: ../Doc/whatsnew/2.3.rst:957 msgid "" @@ -1028,28 +1425,38 @@ msgid "" "This is consistent with Python 2.2, where :class:`int`, :class:`str`, etc., " "underwent the same change." msgstr "" +"En este ejemplo también se puede ver que el objeto incorporado :class:" +"`slice` es ahora el objeto tipo para el tipo slice, y ya no es una función. " +"Esto es consistente con Python 2.2, donde :class:`int`, :class:`str`, etc., " +"sufrieron el mismo cambio." #: ../Doc/whatsnew/2.3.rst:966 msgid "Other Language Changes" -msgstr "" +msgstr "Otros cambios en el lenguaje" #: ../Doc/whatsnew/2.3.rst:968 msgid "" "Here are all of the changes that Python 2.3 makes to the core Python " "language." msgstr "" +"Estos son todos los cambios que Python 2.3 introduce en el núcleo del " +"lenguaje Python." #: ../Doc/whatsnew/2.3.rst:970 msgid "" "The :keyword:`yield` statement is now always a keyword, as described in " "section :ref:`section-generators` of this document." msgstr "" +"La expresión :keyword:`yield` es ahora siempre una palabra clave, como se " +"describe en la sección :ref:`section-generators` de este documento." #: ../Doc/whatsnew/2.3.rst:973 msgid "" "A new built-in function :func:`enumerate` was added, as described in " "section :ref:`section-enumerate` of this document." msgstr "" +"Se ha añadido una nueva función incorporada :func:`enumerate`, como se " +"describe en la sección :ref:`section-enumerate` de este documento." #: ../Doc/whatsnew/2.3.rst:976 msgid "" @@ -1057,6 +1464,9 @@ msgid "" "the built-in :class:`bool` type, as described in section :ref:`section-bool` " "of this document." msgstr "" +"Se han añadido dos nuevas constantes, :const:`True` y :const:`False` junto " +"con el tipo incorporado :class:`bool`, como se describe en la sección :ref:" +"`section-bool` de este documento." #: ../Doc/whatsnew/2.3.rst:980 msgid "" @@ -1066,12 +1476,19 @@ msgid "" "that ``isinstance(int(expression), int)`` is false, but that seems unlikely " "to cause problems in practice." msgstr "" +"El constructor de tipo :func:`int` ahora retornará un entero largo en lugar " +"de lanzar un :exc:`OverflowError` cuando una cadena o un número de punto " +"flotante es demasiado grande para caber en un entero. Esto puede llevar al " +"resultado paradójico de que ``isinstance(int(expresión), int)`` sea falso, " +"pero parece poco probable que cause problemas en la práctica." #: ../Doc/whatsnew/2.3.rst:986 msgid "" "Built-in types now support the extended slicing syntax, as described in " "section :ref:`section-slices` of this document." msgstr "" +"Los tipos incorporados ahora soportan la sintaxis de rebanado extendida, " +"como se describe en la sección :ref:`section-slices` de este documento." #: ../Doc/whatsnew/2.3.rst:989 msgid "" @@ -1080,6 +1497,10 @@ msgid "" "accepts numbers, meaning that you can't use it to concatenate a bunch of " "strings. (Contributed by Alex Martelli.)" msgstr "" +"Una nueva función incorporada, ``suma(iterable, start=0)``, suma los " +"elementos numéricos en el objeto iterable y retorna su suma. :func:`suma` " +"sólo acepta números, lo que significa que no se puede utilizar para " +"concatenar un montón de cadenas. (Contribución de Alex Martelli)" #: ../Doc/whatsnew/2.3.rst:994 msgid "" @@ -1088,6 +1509,10 @@ msgid "" "consistent with slice indexing, so when *pos* is -1 the value will be " "inserted before the last element, and so forth." msgstr "" +"``list.insert(pos, valor)`` solía insertar *valor* al principio de la lista " +"cuando *pos* era negativo. El comportamiento ha sido cambiado para ser " +"consistente con la indexación de las rebanadas, así que cuando *pos* es -1 " +"el valor será insertado antes del último elemento, y así sucesivamente." #: ../Doc/whatsnew/2.3.rst:999 msgid "" @@ -1095,6 +1520,9 @@ msgid "" "returns its index, now takes optional *start* and *stop* arguments to limit " "the search to only part of the list." msgstr "" +"``list.index(value)``, que busca *valor* dentro de la lista y retorna su " +"índice, ahora toma los argumentos opcionales *start* y *stop* para limitar " +"la búsqueda sólo a una parte de la lista." #: ../Doc/whatsnew/2.3.rst:1003 msgid "" @@ -1103,6 +1531,11 @@ msgid "" "dictionary. If the requested key isn't present in the dictionary, *default* " "is returned if it's specified and :exc:`KeyError` raised if it isn't. ::" msgstr "" +"Los diccionarios tienen un nuevo método, ``pop(key[, *default*])``, que " +"retorna el valor correspondiente a *key* y elimina ese par clave/valor del " +"diccionario. Si la clave solicitada no está presente en el diccionario, se " +"retorna *default* si está especificada y se lanza :exc:`KeyError` si no lo " +"está:" #: ../Doc/whatsnew/2.3.rst:1025 msgid "" @@ -1110,20 +1543,26 @@ msgid "" "creates a dictionary with keys taken from the supplied iterator *iterable* " "and all values set to *value*, defaulting to ``None``." msgstr "" +"También hay un nuevo método de clase, ``dict.fromkeys(iterable, value)``, " +"que crea un diccionario con claves tomadas del iterador *iterable* " +"suministrado y todos los valores establecidos a *value*, por defecto a " +"``None``." #: ../Doc/whatsnew/2.3.rst:1029 msgid "(Patches contributed by Raymond Hettinger.)" -msgstr "" +msgstr "(Parches aportados por Raymond Hettinger)" #: ../Doc/whatsnew/2.3.rst:1031 msgid "" "Also, the :func:`dict` constructor now accepts keyword arguments to simplify " "creating small dictionaries::" msgstr "" +"Además, el constructor :func:`dict` ahora acepta argumentos de palabras " +"clave para simplificar la creación de pequeños diccionarios::" #: ../Doc/whatsnew/2.3.rst:1037 msgid "(Contributed by Just van Rossum.)" -msgstr "" +msgstr "(Contribución de Just van Rossum.)" #: ../Doc/whatsnew/2.3.rst:1039 msgid "" @@ -1132,6 +1571,10 @@ msgid "" "Python with the :option:`-O` switch will still generate code that doesn't " "execute any assertions." msgstr "" +"La expresión :keyword:`assert` ya no comprueba la bandera ``debug__``, por " +"lo que ya no se pueden desactivar las aserciones asignando a ``__debug__``. " +"Ejecutar Python con la opción :option:`-O` seguirá generando código que no " +"ejecute ninguna aserción." #: ../Doc/whatsnew/2.3.rst:1044 msgid "" @@ -1141,6 +1584,12 @@ msgid "" "now use the type objects available in the :mod:`types` module.) For example, " "you can create a new module object with the following code:" msgstr "" +"La mayoría de los objetos de tipo son ahora invocables, por lo que puedes " +"usarlos para crear nuevos objetos como funciones, clases y módulos. (Esto " +"significa que el módulo :mod:`new` puede quedar obsoleto en una futura " +"versión de Python, porque ahora puedes utilizar los objetos de tipo " +"disponibles en el módulo :mod:`types`) Por ejemplo, puede crear un nuevo " +"objeto de módulo con el siguiente código:" #: ../Doc/whatsnew/2.3.rst:1059 msgid "" @@ -1151,6 +1600,12 @@ msgid "" "PendingDeprecationWarning:: <-W>` on the command line or use :func:`warnings." "filterwarnings`." msgstr "" +"Se ha añadido una nueva advertencia, :exc:`PendingDeprecationWarning` para " +"indicar las características que están en proceso de ser obsoletas. La " +"advertencia no se imprimirá por defecto. Para comprobar el uso de funciones " +"que quedarán obsoletas en el futuro, proporcione :option:`-Walways::" +"PendingDeprecationWarning:: <-W>` en la línea de comandos o utilice :func:" +"`warnings.filterwarnings`." #: ../Doc/whatsnew/2.3.rst:1065 msgid "" @@ -1158,6 +1613,9 @@ msgid "" "occurred\"``, has begun. Raising a string will now trigger :exc:" "`PendingDeprecationWarning`." msgstr "" +"Ha comenzado el proceso de desaprobación de las excepciones basadas en " +"cadenas, como en ``lanzamiento de \"Error ocurred”``. Al lanzar una cadena, " +"ahora se activará :exc:`PendingDeprecationWarning`." #: ../Doc/whatsnew/2.3.rst:1069 msgid "" @@ -1165,6 +1623,9 @@ msgid "" "warning. In a future version of Python, ``None`` may finally become a " "keyword." msgstr "" +"El uso de ``None`` como nombre de una variable ahora resultará en una " +"advertencia :exc:`SyntaxWarning`. En una futura versión de Python, ``None`` " +"podría convertirse en una palabra clave." #: ../Doc/whatsnew/2.3.rst:1072 msgid "" @@ -1176,6 +1637,15 @@ msgid "" "encoding used by the file; Unicode strings written to the file will be " "automatically converted to bytes using the given encoding." msgstr "" +"El método :meth:`xreadlines` de los objetos archivo, introducido en Python " +"2.1, ya no es necesario porque los archivos se comportan ahora como su " +"propio iterador. :meth:`xreadlines` se introdujo originalmente como una " +"forma más rápida de recorrer todas las líneas de un archivo, pero ahora se " +"puede escribir simplemente ``for line in file_obj``. Los objetos archivo " +"también tienen un nuevo atributo :attr:`encoding` de sólo lectura que " +"proporciona la codificación utilizada por el archivo; las cadenas Unicode " +"escritas en el archivo se convertirán automáticamente a bytes utilizando la " +"codificación dada." #: ../Doc/whatsnew/2.3.rst:1080 msgid "" @@ -1192,6 +1662,19 @@ msgid "" "pipermail/python-dev/2002-October/029035.html. Samuele Pedroni first pointed " "out the problem and also implemented the fix by coding the C3 algorithm." msgstr "" +"El orden de resolución de los métodos utilizados por las clases del nuevo " +"estilo ha cambiado, aunque sólo notarás la diferencia si tienes una " +"jerarquía de herencia realmente complicada. Las clases clásicas no se ven " +"afectadas por este cambio. Python 2.2 originalmente utilizaba una " +"ordenación topológica de los ancestros de una clase, pero 2.3 ahora utiliza " +"el algoritmo C3 como se describe en el artículo `\"A Monotonic Superclass " +"Linearization for Dylan\" `_. Para entender la motivación de este cambio, lea el " +"artículo de Michele Simionato `\"Python 2.3 Method Resolution Order\" " +"`_, o lea el hilo en python-" +"dev que comienza con el mensaje en https://mail.python.org/pipermail/python-" +"dev/2002-October/029035.html. Samuele Pedroni fue el primero en señalar el " +"problema y también implementó la solución codificando el algoritmo C3." #: ../Doc/whatsnew/2.3.rst:1093 msgid "" @@ -1203,6 +1686,13 @@ msgid "" "number using ``sys.setcheckinterval(N)``. The limit can be retrieved with " "the new :func:`sys.getcheckinterval` function." msgstr "" +"Python ejecuta programas multihilo cambiando entre hilos después de ejecutar " +"N bytecodes. El valor por defecto de N se ha incrementado de 10 a 100 " +"bytecodes, acelerando las aplicaciones de un solo hilo al reducir la " +"sobrecarga de cambio. Algunas aplicaciones multihilo pueden sufrir un " +"tiempo de respuesta más lento, pero eso se arregla fácilmente estableciendo " +"el límite a un número menor usando ``sys.setcheckinterval(N)``. El límite " +"puede recuperarse con la nueva función :func:`sys.getcheckinterval`." #: ../Doc/whatsnew/2.3.rst:1101 msgid "" @@ -1211,10 +1701,15 @@ msgid "" "``'.'`` in front of the type name. For example, in Python 2.2, if you " "created a socket and printed its :attr:`__class__`, you'd get this output::" msgstr "" +"Un cambio menor pero de gran alcance es que los nombres de los tipos de " +"extensión definidos por los módulos incluidos con Python ahora contienen el " +"módulo y un ``.'`` delante del nombre del tipo. Por ejemplo, en Python 2.2, " +"si creabas un socket e imprimías su :attr:`__class__`, obtendrías esta " +"salida::" #: ../Doc/whatsnew/2.3.rst:1110 msgid "In 2.3, you get this::" -msgstr "" +msgstr "En 2.3, se obtiene esto::" #: ../Doc/whatsnew/2.3.rst:1115 msgid "" @@ -1225,10 +1720,16 @@ msgid "" "lines of those relating to assigning to an instance's :attr:`~instance." "__class__` attribute." msgstr "" +"Se ha eliminado una de las incompatibilidades señaladas entre las clases de " +"estilo antiguo y las de estilo nuevo: ahora se pueden asignar a los " +"atributos :attr:`~definición.__name__` y :attr:`~clase.__bases__` de las " +"clases de estilo nuevo. Hay algunas restricciones sobre lo que se puede " +"asignar a :attr:`~class.__bases__` en la línea de las relacionadas con la " +"asignación al atributo :attr:`~instance.__class__` de una instancia." #: ../Doc/whatsnew/2.3.rst:1125 msgid "String Changes" -msgstr "" +msgstr "Cambios en las cadenas de texto" #: ../Doc/whatsnew/2.3.rst:1127 msgid "" @@ -1238,12 +1739,20 @@ msgid "" "and ``X in Y`` will return :const:`True` if *X* is a substring of *Y*. If " "*X* is the empty string, the result is always :const:`True`. ::" msgstr "" +"El operador :keyword:`in` ahora funciona de forma diferente para las " +"cadenas. Antes, cuando se evaluaba ``X en Y`` donde *X* y *Y* eran cadenas, " +"*X* sólo podía ser un único carácter. Esto ha cambiado; *X* puede ser una " +"cadena de cualquier longitud, y ``X en Y`` retornará :const:`True` si *X* es " +"una subcadena de *Y*. Si *X* es una cadena vacía, el resultado es siempre :" +"const:`True`. ::" #: ../Doc/whatsnew/2.3.rst:1140 msgid "" "Note that this doesn't tell you where the substring starts; if you need that " "information, use the :meth:`find` string method." msgstr "" +"Tenga en cuenta que esto no le dice dónde empieza la subcadena; si necesita " +"esa información, utilice el método :meth:`find` string." #: ../Doc/whatsnew/2.3.rst:1143 msgid "" @@ -1251,16 +1760,22 @@ msgid "" "have an optional argument for specifying the characters to strip. The " "default is still to remove all whitespace characters::" msgstr "" +"Los métodos de cadena :meth:`strip`, :meth:`lstrip` y :meth:`rstrip` tienen " +"ahora un argumento opcional para especificar los caracteres a eliminar. El " +"valor por defecto sigue siendo eliminar todos los caracteres de espacio en " +"blanco::" #: ../Doc/whatsnew/2.3.rst:1157 msgid "(Suggested by Simon Brunning and implemented by Walter Dörwald.)" -msgstr "" +msgstr "(Sugerido por Simon Brunning y aplicado por Walter Dörwald)" #: ../Doc/whatsnew/2.3.rst:1159 msgid "" "The :meth:`startswith` and :meth:`endswith` string methods now accept " "negative numbers for the *start* and *end* parameters." msgstr "" +"Los métodos de cadena :meth:`startswith` y :meth:`endswith` ahora aceptan " +"números negativos para los parámetros *start* y *end*." #: ../Doc/whatsnew/2.3.rst:1162 msgid "" @@ -1269,10 +1784,14 @@ msgid "" "left until it's the specified width. Note that the ``%`` operator is still " "more flexible and powerful than :meth:`zfill`. ::" msgstr "" +"Otro nuevo método de cadena es :meth:`zfill`, originalmente una función del " +"módulo :mod:`string`. :meth:`zfill` rellena una cadena numérica con ceros a " +"la izquierda hasta que tenga el ancho especificado. Tenga en cuenta que el " +"operador ``%`` sigue siendo más flexible y potente que :meth:`zfill`. ::" #: ../Doc/whatsnew/2.3.rst:1174 msgid "(Contributed by Walter Dörwald.)" -msgstr "" +msgstr "(Contribución de Walter Dörwald.)" #: ../Doc/whatsnew/2.3.rst:1176 msgid "" @@ -1281,6 +1800,11 @@ msgid "" "basestring)`` will return :const:`True` for either kind of string. It's a " "completely abstract type, so you can't create :class:`basestring` instances." msgstr "" +"Se ha añadido un nuevo tipo de objeto, :class:`basestring`. Tanto las " +"cadenas de 8 bits como las cadenas Unicode heredan de este tipo, por lo que " +"``isinstance(obj, basestring)`` retornará :const:`True` para cualquier tipo " +"de cadena. Es un tipo completamente abstracto, por lo que no se pueden " +"crear instancias de :class:`basestring`." #: ../Doc/whatsnew/2.3.rst:1181 msgid "" @@ -1288,22 +1812,30 @@ msgid "" "the usual way when the only reference to them is from the internal " "dictionary of interned strings. (Implemented by Oren Tirosh.)" msgstr "" +"Las cadenas internas ya no son inmortales y ahora serán recolectadas de la " +"forma habitual cuando la única referencia a ellas sea desde el diccionario " +"interno de cadenas internas. (Implementado por Oren Tirosh)" #: ../Doc/whatsnew/2.3.rst:1189 msgid "Optimizations" -msgstr "" +msgstr "Optimizaciones" #: ../Doc/whatsnew/2.3.rst:1191 msgid "" "The creation of new-style class instances has been made much faster; they're " "now faster than classic classes!" msgstr "" +"La creación de instancias de clases de estilo nuevo se ha hecho mucho más " +"rápida; ¡ahora son más rápidas que las clases clásicas!" #: ../Doc/whatsnew/2.3.rst:1194 msgid "" "The :meth:`sort` method of list objects has been extensively rewritten by " "Tim Peters, and the implementation is significantly faster." msgstr "" +"El método :meth:`sort` de los objetos de la lista ha sido ampliamente " +"reescrito por Tim Peters, y la implementación es significativamente más " +"rápida." #: ../Doc/whatsnew/2.3.rst:1197 msgid "" @@ -1313,6 +1845,11 @@ msgid "" "(Original patch by Christopher A. Craig, and significantly reworked by Tim " "Peters.)" msgstr "" +"La multiplicación de enteros largos es ahora mucho más rápida gracias a una " +"implementación de la multiplicación Karatsuba, un algoritmo que escala mejor " +"que el O(n\\*n) requerido para el algoritmo de multiplicación de la escuela " +"primaria. (Parche original de Christopher A. Craig, y reelaborado " +"significativamente por Tim Peters)" #: ../Doc/whatsnew/2.3.rst:1202 msgid "" @@ -1320,6 +1857,10 @@ msgid "" "increase, depending on your compiler's idiosyncrasies. See section :ref:" "`23section-other` for a longer explanation. (Removed by Michael Hudson.)" msgstr "" +"El opcode ``SET_LINENO`` ha desaparecido. Esto puede proporcionar un " +"pequeño aumento de velocidad, dependiendo de la idiosincrasia de su " +"compilador. Vea la sección :ref:`23section-other` para una explicación más " +"larga. (Eliminado por Michael Hudson)" #: ../Doc/whatsnew/2.3.rst:1206 msgid "" @@ -1327,6 +1868,9 @@ msgid "" "xrange(n)`` slightly faster than ``for i in range(n)``. (Patch by Raymond " "Hettinger.)" msgstr "" +"Los objetos :func:`xrange` tienen ahora su propio iterador, haciendo que " +"``for i in xrange(n)`` sea ligeramente más rápido que ``for i in " +"range(n)``. (Parche de Raymond Hettinger)" #: ../Doc/whatsnew/2.3.rst:1210 msgid "" @@ -1335,16 +1879,22 @@ msgid "" "(Implemented mostly by GvR, but lots of people have contributed single " "changes.)" msgstr "" +"Se han realizado una serie de pequeños reajustes en varios puntos " +"conflictivos para mejorar el rendimiento, como por ejemplo alinear una " +"función o eliminar algo de código. (Implementado principalmente por GvR, " +"pero mucha gente ha contribuido con cambios individuales)" #: ../Doc/whatsnew/2.3.rst:1214 msgid "" "The net result of the 2.3 optimizations is that Python 2.3 runs the pystone " "benchmark around 25% faster than Python 2.2." msgstr "" +"El resultado neto de las optimizaciones de la versión 2.3 es que Python 2.3 " +"ejecuta el benchmark pystone alrededor de un 25% f más rápido que Python 2.2." #: ../Doc/whatsnew/2.3.rst:1221 msgid "New, Improved, and Deprecated Modules" -msgstr "" +msgstr "Módulos nuevos, mejorados y obsoletos" #: ../Doc/whatsnew/2.3.rst:1223 msgid "" @@ -1354,6 +1904,12 @@ msgid "" "source tree for a more complete list of changes, or look through the CVS " "logs for all the details." msgstr "" +"Como es habitual, la biblioteca estándar de Python ha recibido una serie de " +"mejoras y correcciones de errores. Aquí hay una lista parcial de los " +"cambios más notables, ordenados alfabéticamente por nombre de módulo. " +"Consulte el archivo :file:`Misc/NEWS` en el árbol de fuentes para obtener " +"una lista más completa de los cambios, o busque en los registros de CVS para " +"obtener todos los detalles." #: ../Doc/whatsnew/2.3.rst:1228 msgid "" @@ -1362,6 +1918,11 @@ msgid "" "assignment operator to add another array's contents, and the ``*=`` " "assignment operator to repeat an array. (Contributed by Jason Orendorff.)" msgstr "" +"El módulo :mod:`array` soporta ahora matrices de caracteres Unicode que " +"utilizan el carácter de formato ``'u``. Las matrices también soportan ahora " +"el uso del operador de asignación ``+=`` para añadir el contenido de otra " +"matriz, y el operador de asignación ``*=`` para repetir una matriz. " +"(Contribución de Jason Orendorff)" #: ../Doc/whatsnew/2.3.rst:1233 msgid "" @@ -1369,6 +1930,10 @@ msgid "" "`_ package, providing a more complete " "interface to the transactional features of the BerkeleyDB library." msgstr "" +"El módulo :mod:`bsddb` ha sido reemplazado por la versión 4.1.6 del paquete " +"`PyBSDDB `_, proporcionando una interfaz más " +"completa para las características transaccionales de la biblioteca " +"BerkeleyDB." #: ../Doc/whatsnew/2.3.rst:1237 msgid "" @@ -1385,6 +1950,19 @@ msgid "" "importing it as :mod:`bsddb3`, you will have to change your ``import`` " "statements to import it as :mod:`bsddb`." msgstr "" +"La antigua versión del módulo ha sido renombrada como :mod:`bsddb185` y ya " +"no se construye automáticamente; tendrás que editar :file:`Modules/Setup` " +"para activarlo. Ten en cuenta que el nuevo paquete :mod:`bsddb` está " +"pensado para ser compatible con el módulo antiguo, así que asegúrate de " +"enviar errores si descubres alguna incompatibilidad. Al actualizar a Python " +"2.3, si el nuevo intérprete se compila con una nueva versión de la " +"biblioteca BerkeleyDB subyacente, es casi seguro que tendrá que convertir " +"sus archivos de base de datos a la nueva versión. Puede hacerlo fácilmente " +"con los nuevos scripts :file:`db2pickle.py` y :file:`pickle2db.py` que " +"encontrará en el directorio :file:`Tools/scripts` de la distribución. Si ya " +"ha estado utilizando el paquete PyBSDDB e importándolo como :mod:`bsddb3`, " +"tendrá que cambiar sus sentencias ``import`` para importarlo como :mod:" +"`bsddb`." #: ../Doc/whatsnew/2.3.rst:1249 msgid "" @@ -1392,12 +1970,19 @@ msgid "" "library. bz2-compressed data is usually smaller than corresponding :mod:" "`zlib`\\ -compressed data. (Contributed by Gustavo Niemeyer.)" msgstr "" +"El nuevo módulo :mod:`bz2` es una interfaz para la biblioteca de compresión " +"de datos bz2. Los datos comprimidos con bz2 suelen ser más pequeños que los " +"correspondientes datos comprimidos con :mod:`zlib`. (Contribución de Gustavo " +"Niemeyer)" #: ../Doc/whatsnew/2.3.rst:1253 msgid "" "A set of standard date/time types has been added in the new :mod:`datetime` " "module. See the following section for more details." msgstr "" +"Se ha añadido un conjunto de tipos de fecha/hora estándar en el nuevo " +"módulo :mod:`datetime`. Consulte la siguiente sección para obtener más " +"detalles." #: ../Doc/whatsnew/2.3.rst:1256 msgid "" @@ -1408,12 +1993,20 @@ msgid "" "includes the header file :file:`sample.h`, you would create the :class:" "`Extension` object like this::" msgstr "" +"La clase Distutils :class:`Extension` soporta ahora un argumento constructor " +"extra llamado *depends* para listar archivos fuente adicionales de los que " +"depende una extensión. Esto permite a Distutils recompilar el módulo si se " +"modifica alguno de los archivos de dependencia. Por ejemplo, si :file:" +"`sampmodule.c` incluye el fichero de cabecera :file:`sample.h`, se crearía " +"el objeto :class:`Extension` así::" #: ../Doc/whatsnew/2.3.rst:1267 msgid "" "Modifying :file:`sample.h` would then cause the module to be recompiled. " "(Contributed by Jeremy Hylton.)" msgstr "" +"La modificación de :file:`sample.h` haría que el módulo se recompilara. " +"(Contribución de Jeremy Hylton)" #: ../Doc/whatsnew/2.3.rst:1270 msgid "" @@ -1422,6 +2015,10 @@ msgid "" "environment variables, using them to override the settings in Python's " "configuration (contributed by Robert Weber)." msgstr "" +"Otros cambios menores en Distutils: ahora comprueba las variables de " +"entorno :envvar:`CC`, :envvar:`CFLAGS`, :envvar:`CPP`, :envvar:`LDFLAGS` y :" +"envvar:`CPPFLAGS`, utilizándolas para anular los ajustes de la configuración " +"de Python (contribución de Robert Weber)." #: ../Doc/whatsnew/2.3.rst:1275 msgid "" @@ -1430,12 +2027,18 @@ msgid "" "private ones as well. The :func:`DocTestSuite` function creates a :class:" "`unittest.TestSuite` object from a set of :mod:`doctest` tests." msgstr "" +"Anteriormente el módulo :mod:`doctest` sólo buscaba casos de prueba en los " +"docstrings de los métodos y funciones públicos, pero ahora también examina " +"los privados. La función :func:`DocTestSuite` crea un objeto :class:" +"`unittest.TestSuite` a partir de un conjunto de pruebas :mod:`doctest`." #: ../Doc/whatsnew/2.3.rst:1280 msgid "" "The new ``gc.get_referents(object)`` function returns a list of all the " "objects referenced by *object*." msgstr "" +"La nueva función ``gc.get_referents(object)`` retorna una lista de todos los " +"objetos referenciados por *object*." #: ../Doc/whatsnew/2.3.rst:1283 msgid "" @@ -1446,20 +2049,29 @@ msgid "" "mode processing continues, meaning that options and arguments can be mixed. " "For example::" msgstr "" +"El módulo :mod:`getopt` ha ganado una nueva función, :func:`gnu_getopt`, que " +"admite los mismos argumentos que la función :func:`getopt` existente, pero " +"utiliza el modo de exploración al estilo GNU. La función :func:`getopt` " +"existente deja de procesar las opciones tan pronto como se encuentra un " +"argumento que no es una opción, pero en el modo GNU el procesamiento " +"continúa, lo que significa que las opciones y los argumentos pueden " +"mezclarse. Por ejemplo::" #: ../Doc/whatsnew/2.3.rst:1294 msgid "(Contributed by Peter Åstrand.)" -msgstr "" +msgstr "(Contribución de Peter Åstrand.)" #: ../Doc/whatsnew/2.3.rst:1296 msgid "" "The :mod:`grp`, :mod:`pwd`, and :mod:`resource` modules now return enhanced " "tuples::" msgstr "" +"Los módulos :mod:`grp`, :mod:`pwd` y :mod:`resource` retornan ahora tuplas " +"mejoradas::" #: ../Doc/whatsnew/2.3.rst:1304 msgid "The :mod:`gzip` module can now handle files exceeding 2 GiB." -msgstr "" +msgstr "El módulo :mod:`gzip` ahora puede manejar archivos de más de 2 GiB." #: ../Doc/whatsnew/2.3.rst:1306 msgid "" @@ -1471,6 +2083,14 @@ msgid "" "is O(lg n). (See https://xlinux.nist.gov/dads//HTML/priorityque.html for " "more information about the priority queue data structure.)" msgstr "" +"El nuevo módulo :mod:`heapq` contiene una implementación de un algoritmo de " +"colas de montón. Un montón es una estructura de datos similar a un array " +"que mantiene los elementos en un orden parcialmente ordenado de forma que, " +"para cada índice *k*, ``heap[k] <= heap[2*k+1]`` y ``heap[k] <= heap[2*k" +"+2]``. Esto hace que sea rápido eliminar el elemento más pequeño, y la " +"inserción de un nuevo elemento manteniendo la propiedad del montón es *O(lg " +"n)*. (Véase https://xlinux.nist.gov/dads//HTML/priorityque.html para más " +"información sobre la estructura de datos de la cola de prioridad)" #: ../Doc/whatsnew/2.3.rst:1314 msgid "" @@ -1479,10 +2099,14 @@ msgid "" "on top of some other mutable Python sequence type. Here's an example that " "uses a Python list::" msgstr "" +"El módulo :mod:`heapq` proporciona las funciones :func:`heappush` y :func:" +"`heappop` para añadir y eliminar elementos manteniendo la propiedad del " +"montón sobre algún otro tipo de secuencia mutable de Python. Aquí hay un " +"ejemplo que utiliza una lista de Python::" #: ../Doc/whatsnew/2.3.rst:1332 msgid "(Contributed by Kevin O'Connor.)" -msgstr "" +msgstr "(Contribución de Kevin O'Connor.)" #: ../Doc/whatsnew/2.3.rst:1334 msgid "" @@ -1493,1019 +2117,9 @@ msgid "" "operations. IDLE's core code has been incorporated into the standard library " "as the :mod:`idlelib` package." msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1340 -msgid "" -"The :mod:`imaplib` module now supports IMAP over SSL. (Contributed by Piers " -"Lauder and Tino Lange.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1343 -msgid "" -"The :mod:`itertools` contains a number of useful functions for use with " -"iterators, inspired by various functions provided by the ML and Haskell " -"languages. For example, ``itertools.ifilter(predicate, iterator)`` returns " -"all elements in the iterator for which the function :func:`predicate` " -"returns :const:`True`, and ``itertools.repeat(obj, N)`` returns ``obj`` *N* " -"times. There are a number of other functions in the module; see the " -"package's reference documentation for details. (Contributed by Raymond " -"Hettinger.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1352 -msgid "" -"Two new functions in the :mod:`math` module, ``degrees(rads)`` and " -"``radians(degs)``, convert between radians and degrees. Other functions in " -"the :mod:`math` module such as :func:`math.sin` and :func:`math.cos` have " -"always required input values measured in radians. Also, an optional *base* " -"argument was added to :func:`math.log` to make it easier to compute " -"logarithms for bases other than ``e`` and ``10``. (Contributed by Raymond " -"Hettinger.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1359 -msgid "" -"Several new POSIX functions (:func:`getpgid`, :func:`killpg`, :func:" -"`lchown`, :func:`loadavg`, :func:`major`, :func:`makedev`, :func:`minor`, " -"and :func:`mknod`) were added to the :mod:`posix` module that underlies the :" -"mod:`os` module. (Contributed by Gustavo Niemeyer, Geert Jansen, and Denis " -"S. Otkidach.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1365 -msgid "" -"In the :mod:`os` module, the :func:`\\*stat` family of functions can now " -"report fractions of a second in a timestamp. Such time stamps are " -"represented as floats, similar to the value returned by :func:`time.time`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1369 -msgid "" -"During testing, it was found that some applications will break if time " -"stamps are floats. For compatibility, when using the tuple interface of " -"the :class:`stat_result` time stamps will be represented as integers. When " -"using named fields (a feature first introduced in Python 2.2), time stamps " -"are still represented as integers, unless :func:`os.stat_float_times` is " -"invoked to enable float return values::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1382 -msgid "In Python 2.4, the default will change to always returning floats." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1384 -msgid "" -"Application developers should enable this feature only if all their " -"libraries work properly when confronted with floating point time stamps, or " -"if they use the tuple API. If used, the feature should be activated on an " -"application level instead of trying to enable it on a per-use basis." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1389 -msgid "" -"The :mod:`optparse` module contains a new parser for command-line arguments " -"that can convert option values to a particular Python type and will " -"automatically generate a usage message. See the following section for more " -"details." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1394 -msgid "" -"The old and never-documented :mod:`linuxaudiodev` module has been " -"deprecated, and a new version named :mod:`ossaudiodev` has been added. The " -"module was renamed because the OSS sound drivers can be used on platforms " -"other than Linux, and the interface has also been tidied and brought up to " -"date in various ways. (Contributed by Greg Ward and Nicholas FitzRoy-Dale.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1400 -msgid "" -"The new :mod:`platform` module contains a number of functions that try to " -"determine various properties of the platform you're running on. There are " -"functions for getting the architecture, CPU type, the Windows OS version, " -"and even the Linux distribution version. (Contributed by Marc-André Lemburg.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1405 -msgid "" -"The parser objects provided by the :mod:`pyexpat` module can now optionally " -"buffer character data, resulting in fewer calls to your character data " -"handler and therefore faster performance. Setting the parser object's :attr:" -"`buffer_text` attribute to :const:`True` will enable buffering." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1410 -msgid "" -"The ``sample(population, k)`` function was added to the :mod:`random` " -"module. *population* is a sequence or :class:`xrange` object containing the " -"elements of a population, and :func:`sample` chooses *k* elements from the " -"population without replacing chosen elements. *k* can be any value up to " -"``len(population)``. For example::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1432 -msgid "" -"The :mod:`random` module now uses a new algorithm, the Mersenne Twister, " -"implemented in C. It's faster and more extensively studied than the " -"previous algorithm." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1436 -msgid "(All changes contributed by Raymond Hettinger.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1438 -msgid "" -"The :mod:`readline` module also gained a number of new functions: :func:" -"`get_history_item`, :func:`get_current_history_length`, and :func:" -"`redisplay`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1442 -msgid "" -"The :mod:`rexec` and :mod:`Bastion` modules have been declared dead, and " -"attempts to import them will fail with a :exc:`RuntimeError`. New-style " -"classes provide new ways to break out of the restricted execution " -"environment provided by :mod:`rexec`, and no one has interest in fixing them " -"or time to do so. If you have applications using :mod:`rexec`, rewrite them " -"to use something else." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1448 -msgid "" -"(Sticking with Python 2.2 or 2.1 will not make your applications any safer " -"because there are known bugs in the :mod:`rexec` module in those versions. " -"To repeat: if you're using :mod:`rexec`, stop using it immediately.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1452 -msgid "" -"The :mod:`rotor` module has been deprecated because the algorithm it uses " -"for encryption is not believed to be secure. If you need encryption, use " -"one of the several AES Python modules that are available separately." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1456 -msgid "" -"The :mod:`shutil` module gained a ``move(src, dest)`` function that " -"recursively moves a file or directory to a new location." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1459 -msgid "" -"Support for more advanced POSIX signal handling was added to the :mod:" -"`signal` but then removed again as it proved impossible to make it work " -"reliably across platforms." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1463 -msgid "" -"The :mod:`socket` module now supports timeouts. You can call the " -"``settimeout(t)`` method on a socket object to set a timeout of *t* seconds. " -"Subsequent socket operations that take longer than *t* seconds to complete " -"will abort and raise a :exc:`socket.timeout` exception." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1468 -msgid "" -"The original timeout implementation was by Tim O'Malley. Michael Gilfix " -"integrated it into the Python :mod:`socket` module and shepherded it through " -"a lengthy review. After the code was checked in, Guido van Rossum rewrote " -"parts of it. (This is a good example of a collaborative development process " -"in action.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1474 -msgid "" -"On Windows, the :mod:`socket` module now ships with Secure Sockets Layer " -"(SSL) support." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1477 -msgid "" -"The value of the C :const:`PYTHON_API_VERSION` macro is now exposed at the " -"Python level as ``sys.api_version``. The current exception can be cleared " -"by calling the new :func:`sys.exc_clear` function." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1481 -msgid "" -"The new :mod:`tarfile` module allows reading from and writing to :program:" -"`tar`\\ -format archive files. (Contributed by Lars Gustäbel.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1484 -msgid "" -"The new :mod:`textwrap` module contains functions for wrapping strings " -"containing paragraphs of text. The ``wrap(text, width)`` function takes a " -"string and returns a list containing the text split into lines of no more " -"than the chosen width. The ``fill(text, width)`` function returns a single " -"string, reformatted to fit into lines no longer than the chosen width. (As " -"you can guess, :func:`fill` is built on top of :func:`wrap`. For example::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1506 -msgid "" -"The module also contains a :class:`TextWrapper` class that actually " -"implements the text wrapping strategy. Both the :class:`TextWrapper` class " -"and the :func:`wrap` and :func:`fill` functions support a number of " -"additional keyword arguments for fine-tuning the formatting; consult the " -"module's documentation for details. (Contributed by Greg Ward.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1512 -msgid "" -"The :mod:`thread` and :mod:`threading` modules now have companion modules, :" -"mod:`dummy_thread` and :mod:`dummy_threading`, that provide a do-nothing " -"implementation of the :mod:`thread` module's interface for platforms where " -"threads are not supported. The intention is to simplify thread-aware " -"modules (ones that *don't* rely on threads to run) by putting the following " -"code at the top::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1524 -msgid "" -"In this example, :mod:`_threading` is used as the module name to make it " -"clear that the module being used is not necessarily the actual :mod:" -"`threading` module. Code can call functions and use classes in :mod:" -"`_threading` whether or not threads are supported, avoiding an :keyword:`if` " -"statement and making the code slightly clearer. This module will not " -"magically make multithreaded code run without threads; code that waits for " -"another thread to return or to do something will simply hang forever." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1532 -msgid "" -"The :mod:`time` module's :func:`strptime` function has long been an " -"annoyance because it uses the platform C library's :func:`strptime` " -"implementation, and different platforms sometimes have odd bugs. Brett " -"Cannon contributed a portable implementation that's written in pure Python " -"and should behave identically on all platforms." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1538 -msgid "" -"The new :mod:`timeit` module helps measure how long snippets of Python code " -"take to execute. The :file:`timeit.py` file can be run directly from the " -"command line, or the module's :class:`Timer` class can be imported and used " -"directly. Here's a short example that figures out whether it's faster to " -"convert an 8-bit string to Unicode by appending an empty Unicode string to " -"it or by using the :func:`unicode` function::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1558 -msgid "" -"The :mod:`Tix` module has received various bug fixes and updates for the " -"current version of the Tix package." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1561 -msgid "" -"The :mod:`Tkinter` module now works with a thread-enabled version of Tcl. " -"Tcl's threading model requires that widgets only be accessed from the thread " -"in which they're created; accesses from another thread can cause Tcl to " -"panic. For certain Tcl interfaces, :mod:`Tkinter` will now automatically " -"avoid this when a widget is accessed from a different thread by marshalling " -"a command, passing it to the correct thread, and waiting for the results. " -"Other interfaces can't be handled automatically but :mod:`Tkinter` will now " -"raise an exception on such an access so that you can at least find out about " -"the problem. See https://mail.python.org/pipermail/python-dev/2002-" -"December/031107.html for a more detailed explanation of this change. " -"(Implemented by Martin von Löwis.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1572 -msgid "" -"Calling Tcl methods through :mod:`_tkinter` no longer returns only strings. " -"Instead, if Tcl returns other objects those objects are converted to their " -"Python equivalent, if one exists, or wrapped with a :class:`_tkinter." -"Tcl_Obj` object if no Python equivalent exists. This behavior can be " -"controlled through the :meth:`wantobjects` method of :class:`tkapp` objects." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1578 -msgid "" -"When using :mod:`_tkinter` through the :mod:`Tkinter` module (as most " -"Tkinter applications will), this feature is always activated. It should not " -"cause compatibility problems, since Tkinter would always convert string " -"results to Python types where possible." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1583 -msgid "" -"If any incompatibilities are found, the old behavior can be restored by " -"setting the :attr:`wantobjects` variable in the :mod:`Tkinter` module to " -"false before creating the first :class:`tkapp` object. ::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1590 -msgid "Any breakage caused by this change should be reported as a bug." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1592 -msgid "" -"The :mod:`UserDict` module has a new :class:`DictMixin` class which defines " -"all dictionary methods for classes that already have a minimum mapping " -"interface. This greatly simplifies writing classes that need to be " -"substitutable for dictionaries, such as the classes in the :mod:`shelve` " -"module." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1598 -msgid "" -"Adding the mix-in as a superclass provides the full dictionary interface " -"whenever the class defines :meth:`__getitem__`, :meth:`__setitem__`, :meth:" -"`__delitem__`, and :meth:`keys`. For example::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1639 -msgid "(Contributed by Raymond Hettinger.)" -msgstr "(Contribución de Raymond Hettinger.)" - -#: ../Doc/whatsnew/2.3.rst:1641 -msgid "" -"The DOM implementation in :mod:`xml.dom.minidom` can now generate XML output " -"in a particular encoding by providing an optional encoding argument to the :" -"meth:`toxml` and :meth:`toprettyxml` methods of DOM nodes." -msgstr "" -"La implementación de DOM en :mod:`xml.dom.minidom` puede ahora generar la " -"salida XML en una codificación particular proporcionando un argumento de " -"codificación opcional a los métodos :meth:`toxml` y :meth:`toprettyxml` de " -"los nodos DOM." - -#: ../Doc/whatsnew/2.3.rst:1645 -msgid "" -"The :mod:`xmlrpclib` module now supports an XML-RPC extension for handling " -"nil data values such as Python's ``None``. Nil values are always supported " -"on unmarshalling an XML-RPC response. To generate requests containing " -"``None``, you must supply a true value for the *allow_none* parameter when " -"creating a :class:`Marshaller` instance." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1651 -msgid "" -"The new :mod:`DocXMLRPCServer` module allows writing self-documenting XML-" -"RPC servers. Run it in demo mode (as a program) to see it in action. " -"Pointing the Web browser to the RPC server produces pydoc-style " -"documentation; pointing xmlrpclib to the server allows invoking the actual " -"methods. (Contributed by Brian Quinlan.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1657 -msgid "" -"Support for internationalized domain names (RFCs 3454, 3490, 3491, and 3492) " -"has been added. The \"idna\" encoding can be used to convert between a " -"Unicode domain name and the ASCII-compatible encoding (ACE) of that name. ::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1664 -msgid "" -"The :mod:`socket` module has also been extended to transparently convert " -"Unicode hostnames to the ACE version before passing them to the C library. " -"Modules that deal with hostnames such as :mod:`httplib` and :mod:`ftplib`) " -"also support Unicode host names; :mod:`httplib` also sends HTTP ``Host`` " -"headers using the ACE version of the domain name. :mod:`urllib` supports " -"Unicode URLs with non-ASCII host names as long as the ``path`` part of the " -"URL is ASCII only." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1672 -msgid "" -"To implement this change, the :mod:`stringprep` module, the " -"``mkstringprep`` tool and the ``punycode`` encoding have been added." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1679 -msgid "Date/Time Type" -msgstr "Tipo de fecha/hora" - -#: ../Doc/whatsnew/2.3.rst:1681 -msgid "" -"Date and time types suitable for expressing timestamps were added as the :" -"mod:`datetime` module. The types don't support different calendars or many " -"fancy features, and just stick to the basics of representing time." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1685 -msgid "" -"The three primary types are: :class:`date`, representing a day, month, and " -"year; :class:`~datetime.time`, consisting of hour, minute, and second; and :" -"class:`~datetime.datetime`, which contains all the attributes of both :class:" -"`date` and :class:`~datetime.time`. There's also a :class:`timedelta` class " -"representing differences between two points in time, and time zone logic is " -"implemented by classes inheriting from the abstract :class:`tzinfo` class." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1692 -msgid "" -"You can create instances of :class:`date` and :class:`~datetime.time` by " -"either supplying keyword arguments to the appropriate constructor, e.g. " -"``datetime.date(year=1972, month=10, day=15)``, or by using one of a number " -"of class methods. For example, the :meth:`date.today` class method returns " -"the current local date." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1698 -msgid "" -"Once created, instances of the date/time classes are all immutable. There " -"are a number of methods for producing formatted strings from objects::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1710 -msgid "" -"The :meth:`replace` method allows modifying one or more fields of a :class:" -"`date` or :class:`~datetime.datetime` instance, returning a new instance::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1720 -msgid "" -"Instances can be compared, hashed, and converted to strings (the result is " -"the same as that of :meth:`isoformat`). :class:`date` and :class:`~datetime." -"datetime` instances can be subtracted from each other, and added to :class:" -"`timedelta` instances. The largest missing feature is that there's no " -"standard library support for parsing strings and getting back a :class:" -"`date` or :class:`~datetime.datetime`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1727 -msgid "" -"For more information, refer to the module's reference documentation. " -"(Contributed by Tim Peters.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1734 -msgid "The optparse Module" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1736 -msgid "" -"The :mod:`getopt` module provides simple parsing of command-line arguments. " -"The new :mod:`optparse` module (originally named Optik) provides more " -"elaborate command-line parsing that follows the Unix conventions, " -"automatically creates the output for :option:`!--help`, and can perform " -"different actions for different options." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1742 -msgid "" -"You start by creating an instance of :class:`OptionParser` and telling it " -"what your program's options are. ::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1756 -msgid "" -"Parsing a command line is then done by calling the :meth:`parse_args` " -"method. ::" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1762 -msgid "" -"This returns an object containing all of the option values, and a list of " -"strings containing the remaining arguments." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1765 -msgid "" -"Invoking the script with the various arguments now works as you'd expect it " -"to. Note that the length argument is automatically converted to an integer." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1778 -msgid "The help message is automatically generated for you:" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1793 -msgid "See the module's documentation for more details." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1796 -msgid "" -"Optik was written by Greg Ward, with suggestions from the readers of the " -"Getopt SIG." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1805 -msgid "Pymalloc: A Specialized Object Allocator" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1807 -msgid "" -"Pymalloc, a specialized object allocator written by Vladimir Marangozov, was " -"a feature added to Python 2.1. Pymalloc is intended to be faster than the " -"system :c:func:`malloc` and to have less memory overhead for allocation " -"patterns typical of Python programs. The allocator uses C's :c:func:`malloc` " -"function to get large pools of memory and then fulfills smaller memory " -"requests from these pools." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1813 -msgid "" -"In 2.1 and 2.2, pymalloc was an experimental feature and wasn't enabled by " -"default; you had to explicitly enable it when compiling Python by providing " -"the :option:`!--with-pymalloc` option to the :program:`configure` script. " -"In 2.3, pymalloc has had further enhancements and is now enabled by default; " -"you'll have to supply :option:`!--without-pymalloc` to disable it." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1819 -msgid "" -"This change is transparent to code written in Python; however, pymalloc may " -"expose bugs in C extensions. Authors of C extension modules should test " -"their code with pymalloc enabled, because some incorrect code may cause core " -"dumps at runtime." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1824 -msgid "" -"There's one particularly common error that causes problems. There are a " -"number of memory allocation functions in Python's C API that have previously " -"just been aliases for the C library's :c:func:`malloc` and :c:func:`free`, " -"meaning that if you accidentally called mismatched functions the error " -"wouldn't be noticeable. When the object allocator is enabled, these " -"functions aren't aliases of :c:func:`malloc` and :c:func:`free` any more, " -"and calling the wrong function to free memory may get you a core dump. For " -"example, if memory was allocated using :c:func:`PyObject_Malloc`, it has to " -"be freed using :c:func:`PyObject_Free`, not :c:func:`free`. A few modules " -"included with Python fell afoul of this and had to be fixed; doubtless there " -"are more third-party modules that will have the same problem." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1836 -msgid "" -"As part of this change, the confusing multiple interfaces for allocating " -"memory have been consolidated down into two API families. Memory allocated " -"with one family must not be manipulated with functions from the other " -"family. There is one family for allocating chunks of memory and another " -"family of functions specifically for allocating Python objects." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1842 -msgid "" -"To allocate and free an undistinguished chunk of memory use the \"raw memory" -"\" family: :c:func:`PyMem_Malloc`, :c:func:`PyMem_Realloc`, and :c:func:" -"`PyMem_Free`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1845 -msgid "" -"The \"object memory\" family is the interface to the pymalloc facility " -"described above and is biased towards a large number of \"small\" " -"allocations: :c:func:`PyObject_Malloc`, :c:func:`PyObject_Realloc`, and :c:" -"func:`PyObject_Free`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1849 -msgid "" -"To allocate and free Python objects, use the \"object\" family :c:func:" -"`PyObject_New`, :c:func:`PyObject_NewVar`, and :c:func:`PyObject_Del`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1852 -msgid "" -"Thanks to lots of work by Tim Peters, pymalloc in 2.3 also provides " -"debugging features to catch memory overwrites and doubled frees in both " -"extension modules and in the interpreter itself. To enable this support, " -"compile a debugging version of the Python interpreter by running :program:" -"`configure` with :option:`!--with-pydebug`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1858 -msgid "" -"To aid extension writers, a header file :file:`Misc/pymemcompat.h` is " -"distributed with the source to Python 2.3 that allows Python extensions to " -"use the 2.3 interfaces to memory allocation while compiling against any " -"version of Python since 1.5.2. You would copy the file from Python's source " -"distribution and bundle it with the source of your extension." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1869 -msgid "https://hg.python.org/cpython/file/default/Objects/obmalloc.c" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1868 -msgid "" -"For the full details of the pymalloc implementation, see the comments at the " -"top of the file :file:`Objects/obmalloc.c` in the Python source code. The " -"above link points to the file within the python.org SVN browser." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1876 -msgid "Build and C API Changes" -msgstr "Cambios en la API de construcción y C" - -#: ../Doc/whatsnew/2.3.rst:1878 -msgid "Changes to Python's build process and to the C API include:" -msgstr "" -"Los cambios en el proceso de build de Python y en la API de C incluyen:" - -#: ../Doc/whatsnew/2.3.rst:1880 -msgid "" -"The cycle detection implementation used by the garbage collection has proven " -"to be stable, so it's now been made mandatory. You can no longer compile " -"Python without it, and the :option:`!--with-cycle-gc` switch to :program:" -"`configure` has been removed." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1885 -msgid "" -"Python can now optionally be built as a shared library (:file:`libpython2.3." -"so`) by supplying :option:`!--enable-shared` when running Python's :program:" -"`configure` script. (Contributed by Ondrej Palkovsky.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1889 -msgid "" -"The :c:macro:`DL_EXPORT` and :c:macro:`DL_IMPORT` macros are now deprecated. " -"Initialization functions for Python extension modules should now be declared " -"using the new macro :c:macro:`PyMODINIT_FUNC`, while the Python core will " -"generally use the :c:macro:`PyAPI_FUNC` and :c:macro:`PyAPI_DATA` macros." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1894 -msgid "" -"The interpreter can be compiled without any docstrings for the built-in " -"functions and modules by supplying :option:`!--without-doc-strings` to the :" -"program:`configure` script. This makes the Python executable about 10% " -"smaller, but will also mean that you can't get help for Python's built-ins. " -"(Contributed by Gustavo Niemeyer.)" -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1900 -msgid "" -"The :c:func:`PyArg_NoArgs` macro is now deprecated, and code that uses it " -"should be changed. For Python 2.2 and later, the method definition table " -"can specify the :const:`METH_NOARGS` flag, signalling that there are no " -"arguments, and the argument checking can then be removed. If compatibility " -"with pre-2.2 versions of Python is important, the code could use " -"``PyArg_ParseTuple(args, \"\")`` instead, but this will be slower than " -"using :const:`METH_NOARGS`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1907 -msgid "" -":c:func:`PyArg_ParseTuple` accepts new format characters for various sizes " -"of unsigned integers: ``B`` for :c:type:`unsigned char`, ``H`` for :c:type:" -"`unsigned short int`, ``I`` for :c:type:`unsigned int`, and ``K`` for :c:" -"type:`unsigned long long`." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1912 -msgid "" -"A new function, ``PyObject_DelItemString(mapping, char *key)`` was added as " -"shorthand for ``PyObject_DelItem(mapping, PyString_New(key))``." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1915 -msgid "" -"File objects now manage their internal string buffer differently, increasing " -"it exponentially when needed. This results in the benchmark tests in :file:" -"`Lib/test/test_bufio.py` speeding up considerably (from 57 seconds to 1.7 " -"seconds, according to one measurement)." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1920 -msgid "" -"It's now possible to define class and static methods for a C extension type " -"by setting either the :const:`METH_CLASS` or :const:`METH_STATIC` flags in a " -"method's :c:type:`PyMethodDef` structure." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1924 -msgid "" -"Python now includes a copy of the Expat XML parser's source code, removing " -"any dependence on a system version or local installation of Expat." -msgstr "" - -#: ../Doc/whatsnew/2.3.rst:1927 -msgid "" -"If you dynamically allocate type objects in your extension, you should be " -"aware of a change in the rules relating to the :attr:`__module__` and :attr:" -"`~definition.__name__` attributes. In summary, you will want to ensure the " -"type's dictionary contains a ``'__module__'`` key; making the module name " -"the part of the type name leading up to the final period will no longer have " -"the desired effect. For more detail, read the API reference documentation " -"or the source." -msgstr "" -"Si asigna dinámicamente objetos de tipo en su extensión, debe tener en " -"cuenta un cambio en las reglas relacionadas con los atributos :attr:" -"`__module__` y :attr:`~definition.__name__`. En resumen, querrá asegurarse " -"de que el diccionario del tipo contiene una clave ``'__module__``; hacer que " -"el nombre del módulo sea la parte del nombre del tipo que va hasta el punto " -"final ya no tendrá el efecto deseado. Para más detalles, lea la " -"documentación de referencia de la API o el código fuente." - -#: ../Doc/whatsnew/2.3.rst:1938 -msgid "Port-Specific Changes" -msgstr "Cambios específicos en los ports" - -#: ../Doc/whatsnew/2.3.rst:1940 -msgid "" -"Support for a port to IBM's OS/2 using the EMX runtime environment was " -"merged into the main Python source tree. EMX is a POSIX emulation layer " -"over the OS/2 system APIs. The Python port for EMX tries to support all the " -"POSIX-like capability exposed by the EMX runtime, and mostly succeeds; :func:" -"`fork` and :func:`fcntl` are restricted by the limitations of the underlying " -"emulation layer. The standard OS/2 port, which uses IBM's Visual Age " -"compiler, also gained support for case-sensitive import semantics as part of " -"the integration of the EMX port into CVS. (Contributed by Andrew MacIntyre.)" -msgstr "" -"El soporte para una adaptación al sistema OS/2 de IBM utilizando el entorno " -"de ejecución EMX se ha incorporado al árbol principal de fuentes de Python. " -"EMX es una capa de emulación POSIX sobre las APIs del sistema OS/2. El " -"puerto de Python para EMX intenta soportar todas las capacidades tipo POSIX " -"expuestas por el tiempo de ejecución de EMX, y en su mayoría lo consigue; :" -"func:`fork` y :func:`fcntl` están restringidas por las limitaciones de la " -"capa de emulación subyacente. El puerto estándar de OS/2, que utiliza el " -"compilador Visual Age de IBM, también obtuvo soporte para la semántica de " -"importación sensible a mayúsculas y minúsculas como parte de la integración " -"del puerto EMX en CVS. (Contribución de Andrew MacIntyre)." - -#: ../Doc/whatsnew/2.3.rst:1949 -msgid "" -"On MacOS, most toolbox modules have been weaklinked to improve backward " -"compatibility. This means that modules will no longer fail to load if a " -"single routine is missing on the current OS version. Instead calling the " -"missing routine will raise an exception. (Contributed by Jack Jansen.)" -msgstr "" -"En MacOS, la mayoría de los módulos de la caja de herramientas se han " -"debilitado para mejorar la compatibilidad con versiones anteriores. Esto " -"significa que los módulos ya no fallarán al cargarse si falta una rutina en " -"la versión actual del sistema operativo. En su lugar, llamar a la rutina que " -"falta lanzará una excepción. (Contribución de Jack Jansen.)" - -#: ../Doc/whatsnew/2.3.rst:1954 -msgid "" -"The RPM spec files, found in the :file:`Misc/RPM/` directory in the Python " -"source distribution, were updated for 2.3. (Contributed by Sean " -"Reifschneider.)" -msgstr "" -"Los archivos de especificaciones RPM, que se encuentran en el directorio :" -"file:`Misc/RPM/` en la distribución de fuentes de Python, fueron " -"actualizados para 2.3. (Contribución de Sean Reifschneider)." - -#: ../Doc/whatsnew/2.3.rst:1957 -msgid "" -"Other new platforms now supported by Python include AtheOS (http://www." -"atheos.cx/), GNU/Hurd, and OpenVMS." -msgstr "" -"Otras plataformas nuevas que ahora soporta Python son AtheOS (http://www." -"atheos.cx/), GNU/Hurd y OpenVMS." - -#: ../Doc/whatsnew/2.3.rst:1966 -msgid "Other Changes and Fixes" -msgstr "Otros cambios y correcciones" - -#: ../Doc/whatsnew/2.3.rst:1968 -msgid "" -"As usual, there were a bunch of other improvements and bugfixes scattered " -"throughout the source tree. A search through the CVS change logs finds " -"there were 523 patches applied and 514 bugs fixed between Python 2.2 and " -"2.3. Both figures are likely to be underestimates." -msgstr "" -"Como es habitual, hay un montón de otras mejoras y correcciones de errores " -"repartidas por el árbol de fuentes. Una búsqueda en los registros de " -"cambios de CVS revela que se aplicaron 523 parches y se corrigieron 514 " -"errores entre Python 2.2 y 2.3. Es probable que ambas cifras estén " -"subestimadas." - -#: ../Doc/whatsnew/2.3.rst:1973 -msgid "Some of the more notable changes are:" -msgstr "Algunos de los cambios más notables son:" - -#: ../Doc/whatsnew/2.3.rst:1975 -msgid "" -"If the :envvar:`PYTHONINSPECT` environment variable is set, the Python " -"interpreter will enter the interactive prompt after running a Python " -"program, as if Python had been invoked with the :option:`-i` option. The " -"environment variable can be set before running the Python interpreter, or it " -"can be set by the Python program as part of its execution." -msgstr "" -"Si se establece la variable de entorno :envvar:`PYTHONINSPECT`, el " -"intérprete de Python entrará en el prompt interactivo después de ejecutar un " -"programa Python, como si Python hubiera sido invocado con la opción :option:" -"`-i`. La variable de entorno se puede establecer antes de ejecutar el " -"intérprete de Python, o puede ser establecida por el programa de Python como " -"parte de su ejecución." - -#: ../Doc/whatsnew/2.3.rst:1981 -msgid "" -"The :file:`regrtest.py` script now provides a way to allow \"all resources " -"except *foo*.\" A resource name passed to the :option:`!-u` option can now " -"be prefixed with a hyphen (``'-'``) to mean \"remove this resource.\" For " -"example, the option '``-uall,-bsddb``' could be used to enable the use of " -"all resources except ``bsddb``." -msgstr "" -"El script :file:`regrtest.py` ahora proporciona una forma de permitir " -"\"todos los recursos excepto *foo*\". Un nombre de recurso pasado a la " -"opción :option:`!-u` puede ahora llevar un prefijo (``'-'``) para significar " -"\"eliminar este recurso\". Por ejemplo, la opción ``-uall,-bsddb`` podría " -"utilizarse para habilitar el uso de todos los recursos excepto ``bsddb``." - -#: ../Doc/whatsnew/2.3.rst:1987 -msgid "" -"The tools used to build the documentation now work under Cygwin as well as " -"Unix." -msgstr "" -"Las herramientas utilizadas para construir la documentación ahora funcionan " -"tanto en Cygwin como en Unix." - -#: ../Doc/whatsnew/2.3.rst:1990 -msgid "" -"The ``SET_LINENO`` opcode has been removed. Back in the mists of time, this " -"opcode was needed to produce line numbers in tracebacks and support trace " -"functions (for, e.g., :mod:`pdb`). Since Python 1.5, the line numbers in " -"tracebacks have been computed using a different mechanism that works with " -"\"python -O\". For Python 2.3 Michael Hudson implemented a similar scheme " -"to determine when to call the trace function, removing the need for " -"``SET_LINENO`` entirely." -msgstr "" -"The ``SET_LINENO`` opcode has been removed. Back in the mists of time, this " -"opcode was needed to produce line numbers in tracebacks and support trace " -"functions (for, e.g., :mod:`pdb`). Since Python 1.5, the line numbers in " -"tracebacks have been computed using a different mechanism that works with " -"\"python -O\". For Python 2.3 Michael Hudson implemented a similar scheme " -"to determine when to call the trace function, removing the need for " -"``SET_LINENO`` entirely." - -#: ../Doc/whatsnew/2.3.rst:1998 -msgid "" -"It would be difficult to detect any resulting difference from Python code, " -"apart from a slight speed up when Python is run without :option:`-O`." -msgstr "" -"Sería difícil detectar cualquier diferencia resultante del código Python, " -"aparte de un ligero aumento de velocidad cuando se ejecuta Python sin :" -"option:`-O`." - -#: ../Doc/whatsnew/2.3.rst:2001 -msgid "" -"C extensions that access the :attr:`f_lineno` field of frame objects should " -"instead call ``PyCode_Addr2Line(f->f_code, f->f_lasti)``. This will have the " -"added effect of making the code work as desired under \"python -O\" in " -"earlier versions of Python." -msgstr "" -"Las extensiones en C que acceden al campo :attr:`f_lineno` de los objetos " -"frame deben llamar en su lugar a ``PyCode_Addr2Line(f->f_code, f-" -">f_lasti)``. Esto tendrá el efecto añadido de hacer que el código funcione " -"como se desea bajo \"python -O\" en versiones anteriores de Python." - -#: ../Doc/whatsnew/2.3.rst:2006 -msgid "" -"A nifty new feature is that trace functions can now assign to the :attr:" -"`f_lineno` attribute of frame objects, changing the line that will be " -"executed next. A ``jump`` command has been added to the :mod:`pdb` debugger " -"taking advantage of this new feature. (Implemented by Richie Hindle.)" -msgstr "" -"Una nueva característica ingeniosa es que las funciones de rastreo pueden " -"ahora asignar al atributo :attr:`f_lineno` de los objetos marco, cambiando " -"la línea que se ejecutará a continuación. Se ha añadido un comando ``jump`` " -"al depurador :mod:`pdb` aprovechando esta nueva característica. " -"(Implementado por Richie Hindle)." - -#: ../Doc/whatsnew/2.3.rst:2015 -msgid "Porting to Python 2.3" -msgstr "Adaptación a Python 2.3" - -#: ../Doc/whatsnew/2.3.rst:2017 -msgid "" -"This section lists previously described changes that may require changes to " -"your code:" -msgstr "" -"Esta sección enumera los cambios descritos anteriormente que pueden requerir " -"cambios en su código:" - -#: ../Doc/whatsnew/2.3.rst:2020 -msgid "" -":keyword:`yield` is now always a keyword; if it's used as a variable name in " -"your code, a different name must be chosen." -msgstr "" -":keyword:`yield` es ahora siempre una palabra clave; si se utiliza como " -"nombre de variable en su código, debe elegirse un nombre diferente." - -#: ../Doc/whatsnew/2.3.rst:2023 -msgid "" -"For strings *X* and *Y*, ``X in Y`` now works if *X* is more than one " -"character long." -msgstr "" -"Para las cadenas *X* y *Y*, ``X en Y`` ahora funciona si *X* tiene más de un " -"carácter." - -#: ../Doc/whatsnew/2.3.rst:2026 -msgid "" -"The :func:`int` type constructor will now return a long integer instead of " -"raising an :exc:`OverflowError` when a string or floating-point number is " -"too large to fit into an integer." -msgstr "" -"El constructor de tipo :func:`int` ahora retornará un entero largo en lugar " -"de lanzar un :exc:`OverflowError` cuando una cadena o un número de punto " -"flotante es demasiado grande para caber en un entero." - -#: ../Doc/whatsnew/2.3.rst:2030 -msgid "" -"If you have Unicode strings that contain 8-bit characters, you must declare " -"the file's encoding (UTF-8, Latin-1, or whatever) by adding a comment to the " -"top of the file. See section :ref:`section-encodings` for more information." -msgstr "" -"Si tiene cadenas Unicode que contienen caracteres de 8 bits, debe declarar " -"la codificación del archivo (UTF-8, Latin-1, o la que sea) añadiendo un " -"comentario al principio del archivo. Consulte la sección :ref:`section-" -"encodings` para más información." - -#: ../Doc/whatsnew/2.3.rst:2034 -msgid "" -"Calling Tcl methods through :mod:`_tkinter` no longer returns only strings. " -"Instead, if Tcl returns other objects those objects are converted to their " -"Python equivalent, if one exists, or wrapped with a :class:`_tkinter." -"Tcl_Obj` object if no Python equivalent exists." -msgstr "" -"La llamada a métodos Tcl a través de :mod:`_tkinter` ya no retorna sólo " -"cadenas. En su lugar, si Tcl retorna otros objetos, éstos se convierten a su " -"equivalente en Python, si existe, o se envuelven con un objeto :class:" -"`_tkinter.Tcl_Obj` si no hay equivalente en Python." - -#: ../Doc/whatsnew/2.3.rst:2039 -msgid "" -"Large octal and hex literals such as ``0xffffffff`` now trigger a :exc:" -"`FutureWarning`. Currently they're stored as 32-bit numbers and result in a " -"negative value, but in Python 2.4 they'll become positive long integers." -msgstr "" -"Los octales largos y hexadecimales grandes como ``0xffffff`` ahora activan " -"un :exc:`FutureWarning`. Actualmente se almacenan como números de 32 bits y " -"resultan en un valor negativo, pero en Python 2.4 se convertirán en enteros " -"largos positivos." - -#: ../Doc/whatsnew/2.3.rst:2043 -msgid "" -"There are a few ways to fix this warning. If you really need a positive " -"number, just add an ``L`` to the end of the literal. If you're trying to " -"get a 32-bit integer with low bits set and have previously used an " -"expression such as ``~(1 << 31)``, it's probably clearest to start with all " -"bits set and clear the desired upper bits. For example, to clear just the " -"top bit (bit 31), you could write ``0xffffffffL &~(1L<<31)``." -msgstr "" -"Hay algunas formas de arreglar esta advertencia. Si realmente necesitas un " -"número positivo, simplemente añade una ``L`` al final del literal. Si está " -"tratando de obtener un entero de 32 bits con los bits inferiores " -"establecidos y ha utilizado previamente una expresión como ``~(1 << 31)``, " -"probablemente sea más claro comenzar con todos los bits establecidos y " -"borrar los bits superiores deseados. Por ejemplo, para borrar sólo el bit " -"superior (el 31), podrías escribir ``0xffffffL &~(1L<<31)``." - -#: ../Doc/whatsnew/2.3.rst:2050 -msgid "You can no longer disable assertions by assigning to ``__debug__``." -msgstr "" -"Ya no se pueden desactivar las aserciones asignándolas a ``__debug__``." - -#: ../Doc/whatsnew/2.3.rst:2052 -msgid "" -"The Distutils :func:`setup` function has gained various new keyword " -"arguments such as *depends*. Old versions of the Distutils will abort if " -"passed unknown keywords. A solution is to check for the presence of the " -"new :func:`get_distutil_options` function in your :file:`setup.py` and only " -"uses the new keywords with a version of the Distutils that supports them::" -msgstr "" -"La función Distutils :func:`setup` ha ganado varios argumentos de palabra " -"clave nuevos como *depends*. Las versiones antiguas de Distutils abortan si " -"se les pasan palabras clave desconocidas. Una solución es comprobar la " -"presencia de la nueva función :func:`get_distutil_options` en su :file:" -"`setup.py` y sólo utilizar las nuevas palabras clave con una versión de las " -"Distutils que las soporte::" - -#: ../Doc/whatsnew/2.3.rst:2065 -msgid "" -"Using ``None`` as a variable name will now result in a :exc:`SyntaxWarning` " -"warning." -msgstr "" -"El uso de ``None`` como nombre de variable ahora resultará en una " -"advertencia :exc:`SyntaxWarning`." - -#: ../Doc/whatsnew/2.3.rst:2068 -msgid "" -"Names of extension types defined by the modules included with Python now " -"contain the module and a ``'.'`` in front of the type name." -msgstr "" -"Los nombres de los tipos de extensión definidos por los módulos incluidos en " -"Python contienen ahora el módulo y un ``.'`` delante del nombre del tipo." - -#: ../Doc/whatsnew/2.3.rst:2077 -msgid "Acknowledgements" -msgstr "Agradecimientos" - -#: ../Doc/whatsnew/2.3.rst:2079 -msgid "" -"The author would like to thank the following people for offering " -"suggestions, corrections and assistance with various drafts of this article: " -"Jeff Bauer, Simon Brunning, Brett Cannon, Michael Chermside, Andrew Dalke, " -"Scott David Daniels, Fred L. Drake, Jr., David Fraser, Kelly Gerber, " -"Raymond Hettinger, Michael Hudson, Chris Lambert, Detlef Lannert, Martin von " -"Löwis, Andrew MacIntyre, Lalo Martins, Chad Netzer, Gustavo Niemeyer, Neal " -"Norwitz, Hans Nowak, Chris Reedy, Francesco Ricciardi, Vinay Sajip, Neil " -"Schemenauer, Roman Suzi, Jason Tishler, Just van Rossum." -msgstr "" -"El autor desea agradecer a las siguientes personas por ofrecer sugerencias, " -"correcciones y asistencia en los diversos borradores de este artículo:Jeff " -"Bauer, Simon Brunning, Brett Cannon, Michael Chermside, Andrew Dalke, Scott " -"David Daniels, Fred L. Drake, Jr, David Fraser, Kelly Gerber, Raymond " -"Hettinger, Michael Hudson, Chris Lambert, Detlef Lannert, Martin von Löwis, " -"Andrew MacIntyre, Lalo Martins, Chad Netzer, Gustavo Niemeyer, Neal Norwitz, " -"Hans Nowak, Chris Reedy, Francesco Ricciardi, Vinay Sajip, Neil Schemenauer, " -"Roman Suzi, Jason Tishler, Just van Rossum." +"El entorno de desarrollo integrado IDLE ha sido actualizado utilizando el " +"código del proyecto IDLEfork (http://idlefork.sourceforge.net). La " +"característica más notable es que el código que se está desarrollando se " +"ejecuta ahora en un subproceso, lo que significa que ya no es necesario " +"realizar operaciones manuales de ``reload()``. El código central de IDLE ha " +"sido incorporado a la biblioteca estándar como el paquete :mod:`idlelib`."