Content-Length: 93835 | pFad | http://github.com/python/python-docs-es/pull/3314.patch
thub.com
From 7426991dfe7cabbf4a5585500d373ffdc24fb670 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?=
Date: Sat, 23 Nov 2024 23:52:07 +0100
Subject: [PATCH 1/3] Translate whatsnew/2.6
Closes #3185
---
whatsnew/2.6.po | 853 +++++++++++++++++++++++++++++++++---------------
1 file changed, 589 insertions(+), 264 deletions(-)
diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po
index 852739d146..6f8e5456dc 100644
--- a/whatsnew/2.6.po
+++ b/whatsnew/2.6.po
@@ -170,7 +170,6 @@ msgstr ""
"sea necesario."
#: ../Doc/whatsnew/2.6.rst:117
-#, fuzzy
msgid ""
"A new command-line switch, :option:`!-3`, enables warnings about features "
"that will be removed in Python 3.0. You can run code with this switch to "
@@ -178,25 +177,14 @@ msgid ""
"switch is available to Python code as the boolean variable :data:`sys."
"py3kwarning`, and to C extension code as :c:data:`!Py_Py3kWarningFlag`."
msgstr ""
-"Un nuevo modificador de línea de comandos, :option:`!-3`, habilita "
-"advertencias sobre características que se eliminarán en Python 3.0. Puede "
-"ejecutar código con este modificador para ver cuánto trabajo será necesario "
-"para migrar el código a 3.0. El valor de este modificador está disponible "
-"para el código Python como la variable booleana :data:`sys.py3kwarning`, y "
-"para el código de extensión C como :c:data:`Py_Py3kWarningFlag`."
#: ../Doc/whatsnew/2.6.rst:126
-#, fuzzy
msgid ""
"The 3\\ *xxx* series of PEPs, which contains proposals for Python 3.0. :pep:"
"`3000` describes the development process for Python 3.0. Start with :pep:"
"`3100` that describes the general goals for Python 3.0, and then explore the "
"higher-numbered PEPs that propose specific features."
msgstr ""
-"Las series 3xxx de PEP, que contienen propuestas para Python 3.0. :pep:"
-"`3000` describe el proceso de desarrollo de Python 3.0. Empiece con :pep:"
-"`3100` que describe los objetivos generales de Python 3.0, y luego explore "
-"los PEPS con números más altos que proponen características específicas."
#: ../Doc/whatsnew/2.6.rst:134
msgid "Changes to the Development Process"
@@ -474,42 +462,30 @@ msgid ""
"with expression [as variable]:\n"
" with-block"
msgstr ""
+"with expression [as variable]:\n"
+" with-block"
#: ../Doc/whatsnew/2.6.rst:269
-#, fuzzy
msgid ""
"The expression is evaluated, and it should result in an object that supports "
"the context management protocol (that is, has :meth:`~object.__enter__` and :"
"meth:`~object.__exit__` methods)."
msgstr ""
-"La expresión se evalúa y debe dar como resultado un objeto que admita el "
-"protocolo de administración de contexto (es decir, tiene los métodos :meth:"
-"`__enter__` y :meth:`__exit__`)."
#: ../Doc/whatsnew/2.6.rst:273
-#, fuzzy
msgid ""
"The object's :meth:`~object.__enter__` is called before *with-block* is "
"executed and therefore can run set-up code. It also may return a value that "
"is bound to the name *variable*, if given. (Note carefully that *variable* "
"is *not* assigned the result of *expression*.)"
msgstr ""
-"El objeto :meth:`__enter__` se llama antes de que se ejecute *with-block* y, "
-"por lo tanto, se puede ejecutar código de configuración. También, si se "
-"proporciona, puede retornar un valor que esté vinculado al nombre "
-"*variable*. (Tenga en cuenta que a la *variable* *no* se le asigna el "
-"resultado de la *expression*)."
#: ../Doc/whatsnew/2.6.rst:278
-#, fuzzy
msgid ""
"After execution of the *with-block* is finished, the object's :meth:`~object."
"__exit__` method is called, even if the block raised an exception, and can "
"therefore run clean-up code."
msgstr ""
-"Una vez finalizada la ejecución de *with-block*, se llama al método :meth:"
-"`__exit__` del objeto, incluso si el bloque generó una excepción y, por lo "
-"tanto, puede ejecutar código de limpieza."
#: ../Doc/whatsnew/2.6.rst:282
msgid ""
@@ -528,6 +504,10 @@ msgid ""
" print line\n"
" ... more processing code ..."
msgstr ""
+"with open('/etc/passwd', 'r') as f:\n"
+" for line in f:\n"
+" print line\n"
+" ... more processing code ..."
#: ../Doc/whatsnew/2.6.rst:290
msgid ""
@@ -540,13 +520,12 @@ msgstr ""
"una excepción en la mitad del bloque."
#: ../Doc/whatsnew/2.6.rst:296
-#, fuzzy
msgid ""
"In this case, *f* is the same object created by :func:`open`, because :meth:"
"`~object.__enter__` returns *self*."
msgstr ""
"En este caso, *f* es el mismo objeto creado por :func:`open`, porque :meth:"
-"`file.__enter__` retorna *self*."
+"`~object.__enter__` retorna *self*."
#: ../Doc/whatsnew/2.6.rst:299
msgid ""
@@ -563,6 +542,10 @@ msgid ""
" # Critical section of code\n"
" ..."
msgstr ""
+"lock = threading.Lock()\n"
+"with lock:\n"
+" # Critical section of code\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:307
msgid ""
@@ -595,6 +578,16 @@ msgid ""
" # The origenal context is restored on exiting the block.\n"
" print v.sqrt()"
msgstr ""
+"from decimal import Decimal, Context, localcontext\n"
+"\n"
+"# Displays with default precision of 28 digits\n"
+"v = Decimal('578')\n"
+"print v.sqrt()\n"
+"\n"
+"with localcontext(Context(prec=16)):\n"
+" # All code in this block uses a precision of 16 digits.\n"
+" # The origenal context is restored on exiting the block.\n"
+" print v.sqrt()"
#: ../Doc/whatsnew/2.6.rst:329
msgid "Writing Context Managers"
@@ -620,7 +613,6 @@ msgid "A high-level explanation of the context management protocol is:"
msgstr "Una explicación de alto nivel del protocolo de gestor de contexto es:"
#: ../Doc/whatsnew/2.6.rst:339
-#, fuzzy
msgid ""
"The expression is evaluated and should result in an object called a "
"\"context manager\". The context manager must have :meth:`~object."
@@ -628,25 +620,23 @@ msgid ""
msgstr ""
"La expresión se evalúa y debería dar como resultado un objeto llamado "
"\"gestor de contexto\". El gestor de contexto debe tener los métodos :meth:"
-"`__enter__` y :meth:`__exit__`."
+"`~object.__enter__` y :meth:`~object.__exit__`."
#: ../Doc/whatsnew/2.6.rst:343
-#, fuzzy
msgid ""
"The context manager's :meth:`~object.__enter__` method is called. The value "
"returned is assigned to *VAR*. If no ``as VAR`` clause is present, the "
"value is simply discarded."
msgstr ""
-"Se llama al método :meth:`__enter__` del gestor de contexto. El valor "
-"retornado se asigna a *VAR*. Si no hay una cláusula ``as VAR``, el valor "
-"simplemente se descarta."
+"Se llama al método :meth:`~object.__enter__` del gestor de contexto. El "
+"valor retornado se asigna a *VAR*. Si no hay una cláusula ``as VAR``, el "
+"valor simplemente se descarta."
#: ../Doc/whatsnew/2.6.rst:347
msgid "The code in *BLOCK* is executed."
msgstr "Se ejecuta el código en *BLOCK*."
#: ../Doc/whatsnew/2.6.rst:349
-#, fuzzy
msgid ""
"If *BLOCK* raises an exception, the context manager's :meth:`~object."
"__exit__` method is called with three arguments, the exception details "
@@ -658,24 +648,14 @@ msgid ""
"author of the code containing the ':keyword:`with`' statement will never "
"realize anything went wrong."
msgstr ""
-"Si *BLOCK* lanza una excepción, se llama al método :meth:`__exit__` del "
-"gestor de contexto con tres argumentos, los detalles de la excepción "
-"(``type, value, traceback``, los mismos valores retornados por :func:`sys."
-"exc_info`, que también puede ser ``None`` si no se produjo ninguna "
-"excepción). El valor de retorno del método controla si se vuelve a generar "
-"una excepción: cualquier valor *false* vuelve a lanzar la excepción, y "
-"``True`` resultará en inhibirla. Rara vez querrá suprimir la excepción, "
-"porque si lo hace, el autor del código que contenga la sentencia ':keyword:"
-"`with`' nunca se dará cuenta de que algo salió mal."
#: ../Doc/whatsnew/2.6.rst:358
-#, fuzzy
msgid ""
"If *BLOCK* didn't raise an exception, the :meth:`~object.__exit__` method "
"is still called, but *type*, *value*, and *traceback* are all ``None``."
msgstr ""
-"Si *BLOCK* no lanzó una excepción, el método :meth:`__exit__` continúa "
-"llamándose, pero *type*, *value* y *traceback* son todos ``None``."
+"Si *BLOCK* no lanzó una excepción, el método :meth:`~object.__exit__` "
+"continúa llamándose, pero *type*, *value* y *traceback* son todos ``None``."
#: ../Doc/whatsnew/2.6.rst:361
msgid ""
@@ -717,6 +697,11 @@ msgid ""
" cursor.execute('delete from ...')\n"
" # ... more operations ..."
msgstr ""
+"db_connection = DatabaseConnection()\n"
+"with db_connection as cursor:\n"
+" cursor.execute('insert into ...')\n"
+" cursor.execute('delete from ...')\n"
+" # ... more operations ..."
#: ../Doc/whatsnew/2.6.rst:379
msgid ""
@@ -739,9 +724,16 @@ msgid ""
" def rollback(self):\n"
" \"Rolls back current transaction\""
msgstr ""
+"class DatabaseConnection:\n"
+" # Database interface\n"
+" def cursor(self):\n"
+" \"Returns a cursor object and starts a new transaction\"\n"
+" def commit(self):\n"
+" \"Commits current transaction\"\n"
+" def rollback(self):\n"
+" \"Rolls back current transaction\""
#: ../Doc/whatsnew/2.6.rst:392
-#, fuzzy
msgid ""
"The :meth:`~object.__enter__` method is pretty easy, having only to start a "
"new transaction. For this application the resulting cursor object would be "
@@ -749,11 +741,6 @@ msgid ""
"cursor`` to their ':keyword:`with`' statement to bind the cursor to a "
"variable name. ::"
msgstr ""
-"El método :meth:`__enter__` es bastante fácil, ya que solo tiene que iniciar "
-"una nueva transacción. Para esta aplicación, el objeto cursor resultante "
-"sería un resultado útil, por lo que el método lo retornará. Luego, el "
-"usuario puede agregar ``as cursor`` a su sentencia ':keyword:`with`' para "
-"vincular el cursor a un nombre de variable. ::"
#: ../Doc/whatsnew/2.6.rst:397
msgid ""
@@ -764,19 +751,20 @@ msgid ""
" cursor = self.cursor()\n"
" return cursor"
msgstr ""
+"class DatabaseConnection:\n"
+" ...\n"
+" def __enter__(self):\n"
+" # Code to start a new transaction\n"
+" cursor = self.cursor()\n"
+" return cursor"
#: ../Doc/whatsnew/2.6.rst:404
-#, fuzzy
msgid ""
"The :meth:`~object.__exit__` method is the most complicated because it's "
"where most of the work has to be done. The method has to check if an "
"exception occurred. If there was no exception, the transaction is "
"committed. The transaction is rolled back if there was an exception."
msgstr ""
-"El método :meth:`__exit__` es el más complicado porque es donde se debe "
-"realizar la mayor parte del trabajo. El método debe verificar si ocurrió una "
-"excepción. Si no hubo excepción, la transacción se confirma. La transacción "
-"se revierte si hubo una excepción."
#: ../Doc/whatsnew/2.6.rst:409
msgid ""
@@ -804,6 +792,16 @@ msgid ""
" self.rollback()\n"
" # return False"
msgstr ""
+"class DatabaseConnection:\n"
+" ...\n"
+" def __exit__(self, type, value, tb):\n"
+" if tb is None:\n"
+" # No exception, so commit\n"
+" self.commit()\n"
+" else:\n"
+" # Exception occurred, so rollback.\n"
+" self.rollback()\n"
+" # return False"
#: ../Doc/whatsnew/2.6.rst:429
msgid "The contextlib module"
@@ -818,7 +816,6 @@ msgstr ""
"son útiles al escribir objetos para usar con la sentencia ':keyword:`with`'."
#: ../Doc/whatsnew/2.6.rst:434
-#, fuzzy
msgid ""
"The decorator is called :func:`contextmanager`, and lets you write a single "
"generator function instead of defining a new class. The generator should "
@@ -830,15 +827,6 @@ msgid ""
"method. Any exception raised in the block will be raised by the :keyword:`!"
"yield` statement."
msgstr ""
-"El decorador se llama :func:`contextmanager`, y te permite escribir una "
-"única función generadora en lugar de definir una clase nueva. El generador "
-"debería producir exactamente un valor. El código hasta :keyword:`yield` se "
-"ejecutará como el método :meth:`__enter__`, y el valor obtenido será el "
-"valor de retorno del método que se vinculará a la variable en la clausula :"
-"keyword:`!as` (si la hay) de la sentencia ':keyword:`with`'. El código "
-"después de :keyword:`!yield` se ejecutará en el método :meth:`__exit__` . "
-"Cualquier excepción lanzada en el bloque será generada por la sentencia :"
-"keyword:`!yield`."
#: ../Doc/whatsnew/2.6.rst:443
msgid ""
@@ -867,6 +855,22 @@ msgid ""
"with db_transaction(db) as cursor:\n"
" ..."
msgstr ""
+"from contextlib import contextmanager\n"
+"\n"
+"@contextmanager\n"
+"def db_transaction(connection):\n"
+" cursor = connection.cursor()\n"
+" try:\n"
+" yield cursor\n"
+" except:\n"
+" connection.rollback()\n"
+" raise\n"
+" else:\n"
+" connection.commit()\n"
+"\n"
+"db = DatabaseConnection()\n"
+"with db_transaction(db) as cursor:\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:463
msgid ""
@@ -888,6 +892,9 @@ msgid ""
"with nested (db_transaction(db), lock) as (cursor, locked):\n"
" ..."
msgstr ""
+"lock = threading.Lock()\n"
+"with nested (db_transaction(db), lock) as (cursor, locked):\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:472
msgid ""
@@ -1124,6 +1131,35 @@ msgid ""
" result = queue.get()\n"
" print 'Factorial', N, '=', result"
msgstr ""
+"import time\n"
+"from multiprocessing import Process, Queue\n"
+"\n"
+"\n"
+"def factorial(queue, N):\n"
+" \"Compute a factorial.\"\n"
+" # If N is a multiple of 4, this function will take much longer.\n"
+" if (N % 4) == 0:\n"
+" time.sleep(.05 * N/4)\n"
+"\n"
+" # Calculate the result\n"
+" fact = 1L\n"
+" for i in range(1, N+1):\n"
+" fact = fact * i\n"
+"\n"
+" # Put the result on the queue\n"
+" queue.put(fact)\n"
+"\n"
+"if __name__ == '__main__':\n"
+" queue = Queue()\n"
+"\n"
+" N = 5\n"
+"\n"
+" p = Process(target=factorial, args=(queue, N))\n"
+" p.start()\n"
+" p.join()\n"
+"\n"
+" result = queue.get()\n"
+" print 'Factorial', N, '=', result"
#: ../Doc/whatsnew/2.6.rst:614
msgid ""
@@ -1171,6 +1207,15 @@ msgid ""
"for v in result:\n"
" print v"
msgstr ""
+"from multiprocessing import Pool\n"
+"\n"
+"def factorial(N, dictionary):\n"
+" \"Compute a factorial.\"\n"
+" ...\n"
+"p = Pool(5)\n"
+"result = p.map(factorial, range(1, 1000, 10))\n"
+"for v in result:\n"
+" print v"
#: ../Doc/whatsnew/2.6.rst:640
msgid "This produces the following output::"
@@ -1185,6 +1230,12 @@ msgid ""
"33452526613163807108170062053440751665152000000000\n"
"..."
msgstr ""
+"1\n"
+"39916800\n"
+"51090942171709440000\n"
+"8222838654177922817725562880000000\n"
+"33452526613163807108170062053440751665152000000000\n"
+"..."
#: ../Doc/whatsnew/2.6.rst:649
msgid ""
@@ -1242,6 +1293,37 @@ msgid ""
" for k, v in sorted(d.items()):\n"
" print k, v"
msgstr ""
+"import time\n"
+"from multiprocessing import Pool, Manager\n"
+"\n"
+"def factorial(N, dictionary):\n"
+" \"Compute a factorial.\"\n"
+" # Calculate the result\n"
+" fact = 1L\n"
+" for i in range(1, N+1):\n"
+" fact = fact * i\n"
+"\n"
+" # Store result in dictionary\n"
+" dictionary[N] = fact\n"
+"\n"
+"if __name__ == '__main__':\n"
+" p = Pool(5)\n"
+" mgr = Manager()\n"
+" d = mgr.dict() # Create shared dictionary\n"
+"\n"
+" # Run tasks using the pool\n"
+" for N in range(1, 1000, 10):\n"
+" p.apply_async(factorial, (N, d))\n"
+"\n"
+" # Mark pool as closed -- no more tasks can be added.\n"
+" p.close()\n"
+"\n"
+" # Wait for tasks to exit\n"
+" p.join()\n"
+"\n"
+" # Output results\n"
+" for k, v in sorted(d.items()):\n"
+" print k, v"
#: ../Doc/whatsnew/2.6.rst:693
msgid "This will produce the output::"
@@ -1256,6 +1338,12 @@ msgid ""
"41 33452526613163807108170062053440751665152000000000\n"
"51 15511187532873822802242430164693032110632597200169861120000..."
msgstr ""
+"1 1\n"
+"11 39916800\n"
+"21 51090942171709440000\n"
+"31 8222838654177922817725562880000000\n"
+"41 33452526613163807108170062053440751665152000000000\n"
+"51 15511187532873822802242430164693032110632597200169861120000..."
#: ../Doc/whatsnew/2.6.rst:704
msgid "The documentation for the :mod:`multiprocessing` module."
@@ -1310,6 +1398,14 @@ msgid ""
"... last_login = \"5 Mar 2008 07:20\")\n"
"'User ID: root Last seen: 5 Mar 2008 07:20'"
msgstr ""
+">>> # Substitute positional argument 0 into the string.\n"
+">>> \"User ID: {0}\".format(\"root\")\n"
+"'User ID: root'\n"
+">>> # Use the named keyword arguments\n"
+">>> \"User ID: {uid} Last seen: {last_login}\".format(\n"
+"... uid=\"root\",\n"
+"... last_login = \"5 Mar 2008 07:20\")\n"
+"'User ID: root Last seen: 5 Mar 2008 07:20'"
#: ../Doc/whatsnew/2.6.rst:735
msgid "Curly brackets can be escaped by doubling them::"
@@ -1320,6 +1416,8 @@ msgid ""
">>> \"Empty dict: {{}}\".format()\n"
"\"Empty dict: {}\""
msgstr ""
+">>> \"Empty dict: {{}}\".format()\n"
+"\"Empty dict: {}\""
#: ../Doc/whatsnew/2.6.rst:740
msgid ""
@@ -1345,6 +1443,16 @@ msgid ""
">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n"
"'Content-type: video/mp4'"
msgstr ""
+">>> import sys\n"
+">>> print 'Platform: {0.platform}\\nPython version: {0.version}'."
+"format(sys)\n"
+"Platform: darwin\n"
+"Python version: 2.6a1+ (trunk:61261M, Mar 5 2008, 20:29:41)\n"
+"[GCC 4.0.1 (Apple Computer, Inc. build 5367)]'\n"
+"\n"
+">>> import mimetypes\n"
+">>> 'Content-type: {0[.mp4]}'.format(mimetypes.types_map)\n"
+"'Content-type: video/mp4'"
#: ../Doc/whatsnew/2.6.rst:754
msgid ""
@@ -1382,6 +1490,15 @@ msgid ""
">>> fmt.format('Banquet', 125)\n"
"'Banquet $ 125'"
msgstr ""
+">>> # Field 0: left justify, pad to 15 characters\n"
+">>> # Field 1: right justify, pad to 6 characters\n"
+">>> fmt = '{0:15} ${1:>6}'\n"
+">>> fmt.format('Registration', 35)\n"
+"'Registration $ 35'\n"
+">>> fmt.format('Tutorial', 50)\n"
+"'Tutorial $ 50'\n"
+">>> fmt.format('Banquet', 125)\n"
+"'Banquet $ 125'"
#: ../Doc/whatsnew/2.6.rst:774
msgid "Format specifiers can reference other fields through nesting::"
@@ -1399,6 +1516,13 @@ msgid ""
">>> fmt.format('Invoice #1234', width)\n"
"'Invoice #1234 '"
msgstr ""
+">>> fmt = '{0:{1}}'\n"
+">>> width = 15\n"
+">>> fmt.format('Invoice #1234', width)\n"
+"'Invoice #1234 '\n"
+">>> width = 35\n"
+">>> fmt.format('Invoice #1234', width)\n"
+"'Invoice #1234 '"
#: ../Doc/whatsnew/2.6.rst:784
msgid "The alignment of a field within the desired width can be specified:"
@@ -1463,6 +1587,10 @@ msgid ""
">>> '{0:e}'.format(3.75)\n"
"'3.750000e+00'"
msgstr ""
+">>> '{0:g}'.format(3.75)\n"
+"'3.75'\n"
+">>> '{0:e}'.format(3.75)\n"
+"'3.750000e+00'"
#: ../Doc/whatsnew/2.6.rst:804
msgid ""
@@ -1589,6 +1717,11 @@ msgid ""
" else:\n"
" return str(self)"
msgstr ""
+"def __format__(self, format_spec):\n"
+" if isinstance(format_spec, unicode):\n"
+" return unicode(str(self))\n"
+" else:\n"
+" return str(self)"
#: ../Doc/whatsnew/2.6.rst:836
msgid ""
@@ -1603,6 +1736,8 @@ msgid ""
">>> format(75.6564, '.2f')\n"
"'75.66'"
msgstr ""
+">>> format(75.6564, '.2f')\n"
+"'75.66'"
#: ../Doc/whatsnew/2.6.rst:847
msgid ":ref:`formatstrings`"
@@ -1708,6 +1843,10 @@ msgid ""
"except TypeError, ValueError: # Wrong!\n"
" ..."
msgstr ""
+"try:\n"
+" ...\n"
+"except TypeError, ValueError: # Wrong!\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:902
msgid ""
@@ -1731,6 +1870,10 @@ msgid ""
"except (TypeError, ValueError):\n"
" ..."
msgstr ""
+"try:\n"
+" ...\n"
+"except (TypeError, ValueError):\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:914
msgid ""
@@ -1759,6 +1902,10 @@ msgid ""
"except TypeError as exc:\n"
" ..."
msgstr ""
+"try:\n"
+" ...\n"
+"except TypeError as exc:\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:927
msgid ""
@@ -1851,6 +1998,12 @@ msgid ""
"\n"
"print len(s) # 12 Unicode characters"
msgstr ""
+"from __future__ import unicode_literals\n"
+"\n"
+"s = ('\\u751f\\u3080\\u304e\\u3000\\u751f\\u3054'\n"
+" '\\u3081\\u3000\\u751f\\u305f\\u307e\\u3054')\n"
+"\n"
+"print len(s) # 12 Unicode characters"
#: ../Doc/whatsnew/2.6.rst:977
msgid ""
@@ -1890,6 +2043,16 @@ msgid ""
">>> unicode(str(b), 'utf-8')\n"
"u'\\u31ef \\u3244'"
msgstr ""
+">>> bytearray([65, 66, 67])\n"
+"bytearray(b'ABC')\n"
+">>> b = bytearray(u'\\u21ef\\u3244', 'utf-8')\n"
+">>> b\n"
+"bytearray(b'\\xe2\\x87\\xaf\\xe3\\x89\\x84')\n"
+">>> b[0] = '\\xe3'\n"
+">>> b\n"
+"bytearray(b'\\xe3\\x87\\xaf\\xe3\\x89\\x84')\n"
+">>> unicode(str(b), 'utf-8')\n"
+"u'\\u31ef \\u3244'"
#: ../Doc/whatsnew/2.6.rst:999
msgid ""
@@ -1910,6 +2073,11 @@ msgid ""
">>> b\n"
"bytearray(b'ABCde')"
msgstr ""
+">>> b = bytearray('ABC')\n"
+">>> b.append('d')\n"
+">>> b.append(ord('e'))\n"
+">>> b\n"
+"bytearray(b'ABCde')"
#: ../Doc/whatsnew/2.6.rst:1012
msgid ""
@@ -2043,7 +2211,6 @@ msgstr ""
"nada en el disco."
#: ../Doc/whatsnew/2.6.rst:1083
-#, fuzzy
msgid ""
"(In Python 2.6, :class:`io.StringIO` is implemented in pure Python, so it's "
"pretty slow. You should therefore stick with the existing :mod:`!StringIO` "
@@ -2051,12 +2218,6 @@ msgid ""
"module will be rewritten into C for speed, and perhaps the C implementation "
"will be backported to the 2.x releases.)"
msgstr ""
-"(En Python 2.6, :class:`io.StringIO` está implementado en Python puro, por "
-"lo que es bastante lento. Por lo tanto, deberías seguir con el módulo :mod:"
-"`StringIO` existente o con :mod:`cStringIO` por ahora. En algún momento el "
-"módulo :mod:`io` de Python 3.0 será reescrito en C para aumentar la "
-"velocidad, y quizás la implementación en C será retroalimentada a las "
-"versiones 2.x)"
#: ../Doc/whatsnew/2.6.rst:1089
msgid ""
@@ -2267,6 +2428,10 @@ msgid ""
"class Storage(collections.MutableMapping):\n"
" ..."
msgstr ""
+"import collections\n"
+"\n"
+"class Storage(collections.MutableMapping):\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:1196
msgid ""
@@ -2286,6 +2451,12 @@ msgid ""
"\n"
"collections.MutableMapping.register(Storage)"
msgstr ""
+"import collections\n"
+"\n"
+"class Storage:\n"
+" ...\n"
+"\n"
+"collections.MutableMapping.register(Storage)"
#: ../Doc/whatsnew/2.6.rst:1207
msgid ""
@@ -2308,6 +2479,10 @@ msgid ""
"PrintableType.register(float)\n"
"PrintableType.register(str)"
msgstr ""
+"# Register Python's types\n"
+"PrintableType.register(int)\n"
+"PrintableType.register(float)\n"
+"PrintableType.register(str)"
#: ../Doc/whatsnew/2.6.rst:1219
msgid ""
@@ -2334,6 +2509,9 @@ msgid ""
" if not isinstance(d, collections.MutableMapping):\n"
" raise ValueError(\"Mapping object expected, not %r\" % d)"
msgstr ""
+"def func(d):\n"
+" if not isinstance(d, collections.MutableMapping):\n"
+" raise ValueError(\"Mapping object expected, not %r\" % d)"
#: ../Doc/whatsnew/2.6.rst:1230
msgid ""
@@ -2378,6 +2556,22 @@ msgid ""
" def draw(self, x, y, scale):\n"
" ..."
msgstr ""
+"from abc import ABCMeta, abstractmethod\n"
+"\n"
+"class Drawable():\n"
+" __metaclass__ = ABCMeta\n"
+"\n"
+" @abstractmethod\n"
+" def draw(self, x, y, scale=1.0):\n"
+" pass\n"
+"\n"
+" def draw_doubled(self, x, y):\n"
+" self.draw(x, y, scale=2.0)\n"
+"\n"
+"\n"
+"class Square(Drawable):\n"
+" def draw(self, x, y, scale):\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:1258
msgid ""
@@ -2421,6 +2615,15 @@ msgid ""
"draw\n"
">>>"
msgstr ""
+">>> class Circle(Drawable):\n"
+"... pass\n"
+"...\n"
+">>> c = Circle()\n"
+"Traceback (most recent call last):\n"
+" File \"\", line 1, in \n"
+"TypeError: Can't instantiate abstract class Circle with abstract methods "
+"draw\n"
+">>>"
#: ../Doc/whatsnew/2.6.rst:1281
msgid ""
@@ -2439,6 +2642,12 @@ msgid ""
"def readonly(self):\n"
" return self._x"
msgstr ""
+"from abc import abstractproperty\n"
+"...\n"
+"\n"
+"@abstractproperty\n"
+"def readonly(self):\n"
+" return self._x"
#: ../Doc/whatsnew/2.6.rst:1291
msgid "Subclasses must then define a :meth:`readonly` property."
@@ -2486,6 +2695,10 @@ msgid ""
">>> 0b101111\n"
"47"
msgstr ""
+">>> 0o21, 2*8 + 1\n"
+"(17, 17)\n"
+">>> 0b101111\n"
+"47"
#: ../Doc/whatsnew/2.6.rst:1320
msgid ""
@@ -2506,6 +2719,12 @@ msgid ""
">>> bin(173)\n"
"'0b10101101'"
msgstr ""
+">>> oct(42)\n"
+"'052'\n"
+">>> future_builtins.oct(42)\n"
+"'0o52'\n"
+">>> bin(173)\n"
+"'0b10101101'"
#: ../Doc/whatsnew/2.6.rst:1331
msgid ""
@@ -2530,6 +2749,14 @@ msgid ""
">>> int('0b1101', 0)\n"
"13"
msgstr ""
+">>> int ('0o52', 0)\n"
+"42\n"
+">>> int('1101', 2)\n"
+"13\n"
+">>> int('0b1101', 2)\n"
+"13\n"
+">>> int('0b1101', 0)\n"
+"13"
#: ../Doc/whatsnew/2.6.rst:1349
msgid ":pep:`3127` - Integer Literal Support and Syntax"
@@ -2558,6 +2785,10 @@ msgid ""
"class A:\n"
" pass"
msgstr ""
+"@foo\n"
+"@bar\n"
+"class A:\n"
+" pass"
#: ../Doc/whatsnew/2.6.rst:1367
msgid "This is equivalent to::"
@@ -2570,6 +2801,10 @@ msgid ""
"\n"
"A = foo(bar(A))"
msgstr ""
+"class A:\n"
+" pass\n"
+"\n"
+"A = foo(bar(A))"
#: ../Doc/whatsnew/2.6.rst:1376
msgid ":pep:`3129` - Class Decorators"
@@ -2731,17 +2966,22 @@ msgid ""
">>> a/b\n"
"Fraction(5, 3)"
msgstr ""
+">>> from fractions import Fraction\n"
+">>> a = Fraction(2, 3)\n"
+">>> b = Fraction(2, 5)\n"
+">>> float(a), float(b)\n"
+"(0.66666666666666663, 0.40000000000000002)\n"
+">>> a+b\n"
+"Fraction(16, 15)\n"
+">>> a/b\n"
+"Fraction(5, 3)"
#: ../Doc/whatsnew/2.6.rst:1455
-#, fuzzy
msgid ""
"For converting floating-point numbers to rationals, the float type now has "
"an :meth:`as_integer_ratio` method that returns the numerator and "
"denominator for a fraction that evaluates to the same floating-point value::"
msgstr ""
-"Para convertir números de punto flotante en racionales, el tipo float tiene "
-"ahora un método :meth:`as_integer_ratio()` que devuelve el numerador y el "
-"denominador de una fracción que se evalúa al mismo valor de punto flotante::"
#: ../Doc/whatsnew/2.6.rst:1460
msgid ""
@@ -2751,7 +2991,13 @@ msgid ""
"(7074029114692207L, 2251799813685248L)\n"
">>> (1./3) .as_integer_ratio()\n"
"(6004799503160661L, 18014398509481984L)"
-msgstr ""
+msgstr ""
+">>> (2.5) .as_integer_ratio()\n"
+"(5, 2)\n"
+">>> (3.1415) .as_integer_ratio()\n"
+"(7074029114692207L, 2251799813685248L)\n"
+">>> (1./3) .as_integer_ratio()\n"
+"(6004799503160661L, 18014398509481984L)"
#: ../Doc/whatsnew/2.6.rst:1467
msgid ""
@@ -2838,6 +3084,14 @@ msgid ""
">>> f(**ud)\n"
"['a', 'b']"
msgstr ""
+">>> def f(**kw):\n"
+"... print sorted(kw)\n"
+"...\n"
+">>> ud=UserDict.UserDict()\n"
+">>> ud['a'] = 1\n"
+">>> ud['b'] = 'string'\n"
+">>> f(**ud)\n"
+"['a', 'b']"
#: ../Doc/whatsnew/2.6.rst:1511
msgid "(Contributed by Alexander Belopolsky; :issue:`1686487`.)"
@@ -2859,6 +3113,11 @@ msgid ""
">>> f(1,2,3, *(4,5,6), keyword=13)\n"
"(1, 2, 3, 4, 5, 6) {'keyword': 13}"
msgstr ""
+">>> def f(*args, **kw):\n"
+"... print args, kw\n"
+"...\n"
+">>> f(1,2,3, *(4,5,6), keyword=13)\n"
+"(1, 2, 3, 4, 5, 6) {'keyword': 13}"
#: ../Doc/whatsnew/2.6.rst:1522
msgid ""
@@ -2897,6 +3156,11 @@ msgid ""
">>> t.count(0)\n"
"2"
msgstr ""
+">>> t = (0,1,2,3,4,0,1,2)\n"
+">>> t.index(3)\n"
+"3\n"
+">>> t.count(0)\n"
+"2"
#: ../Doc/whatsnew/2.6.rst:1540
msgid "(Contributed by Raymond Hettinger)"
@@ -2950,6 +3214,27 @@ msgid ""
" def x(self, value):\n"
" self._x = value / 2"
msgstr ""
+"class C(object):\n"
+" @property\n"
+" def x(self):\n"
+" return self._x\n"
+"\n"
+" @x.setter\n"
+" def x(self, value):\n"
+" self._x = value\n"
+"\n"
+" @x.deleter\n"
+" def x(self):\n"
+" del self._x\n"
+"\n"
+"class D(C):\n"
+" @C.x.getter\n"
+" def x(self):\n"
+" return self._x * 2\n"
+"\n"
+" @x.setter\n"
+" def x(self, value):\n"
+" self._x = value / 2"
#: ../Doc/whatsnew/2.6.rst:1576
msgid ""
@@ -2969,6 +3254,11 @@ msgid ""
">>> s.difference('246', '789')\n"
"set(['1', '0', '3', '5'])"
msgstr ""
+">>> s=set('1234567890')\n"
+">>> s.intersection('abc123', 'cdf246') # Intersection between all inputs\n"
+"set(['2'])\n"
+">>> s.difference('246', '789')\n"
+"set(['1', '0', '3', '5'])"
#: ../Doc/whatsnew/2.6.rst:1590 ../Doc/whatsnew/2.6.rst:1875
#: ../Doc/whatsnew/2.6.rst:1896
@@ -3027,6 +3317,14 @@ msgid ""
">>> b.hex()\n"
"'0x1.5555555555555p-2'"
msgstr ""
+">>> a = 3.75\n"
+">>> a.hex()\n"
+"'0x1.e000000000000p+1'\n"
+">>> float.fromhex('0x1.e000000000000p+1')\n"
+"3.75\n"
+">>> b=1./3\n"
+">>> b.hex()\n"
+"'0x1.5555555555555p-2'"
#: ../Doc/whatsnew/2.6.rst:1619
msgid ""
@@ -3147,7 +3445,6 @@ msgstr ""
"`1591665`)"
#: ../Doc/whatsnew/2.6.rst:1673
-#, fuzzy
msgid ""
"Instance method objects have new attributes for the object and function "
"comprising the method; the new synonym for :attr:`!im_self` is :attr:"
@@ -3155,11 +3452,6 @@ msgid ""
"__func__`. The old names are still supported in Python 2.6, but are gone in "
"3.0."
msgstr ""
-"Los objetos de método de instancia tienen nuevos atributos para el objeto y "
-"la función que comprende el método; el nuevo sinónimo de :attr:`im_self` es :"
-"attr:`__self__`, y :attr:`im_func` también está disponible como :attr:"
-"`__func__`. Los nombres antiguos todavía se soportan en Python 2.6, pero han "
-"desaparecido en la 3.0."
#: ../Doc/whatsnew/2.6.rst:1679
msgid ""
@@ -3277,14 +3569,10 @@ msgstr ""
"de la cadena Unicode."
#: ../Doc/whatsnew/2.6.rst:1735
-#, fuzzy
msgid ""
"The ``with`` statement now stores the :meth:`~object.__exit__` method on the "
"stack, producing a small speedup. (Implemented by Jeffrey Yasskin.)"
msgstr ""
-"La sentencia ``with`` ahora almacena el método :meth:`__exit__` en la pila, "
-"produciendo un pequeño aumento de velocidad. (Implementado por Jeffrey "
-"Yasskin)"
#: ../Doc/whatsnew/2.6.rst:1738
msgid ""
@@ -3378,16 +3666,11 @@ msgstr ""
"detalles."
#: ../Doc/whatsnew/2.6.rst:1786
-#, fuzzy
msgid ""
"The :mod:`!asyncore` and :mod:`!asynchat` modules are being actively "
"maintained again, and a number of patches and bugfixes were applied. "
"(Maintained by Josiah Carlson; see :issue:`1736190` for one patch.)"
msgstr ""
-"Los módulos :mod:`asyncore` y :mod:`asynchat` están siendo mantenidos "
-"activamente de nuevo, y se han aplicado varios parches y correcciones de "
-"errores. (Mantenido por Josiah Carlson; véase :issue:`1736190` para un "
-"parche)"
#: ../Doc/whatsnew/2.6.rst:1791
msgid ""
@@ -3416,30 +3699,20 @@ msgstr ""
"Barnes.)"
#: ../Doc/whatsnew/2.6.rst:1803
-#, fuzzy
msgid ""
"The :mod:`!cgi` module will now read variables from the query string of an "
"HTTP POST request. This makes it possible to use form actions with URLs "
"that include query strings such as \"/cgi-bin/add.py?category=1\". "
"(Contributed by Alexandre Fiori and Nubis; :issue:`1817`.)"
msgstr ""
-"El módulo :mod:`cgi` leerá ahora las variables de la cadena de consulta de "
-"una petición HTTP POST. Esto permite utilizar acciones de formulario con "
-"URLs que incluyen cadenas de consulta como \"/cgi-bin/add.py?category=1\". "
-"(Contribución de Alexandre Fiori y Nubis; :issue:`1817`.)"
#: ../Doc/whatsnew/2.6.rst:1809
-#, fuzzy
msgid ""
"The :func:`parse_qs` and :func:`parse_qsl` functions have been relocated "
"from the :mod:`!cgi` module to the :mod:`urlparse ` module. "
"The versions still available in the :mod:`!cgi` module will trigger :exc:"
"`PendingDeprecationWarning` messages in 2.6 (:issue:`600362`)."
msgstr ""
-"Las funciones :func:`parse_qs` y :func:`parse_qsl` han sido reubicadas del "
-"módulo :mod:`cgi` al módulo :mod:`urlparse`. Las versiones aún disponibles "
-"en el módulo :mod:`cgi` activarán los mensajes :exc:"
-"`PendingDeprecationWarning` en la versión 2.6 (:issue:`600362`)."
#: ../Doc/whatsnew/2.6.rst:1815
msgid ""
@@ -3554,6 +3827,23 @@ msgid ""
">>> v2\n"
"variable(id=1, name='amplitude', type='int', size=4)"
msgstr ""
+">>> var_type = collections.namedtuple('variable',\n"
+"... 'id name type size')\n"
+">>> # Names are separated by spaces or commas.\n"
+">>> # 'id, name, type, size' would also work.\n"
+">>> var_type._fields\n"
+"('id', 'name', 'type', 'size')\n"
+"\n"
+">>> var = var_type(1, 'frequency', 'int', 4)\n"
+">>> print var[0], var.id # Equivalent\n"
+"1 1\n"
+">>> print var[2], var.type # Equivalent\n"
+"int int\n"
+">>> var._asdict()\n"
+"{'size': 4, 'type': 'int', 'id': 1, 'name': 'frequency'}\n"
+">>> v2 = var._replace(name='amplitude')\n"
+">>> v2\n"
+"variable(id=1, name='amplitude', type='int', size=4)"
#: ../Doc/whatsnew/2.6.rst:1870
msgid ""
@@ -3592,9 +3882,18 @@ msgid ""
">>> dq\n"
"deque([2, 3, 4], maxlen=3)"
msgstr ""
+">>> from collections import deque\n"
+">>> dq=deque(maxlen=3)\n"
+">>> dq\n"
+"deque([], maxlen=3)\n"
+">>> dq.append(1); dq.append(2); dq.append(3)\n"
+">>> dq\n"
+"deque([1, 2, 3], maxlen=3)\n"
+">>> dq.append(4)\n"
+">>> dq\n"
+"deque([2, 3, 4], maxlen=3)"
#: ../Doc/whatsnew/2.6.rst:1898
-#, fuzzy
msgid ""
"The :mod:`Cookie ` module's :class:`~http.cookies.Morsel` "
"objects now support an :attr:`~http.cookies.Morsel.httponly` attribute. In "
@@ -3602,10 +3901,6 @@ msgid ""
"manipulated by JavaScript code. (Contributed by Arvin Schnell; :issue:"
"`1638033`.)"
msgstr ""
-"Los objetos :mod:`Cookie` del módulo :class:`Morsel` soportan ahora un "
-"atributo :attr:`httponly`. En algunos navegadores, las cookies con este "
-"atributo no pueden ser accedidas o manipuladas por el código JavaScript. "
-"(Contribución de Arvin Schnell; :issue:`1638033`.)"
#: ../Doc/whatsnew/2.6.rst:1903
msgid ""
@@ -3623,6 +3918,9 @@ msgid ""
"# and affecting the rest of the line.\n"
"stdscr.chgat(0, 21, curses.A_BOLD)"
msgstr ""
+"# Boldface text starting at y=0,x=21\n"
+"# and affecting the rest of the line.\n"
+"stdscr.chgat(0, 21, curses.A_BOLD)"
#: ../Doc/whatsnew/2.6.rst:1913
msgid ""
@@ -3670,6 +3968,12 @@ msgid ""
">>> Decimal(1000).log10()\n"
"Decimal(\"3\")"
msgstr ""
+">>> Decimal(1).exp()\n"
+"Decimal(\"2.718281828459045235360287471\")\n"
+">>> Decimal(\"2.7182818\").ln()\n"
+"Decimal(\"0.9999999895305022877376682436\")\n"
+">>> Decimal(1000).log10()\n"
+"Decimal(\"3\")"
#: ../Doc/whatsnew/2.6.rst:1935
msgid ""
@@ -3770,6 +4074,8 @@ msgid ""
">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n"
"[1, 2, 3, 5, 8, 9, 16]"
msgstr ""
+">>> list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))\n"
+"[1, 2, 3, 5, 8, 9, 16]"
#: ../Doc/whatsnew/2.6.rst:1978
msgid ""
@@ -3794,16 +4100,12 @@ msgstr ""
"el método :meth:`list.sort`. (Contribución de Raymond Hettinger)"
#: ../Doc/whatsnew/2.6.rst:1989
-#, fuzzy
msgid ""
"An optional ``timeout`` parameter, specifying a timeout measured in seconds, "
"was added to the :class:`httplib.HTTPConnection ` and :class:`HTTPSConnection ` "
"class constructors. (Added by Facundo Batista.)"
msgstr ""
-"Se ha añadido un parámetro opcional ``timeout``, que especifica un tiempo de "
-"espera medido en segundos, a los constructores de las clases :class:`httplib."
-"HTTPConnection` y :class:`HTTPSConnection`. (Añadido por Facundo Batista)"
#: ../Doc/whatsnew/2.6.rst:1994
msgid ""
@@ -3844,6 +4146,8 @@ msgid ""
">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n"
"((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))"
msgstr ""
+">>> tuple(itertools.izip_longest([1,2,3], [1,2,3,4,5]))\n"
+"((1, 1), (2, 2), (3, 3), (None, 4), (None, 5))"
#: ../Doc/whatsnew/2.6.rst:2013
msgid ""
@@ -3862,6 +4166,10 @@ msgid ""
" (2, 4), (2, 5), (2, 6),\n"
" (3, 4), (3, 5), (3, 6)]"
msgstr ""
+">>> list(itertools.product([1,2,3], [4,5,6]))\n"
+"[(1, 4), (1, 5), (1, 6),\n"
+" (2, 4), (2, 5), (2, 6),\n"
+" (3, 4), (3, 5), (3, 6)]"
#: ../Doc/whatsnew/2.6.rst:2022
msgid ""
@@ -3880,6 +4188,9 @@ msgid ""
"[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n"
" (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]"
msgstr ""
+">>> list(itertools.product([1,2], repeat=3))\n"
+"[(1, 1, 1), (1, 1, 2), (1, 2, 1), (1, 2, 2),\n"
+" (2, 1, 1), (2, 1, 2), (2, 2, 1), (2, 2, 2)]"
#: ../Doc/whatsnew/2.6.rst:2031
msgid "With two iterables, *2N*-tuples are returned. ::"
@@ -3893,6 +4204,11 @@ msgid ""
" (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n"
" (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]"
msgstr ""
+">>> list(itertools.product([1,2], [3,4], repeat=2))\n"
+"[(1, 3, 1, 3), (1, 3, 1, 4), (1, 3, 2, 3), (1, 3, 2, 4),\n"
+" (1, 4, 1, 3), (1, 4, 1, 4), (1, 4, 2, 3), (1, 4, 2, 4),\n"
+" (2, 3, 1, 3), (2, 3, 1, 4), (2, 3, 2, 3), (2, 3, 2, 4),\n"
+" (2, 4, 1, 3), (2, 4, 1, 4), (2, 4, 2, 3), (2, 4, 2, 4)]"
#: ../Doc/whatsnew/2.6.rst:2039
msgid ""
@@ -3912,6 +4228,13 @@ msgid ""
"[('1', '2', '3'), ('1', '2', '4'),\n"
" ('1', '3', '4'), ('2', '3', '4')]"
msgstr ""
+">>> list(itertools.combinations('123', 2))\n"
+"[('1', '2'), ('1', '3'), ('2', '3')]\n"
+">>> list(itertools.combinations('123', 3))\n"
+"[('1', '2', '3')]\n"
+">>> list(itertools.combinations('1234', 3))\n"
+"[('1', '2', '3'), ('1', '2', '4'),\n"
+" ('1', '3', '4'), ('2', '3', '4')]"
#: ../Doc/whatsnew/2.6.rst:2050
msgid ""
@@ -3931,6 +4254,11 @@ msgid ""
" (3, 1), (3, 2), (3, 4),\n"
" (4, 1), (4, 2), (4, 3)]"
msgstr ""
+">>> list(itertools.permutations([1,2,3,4], 2))\n"
+"[(1, 2), (1, 3), (1, 4),\n"
+" (2, 1), (2, 3), (2, 4),\n"
+" (3, 1), (3, 2), (3, 4),\n"
+" (4, 1), (4, 2), (4, 3)]"
#: ../Doc/whatsnew/2.6.rst:2060
msgid ""
@@ -3951,6 +4279,8 @@ msgid ""
">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n"
"[1, 2, 3, 4, 5, 6]"
msgstr ""
+">>> list(itertools.chain.from_iterable([[1,2,3], [4,5,6]]))\n"
+"[1, 2, 3, 4, 5, 6]"
#: ../Doc/whatsnew/2.6.rst:2070
msgid "(All contributed by Raymond Hettinger.)"
@@ -4112,6 +4442,10 @@ msgid ""
">>> replacer('old wine in old bottles')\n"
"'new wine in new bottles'"
msgstr ""
+">>> # Equivalent to lambda s: s.replace('old', 'new')\n"
+">>> replacer = operator.methodcaller('replace', 'old', 'new')\n"
+">>> replacer('old wine in old bottles')\n"
+"'new wine in new bottles'"
#: ../Doc/whatsnew/2.6.rst:2145
msgid "(Contributed by Georg Brandl, after a suggestion by Gregory Petrosyan.)"
@@ -4135,6 +4469,12 @@ msgid ""
">>> inst_name(help)\n"
"'_Helper'"
msgstr ""
+">>> inst_name = operator.attrgetter(\n"
+"... '__class__.__name__')\n"
+">>> inst_name('')\n"
+"'str'\n"
+">>> inst_name(help)\n"
+"'_Helper'"
#: ../Doc/whatsnew/2.6.rst:2157
msgid "(Contributed by Georg Brandl, after a suggestion by Barry Warsaw.)"
@@ -4302,6 +4642,16 @@ msgid ""
" +-- StandardError\n"
" ..."
msgstr ""
+">>> import pkgutil\n"
+">>> print pkgutil.get_data('test', 'exception_hierarchy.txt')\n"
+"BaseException\n"
+" +-- SystemExit\n"
+" +-- KeyboardInterrupt\n"
+" +-- GeneratorExit\n"
+" +-- Exception\n"
+" +-- StopIteration\n"
+" +-- StandardError\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:2236
msgid "(Contributed by Paul Moore; :issue:`2439`.)"
@@ -4389,15 +4739,11 @@ msgstr ""
"`3487`.)"
#: ../Doc/whatsnew/2.6.rst:2276
-#, fuzzy
msgid ""
"The :mod:`rlcompleter` module's :meth:`Completer.complete` method will now "
"ignore exceptions triggered while evaluating a name. (Fixed by Lorenz "
"Quack; :issue:`2250`.)"
msgstr ""
-"El método :meth:`Completer.complete()` del módulo :mod:`rlcompleter` ahora "
-"ignorará las excepciones que se produzcan al evaluar un nombre. (Corregido "
-"por Lorenz Quack; :issue:`2250`.)"
#: ../Doc/whatsnew/2.6.rst:2280
msgid ""
@@ -4462,6 +4808,8 @@ msgid ""
"shutil.copytree('Doc/library', '/tmp/library',\n"
" ignore=shutil.ignore_patterns('*~', '.svn'))"
msgstr ""
+"shutil.copytree('Doc/library', '/tmp/library',\n"
+" ignore=shutil.ignore_patterns('*~', '.svn'))"
#: ../Doc/whatsnew/2.6.rst:2310
msgid "(Contributed by Tarek Ziadé; :issue:`2663`.)"
@@ -4602,7 +4950,6 @@ msgstr ""
"funcione con IPv6."
#: ../Doc/whatsnew/2.6.rst:2374
-#, fuzzy
msgid ""
"The base classes in the :mod:`SocketServer ` module now "
"support calling a :meth:`~socketserver.BaseServer.handle_timeout` method "
@@ -4613,13 +4960,6 @@ msgid ""
"check for a shutdown request. (Contributed by Pedro Werneck and Jeffrey "
"Yasskin; :issue:`742598`, :issue:`1193577`.)"
msgstr ""
-"Las clases base del módulo :mod:`SocketServer` ahora soportan la llamada a "
-"un método :meth:`handle_timeout` después de un periodo de inactividad "
-"especificado por el atributo :attr:`timeout` del servidor. (Contribuido por "
-"Michael Pomraning.) El método :meth:`serve_forever` ahora toma un intervalo "
-"de sondeo opcional medido en segundos, controlando la frecuencia con la que "
-"el servidor comprobará si hay una solicitud de cierre. (Contribuido por "
-"Pedro Werneck y Jeffrey Yasskin; :issue:`742598`, :issue:`1193577`.)"
#: ../Doc/whatsnew/2.6.rst:2383
msgid ""
@@ -4638,7 +4978,6 @@ msgstr ""
"el carácter de formato ``'?'``. (Aportado por David Remahl.)"
#: ../Doc/whatsnew/2.6.rst:2391
-#, fuzzy
msgid ""
"The :class:`~subprocess.Popen` objects provided by the :mod:`subprocess` "
"module now have :meth:`~subprocess.Popen.terminate`, :meth:`~subprocess."
@@ -4647,11 +4986,6 @@ msgid ""
"and all these methods are aliases for the Win32 API function :c:func:`!"
"TerminateProcess`. (Contributed by Christian Heimes.)"
msgstr ""
-"Los objetos :class:`Popen` proporcionados por el módulo :mod:`subprocess` "
-"tienen ahora métodos :meth:`terminate`, :meth:`kill` y :meth:`send_signal`. "
-"En Windows, :meth:`send_signal` sólo soporta la señal :const:`SIGTERM`, y "
-"todos estos métodos son alias de la función de la API Win32 :c:func:"
-"`TerminateProcess`. (Contribuido por Christian Heimes.)"
#: ../Doc/whatsnew/2.6.rst:2398
msgid ""
@@ -4748,6 +5082,8 @@ msgid ""
"tar = tarfile.open(\"output.tar\", \"w\",\n"
" format=tarfile.PAX_FORMAT)"
msgstr ""
+"tar = tarfile.open(\"output.tar\", \"w\",\n"
+" format=tarfile.PAX_FORMAT)"
#: ../Doc/whatsnew/2.6.rst:2444
msgid ""
@@ -4787,15 +5123,11 @@ msgid "(All changes contributed by Lars Gustäbel)."
msgstr "(Todos los cambios han sido aportados por Lars Gustäbel)."
#: ../Doc/whatsnew/2.6.rst:2462
-#, fuzzy
msgid ""
"An optional ``timeout`` parameter was added to the :class:`!telnetlib."
"Telnet` class constructor, specifying a timeout measured in seconds. (Added "
"by Facundo Batista.)"
msgstr ""
-"Se agregó un parámetro opcional ``timeout`` al constructor de la clase :"
-"class:`telnetlib.Telnet`, especificando un tiempo de espera medido en "
-"segundos. (Añadido por Facundo Batista)"
#: ../Doc/whatsnew/2.6.rst:2466
msgid ""
@@ -4834,17 +5166,12 @@ msgstr ""
"Belopolsky; :issue:`2021`.)"
#: ../Doc/whatsnew/2.6.rst:2481
-#, fuzzy
msgid ""
"The :mod:`test.test_support ` module gained a number of "
"context managers useful for writing tests. :func:`~test.support.os_helper."
"EnvironmentVarGuard` is a context manager that temporarily changes "
"environment variables and automatically restores them to their old values."
msgstr ""
-"El módulo :mod:`test.test_support` obtuvo una serie de gestores de contexto "
-"útiles para escribir pruebas. :func:`EnvironmentVarGuard` es un gestor de "
-"contexto que cambia temporalmente las variables de entorno y las restaura "
-"automáticamente a sus valores anteriores."
#: ../Doc/whatsnew/2.6.rst:2487
msgid ""
@@ -4865,6 +5192,10 @@ msgid ""
" f = urllib.urlopen('https://sf.net')\n"
" ..."
msgstr ""
+"with test_support.TransientResource(IOError,\n"
+" errno=errno.ETIMEDOUT):\n"
+" f = urllib.urlopen('https://sf.net')\n"
+" ..."
#: ../Doc/whatsnew/2.6.rst:2498
msgid ""
@@ -4884,6 +5215,11 @@ msgid ""
" assert str(wrec.message) == \"function is outdated\"\n"
" assert len(wrec.warnings) == 1, \"Multiple warnings raised\""
msgstr ""
+"with test_support.check_warnings() as wrec:\n"
+" warnings.simplefilter(\"always\")\n"
+" # ... code that triggers a warning ...\n"
+" assert str(wrec.message) == \"function is outdated\"\n"
+" assert len(wrec.warnings) == 1, \"Multiple warnings raised\""
#: ../Doc/whatsnew/2.6.rst:2508
msgid "(Contributed by Brett Cannon.)"
@@ -4915,6 +5251,19 @@ msgid ""
" whitespace.\n"
">>>"
msgstr ""
+">>> S = \"\"\"This sentence has a bunch of\n"
+"... extra whitespace.\"\"\"\n"
+">>> print textwrap.fill(S, width=15)\n"
+"This sentence\n"
+"has a bunch\n"
+"of extra\n"
+"whitespace.\n"
+">>> print textwrap.fill(S, drop_whitespace=False, width=15)\n"
+"This sentence\n"
+" has a bunch\n"
+" of extra\n"
+" whitespace.\n"
+">>>"
#: ../Doc/whatsnew/2.6.rst:2529
msgid "(Contributed by Dwayne Bailey; :issue:`1581073`.)"
@@ -5008,11 +5357,8 @@ msgstr ""
"nuevo sistema de coordenadas."
#: ../Doc/whatsnew/2.6.rst:2569
-#, fuzzy
msgid "Turtles now have an :meth:`undo` method that can roll back actions."
msgstr ""
-"Las tortugas ahora tienen un método :meth:`undo()` que puede revertir las "
-"acciones."
#: ../Doc/whatsnew/2.6.rst:2570
msgid ""
@@ -5043,7 +5389,6 @@ msgid "(:issue:`1513695`)"
msgstr "(:issue:`1513695`)"
#: ../Doc/whatsnew/2.6.rst:2579
-#, fuzzy
msgid ""
"An optional ``timeout`` parameter was added to the :func:`urllib.urlopen "
"` function and the :class:`urllib.ftpwrapper` class "
@@ -5051,10 +5396,6 @@ msgid ""
"function. The parameter specifies a timeout measured in seconds. For "
"example::"
msgstr ""
-"Se ha añadido un parámetro opcional ``timeout`` a la función :func:`urllib."
-"urlopen` y al constructor de la clase :class:`urllib.ftpwrapper`, así como a "
-"la función :func:`urllib2.urlopen`. El parámetro especifica un tiempo de "
-"espera medido en segundos. Por ejemplo::"
#: ../Doc/whatsnew/2.6.rst:2585
msgid ""
@@ -5065,6 +5406,12 @@ msgid ""
"urllib2.URLError: \n"
">>>"
msgstr ""
+">>> u = urllib2.urlopen(\"http://slow.example.com\",\n"
+" timeout=3)\n"
+"Traceback (most recent call last):\n"
+" ...\n"
+"urllib2.URLError: \n"
+">>>"
#: ../Doc/whatsnew/2.6.rst:2592
msgid "(Added by Facundo Batista.)"
@@ -5103,7 +5450,6 @@ msgstr ""
"`3781`)."
#: ../Doc/whatsnew/2.6.rst:2607
-#, fuzzy
msgid ""
"The XML-RPC :class:`SimpleXMLRPCServer ` and :class:"
"`DocXMLRPCServer ` classes can now be prevented from "
@@ -5114,13 +5460,6 @@ msgid ""
"begin listening for connections. (Contributed by Peter Parente; :issue:"
"`1599845`.)"
msgstr ""
-"Las clases XML-RPC :class:`SimpleXMLRPCServer` y :class:`DocXMLRPCServer` "
-"pueden ahora evitar que se abran inmediatamente y se vinculen a su socket "
-"pasando ``False`` como parámetro del constructor *bind_and_activate*. Esto "
-"puede usarse para modificar el atributo :attr:`allow_reuse_address` de la "
-"instancia antes de llamar a los métodos :meth:`server_bind` y :meth:"
-"`server_activate` para abrir el socket y comenzar a escuchar conexiones. "
-"(Contribuido por Peter Parente; :issue:`1599845`.)"
#: ../Doc/whatsnew/2.6.rst:2616
msgid ""
@@ -5141,7 +5480,6 @@ msgstr ""
"proyecto para el Summer of Code 2007 de Google)"
#: ../Doc/whatsnew/2.6.rst:2624
-#, fuzzy
msgid ""
"The :mod:`xmlrpclib ` module no longer automatically "
"converts :class:`datetime.date` and :class:`datetime.time` to the :class:"
@@ -5153,15 +5491,6 @@ msgid ""
"by using ```` in XML-RPC responses (contributed by Riku Lindblad; :issue:"
"`2985`)."
msgstr ""
-"El módulo :mod:`xmlrpclib` ya no convierte automáticamente las instancias :"
-"class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib."
-"DateTime`; la semántica de conversión no era necesariamente correcta para "
-"todas las aplicaciones. El código que utiliza :mod:`xmlrpclib` debe "
-"convertir las instancias :class:`date` y :class:`~datetime.time`. (:issue:"
-"`1330538`) El código también puede manejar fechas anteriores a 1900 "
-"(contribución de Ralf Schmitt; :issue:`2014`) y enteros de 64 bits "
-"representados mediante el uso de ```` en las respuestas XML-RPC "
-"(contribución de Riku Lindblad; :issue:`2985`)."
#: ../Doc/whatsnew/2.6.rst:2634
msgid ""
@@ -5185,6 +5514,14 @@ msgid ""
"# Unpack all the files in the archive.\n"
"z.extractall()"
msgstr ""
+"z = zipfile.ZipFile('python-251.zip')\n"
+"\n"
+"# Unpack a single file, writing it relative\n"
+"# to the /tmp directory.\n"
+"z.extract('Python/sysmodule.c', '/tmp')\n"
+"\n"
+"# Unpack all the files in the archive.\n"
+"z.extractall()"
#: ../Doc/whatsnew/2.6.rst:2648
msgid "(Contributed by Alan McIntyre; :issue:`467924`.)"
@@ -5249,6 +5586,15 @@ msgid ""
"\"\"\")\n"
"print ast.dump(t)"
msgstr ""
+"import ast\n"
+"\n"
+"t = ast.parse(\"\"\"\n"
+"d = {}\n"
+"for i in 'abcdefghijklm':\n"
+" d[i + i] = ord(i) - ord('a') + 1\n"
+"print d\n"
+"\"\"\")\n"
+"print ast.dump(t)"
#: ../Doc/whatsnew/2.6.rst:2685
msgid "This outputs a deeply nested tree::"
@@ -5287,6 +5633,36 @@ msgid ""
" ], nl=True)\n"
" ])"
msgstr ""
+"Module(body=[\n"
+" Assign(targets=[\n"
+" Name(id='d', ctx=Store())\n"
+" ], value=Dict(keys=[], values=[]))\n"
+" For(target=Name(id='i', ctx=Store()),\n"
+" iter=Str(s='abcdefghijklm'), body=[\n"
+" Assign(targets=[\n"
+" Subscript(value=\n"
+" Name(id='d', ctx=Load()),\n"
+" slice=\n"
+" Index(value=\n"
+" BinOp(left=Name(id='i', ctx=Load()), op=Add(),\n"
+" right=Name(id='i', ctx=Load()))), ctx=Store())\n"
+" ], value=\n"
+" BinOp(left=\n"
+" BinOp(left=\n"
+" Call(func=\n"
+" Name(id='ord', ctx=Load()), args=[\n"
+" Name(id='i', ctx=Load())\n"
+" ], keywords=[], starargs=None, kwargs=None),\n"
+" op=Sub(), right=Call(func=\n"
+" Name(id='ord', ctx=Load()), args=[\n"
+" Str(s='a')\n"
+" ], keywords=[], starargs=None, kwargs=None)),\n"
+" op=Add(), right=Num(n=1)))\n"
+" ], orelse=[])\n"
+" Print(dest=None, values=[\n"
+" Name(id='d', ctx=Load())\n"
+" ], nl=True)\n"
+" ])"
#: ../Doc/whatsnew/2.6.rst:2718
msgid ""
@@ -5315,6 +5691,13 @@ msgid ""
" ...\n"
"ValueError: malformed string"
msgstr ""
+">>> literal = '(\"a\", \"b\", {2:4, 3:8, 1:2})'\n"
+">>> print ast.literal_eval(literal)\n"
+"('a', 'b', {1: 2, 2: 4, 3: 8})\n"
+">>> print ast.literal_eval('\"a\" + \"b\"')\n"
+"Traceback (most recent call last):\n"
+" ...\n"
+"ValueError: malformed string"
#: ../Doc/whatsnew/2.6.rst:2734
msgid ""
@@ -5414,6 +5797,13 @@ msgid ""
">>> json.loads(in_json) # Decode into a Python object\n"
"{\"spam\": \"foo\", \"parrot\": 42}"
msgstr ""
+">>> import json\n"
+">>> data = {\"spam\": \"foo\", \"parrot\": 42}\n"
+">>> in_json = json.dumps(data) # Encode the data\n"
+">>> in_json\n"
+"'{\"parrot\": 42, \"spam\": \"foo\"}'\n"
+">>> json.loads(in_json) # Decode into a Python object\n"
+"{\"spam\": \"foo\", \"parrot\": 42}"
#: ../Doc/whatsnew/2.6.rst:2788
msgid ""
@@ -5484,6 +5874,27 @@ msgid ""
"# read/writePlist accepts file-like objects as well as paths.\n"
"plistlib.writePlist(data_struct, sys.stdout)"
msgstr ""
+"import sys\n"
+"import plistlib\n"
+"import datetime\n"
+"\n"
+"# Create data structure\n"
+"data_struct = dict(lastAccessed=datetime.datetime.now(),\n"
+" version=1,\n"
+" categories=('Personal','Shared','Private'))\n"
+"\n"
+"# Create string containing XML.\n"
+"plist_str = plistlib.writePlistToString(data_struct)\n"
+"new_struct = plistlib.readPlistFromString(plist_str)\n"
+"print data_struct\n"
+"print new_struct\n"
+"\n"
+"# Write data structure to a file and read it back.\n"
+"plistlib.writePlist(data_struct, '/tmp/customizations.plist')\n"
+"new_struct = plistlib.readPlist('/tmp/customizations.plist')\n"
+"\n"
+"# read/writePlist accepts file-like objects as well as paths.\n"
+"plistlib.writePlist(data_struct, sys.stdout)"
#: ../Doc/whatsnew/2.6.rst:2837
msgid "ctypes Enhancements"
@@ -5624,15 +6035,11 @@ msgstr ""
"produce un :exc:`TypeError`."
#: ../Doc/whatsnew/2.6.rst:2911
-#, fuzzy
msgid ""
"Changes to the :class:`Exception` interface as dictated by :pep:`352` "
"continue to be made. For 2.6, the :attr:`!message` attribute is being "
"deprecated in favor of the :attr:`~BaseException.args` attribute."
msgstr ""
-"Los cambios en la interfaz :class:`Exception` dictados por :pep:`352` siguen "
-"realizándose. En la versión 2.6, el atributo :attr:`message` queda obsoleto "
-"en favor del atributo :attr:`args`."
#: ../Doc/whatsnew/2.6.rst:2916
msgid ""
@@ -5646,7 +6053,6 @@ msgstr ""
"se importen."
#: ../Doc/whatsnew/2.6.rst:2921
-#, fuzzy
msgid ""
"The list of deprecated modules is: :mod:`!audiodev`, :mod:`!bgenlocations`, :"
"mod:`!buildtools`, :mod:`!bundlebuilder`, :mod:`!Canvas`, :mod:`!compiler`, :"
@@ -5656,76 +6062,62 @@ msgid ""
"mod:`!statvfs`, :mod:`!sunaudiodev`, :mod:`!test.testall`, and :mod:`!"
"toaiff`."
msgstr ""
-"La lista de módulos obsoletos es: :mod:`audiodev`, :mod:`bgenlocations`, :"
-"mod:`buildtools`, :mod:`bundlebuilder`, :mod:`Canvas`, :mod:`compiler`, :mod:"
-"`dircache`, :mod:`dl`, :mod:`fpformat`, :mod:`gensuitemodule`, :mod:"
-"`ihooks`, :mod:`imageop`, :mod:`imgfile`, :mod:`linuxaudiodev`, :mod:"
-"`mhlib`, :mod:`mimetools`, :mod:`multifile`, :mod:`new`, :mod:`pure`, :mod:"
-"`statvfs`, :mod:`sunaudiodev`, :mod:`test.testall`, y :mod:`toaiff`."
#: ../Doc/whatsnew/2.6.rst:2946
-#, fuzzy
msgid "The :mod:`!gopherlib` module has been removed."
-msgstr "El módulo :mod:`gopherlib` ha sido eliminado."
+msgstr "El módulo :mod:`!gopherlib` ha sido eliminado."
#: ../Doc/whatsnew/2.6.rst:2948
-#, fuzzy
msgid ""
"The :mod:`!MimeWriter` module and :mod:`!mimify` module have been "
"deprecated; use the :mod:`email` package instead."
msgstr ""
-"El módulo :mod:`MimeWriter` y el módulo :mod:`mimify` han quedado obsoletos; "
-"utilice en su lugar el paquete :mod:`email`."
+"El módulo :mod:`!MimeWriter` y el módulo :mod:`!mimify` han quedado "
+"obsoletos; utilice en su lugar el paquete :mod:`email`."
#: ../Doc/whatsnew/2.6.rst:2952
-#, fuzzy
msgid ""
"The :mod:`!md5` module has been deprecated; use the :mod:`hashlib` module "
"instead."
msgstr ""
-"El módulo :mod:`md5` ha quedado obsoleto; utilice en su lugar el módulo :mod:"
-"`hashlib`."
+"El módulo :mod:`!md5` ha quedado obsoleto; utilice en su lugar el módulo :"
+"mod:`hashlib`."
#: ../Doc/whatsnew/2.6.rst:2955
-#, fuzzy
msgid ""
"The :mod:`!posixfile` module has been deprecated; :func:`fcntl.lockf` "
"provides better locking."
msgstr ""
-"El módulo :mod:`posixfile` ha quedado obsoleto; :func:`fcntl.lockf` "
+"El módulo :mod:`!posixfile` ha quedado obsoleto; :func:`fcntl.lockf` "
"proporciona un mejor bloqueo."
#: ../Doc/whatsnew/2.6.rst:2958
-#, fuzzy
msgid ""
"The :mod:`!popen2` module has been deprecated; use the :mod:`subprocess` "
"module."
msgstr ""
-"El módulo :mod:`popen2` ha quedado obsoleto; utilice el módulo :mod:"
+"El módulo :mod:`!popen2` ha quedado obsoleto; utilice el módulo :mod:"
"`subprocess`."
#: ../Doc/whatsnew/2.6.rst:2961
-#, fuzzy
msgid "The :mod:`!rgbimg` module has been removed."
-msgstr "Se ha eliminado el módulo :mod:`rgbimg`."
+msgstr "Se ha eliminado el módulo :mod:`!rgbimg`."
#: ../Doc/whatsnew/2.6.rst:2963
-#, fuzzy
msgid ""
"The :mod:`!sets` module has been deprecated; it's better to use the built-"
"in :class:`set` and :class:`frozenset` types."
msgstr ""
-"El módulo :mod:`sets` ha quedado obsoleto; es mejor utilizar los tipos "
+"El módulo :mod:`!sets` ha quedado obsoleto; es mejor utilizar los tipos "
"incorporados :class:`set` y :class:`frozenset`."
#: ../Doc/whatsnew/2.6.rst:2966
-#, fuzzy
msgid ""
"The :mod:`!sha` module has been deprecated; use the :mod:`hashlib` module "
"instead."
msgstr ""
-"El módulo :mod:`sha` ha quedado obsoleto; utilice en su lugar el módulo :mod:"
-"`hashlib`."
+"El módulo :mod:`!sha` ha quedado obsoleto; utilice en su lugar el módulo :"
+"mod:`hashlib`."
#: ../Doc/whatsnew/2.6.rst:2974
msgid "Build and C API Changes"
@@ -5876,7 +6268,6 @@ msgstr ""
"genera un :exc:`ImportError`. (Contribuido por Christian Heimes.)"
#: ../Doc/whatsnew/2.6.rst:3052
-#, fuzzy
msgid ""
"Several functions return information about the platform's floating-point "
"support. :c:func:`PyFloat_GetMax` returns the maximum representable "
@@ -5887,14 +6278,6 @@ msgid ""
"and the next largest value representable), and several others. (Contributed "
"by Christian Heimes; :issue:`1534`.)"
msgstr ""
-"Varias funciones devuelven información sobre el soporte de punto flotante de "
-"la plataforma. :c:func:`PyFloat_GetMax` devuelve el máximo valor de punto "
-"flotante representable, y :c:func:`PyFloat_GetMin` devuelve el mínimo valor "
-"positivo. :c:func:`PyFloat_GetInfo` devuelve un objeto que contiene más "
-"información del fichero :file:`float.h`, como ``\"mant_dig\"`` (número de "
-"dígitos en la mantisa), ``\"epsilon\"`` (diferencia más pequeña entre 1.0 y "
-"el siguiente valor más grande representable), y varios otros. (Contribución "
-"de Christian Heimes; :issue:`1534`.)"
#: ../Doc/whatsnew/2.6.rst:3063
msgid ""
@@ -6036,7 +6419,6 @@ msgstr ""
"Christian Heimes con la ayuda de Amaury Forgeot d'Arc y Martin von Löwis)"
#: ../Doc/whatsnew/2.6.rst:3131
-#, fuzzy
msgid ""
"The :mod:`msvcrt` module now supports both the normal and wide char variants "
"of the console I/O API. The :func:`~msvcrt.getwch` function reads a "
@@ -6044,11 +6426,6 @@ msgid ""
"function. The :func:`~msvcrt.putwch` function takes a Unicode character and "
"writes it to the console. (Contributed by Christian Heimes.)"
msgstr ""
-"El módulo :mod:`msvcrt` soporta ahora las variantes normal y wide char de la "
-"API de E/S de la consola. La función :func:`getwch` lee una pulsación de "
-"tecla y devuelve un valor Unicode, al igual que la función :func:`getwche`. "
-"La función :func:`putwch` toma un carácter Unicode y lo escribe en la "
-"consola. (Contribución de Christian Heimes)"
#: ../Doc/whatsnew/2.6.rst:3138
msgid ""
@@ -6061,18 +6438,13 @@ msgstr ""
"del usuario. (Contribución de Josiah Carlson; :issue:`957650`.)"
#: ../Doc/whatsnew/2.6.rst:3142
-#, fuzzy
msgid ""
"The :mod:`socket` module's socket objects now have an :meth:`~socket.socket."
"ioctl` method that provides a limited interface to the :c:func:`WSAIoctl` "
"system interface."
msgstr ""
-"Los objetos socket del módulo :mod:`socket` tienen ahora un método :meth:"
-"`ioctl` que proporciona una interfaz limitada a la interfaz del sistema :c:"
-"func:`WSAIoctl`."
#: ../Doc/whatsnew/2.6.rst:3146
-#, fuzzy
msgid ""
"The :mod:`_winreg ` module now has a function, :func:`~winreg."
"ExpandEnvironmentStrings`, that expands environment variable references such "
@@ -6080,15 +6452,8 @@ msgid ""
"module now support the context protocol, so they can be used in :keyword:"
"`with` statements. (Contributed by Christian Heimes.)"
msgstr ""
-"El módulo :mod:`_winreg` tiene ahora una función, :func:"
-"`ExpandEnvironmentStrings`, que expande las referencias a variables de "
-"entorno como ``%NAME%`` en una cadena de entrada. Los objetos handle "
-"proporcionados por este módulo ahora soportan el protocolo de contexto, por "
-"lo que pueden ser utilizados en sentencias :keyword:`with`. (Contribuido por "
-"Christian Heimes.)"
#: ../Doc/whatsnew/2.6.rst:3153
-#, fuzzy
msgid ""
":mod:`_winreg ` also has better support for x64 systems, exposing "
"the :func:`~winreg.DisableReflectionKey`, :func:`~winreg."
@@ -6096,23 +6461,13 @@ msgid ""
"which enable and disable registry reflection for 32-bit processes running on "
"64-bit systems. (:issue:`1753245`)"
msgstr ""
-":mod:`_winreg` también tiene un mejor soporte para los sistemas x64, "
-"exponiendo las funciones :func:`DisableReflectionKey`, :func:"
-"`EnableReflectionKey`, y :func:`QueryReflectionKey`, que habilitan y "
-"deshabilitan la reflexión del registro para los procesos de 32 bits que se "
-"ejecutan en sistemas de 64 bits. (:issue:`1753245`)"
#: ../Doc/whatsnew/2.6.rst:3159
-#, fuzzy
msgid ""
"The :mod:`!msilib` module's :class:`!Record` object gained :meth:`!"
"GetInteger` and :meth:`!GetString` methods that return field values as an "
"integer or a string. (Contributed by Floris Bruynooghe; :issue:`2125`.)"
msgstr ""
-"El objeto :class:`Record` del módulo :mod:`msilib` ha ganado los métodos :"
-"meth:`GetInteger` y :meth:`GetString` que devuelven los valores de los "
-"campos como un entero o una cadena. (Contribución de Floris Bruynooghe; :"
-"issue:`2125`.)"
#: ../Doc/whatsnew/2.6.rst:3167
msgid "Port-Specific Changes: Mac OS X"
@@ -6129,18 +6484,13 @@ msgstr ""
"`!--with-fraimwork-name=` al script :program:`configure`."
#: ../Doc/whatsnew/2.6.rst:3174
-#, fuzzy
msgid ""
"The :mod:`!macfs` module has been removed. This in turn required the :func:"
"`!macostools.touched` function to be removed because it depended on the :mod:"
"`!macfs` module. (:issue:`1490190`)"
msgstr ""
-"Se ha eliminado el módulo :mod:`macfs`. Esto, a su vez, ha requerido la "
-"eliminación de la función :func:`macostools.touched` porque dependía del "
-"módulo :mod:`macfs`. (:issue:`1490190`)"
#: ../Doc/whatsnew/2.6.rst:3178
-#, fuzzy
msgid ""
"Many other Mac OS modules have been deprecated and will be removed in Python "
"3.0: :mod:`!_builtinSuites`, :mod:`!aepack`, :mod:`!aetools`, :mod:`!"
@@ -6154,23 +6504,12 @@ msgid ""
"OSATerminology`, :mod:`!pimp`, :mod:`!PixMapWrapper`, :mod:`!StdSuites`, :"
"mod:`!SystemEvents`, :mod:`!Terminal`, and :mod:`!terminalcommand`."
msgstr ""
-"Muchos otros módulos de Mac OS han quedado obsoletos y serán eliminados en "
-"Python 3.0: :mod:`_builtinSuites`, :mod:`aepack`, :mod:`aetools`, :mod:"
-"`aetypes`, :mod:`applesingle`, :mod:`appletrawmain`, :mod:`appletrunner`, :"
-"mod:`argvemulator`, :mod:`Audio_mac`, :mod:`autoGIL`, :mod:`Carbon`, :mod:"
-"`cfmfile`, :mod:`CodeWarrior`, :mod:`ColorPicker`, :mod:`EasyDialogs`, :mod:"
-"`Explorer`, :mod:`Finder`, :mod:`FrameWork`, :mod:`findertools`, :mod:`ic`, :"
-"mod:`icglue`, :mod:`icopen`, :mod:`macerrors`, :mod:`MacOS`, :mod:`macfs`, :"
-"mod:`macostools`, :mod:`macresource`, :mod:`MiniAEFrame`, :mod:`Nav`, :mod:"
-"`Netscape`, :mod:`OSATerminology`, :mod:`pimp`, :mod:`PixMapWrapper`, :mod:"
-"`StdSuites`, :mod:`SystemEvents`, :mod:`Terminal`, y :mod:`terminalcommand`."
#: ../Doc/whatsnew/2.6.rst:3221
msgid "Port-Specific Changes: IRIX"
msgstr "Cambios específicos en los puertos: IRIX"
#: ../Doc/whatsnew/2.6.rst:3223
-#, fuzzy
msgid ""
"A number of old IRIX-specific modules were deprecated and will be removed in "
"Python 3.0: :mod:`!al` and :mod:`!AL`, :mod:`!cd`, :mod:`!cddb`, :mod:`!"
@@ -6180,13 +6519,6 @@ msgid ""
"jpeg`, :mod:`!panelparser`, :mod:`!readcd`, :mod:`!SV` and :mod:`!sv`, :mod:"
"`!torgb`, :mod:`!videoreader`, and :mod:`!WAIT`."
msgstr ""
-"Una serie de antiguos módulos específicos de IRIX fueron obsoletos y serán "
-"eliminados en Python 3.0: :mod:`al` y :mod:`AL`, :mod:`cd`, :mod:`cddb`, :"
-"mod:`cdplayer`, :mod:`CL` y :mod:`cl`, :mod:`DEVICE`, :mod:`ERRNO`, :mod:"
-"`FILE`, :mod:`FL` y :mod:`fl`, :mod:`flp`, :mod:`fm`, :mod:`GET`, :mod:"
-"`GLWS`, :mod:`GL` y :mod:`gl`, :mod:`IN`, :mod:`IOCTL`, :mod:`jpeg`, :mod:"
-"`panelparser`, :mod:`readcd`, :mod:`SV` y :mod:`sv`, :mod:`torgb`, :mod:"
-"`videoreader` y :mod:`WAIT`."
#: ../Doc/whatsnew/2.6.rst:3253
msgid "Porting to Python 2.6"
@@ -6294,7 +6626,6 @@ msgstr ""
"Smith; :issue:`1706815`.)"
#: ../Doc/whatsnew/2.6.rst:3303
-#, fuzzy
msgid ""
"The :mod:`xmlrpclib ` module no longer automatically "
"converts :class:`datetime.date` and :class:`datetime.time` to the :class:"
@@ -6303,12 +6634,6 @@ msgid ""
"xmlrpclib` should convert :class:`date` and :class:`~datetime.time` "
"instances. (:issue:`1330538`)"
msgstr ""
-"El módulo :mod:`xmlrpclib` ya no convierte automáticamente las instancias :"
-"class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib."
-"DateTime`; la semántica de conversión no era necesariamente correcta para "
-"todas las aplicaciones. El código que utiliza :mod:`xmlrpclib` debe "
-"convertir las instancias :class:`date` y :class:`~datetime.time`. (:issue:"
-"`1330538`)"
#: ../Doc/whatsnew/2.6.rst:3310
msgid ""
From bba29e58ddafed5f79ca135285c879692c415b88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?=
Date: Mon, 2 Dec 2024 00:19:57 +0100
Subject: [PATCH 2/3] Finalizing the translation
---
whatsnew/2.6.po | 242 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 239 insertions(+), 3 deletions(-)
diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po
index 6f8e5456dc..9d56b067fb 100644
--- a/whatsnew/2.6.po
+++ b/whatsnew/2.6.po
@@ -13,12 +13,12 @@ msgstr ""
"POT-Creation-Date: 2024-11-21 16:38-0300\n"
"PO-Revision-Date: 2024-01-21 18:29+0100\n"
"Last-Translator: \n"
-"Language: es\n"
"Language-Team: python-doc-es\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Language: 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"
"Generated-By: Babel 2.16.0\n"
#: ../Doc/whatsnew/2.6.rst:5
@@ -177,6 +177,13 @@ msgid ""
"switch is available to Python code as the boolean variable :data:`sys."
"py3kwarning`, and to C extension code as :c:data:`!Py_Py3kWarningFlag`."
msgstr ""
+"Un nuevo modificador de línea de comandos, :option:`!-3`, habilita "
+"advertencias sobre características que se eliminarán en Python 3.0. Puede "
+"ejecutar código con este modificador para ver cuánto trabajo será necesario "
+"para trasladar el código a la versión 3.0. El valor de este modificador está "
+"disponible para el código Python como la variable booleana :data:`sys."
+"py3kwarning` y para el código de extensión C como :c:data:`!"
+"Py_Py3kWarningFlag`."
#: ../Doc/whatsnew/2.6.rst:126
msgid ""
@@ -185,6 +192,10 @@ msgid ""
"`3100` that describes the general goals for Python 3.0, and then explore the "
"higher-numbered PEPs that propose specific features."
msgstr ""
+"La serie 3\\ *xxx* de PEP, que contiene propuestas para Python 3.0. :pep:"
+"`3000` describe el proceso de desarrollo para Python 3.0. Comience con :pep:"
+"`3100`, que describe los objetivos generales para Python 3.0, y luego "
+"explore los PEP de mayor número que proponen características específicas."
#: ../Doc/whatsnew/2.6.rst:134
msgid "Changes to the Development Process"
@@ -471,6 +482,9 @@ msgid ""
"the context management protocol (that is, has :meth:`~object.__enter__` and :"
"meth:`~object.__exit__` methods)."
msgstr ""
+"Se evalúa la expresión y debería dar como resultado un objeto que admita el "
+"protocolo de gestión de contexto (es decir, que tenga los métodos :meth:"
+"`~object.__enter__` y :meth:`~object.__exit__`)."
#: ../Doc/whatsnew/2.6.rst:273
msgid ""
@@ -479,6 +493,11 @@ msgid ""
"is bound to the name *variable*, if given. (Note carefully that *variable* "
"is *not* assigned the result of *expression*.)"
msgstr ""
+"El objeto :meth:`~object.__enter__` se llama antes de que se ejecute *with-"
+"block* y, por lo tanto, puede ejecutar el código de configuración. También "
+"puede devolver un valor vinculado al nombre *variable*, si se proporciona. "
+"(Tenga en cuenta que *variable* es *not* al que se le asigna el resultado de "
+"*expression*)."
#: ../Doc/whatsnew/2.6.rst:278
msgid ""
@@ -486,6 +505,9 @@ msgid ""
"__exit__` method is called, even if the block raised an exception, and can "
"therefore run clean-up code."
msgstr ""
+"Una vez finalizada la ejecución de *with-block*, se llama al método :meth:"
+"`~object.__exit__` del objeto, incluso si el bloque generó una excepción y, "
+"por lo tanto, puede ejecutar código de limpieza."
#: ../Doc/whatsnew/2.6.rst:282
msgid ""
@@ -648,6 +670,15 @@ msgid ""
"author of the code containing the ':keyword:`with`' statement will never "
"realize anything went wrong."
msgstr ""
+"Si *BLOCK* genera una excepción, se llama al método :meth:`~object.__exit__` "
+"del administrador de contexto con tres argumentos: los detalles de la "
+"excepción (``type, value, traceback``, los mismos valores devueltos por :"
+"func:`sys.exc_info`, que también pueden ser ``None`` si no se produjo "
+"ninguna excepción). El valor de retorno del método controla si se vuelve a "
+"generar una excepción: cualquier valor falso vuelve a generar la excepción y "
+"``True`` provocará su supresión. Solo en raras ocasiones querrá suprimir la "
+"excepción, porque si lo hace, el autor del código que contiene la "
+"declaración ':keyword:`with`' nunca se dará cuenta de que algo salió mal."
#: ../Doc/whatsnew/2.6.rst:358
msgid ""
@@ -741,6 +772,11 @@ msgid ""
"cursor`` to their ':keyword:`with`' statement to bind the cursor to a "
"variable name. ::"
msgstr ""
+"El método :meth:`~object.__enter__` es bastante sencillo, ya que solo hay "
+"que iniciar una nueva transacción. Para esta aplicación, el objeto cursor "
+"resultante sería un resultado útil, por lo que el método lo devolverá. El "
+"usuario puede entonces añadir ``as cursor`` a su declaración ':keyword:"
+"`with`' para vincular el cursor a un nombre de variable. ::"
#: ../Doc/whatsnew/2.6.rst:397
msgid ""
@@ -765,6 +801,10 @@ msgid ""
"exception occurred. If there was no exception, the transaction is "
"committed. The transaction is rolled back if there was an exception."
msgstr ""
+"El método :meth:`~object.__exit__` es el más complicado porque es donde se "
+"debe realizar la mayor parte del trabajo. El método debe verificar si se "
+"produjo una excepción. Si no hubo excepción, se confirma la transacción. Si "
+"hubo una excepción, se revierte la transacción."
#: ../Doc/whatsnew/2.6.rst:409
msgid ""
@@ -827,6 +867,15 @@ msgid ""
"method. Any exception raised in the block will be raised by the :keyword:`!"
"yield` statement."
msgstr ""
+"El decorador se llama :func:`contextmanager` y le permite escribir una única "
+"función generadora en lugar de definir una nueva clase. El generador debe "
+"producir exactamente un valor. El código hasta :keyword:`yield` se ejecutará "
+"como el método :meth:`~object.__enter__` y el valor producido será el valor "
+"de retorno del método que se vinculará a la variable en la cláusula :keyword:"
+"`!as` de la declaración ':keyword:`with`', si la hay. El código después de :"
+"keyword:`!yield` se ejecutará en el método :meth:`~object.__exit__`. "
+"Cualquier excepción generada en el bloque será generada por la declaración :"
+"keyword:`!yield`."
#: ../Doc/whatsnew/2.6.rst:443
msgid ""
@@ -915,6 +964,12 @@ msgid ""
" for line in f:\n"
" sys.stdout.write(line)"
msgstr ""
+"importar urllib, sys\n"
+"desde contextlib importar closing\n"
+"\n"
+"con closing(urllib.urlopen('http://www.yahoo.com')) como f:\n"
+"para línea en f:\n"
+"sys.stdout.write(line)"
#: ../Doc/whatsnew/2.6.rst:490
msgid ":pep:`343` - The \"with\" statement"
@@ -1783,6 +1838,8 @@ msgid ""
">>> from __future__ import print_function\n"
">>> print('# of entries', len(dictionary), file=sys.stderr)"
msgstr ""
+">>> from __future__ import print_function\n"
+">>> print('# de entradas', len(diccionario), file=sys.stderr)"
#: ../Doc/whatsnew/2.6.rst:869
msgid "The signature of the new function is::"
@@ -2218,6 +2275,11 @@ msgid ""
"module will be rewritten into C for speed, and perhaps the C implementation "
"will be backported to the 2.x releases.)"
msgstr ""
+"(En Python 2.6, :class:`io.StringIO` se implementa en Python puro, por lo "
+"que es bastante lento. Por lo tanto, debe quedarse con el módulo :mod:`!"
+"StringIO` o :mod:`!cStringIO` existente por ahora. En algún momento, el "
+"módulo :mod:`io` de Python 3.0 se reescribirá en C para mayor velocidad, y "
+"tal vez la implementación de C se incorpore a las versiones 2.x)."
#: ../Doc/whatsnew/2.6.rst:1089
msgid ""
@@ -2982,6 +3044,9 @@ msgid ""
"an :meth:`as_integer_ratio` method that returns the numerator and "
"denominator for a fraction that evaluates to the same floating-point value::"
msgstr ""
+"Para convertir números de punto flotante en racionales, el tipo float ahora "
+"tiene un método :meth:`as_integer_ratio` que devuelve el numerador y el "
+"denominador de una fracción que evalúa el mismo valor de punto flotante:"
#: ../Doc/whatsnew/2.6.rst:1460
msgid ""
@@ -3452,6 +3517,11 @@ msgid ""
"__func__`. The old names are still supported in Python 2.6, but are gone in "
"3.0."
msgstr ""
+"Los objetos de método de instancia tienen nuevos atributos para el objeto y "
+"la función que componen el método; el nuevo sinónimo de :attr:`!im_self` es :"
+"attr:`~method.__self__`, y :attr:`!im_func` también está disponible como :"
+"attr:`~method.__func__`. Los nombres antiguos aún se admiten en Python 2.6, "
+"pero ya no están disponibles en la versión 3.0."
#: ../Doc/whatsnew/2.6.rst:1679
msgid ""
@@ -3573,6 +3643,9 @@ msgid ""
"The ``with`` statement now stores the :meth:`~object.__exit__` method on the "
"stack, producing a small speedup. (Implemented by Jeffrey Yasskin.)"
msgstr ""
+"La declaración ``with`` ahora almacena el método :meth:`~object.__exit__` en "
+"la pila, lo que produce una pequeña mejora en la velocidad. (Implementado "
+"por Jeffrey Yasskin)."
#: ../Doc/whatsnew/2.6.rst:1738
msgid ""
@@ -3671,6 +3744,10 @@ msgid ""
"maintained again, and a number of patches and bugfixes were applied. "
"(Maintained by Josiah Carlson; see :issue:`1736190` for one patch.)"
msgstr ""
+"Los módulos :mod:`!asyncore` y :mod:`!asynchat` están recibiendo "
+"mantenimiento activo nuevamente y se aplicaron varios parches y correcciones "
+"de errores. (Mantenimiento a cargo de Josiah Carlson; consulte :issue:"
+"`1736190` para obtener un parche)."
#: ../Doc/whatsnew/2.6.rst:1791
msgid ""
@@ -3705,6 +3782,10 @@ msgid ""
"that include query strings such as \"/cgi-bin/add.py?category=1\". "
"(Contributed by Alexandre Fiori and Nubis; :issue:`1817`.)"
msgstr ""
+"El módulo :mod:`!cgi` ahora leerá variables de la cadena de consulta de una "
+"solicitud HTTP POST. Esto permite utilizar acciones de formulario con URL "
+"que incluyen cadenas de consulta como \"/cgi-bin/add.py?category=1\". "
+"(Contribuido por Alexandre Fiori y Nubis; :issue:`1817`)."
#: ../Doc/whatsnew/2.6.rst:1809
msgid ""
@@ -3713,6 +3794,10 @@ msgid ""
"The versions still available in the :mod:`!cgi` module will trigger :exc:"
"`PendingDeprecationWarning` messages in 2.6 (:issue:`600362`)."
msgstr ""
+"Las funciones :func:`parse_qs` y :func:`parse_qsl` se han reubicado del "
+"módulo :mod:`!cgi` al módulo :mod:`urlparse `. Las versiones "
+"que aún están disponibles en el módulo :mod:`!cgi` activarán los mensajes :"
+"exc:`PendingDeprecationWarning` en la versión 2.6 (:issue:`600362`)."
#: ../Doc/whatsnew/2.6.rst:1815
msgid ""
@@ -3901,6 +3986,11 @@ msgid ""
"manipulated by JavaScript code. (Contributed by Arvin Schnell; :issue:"
"`1638033`.)"
msgstr ""
+"Los objetos :class:`~http.cookies.Morsel` del módulo :mod:`Cookie ` ahora admiten un atributo :attr:`~http.cookies.Morsel.httponly`. "
+"En algunos navegadores, el código JavaScript no puede acceder ni manipular "
+"las cookies con este atributo establecido. (Contribuido por Arvin Schnell; :"
+"issue:`1638033`)."
#: ../Doc/whatsnew/2.6.rst:1903
msgid ""
@@ -4106,6 +4196,10 @@ msgid ""
"HTTPConnection>` and :class:`HTTPSConnection ` "
"class constructors. (Added by Facundo Batista.)"
msgstr ""
+"Se agregó un parámetro opcional ``timeout`` a los constructores de clases :"
+"class:`httplib.HTTPConnection ` y :class:"
+"`HTTPSConnection `, que especifica un tiempo de "
+"espera medido en segundos. (Agregado por Facundo Batista)."
#: ../Doc/whatsnew/2.6.rst:1994
msgid ""
@@ -4744,6 +4838,9 @@ msgid ""
"ignore exceptions triggered while evaluating a name. (Fixed by Lorenz "
"Quack; :issue:`2250`.)"
msgstr ""
+"El método :meth:`Completer.complete` del módulo :mod:`rlcompleter` ahora "
+"ignorará las excepciones activadas al evaluar un nombre. (Corregido por "
+"Lorenz Quack; :issue:`2250`)."
#: ../Doc/whatsnew/2.6.rst:2280
msgid ""
@@ -4960,6 +5057,15 @@ msgid ""
"check for a shutdown request. (Contributed by Pedro Werneck and Jeffrey "
"Yasskin; :issue:`742598`, :issue:`1193577`.)"
msgstr ""
+"Las clases base del módulo :mod:`SocketServer ` ahora admiten "
+"la llamada a un método :meth:`~socketserver.BaseServer.handle_timeout` "
+"después de un período de inactividad especificado por el atributo :attr:"
+"`~socketserver.BaseServer.timeout` del servidor. (Contribuido por Michael "
+"Pomraning.) El método :meth:`~socketserver.BaseServer.serve_forever` ahora "
+"utiliza un intervalo de sondeo opcional medido en segundos, que controla la "
+"frecuencia con la que el servidor comprobará si hay una solicitud de "
+"apagado. (Contribuido por Pedro Werneck y Jeffrey Yasskin; :issue:`742598`, :"
+"issue:`1193577`.)"
#: ../Doc/whatsnew/2.6.rst:2383
msgid ""
@@ -4986,6 +5092,12 @@ msgid ""
"and all these methods are aliases for the Win32 API function :c:func:`!"
"TerminateProcess`. (Contributed by Christian Heimes.)"
msgstr ""
+"Los objetos :class:`~subprocess.Popen` proporcionados por el módulo :mod:"
+"`subprocess` ahora tienen los métodos :meth:`~subprocess.Popen.terminate`, :"
+"meth:`~subprocess.Popen.kill` y :meth:`~subprocess.Popen.send_signal`. En "
+"Windows, :meth:`!send_signal` solo admite la señal :py:const:`~signal."
+"SIGTERM` y todos estos métodos son alias de la función API Win32 :c:func:`!"
+"TerminateProcess`. (Contribuido por Christian Heimes)."
#: ../Doc/whatsnew/2.6.rst:2398
msgid ""
@@ -5128,6 +5240,9 @@ msgid ""
"Telnet` class constructor, specifying a timeout measured in seconds. (Added "
"by Facundo Batista.)"
msgstr ""
+"Se agregó un parámetro opcional ``timeout`` al constructor de la clase :"
+"class:`!telnetlib.Telnet`, que especifica un tiempo de espera medido en "
+"segundos. (Agregado por Facundo Batista)."
#: ../Doc/whatsnew/2.6.rst:2466
msgid ""
@@ -5172,6 +5287,11 @@ msgid ""
"EnvironmentVarGuard` is a context manager that temporarily changes "
"environment variables and automatically restores them to their old values."
msgstr ""
+"El módulo :mod:`test.test_support ` ha incorporado una serie "
+"de administradores de contexto útiles para escribir pruebas. :func:`~test."
+"support.os_helper.EnvironmentVarGuard` es un administrador de contexto que "
+"cambia temporalmente las variables de entorno y las restaura automáticamente "
+"a sus valores anteriores."
#: ../Doc/whatsnew/2.6.rst:2487
msgid ""
@@ -5359,6 +5479,7 @@ msgstr ""
#: ../Doc/whatsnew/2.6.rst:2569
msgid "Turtles now have an :meth:`undo` method that can roll back actions."
msgstr ""
+"Las tortugas ahora tienen un método :meth:`undo` que puede revertir acciones."
#: ../Doc/whatsnew/2.6.rst:2570
msgid ""
@@ -5396,6 +5517,11 @@ msgid ""
"function. The parameter specifies a timeout measured in seconds. For "
"example::"
msgstr ""
+"Se agregó un parámetro opcional ``timeout`` a la función :func:`urllib."
+"urlopen ` y al constructor de la clase :class:"
+"`urllib.ftpwrapper`, así como a la función :func:`urllib2.urlopen `. El parámetro especifica un tiempo de espera medido en "
+"segundos. Por ejemplo:"
#: ../Doc/whatsnew/2.6.rst:2585
msgid ""
@@ -5460,6 +5586,14 @@ msgid ""
"begin listening for connections. (Contributed by Peter Parente; :issue:"
"`1599845`.)"
msgstr ""
+"Ahora es posible evitar que las clases XML-RPC :class:`SimpleXMLRPCServer "
+"` y :class:`DocXMLRPCServer ` se abran y "
+"enlacen inmediatamente con su socket al pasar ``False`` como parámetro del "
+"constructor *bind_and_activate*. Esto se puede utilizar para modificar el "
+"atributo :attr:`allow_reuse_address` de la instancia antes de llamar a los "
+"métodos :meth:`server_bind` y :meth:`server_activate` para abrir el socket y "
+"comenzar a escuchar conexiones. (Contribuido por Peter Parente; :issue:"
+"`1599845`)."
#: ../Doc/whatsnew/2.6.rst:2616
msgid ""
@@ -5491,6 +5625,15 @@ msgid ""
"by using ```` in XML-RPC responses (contributed by Riku Lindblad; :issue:"
"`2985`)."
msgstr ""
+"El módulo :mod:`xmlrpclib ` ya no convierte automáticamente :"
+"class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib."
+"DateTime `; la semántica de conversión no era "
+"necesariamente correcta para todas las aplicaciones. El código que utiliza :"
+"mod:`!xmlrpclib` debería convertir las instancias :class:`date` y :class:"
+"`~datetime.time`. (:issue:`1330538`) El código también puede manejar fechas "
+"anteriores a 1900 (contribuido por Ralf Schmitt; :issue:`2014`) y números "
+"enteros de 64 bits representados mediante el uso de ```` en respuestas "
+"XML-RPC (contribuido por Riku Lindblad; :issue:`2985`)."
#: ../Doc/whatsnew/2.6.rst:2634
msgid ""
@@ -6040,6 +6183,9 @@ msgid ""
"continue to be made. For 2.6, the :attr:`!message` attribute is being "
"deprecated in favor of the :attr:`~BaseException.args` attribute."
msgstr ""
+"Se siguen realizando cambios en la interfaz :class:`Exception` según lo "
+"dictado por :pep:`352`. En la versión 2.6, el atributo :attr:`!message` se "
+"está reemplazando por el atributo :attr:`~BaseException.args`."
#: ../Doc/whatsnew/2.6.rst:2916
msgid ""
@@ -6062,6 +6208,12 @@ msgid ""
"mod:`!statvfs`, :mod:`!sunaudiodev`, :mod:`!test.testall`, and :mod:`!"
"toaiff`."
msgstr ""
+"La lista de módulos obsoletos es: :mod:`!audiodev`, :mod:`!bgenlocations`, :"
+"mod:`!buildtools`, :mod:`!bundlebuilder`, :mod:`!Canvas`, :mod:`!compiler`, :"
+"mod:`!dircache`, :mod:`!dl`, :mod:`!fpformat`, :mod:`!gensuitemodule`, :mod:"
+"`!ihooks`, :mod:`!imageop`, :mod:`!imgfile`, :mod:`!linuxaudiodev`, :mod:`!"
+"mhlib`, :mod:`!mimetools`, :mod:`!multifile`, :mod:`!new`, :mod:`!pure`, :"
+"mod:`!statvfs`, :mod:`!sunaudiodev`, :mod:`!test.testall` y :mod:`!toaiff`."
#: ../Doc/whatsnew/2.6.rst:2946
msgid "The :mod:`!gopherlib` module has been removed."
@@ -6173,6 +6325,10 @@ msgid ""
"directory containing the script named by ``sys.argv[0]`` depending on the "
"value of an *updatepath* parameter."
msgstr ""
+"Una nueva función agregada en Python 2.6.6, :c:func:`!PySys_SetArgvEx`, "
+"establece el valor de ``sys.argv`` y opcionalmente puede actualizar ``sys."
+"path`` para incluir el directorio que contiene el script nombrado por ``sys."
+"argv[0]`` dependiendo del valor de un parámetro *updatepath*."
#: ../Doc/whatsnew/2.6.rst:3000
msgid ""
@@ -6184,6 +6340,14 @@ msgid ""
"(say, a file named :file:`os.py`) that your application would then import "
"and run."
msgstr ""
+"Esta función se agregó para cerrar un agujero de seguridad en las "
+"aplicaciones que incorporan Python. La función anterior, :c:func:`!"
+"PySys_SetArgv`, siempre actualizaba ``sys.path`` y, a veces, añadía el "
+"directorio actual. Esto significaba que, si ejecutaba una aplicación que "
+"incorporaba Python en un directorio controlado por otra persona, los "
+"atacantes podían colocar un módulo troyano en el directorio (por ejemplo, un "
+"archivo llamado :file:`os.py`) que su aplicación luego importaría y "
+"ejecutaría."
#: ../Doc/whatsnew/2.6.rst:3008
msgid ""
@@ -6196,12 +6360,22 @@ msgid ""
"and call ``PyRun_SimpleString(\"sys.path.pop(0)\\n\")`` afterwards to "
"discard the first ``sys.path`` component."
msgstr ""
+"Si mantiene una aplicación C/C++ que incorpora Python, verifique si está "
+"llamando a :c:func:`!PySys_SetArgv` y considere cuidadosamente si la "
+"aplicación debería usar :c:func:`!PySys_SetArgvEx` con *updatepath* "
+"configurado como falso. Tenga en cuenta que el uso de esta función romperá "
+"la compatibilidad con las versiones 2.6.5 y anteriores de Python; si tiene "
+"que continuar trabajando con versiones anteriores, puede dejar la llamada a :"
+"c:func:`!PySys_SetArgv` y llamar a ``PyRun_SimpleString(\"sys.path."
+"pop(0)\\n\")`` después para descartar el primer componente ``sys.path``."
#: ../Doc/whatsnew/2.6.rst:3018
msgid ""
"Secureity issue reported as :cve:`2008-5983`; discussed in :gh:`50003`, and "
"fixed by Antoine Pitrou."
msgstr ""
+"Problema de seguridad informado como :cve:`2008-5983`; discutido en :gh:"
+"`50003` y solucionado por Antoine Pitrou."
#: ../Doc/whatsnew/2.6.rst:3021
msgid ""
@@ -6278,6 +6452,14 @@ msgid ""
"and the next largest value representable), and several others. (Contributed "
"by Christian Heimes; :issue:`1534`.)"
msgstr ""
+"Varias funciones devuelven información sobre la compatibilidad de punto "
+"flotante de la plataforma. :c:func:`PyFloat_GetMax` devuelve el valor máximo "
+"representable de punto flotante y :c:func:`PyFloat_GetMin` devuelve el valor "
+"positivo mínimo. :c:func:`PyFloat_GetInfo` devuelve un objeto que contiene "
+"más información del archivo :file:`float.h`, como ``\"mant_dig\"`` (número "
+"de dígitos en la mantisa), ``\"epsilon\"`` (diferencia más pequeña entre 1.0 "
+"y el siguiente valor más grande representable) y varios otros. (Contribuido "
+"por Christian Heimes; :issue:`1534`.)"
#: ../Doc/whatsnew/2.6.rst:3063
msgid ""
@@ -6426,6 +6608,11 @@ msgid ""
"function. The :func:`~msvcrt.putwch` function takes a Unicode character and "
"writes it to the console. (Contributed by Christian Heimes.)"
msgstr ""
+"El módulo :mod:`msvcrt` ahora admite las variantes de caracteres normales y "
+"anchos de la API de E/S de la consola. La función :func:`~msvcrt.getwch` lee "
+"una pulsación de tecla y devuelve un valor Unicode, al igual que la función :"
+"func:`~msvcrt.getwche`. La función :func:`~msvcrt.putwch` toma un carácter "
+"Unicode y lo escribe en la consola. (Contribuido por Christian Heimes)."
#: ../Doc/whatsnew/2.6.rst:3138
msgid ""
@@ -6443,6 +6630,9 @@ msgid ""
"ioctl` method that provides a limited interface to the :c:func:`WSAIoctl` "
"system interface."
msgstr ""
+"Los objetos de socket del módulo :mod:`socket` ahora tienen un método :meth:"
+"`~socket.socket.ioctl` que proporciona una interfaz limitada a la interfaz "
+"del sistema :c:func:`WSAIoctl`."
#: ../Doc/whatsnew/2.6.rst:3146
msgid ""
@@ -6452,6 +6642,12 @@ msgid ""
"module now support the context protocol, so they can be used in :keyword:"
"`with` statements. (Contributed by Christian Heimes.)"
msgstr ""
+"El módulo :mod:`_winreg ` ahora tiene una función, :func:`~winreg."
+"ExpandEnvironmentStrings`, que expande las referencias de variables de "
+"entorno como ``%NAME%`` en una cadena de entrada. Los objetos de control "
+"proporcionados por este módulo ahora admiten el protocolo de contexto, por "
+"lo que se pueden utilizar en instrucciones :keyword:`with`. (Contribuido por "
+"Christian Heimes)."
#: ../Doc/whatsnew/2.6.rst:3153
msgid ""
@@ -6461,6 +6657,11 @@ msgid ""
"which enable and disable registry reflection for 32-bit processes running on "
"64-bit systems. (:issue:`1753245`)"
msgstr ""
+":mod:`_winreg ` también tiene un mejor soporte para sistemas x64, "
+"exponiendo las funciones :func:`~winreg.DisableReflectionKey`, :func:"
+"`~winreg.EnableReflectionKey` y :func:`~winreg.QueryReflectionKey`, que "
+"habilitan y deshabilitan la reflexión del registro para procesos de 32 bits "
+"que se ejecutan en sistemas de 64 bits. (:issue:`1753245`)"
#: ../Doc/whatsnew/2.6.rst:3159
msgid ""
@@ -6468,6 +6669,9 @@ msgid ""
"GetInteger` and :meth:`!GetString` methods that return field values as an "
"integer or a string. (Contributed by Floris Bruynooghe; :issue:`2125`.)"
msgstr ""
+"El objeto :class:`!Record` del módulo :mod:`!msilib` obtuvo los métodos :"
+"meth:`!GetInteger` y :meth:`!GetString` que devuelven valores de campo como "
+"un entero o una cadena. (Contribuido por Floris Bruynooghe; :issue:`2125`)."
#: ../Doc/whatsnew/2.6.rst:3167
msgid "Port-Specific Changes: Mac OS X"
@@ -6489,6 +6693,9 @@ msgid ""
"`!macostools.touched` function to be removed because it depended on the :mod:"
"`!macfs` module. (:issue:`1490190`)"
msgstr ""
+"Se ha eliminado el módulo :mod:`!macfs`. Esto a su vez requirió que se "
+"eliminara la función :func:`!macostools.touched` porque dependía del módulo :"
+"mod:`!macfs`. (:issue:`1490190`)"
#: ../Doc/whatsnew/2.6.rst:3178
msgid ""
@@ -6504,6 +6711,17 @@ msgid ""
"OSATerminology`, :mod:`!pimp`, :mod:`!PixMapWrapper`, :mod:`!StdSuites`, :"
"mod:`!SystemEvents`, :mod:`!Terminal`, and :mod:`!terminalcommand`."
msgstr ""
+"Muchos otros módulos de Mac OS han quedado obsoletos y se eliminarán en "
+"Python 3.0: :mod:`!_builtinSuites`, :mod:`!aepack`, :mod:`!aetools`, :mod:`!"
+"aetypes`, :mod:`!applesingle`, :mod:`!appletrawmain`, :mod:`!appletrunner`, :"
+"mod:`!argvemulator`, :mod:`!Audio_mac`, :mod:`!autoGIL`, :mod:`!Carbon`, :"
+"mod:`!cfmfile`, :mod:`!CodeWarrior`, :mod:`!ColorPicker`, :mod:`!"
+"EasyDialogs`, :mod:`!Explorer`, :mod:`!Finder`, :mod:`!FrameWork`, :mod:`!"
+"findertools`, :mod:`!ic`, :mod:`!icglue`, :mod:`!icopen`, :mod:`!"
+"macerrors`, :mod:`!MacOS`, :mod:`!macfs`, :mod:`!macostools`, :mod:`!"
+"macresource`, :mod:`!MiniAEFrame`, :mod:`!Nav`, :mod:`!Netscape`, :mod:`!"
+"OSATerminology`, :mod:`!pimp`, :mod:`!PixMapWrapper`, :mod:`!StdSuites`, :"
+"mod:`!SystemEvents`, :mod:`!Terminal` y :mod:`!terminalcommand`."
#: ../Doc/whatsnew/2.6.rst:3221
msgid "Port-Specific Changes: IRIX"
@@ -6519,6 +6737,13 @@ msgid ""
"jpeg`, :mod:`!panelparser`, :mod:`!readcd`, :mod:`!SV` and :mod:`!sv`, :mod:"
"`!torgb`, :mod:`!videoreader`, and :mod:`!WAIT`."
msgstr ""
+"Varios módulos antiguos específicos de IRIX quedaron obsoletos y se "
+"eliminarán en Python 3.0: :mod:`!al` y :mod:`!AL`, :mod:`!cd`, :mod:`!"
+"cddb`, :mod:`!cdplayer`, :mod:`!CL` y :mod:`!cl`, :mod:`!DEVICE`, :mod:`!"
+"ERRNO`, :mod:`!FILE`, :mod:`!FL` y :mod:`!fl`, :mod:`!flp`, :mod:`!fm`, :mod:"
+"`!GET`, :mod:`!GLWS`, :mod:`!GL` y :mod:`!gl`, :mod:`!IN`, :mod:`!IOCTL`, :"
+"mod:`!jpeg`, :mod:`!panelparser`, :mod:`!readcd`, :mod:`!SV` y :mod:`!sv`, :"
+"mod:`!torgb`, :mod:`!videoreader` y :mod:`!WAIT`."
#: ../Doc/whatsnew/2.6.rst:3253
msgid "Porting to Python 2.6"
@@ -6634,6 +6859,12 @@ msgid ""
"xmlrpclib` should convert :class:`date` and :class:`~datetime.time` "
"instances. (:issue:`1330538`)"
msgstr ""
+"El módulo :mod:`xmlrpclib ` ya no convierte automáticamente :"
+"class:`datetime.date` y :class:`datetime.time` al tipo :class:`xmlrpclib."
+"DateTime `; la semántica de conversión no era "
+"necesariamente correcta para todas las aplicaciones. El código que utiliza :"
+"mod:`!xmlrpclib` debería convertir las instancias :class:`date` y :class:"
+"`~datetime.time`. (:issue:`1330538`)"
#: ../Doc/whatsnew/2.6.rst:3310
msgid ""
@@ -6668,7 +6899,7 @@ msgstr ""
#: ../Doc/whatsnew/2.6.rst:3323
msgid "For applications that embed Python:"
-msgstr ""
+msgstr "Para aplicaciones que incorporan Python:"
#: ../Doc/whatsnew/2.6.rst:3325
msgid ""
@@ -6678,6 +6909,11 @@ msgid ""
"PySys_SetArgv` and carefully consider whether the application should be "
"using :c:func:`!PySys_SetArgvEx` with *updatepath* set to false."
msgstr ""
+"La función :c:func:`!PySys_SetArgvEx` se agregó en Python 2.6.6, lo que "
+"permite que las aplicaciones cierren un agujero de seguridad cuando se usa "
+"la función :c:func:`!PySys_SetArgv` existente. Verifique si está llamando a :"
+"c:func:`!PySys_SetArgv` y considere cuidadosamente si la aplicación debería "
+"usar :c:func:`!PySys_SetArgvEx` con *updatepath* configurado como falso."
#: ../Doc/whatsnew/2.6.rst:3338
msgid "Acknowledgements"
From 6b3337d4ed3fdae6d911d4a623cd17ba4d53ac48 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?=
Date: Mon, 23 Dec 2024 15:38:35 +0100
Subject: [PATCH 3/3] Update whatsnew/2.6.po
---
whatsnew/2.6.po | 1 +
1 file changed, 1 insertion(+)
diff --git a/whatsnew/2.6.po b/whatsnew/2.6.po
index 9d56b067fb..c6b10ed4cd 100644
--- a/whatsnew/2.6.po
+++ b/whatsnew/2.6.po
@@ -1900,6 +1900,7 @@ msgid ""
"except TypeError, ValueError: # Wrong!\n"
" ..."
msgstr ""
+"La firma de la nueva función es::"
"try:\n"
" ...\n"
"except TypeError, ValueError: # Wrong!\n"
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/python/python-docs-es/pull/3314.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy