diff --git a/.gitignore b/.gitignore index 5ecc92b5f9..ed18f9e376 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,6 @@ coverage.xml .idea/ /translation-memory.po /locale/ + +# OSX +.DS_Store diff --git a/TRANSLATORS b/TRANSLATORS index ae199af206..e3d7796172 100644 --- a/TRANSLATORS +++ b/TRANSLATORS @@ -8,5 +8,6 @@ Cristián Maureira-Fredes (@cmaureir) Claudia Millán Nebot (@clacri @cheshireminima) María Andrea Vignau (@mavignau @marian-vignau) Marco Richetta (@marcorichetta) +Sergio Delgado Quintero (@sdelquin) Silvina Tamburini (@silvinabt87) Javier Daza (@javierdaza) diff --git a/dict b/dict index 4afe3a5ce0..d747a7fd66 100644 --- a/dict +++ b/dict @@ -1,13 +1,22 @@ +API ASCII +Aahz +Adam Adler +Alex Android Associates Autocompletado Awk B +BSD +Boddie Brian Built C +CPU +Cameron +Chapman Circus Cocoa Comos @@ -16,34 +25,50 @@ Cython FLTK Fibonacci Fibonacci +Fibonacci +Finder Flags Flying Flying Fortran Foundation Fourier +GIL +Greg Gtk+ +HTML Hammond Henstridge Hugunin I Index +Index Interesantemente +Java +Jim Jim Jython Kivy L +Laird Linux Lloyd Mac +MacOS Macintosh Mark Microsoft +Mitch Monty NumPy Numerical +Olsen +POSIX +POST +PVM Package Pasarles +Paul Perl Pillow PyFLTK @@ -56,11 +81,16 @@ Pythónico Qt Randal Reilly +Rezinsky Ruby +SYSV Schwartz SciPy SimpleFileExFlags Smalltalk +Smalltalk +Stein +TCP Tcl Tix Tk @@ -68,9 +98,13 @@ Tkinter Tutorial Unicode Unix +Usenet +VM +WWW Windows X Xt +aleatoriamente append aproximarla argv @@ -86,9 +120,12 @@ b backspace bash batch -big-endian +bloqueante bug built +byte +bytecode +bytes búfer búferes coerción @@ -97,9 +134,11 @@ comilla command compilada computacionalmente +consolelib corrutina corrutinas criptográficamente +curses customización customizarlo códec @@ -120,6 +159,7 @@ ecualizadora else enrutamiento enumerador +env especificador estáticamente except @@ -133,6 +173,7 @@ freeze garbage granularidad gzip +h hardware hash hashables @@ -159,6 +200,7 @@ instanciado instanciar int interactivamente +interfaces intermezzo interoperabilidad intérpreter @@ -168,6 +210,7 @@ invocables iterador iteradores json +l lexicográfica lexicográfico libtclsam @@ -176,17 +219,26 @@ m manejador manejadores mantenibilidad +mapeo +mapeos metaclase metaclases mezclarlos modularidad mortem +muestrea multi +multihilo multilínea +mutex +ncurses nonlocal object +onexit option or +os +pads parsea parseada permitiéndole @@ -195,6 +247,7 @@ personalizadamente pip podés polimórfica +popen portabilidad portable posicional @@ -210,6 +263,7 @@ pseudo py pyc python +read readline recompila recompilación @@ -231,11 +285,14 @@ referencian referenciarse remove reordenar +request +run s script scripting scripts search +secuencialmente seguirle self semánticamente @@ -253,12 +310,20 @@ sobreescribe socket sockets solucionadores +sorprendentemente sort spam +stderr +stderr +stdin +stdin +stdout +stdout strings sub subcarpetas subcomandos +subdirectorio submódulo submódulos subpaquete @@ -270,6 +335,8 @@ t tab tabulación takefocus +termcap +testeo tipado tipear token @@ -279,10 +346,13 @@ tupla tuplas tutorial uninstall +urllib vía wchar +web widget widgets +wiki wxPython wxWidgets wxwidgets diff --git a/faq/library.po b/faq/library.po index 01891fb6e0..3fad03be09 100644 --- a/faq/library.po +++ b/faq/library.po @@ -1,37 +1,39 @@ # Copyright (C) 2001-2020, Python Software Foundation # This file is distributed under the same license as the Python package. -# Maintained by the python-doc-es workteam. +# Maintained by the python-doc-es workteam. # docs-es@python.org / https://mail.python.org/mailman3/lists/docs-es.python.org/ # Check https://github.com/PyCampES/python-docs-es/blob/3.8/TRANSLATORS to get the list of volunteers # -#, fuzzy msgid "" 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: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" +"PO-Revision-Date: 2020-05-10 21:32+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: Sergio Delgado Quintero \n" +"Language: es\n" +"X-Generator: Poedit 2.3\n" #: ../Doc/faq/library.rst:5 msgid "Library and Extension FAQ" -msgstr "" +msgstr "Preguntas frecuentes sobre bibliotecas y extensiones" #: ../Doc/faq/library.rst:8 msgid "Contents" -msgstr "" +msgstr "Contenidos" #: ../Doc/faq/library.rst:12 msgid "General Library Questions" -msgstr "" +msgstr "Cuestiones generales sobre bibliotecas" #: ../Doc/faq/library.rst:15 msgid "How do I find a module or application to perform task X?" -msgstr "" +msgstr "¿Cómo encuentro un módulo o aplicación para ejecutar la tarea X?" #: ../Doc/faq/library.rst:17 msgid "" @@ -39,6 +41,10 @@ msgid "" "relevant standard library module. (Eventually you'll learn what's in the " "standard library and will be able to skip this step.)" msgstr "" +"Vea la :ref:`referencia de bibliotecas ` para comprobar si " +"existe un módulo relevante en la biblioteca estándar. (Eventualmente " +"aprenderá lo que hay en la biblioteca estándar y será capaz de saltarse este " +"paso.)" #: ../Doc/faq/library.rst:21 msgid "" @@ -47,10 +53,15 @@ msgid "" "engine. Searching for \"Python\" plus a keyword or two for your topic of " "interest will usually find something helpful." msgstr "" +"Para los paquetes de terceros, busque en el `Índice de Paquetes de Python " +"`_ o pruebe `Google `_ u otro " +"motor de búsqueda. Buscando por “Python” más una o dos palabras clave del " +"tema de interés, generalmente encontrará algo útil." #: ../Doc/faq/library.rst:28 msgid "Where is the math.py (socket.py, regex.py, etc.) source file?" msgstr "" +"¿Dónde está el fichero fuente *math.py* (*socket.py*, *regex.py*, etc.)?" #: ../Doc/faq/library.rst:30 msgid "" @@ -60,29 +71,38 @@ msgid "" "file:`mathmodule.c`, somewhere in a C source directory (not on the Python " "Path)." msgstr "" +"Si no puede encontrar un fichero fuente para un módulo, puede ser un módulo " +"incorporado o cargado dinámicamente implementado en C, C++ u otro lenguaje " +"compilado. En este caso puede no disponer del fichero fuente o puede ser " +"algo como :file:`mathmodule.c`, en algún lugar de un directorio fuente C " +"(fuera del Python *Path*)." #: ../Doc/faq/library.rst:35 msgid "There are (at least) three kinds of modules in Python:" -msgstr "" +msgstr "Hay (al menos) tres tipos de módulos en Python:" #: ../Doc/faq/library.rst:37 msgid "modules written in Python (.py);" -msgstr "" +msgstr "módulos escritos en Python (.py);" #: ../Doc/faq/library.rst:38 msgid "" "modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc);" msgstr "" +"módulos escritos en C y cargados dinámicamente (*.dll, .pyd, .so, .sl*, " +"etc.);" #: ../Doc/faq/library.rst:39 msgid "" "modules written in C and linked with the interpreter; to get a list of " "these, type::" msgstr "" +"módulos escritos en C y enlazados con el intérprete; para obtener una lista " +"de estos, escriba::" #: ../Doc/faq/library.rst:47 msgid "How do I make a Python script executable on Unix?" -msgstr "" +msgstr "¿Cómo hago ejecutable un script Python en Unix?" #: ../Doc/faq/library.rst:49 msgid "" @@ -90,24 +110,33 @@ msgid "" "first line must begin with ``#!`` followed by the path of the Python " "interpreter." msgstr "" +"Necesita hacer dos cosas: el modo del fichero del script debe ser ejecutable " +"y la primera línea debe comenzar con ``#!`` seguido de la ruta al intérprete " +"de Python." #: ../Doc/faq/library.rst:53 msgid "" "The first is done by executing ``chmod +x scriptfile`` or perhaps ``chmod " "755 scriptfile``." msgstr "" +"Lo primero se hace ejecutando ``chmod +x scriptfile`` o bien ``chmod 755 " +"scriptfile``." #: ../Doc/faq/library.rst:56 msgid "" "The second can be done in a number of ways. The most straightforward way is " "to write ::" msgstr "" +"Lo segundo se puede hacer de distintas maneras. La manera más directa es " +"escribir ::" #: ../Doc/faq/library.rst:61 msgid "" "as the very first line of your file, using the pathname for where the Python " "interpreter is installed on your platform." msgstr "" +"en la primera línea de su fichero, usando la ruta donde está instalado el " +"intérprete de Python en su plataforma." #: ../Doc/faq/library.rst:64 msgid "" @@ -116,6 +145,10 @@ msgid "" "variants support the following, assuming the Python interpreter is in a " "directory on the user's :envvar:`PATH`::" msgstr "" +"Si quiere que el script sea independiente de donde se ubique el intérprete " +"de Python, puede usar el programa :program:`env`. Casi todas las variantes " +"de Unix soportan lo siguiente, asumiendo que el intérprete de Python está en " +"un directorio del :envvar:`PATH` de usuario:" #: ../Doc/faq/library.rst:71 msgid "" @@ -123,6 +156,8 @@ msgid "" "scripts is often very minimal, so you need to use the actual absolute " "pathname of the interpreter." msgstr "" +"*No* haga esto para scripts CGI. La variable :envvar:`PATH` para scripts CGI " +"es mínima, así que necesita usar la ruta real absoluta al intérprete." #: ../Doc/faq/library.rst:75 msgid "" @@ -130,16 +165,21 @@ msgid "" "env` program fails; or there's no env program at all. In that case, you can " "try the following hack (due to Alex Rezinsky):" msgstr "" +"Ocasionalmente, un entorno de usuario está tan lleno que el programa :" +"program:`/usr/bin/env` falla; o bien no existe el programa env. En ese caso, " +"puede intentar el siguiente truco (gracias a Alex Rezinsky):" #: ../Doc/faq/library.rst:86 msgid "" "The minor disadvantage is that this defines the script's __doc__ string. " "However, you can fix that by adding ::" msgstr "" +"Una pequeña desventaja es que esto define el *__doc__* del script. Sin " +"embargo, puede arreglarlo añadiendo ::" #: ../Doc/faq/library.rst:94 msgid "Is there a curses/termcap package for Python?" -msgstr "" +msgstr "¿Hay un paquete curses/termcap para Python?" #: ../Doc/faq/library.rst:98 msgid "" @@ -148,6 +188,10 @@ msgid "" "compiled by default. (Note that this is not available in the Windows " "distribution -- there is no curses module for Windows.)" msgstr "" +"Para variantes Unix: La distribución estándar de Python viene con un módulo " +"curses en el subdirectorio :source:`Modules`, aunque no está compilado por " +"defecto. (Nótese que esto no está disponible en la distribución Windows — no " +"hay módulo curses para Windows.)" #: ../Doc/faq/library.rst:103 msgid "" @@ -158,44 +202,56 @@ msgid "" "but there don't seem to be any currently maintained OSes that fall into this " "category." msgstr "" +"El módulo :mod:`curses` soporta características básicas de cursores así como " +"muchas funciones adicionales de ncurses y cursores SYSV como color, soporte " +"para conjuntos de caracteres alternativos, pads, y soporte para ratón. Esto " +"significa que el módulo no es compatible con sistemas operativos que sólo " +"tienen cursores BSD, pero no parece que ningún sistema operativo actualmente " +"mantenido caiga dentro de esta categoría." #: ../Doc/faq/library.rst:109 msgid "" "For Windows: use `the consolelib module `_." msgstr "" +"Para Windows: use `el módulo consolelib `_." #: ../Doc/faq/library.rst:114 msgid "Is there an equivalent to C's onexit() in Python?" -msgstr "" +msgstr "¿Hay un equivalente en Python al onexit() de C?" #: ../Doc/faq/library.rst:116 msgid "" "The :mod:`atexit` module provides a register function that is similar to " "C's :c:func:`onexit`." msgstr "" +"El módulo :mod:`atexit` proporciona una función de registro que es similar " +"a :c:func:`onexit` de C." #: ../Doc/faq/library.rst:121 msgid "Why don't my signal handlers work?" -msgstr "" +msgstr "¿Por qué no funcionan mis manejadores de señales?" #: ../Doc/faq/library.rst:123 msgid "" "The most common problem is that the signal handler is declared with the " "wrong argument list. It is called as ::" msgstr "" +"El problema más común es que el manejador de señales esté declarado con la " +"lista incorrecta de argumentos. Se llama como ::" #: ../Doc/faq/library.rst:128 msgid "so it should be declared with two arguments::" -msgstr "" +msgstr "así que debería declararse con dos argumentos::" #: ../Doc/faq/library.rst:135 msgid "Common tasks" -msgstr "" +msgstr "Tareas comunes" #: ../Doc/faq/library.rst:138 msgid "How do I test a Python program or component?" -msgstr "" +msgstr "¿Cómo pruebo un programa o un componente Python?" #: ../Doc/faq/library.rst:140 msgid "" @@ -203,12 +259,18 @@ msgid "" "examples in the docstrings for a module and runs them, comparing the output " "with the expected output given in the docstring." msgstr "" +"Python viene con dos *frameworks* de *testing*. El módulo :mod:`doctest` " +"encuentra ejemplos en los docstrings para un módulo y los ejecuta, " +"comparando la salida con la salida esperada especificada en la cadena de " +"documentación." #: ../Doc/faq/library.rst:144 msgid "" "The :mod:`unittest` module is a fancier testing framework modelled on Java " "and Smalltalk testing frameworks." msgstr "" +"El módulo :mod:`unittest` es un *framework* de *testing* más agradable y " +"modelado sobre los *frameworks* de *testing* de Java y Smalltalk." #: ../Doc/faq/library.rst:147 msgid "" @@ -220,14 +282,23 @@ msgid "" "avoid depending on mutating global variables, since this makes testing much " "more difficult to do." msgstr "" +"Para hacer más fácil el *testing*, debería usar un buen diseño modular en su " +"programa. Su programa debería tener casi toda la funcionalidad encapsulada " +"en funciones o en métodos de clases — y esto algunas veces tiene el efecto " +"sorprendente y encantador de que su programa funcione más rápido (porque los " +"accesos a las variables locales son más rápidas que los accesos a las " +"variables globales). Además el programa debería evitar depender de la " +"mutación de variables globales, ya que esto dificulta mucho más hacer el " +"*testing*." #: ../Doc/faq/library.rst:155 msgid "The \"global main logic\" of your program may be as simple as ::" msgstr "" +"La “lógica global principal” de su programa puede ser tan simple como ::" #: ../Doc/faq/library.rst:160 msgid "at the bottom of the main module of your program." -msgstr "" +msgstr "al final del módulo principal de su programa." #: ../Doc/faq/library.rst:162 msgid "" @@ -240,12 +311,22 @@ msgid "" "the \"production code\", since this makes it easy to find bugs and even " "design flaws earlier." msgstr "" +"Una vez que su programa esté organizado en una colección manejable de " +"funciones y comportamientos de clases, usted debería escribir funciones de " +"comprobación que ejerciten los comportamientos. Se puede asociar un conjunto " +"de pruebas a cada módulo. Esto suena a mucho trabajo, pero gracias a que " +"Python es tan conciso y flexible, se hace sorprendentemente fácil. Puede " +"codificar de manera mucho más agradable y divertida escribiendo funciones de " +"comprobación en paralelo con el \"código de producción\", ya que esto " +"facilita encontrar antes errores e incluso fallos de diseño." #: ../Doc/faq/library.rst:170 msgid "" "\"Support modules\" that are not intended to be the main module of a program " "may include a self-test of the module. ::" msgstr "" +"Los \"módulos de soporte\" que no tienen la intención de estar en el módulo " +"principal de un programa pueden incluir un auto *test* del módulo. ::" #: ../Doc/faq/library.rst:176 msgid "" @@ -253,10 +334,13 @@ msgid "" "when the external interfaces are unavailable by using \"fake\" interfaces " "implemented in Python." msgstr "" +"Incluso los programas que interactúan con interfaces externas complejas se " +"pueden comprobar cuando las interfaces externas no están disponibles usando " +"interfaces \"simuladas\" implementadas en Python." #: ../Doc/faq/library.rst:182 msgid "How do I create documentation from doc strings?" -msgstr "" +msgstr "¿Cómo creo documentación a partir de los docstrings?" #: ../Doc/faq/library.rst:184 msgid "" @@ -265,24 +349,31 @@ msgid "" "docstrings is `epydoc `_. `Sphinx `_ can also include docstring content." msgstr "" +"El módulo :mod:`pydoc` puede crear HTML desde los docstrings existentes en " +"su código fuente Python. Una alternativa para crear documentación API " +"estrictamente desde docstrings es `epydoc `_. `Sphinx `_ también puede incluir contenido " +"docstring." #: ../Doc/faq/library.rst:191 msgid "How do I get a single keypress at a time?" -msgstr "" +msgstr "¿Cómo consigo presionar una única tecla cada vez?" #: ../Doc/faq/library.rst:193 msgid "" "For Unix variants there are several solutions. It's straightforward to do " "this using curses, but curses is a fairly large module to learn." msgstr "" +"Para variantes Unix hay varias soluciones. Lo más directo es hacerlo usando " +"cursores, pero curses es un módulo bastante amplio para aprenderlo." #: ../Doc/faq/library.rst:237 msgid "Threads" -msgstr "" +msgstr "Hilos" #: ../Doc/faq/library.rst:240 msgid "How do I program using threads?" -msgstr "" +msgstr "¿Cómo programo usando hilos?" #: ../Doc/faq/library.rst:242 msgid "" @@ -290,28 +381,38 @@ msgid "" "module. The :mod:`threading` module builds convenient abstractions on top of " "the low-level primitives provided by the :mod:`_thread` module." msgstr "" +"Asegúrese de usar el módulo :mod:`threading` y no el módulo :mod:`_thread`. " +"El módulo :mod:`threading` construye abstracciones convenientes sobre las " +"primitivas de bajo nivel proporcionadas por el módulo :mod:`_thread`." #: ../Doc/faq/library.rst:246 msgid "" "Aahz has a set of slides from his threading tutorial that are helpful; see " "http://www.pythoncraft.com/OSCON2001/." msgstr "" +"Aahz tiene un conjunto de transparencias en su tutorial de hilos que resulta " +"útil: vea http://www.pythoncraft.com/OSCON2001/." #: ../Doc/faq/library.rst:251 msgid "None of my threads seem to run: why?" -msgstr "" +msgstr "Ninguno de mis hilos parece funcionar: ¿por qué?" #: ../Doc/faq/library.rst:253 msgid "" "As soon as the main thread exits, all threads are killed. Your main thread " "is running too quickly, giving the threads no time to do any work." msgstr "" +"Tan pronto como el hilo principal termine, se matan todos los hilos. Su hilo " +"principal está corriendo demasiado rápido, sin dar tiempo a los hilos para " +"hacer algún trabajo." #: ../Doc/faq/library.rst:256 msgid "" "A simple fix is to add a sleep to the end of the program that's long enough " "for all the threads to finish::" msgstr "" +"Una solución sencilla es añadir un *sleep* al final del programa que sea " +"suficientemente largo para que todos los hilos terminen::" #: ../Doc/faq/library.rst:271 msgid "" @@ -319,10 +420,16 @@ msgid "" "run sequentially, one at a time! The reason is that the OS thread scheduler " "doesn't start a new thread until the previous thread is blocked." msgstr "" +"Por ahora (en muchas plataformas) los hilos no corren en paralelo, sino que " +"parece que corren secuencialmente, ¡uno a la vez! La razón es que el " +"planificador de hilos del sistema operativo no inicia un nuevo hilo hasta " +"que el hilo anterior está bloqueado." #: ../Doc/faq/library.rst:275 msgid "A simple fix is to add a tiny sleep to the start of the run function::" msgstr "" +"Una solución sencilla es añadir un pequeño *sleep* al comienzo de la función " +"run::" #: ../Doc/faq/library.rst:288 msgid "" @@ -332,16 +439,23 @@ msgid "" "the queue when it finishes, and let the main thread read as many tokens from " "the queue as there are threads." msgstr "" +"En vez de intentar adivinar un valor de retardo adecuado para :func:`time." +"sleep`, es mejor usar algún tipo de mecanismo de semáforo. Una idea es usar " +"el módulo :mod:`queue` para crear un objeto cola, permitiendo que cada hilo " +"añada un *token* a la cola cuando termine, y permitiendo al hilo principal " +"leer tantos tokens de la cola como hilos haya." #: ../Doc/faq/library.rst:296 msgid "How do I parcel out work among a bunch of worker threads?" -msgstr "" +msgstr "¿Cómo puedo dividir trabajo entre un grupo de hilos?" #: ../Doc/faq/library.rst:298 msgid "" "The easiest way is to use the new :mod:`concurrent.futures` module, " "especially the :mod:`~concurrent.futures.ThreadPoolExecutor` class." msgstr "" +"La manera más fácil es usar el nuevo módulo :mod:`concurrent.futures`, " +"especialmente la clase :mod:`~concurrent.futures.ThreadPoolExecutor`." #: ../Doc/faq/library.rst:301 msgid "" @@ -352,24 +466,33 @@ msgid "" "``.get()`` method to return them. The class will take care of the locking " "necessary to ensure that each job is handed out exactly once." msgstr "" +"O, si quiere tener un control más preciso sobre el algoritmo de despacho, " +"puede escribir su propia lógica manualmente. Use el módulo :mod:`queue` para " +"crear una cola que contenga una lista de trabajos. La clase :class:`~queue." +"Queue` mantiene una lista de objetos y tiene un método ``.put(obj)`` que " +"añade elementos a la cola y un método ``.get()`` que los devuelve. Esta " +"clase se encargará de los bloqueos necesarios para asegurar que cada trabajo " +"se reparte exactamente una vez." #: ../Doc/faq/library.rst:308 msgid "Here's a trivial example::" -msgstr "" +msgstr "Aquí hay un ejemplo trivial::" #: ../Doc/faq/library.rst:346 msgid "When run, this will produce the following output:" -msgstr "" +msgstr "Cuando se ejecute, esto producirá la siguiente salida:" #: ../Doc/faq/library.rst:364 msgid "" "Consult the module's documentation for more details; the :class:`~queue." "Queue` class provides a featureful interface." msgstr "" +"Consulte la documentación del módulo para más detalles; la clase :class:" +"`~queue.Queue` proporciona una interfaz llena de características." #: ../Doc/faq/library.rst:369 msgid "What kinds of global value mutation are thread-safe?" -msgstr "" +msgstr "¿Qué tipos de mutación de valores globales son *thread-safe*?" #: ../Doc/faq/library.rst:371 msgid "" @@ -380,6 +503,13 @@ msgid "" "instruction and therefore all the C implementation code reached from each " "instruction is therefore atomic from the point of view of a Python program." msgstr "" +"Un :term:`global interpreter lock` (GIL) se usa internamente para asegurar " +"que sólo un hilo corre a la vez en la VM de Python. En general, Python " +"ofrece cambiar entre hilos sólo en instrucciones bytecode; la frecuencia con " +"la que cambia se puede fijar vía :func:`sys.setswitchinterval`. Cada " +"instrucción bytecode y por lo tanto, toda la implementación de código C " +"alcanzada por cada instrucción, es atómica desde el punto de vista de un " +"programa Python." #: ../Doc/faq/library.rst:378 msgid "" @@ -388,16 +518,23 @@ msgid "" "shared variables of built-in data types (ints, lists, dicts, etc) that " "\"look atomic\" really are." msgstr "" +"En teoría, esto significa que un informe exacto requiere de un conocimiento " +"exacto de la implementación en bytecode de la PVM. En la práctica, esto " +"significa que las operaciones entre variables compartidas de tipos de datos " +"*built-in* (enteros, listas, diccionarios, etc.) que “parecen atómicas” " +"realmente lo son." #: ../Doc/faq/library.rst:383 msgid "" "For example, the following operations are all atomic (L, L1, L2 are lists, " "D, D1, D2 are dicts, x, y are objects, i, j are ints)::" msgstr "" +"Por ejemplo, las siguientes operaciones son todas atómicas (L, L1, L2 son " +"listas, D, D1, D2 son diccionarios, *x, y* son objetos, *i, j* son enteros)::" #: ../Doc/faq/library.rst:398 msgid "These aren't::" -msgstr "" +msgstr "Estas no lo son::" #: ../Doc/faq/library.rst:405 msgid "" @@ -406,10 +543,15 @@ msgid "" "affect things. This is especially true for the mass updates to dictionaries " "and lists. When in doubt, use a mutex!" msgstr "" +"Las operaciones que reemplazan otros objetos pueden invocar el método :meth:" +"`__del__` de esos otros objetos cuando su número de referencias alcance " +"cero, y eso puede afectar a otras cosas. Esto es especialmente cierto para " +"las actualizaciones en masa de diccionarios y listas. Cuando se esté en " +"duda, ¡use un mutex!" #: ../Doc/faq/library.rst:412 msgid "Can't we get rid of the Global Interpreter Lock?" -msgstr "" +msgstr "¿Podemos deshacernos del *Global Interpreter Lock*?" #: ../Doc/faq/library.rst:416 msgid "" @@ -418,6 +560,11 @@ msgid "" "multi-threaded Python program effectively only uses one CPU, due to the " "insistence that (almost) all Python code can only run while the GIL is held." msgstr "" +"El :term:`global interpreter lock` (GIL) se percibe a menudo como un " +"obstáculo en el despliegue de Python sobre máquinas servidoras finales de " +"múltiples procesadores, porque un programa Python multihilo efectivamente " +"sólo usa una CPU, debido a la exigencia de que (casi) todo el código Python " +"sólo puede correr mientras el GIL esté activado." #: ../Doc/faq/library.rst:421 msgid "" @@ -430,6 +577,14 @@ msgid "" "due to the amount of fine-grained locking necessary to compensate for the " "removal of the GIL." msgstr "" +"En los días de Python 1.5, Greg Stein de hecho implementó un conjunto amplio " +"de parches (los parches “libres de hilo”) que eliminaba el GIL y lo " +"reemplazaba con un bloqueo de grano fino. Adam Olsen hizo recientemente un " +"experimento similar con su proyecto `python-safethread `_. Desafortunadamente, ambos experimentos " +"mostraron una aguda caída en el rendimiento (al menos del 30% o más baja), " +"debido a la cantidad de bloqueos de grano fino necesarios para compensar la " +"eliminación del GIL." #: ../Doc/faq/library.rst:429 msgid "" @@ -441,6 +596,13 @@ msgid "" "module provides a lower-level API in case you want more control over " "dispatching of tasks." msgstr "" +"¡Esto no significa que no pueda hacer buen uso de Python en máquinas de " +"múltiples CPU! Usted sólo tiene que ser creativo a la hora de dividir el " +"trabajo entre múltiples *procesos* en vez de entre múltiples *hilos*. La " +"clase :class:`~concurrent.futures.ProcessPoolExecutor` del nuevo módulo :mod:" +"`concurrent.futures` proporciona una manera sencilla de hacer esto; el " +"módulo :mod:`multiprocessing` proporciona una API de bajo nivel en caso de " +"que se quiera tener un mayor control sobre el despacho de las tareas." #: ../Doc/faq/library.rst:437 msgid "" @@ -450,6 +612,11 @@ msgid "" "work done. Some standard library modules such as :mod:`zlib` and :mod:" "`hashlib` already do this." msgstr "" +"El uso sensato de extensiones C también ayudará; si usa una extensión C para " +"ejecutar una tarea que consume mucho tiempo, la extensión puede liberar al " +"GIL mientras el hilo de ejecución esté en el código C y permite a otros " +"hilos hacer trabajo. Algunos módulos de la biblioteca estándar tales como :" +"mod:`zlib` y :mod:`hashlib` ya lo hacen." #: ../Doc/faq/library.rst:443 msgid "" @@ -462,6 +629,15 @@ msgid "" "types have their own free list; these free lists would have to be moved to " "the interpreter state. And so on." msgstr "" +"Se ha sugerido que el GIL debería ser un bloqueo por estado de intérprete, " +"en vez de realmente global; luego los intérpretes no serían capaces de " +"compartir objetos. Desafortunadamente, esto tampoco es probable que ocurra. " +"Sería una tremenda cantidad de trabajo, porque muchas implementaciones de " +"objetos actualmente tienen un estado global. Por ejemplo, los enteros " +"pequeños y las cadenas pequeñas están *cacheadas*; estas *caches* se " +"tendrían que mover al estado del intérprete. Otros tipos de objetos tienen " +"su propia lista libre; estas listas libres se tendrían que mover al estado " +"del intérprete. Y así sucesivamente." #: ../Doc/faq/library.rst:452 msgid "" @@ -470,20 +646,27 @@ msgid "" "extensions are being written at a faster rate than you can convert them to " "store all their global state in the interpreter state." msgstr "" +"Y dudo de si se puede hacer en tiempo finito, porque el mismo problema " +"existe para extensiones de terceros. Es probable que las extensiones de " +"terceros se escriban más rápido de lo que se puedan convertir para almacenar " +"todo su estado global en el estado del intérprete." #: ../Doc/faq/library.rst:457 msgid "" "And finally, once you have multiple interpreters not sharing any state, what " "have you gained over running each interpreter in a separate process?" msgstr "" +"Y finalmente, una vez que tenga múltiples intérpretes sin compartir ningún " +"estado, ¿qué habrá ganado sobre correr cada intérprete en un proceso " +"separado?" #: ../Doc/faq/library.rst:462 msgid "Input and Output" -msgstr "" +msgstr "Entrada y Salida" #: ../Doc/faq/library.rst:465 msgid "How do I delete a file? (And other file questions...)" -msgstr "" +msgstr "¿Cómo borro un fichero? (Y otras preguntas sobre ficheros...)" #: ../Doc/faq/library.rst:467 msgid "" @@ -491,6 +674,10 @@ msgid "" "see the :mod:`os` module. The two functions are identical; :func:`~os." "unlink` is simply the name of the Unix system call for this function." msgstr "" +"Use ``os.remove(filename)`` o ``os.unlink(filename)``; para la " +"documentación, vea el módulo :mod:`os`. Las dos funciones son idénticas; :" +"func:`~os.unlink` es simplemente el nombre de la llamada al sistema UNIX " +"para esta función." #: ../Doc/faq/library.rst:471 msgid "" @@ -500,10 +687,15 @@ msgid "" "directories as long as they're empty; if you want to delete an entire " "directory tree and its contents, use :func:`shutil.rmtree`." msgstr "" +"Para borrar un directorio, use :func:`os.rmdir`; use :func:`os.mkdir` para " +"crear uno. ``os.makedirs(path)`` creará cualquier directorio intermedio que " +"no exista en ``path``. ``os.removedirs(path)`` borrará los directorios " +"intermedios siempre y cuando estén vacíos; si quiere borrar un árbol de " +"directorios completo y sus contenidos, use :func:`shutil.rmtree`." #: ../Doc/faq/library.rst:477 msgid "To rename a file, use ``os.rename(old_path, new_path)``." -msgstr "" +msgstr "Para renombrar un fichero, use ``os.rename(old_path, new_path)``." #: ../Doc/faq/library.rst:479 msgid "" @@ -512,6 +704,11 @@ msgid "" "There's also ``os.ftruncate(fd, offset)`` for files opened with :func:`os." "open`, where *fd* is the file descriptor (a small integer)." msgstr "" +"Para truncar un fichero, ábralo usando ``f = open(filename, \"rb+\")``, y " +"use ``f.truncate(offset)``; el desplazamiento toma por defecto la posición " +"actual de búsqueda. También existe ``os.ftruncate(fd, offset)`` para " +"ficheros abiertos con :func:`os.open`, donde *fd* es el descriptor del " +"fichero (un entero pequeño)." #: ../Doc/faq/library.rst:484 msgid "" @@ -519,20 +716,26 @@ msgid "" "files including :func:`~shutil.copyfile`, :func:`~shutil.copytree`, and :" "func:`~shutil.rmtree`." msgstr "" +"El módulo :mod:`shutil` también contiene distintas funciones para trabajar " +"con ficheros incluyendo :func:`~shutil.copyfile`, :func:`~shutil.copytree` " +"y :func:`~shutil.rmtree`." #: ../Doc/faq/library.rst:490 msgid "How do I copy a file?" -msgstr "" +msgstr "¿Cómo copio un fichero?" #: ../Doc/faq/library.rst:492 msgid "" "The :mod:`shutil` module contains a :func:`~shutil.copyfile` function. Note " -"that on MacOS 9 it doesn't copy the resource fork and Finder info." +"that on MacOS 9 it doesn't copy the resource fork and *Finder* info." msgstr "" +"El módulo :mod:`shutil` contiene una función :func:`~shutil.copyfile`. " +"Nótese que en MacOS 9 no copia el *fork* del recurso ni la información de " +"Finder." #: ../Doc/faq/library.rst:497 msgid "How do I read (or write) binary data?" -msgstr "" +msgstr "¿Cómo leo (o escribo) datos binarios?" #: ../Doc/faq/library.rst:499 msgid "" @@ -540,12 +743,18 @@ msgid "" "`struct` module. It allows you to take a string containing binary data " "(usually numbers) and convert it to Python objects; and vice versa." msgstr "" +"Para leer o escribir formatos binarios de datos complejos, es mejor usar el " +"módulo :mod:`struct`. Esto le permite tomar una cadena de texto que contiene " +"datos binarios (normalmente números) y convertirla a objetos de Python; y " +"viceversa." #: ../Doc/faq/library.rst:503 msgid "" "For example, the following code reads two 2-byte integers and one 4-byte " "integer in big-endian format from a file::" msgstr "" +"Por ejemplo, el siguiente código lee de un fichero dos enteros de 2-bytes y " +"uno de 4-bytes en formato *big-endian*::" #: ../Doc/faq/library.rst:512 msgid "" @@ -553,12 +762,17 @@ msgid "" "one \"short integer\" (2 bytes), and 'l' reads one \"long integer\" (4 " "bytes) from the string." msgstr "" +"El '>' en la cadena de formato fuerza los datos a *big-endian*; la letra 'h' " +"lee un \"entero corto\" (2 bytes), y 'l' lee un \"entero largo\" (4 bytes) " +"desde la cadena de texto." #: ../Doc/faq/library.rst:516 msgid "" "For data that is more regular (e.g. a homogeneous list of ints or floats), " "you can also use the :mod:`array` module." msgstr "" +"Para datos que son más regulares (por ejemplo una lista homogénea de enteros " +"o flotantes), puede también usar el módulo :mod:`array`." #: ../Doc/faq/library.rst:521 msgid "" @@ -567,10 +781,15 @@ msgid "" "instead (the default), the file will be open in text mode and ``f.read()`` " "will return :class:`str` objects rather than :class:`bytes` objects." msgstr "" +"Para leer y escribir datos binarios, es obligatorio abrir el fichero en modo " +"binario (aquí, pasando ``\"rb\"`` a :func:`open`). Si, en cambio, usa ``\"r" +"\"`` (por defecto), el fichero se abrirá en modo texto y ``f.read()`` " +"devolverá objetos :class:`str` en vez de objetos :class:`bytes`." #: ../Doc/faq/library.rst:529 msgid "I can't seem to use os.read() on a pipe created with os.popen(); why?" msgstr "" +"No consigo usar os.read() en un *pipe* creado con os.popen(); ¿por qué?" #: ../Doc/faq/library.rst:531 msgid "" @@ -580,36 +799,44 @@ msgid "" "function. Thus, to read *n* bytes from a pipe *p* created with :func:`os." "popen`, you need to use ``p.read(n)``." msgstr "" +":func:`os.read` es una función de bajo nivel que recibe un descriptor de " +"fichero, un entero pequeño representando el fichero abierto. :func:`os." +"popen` crea un objeto fichero de alto nivel, el mismo tipo que devuelve la " +"función *built-in* :func:`open`. Así, para leer *n* bytes de un *pipe* *p* " +"creado con :func:`os.popen`, necesita usar ``p.read(n)``." #: ../Doc/faq/library.rst:618 msgid "How do I access the serial (RS232) port?" -msgstr "" +msgstr "¿Cómo accedo al puerto serial (RS232)?" #: ../Doc/faq/library.rst:620 msgid "For Win32, POSIX (Linux, BSD, etc.), Jython:" -msgstr "" +msgstr "Para *Win32*, POSIX (Linux, BSD, etc.), Jython:" #: ../Doc/faq/library.rst:622 msgid "http://pyserial.sourceforge.net" -msgstr "" +msgstr "http://pyserial.sourceforge.net" #: ../Doc/faq/library.rst:624 msgid "For Unix, see a Usenet post by Mitch Chapman:" -msgstr "" +msgstr "Para Unix, vea una publicación Usenet de Mitch Chapman:" #: ../Doc/faq/library.rst:626 msgid "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" -msgstr "" +msgstr "https://groups.google.com/groups?selm=34A04430.CF9@ohioee.com" #: ../Doc/faq/library.rst:630 msgid "Why doesn't closing sys.stdout (stdin, stderr) really close it?" -msgstr "" +msgstr "¿Por qué al cerrar sys.stdout (stdin, stderr) realmente no se cierran?" #: ../Doc/faq/library.rst:632 msgid "" "Python :term:`file objects ` are a high-level layer of " "abstraction on low-level C file descriptors." msgstr "" +"Los :term:`objetos de tipo fichero ` en Python son una capa de " +"abstracción de alto nivel sobre los descriptores de ficheros de bajo nivel " +"de C." #: ../Doc/faq/library.rst:635 msgid "" @@ -619,6 +846,12 @@ msgid "" "descriptor. This also happens automatically in ``f``'s destructor, when " "``f`` becomes garbage." msgstr "" +"Para la mayoría de objetos de tipo fichero que cree en Python vía la función " +"*built-in* :func:`open`, ``f.close()`` marca el objeto de tipo fichero " +"Python como ya cerrado desde el punto de vista de Python, y también ordena " +"el cierre del descriptor de fichero subyacente en C. Esto además ocurre " +"automáticamente en el destructor de ``f``, cuando ``f`` se convierte en " +"basura." #: ../Doc/faq/library.rst:641 msgid "" @@ -627,6 +860,10 @@ msgid "" "marks the Python-level file object as being closed, but does *not* close the " "associated C file descriptor." msgstr "" +"Pero *stdin*, *stdout* y *stderr* se tratan de manera especial en Python, " +"debido a un estatus especial que también tienen en C. Ejecutando ``sys." +"stdout.close()`` marca el objeto fichero de nivel Python para ser cerrado, " +"pero *no* cierra el descriptor de fichero asociado en C." #: ../Doc/faq/library.rst:646 msgid "" @@ -634,18 +871,22 @@ msgid "" "first be sure that's what you really want to do (e.g., you may confuse " "extension modules trying to do I/O). If it is, use :func:`os.close`::" msgstr "" +"Para cerrar el descriptor de fichero subyacente en C para uno de estos tres " +"casos, debería primero asegurarse de que eso es realmente lo que quiere " +"hacer (por ejemplo, puede confundir módulos de extensión intentado hacer *I/" +"O*). Si es así, use :func:`os.close`::" #: ../Doc/faq/library.rst:654 msgid "Or you can use the numeric constants 0, 1 and 2, respectively." -msgstr "" +msgstr "O puede usar las constantes numéricas 0, 1 y 2, respectivamente." #: ../Doc/faq/library.rst:658 msgid "Network/Internet Programming" -msgstr "" +msgstr "Programación de Redes/Internet" #: ../Doc/faq/library.rst:661 msgid "What WWW tools are there for Python?" -msgstr "" +msgstr "¿Qué herramientas de Python existen para WWW?" #: ../Doc/faq/library.rst:663 msgid "" @@ -653,32 +894,41 @@ msgid "" "Reference Manual. Python has many modules that will help you build server-" "side and client-side web systems." msgstr "" +"Vea los capítulos titulados :ref:`internet` y :ref:`netdata` en el manual de " +"referencia de bibliotecas. Python tiene muchos módulos que le ayudarán a " +"construir sistemas web del lado del servidor y del lado del cliente." #: ../Doc/faq/library.rst:669 msgid "" "A summary of available frameworks is maintained by Paul Boddie at https://" "wiki.python.org/moin/WebProgramming\\ ." msgstr "" +"Paul Boddie mantiene un resumen de los *frameworks* disponibles en https://" +"wiki.python.org/moin/WebProgramming\\ ." #: ../Doc/faq/library.rst:672 msgid "" "Cameron Laird maintains a useful set of pages about Python web technologies " "at http://phaseit.net/claird/comp.lang.python/web_python." msgstr "" +"Cameron Laird mantiene un conjunto útil de páginas sobre tecnologías web " +"Python en http://phaseit.net/claird/comp.lang.python/web_python." #: ../Doc/faq/library.rst:677 msgid "How can I mimic CGI form submission (METHOD=POST)?" -msgstr "" +msgstr "¿Cómo puedo imitar un envío de formulario CGI (*METHOD=POST*)?" #: ../Doc/faq/library.rst:679 msgid "" "I would like to retrieve web pages that are the result of POSTing a form. Is " "there existing code that would let me do this easily?" msgstr "" +"Me gustaría recuperar páginas web que son resultado del envío de un " +"formulario. ¿Existe algún código que me permita hacer esto fácilmente?" #: ../Doc/faq/library.rst:682 msgid "Yes. Here's a simple example that uses urllib.request::" -msgstr "" +msgstr "Sí. Aquí hay un ejemplo sencillo que usa urllib.request::" #: ../Doc/faq/library.rst:697 msgid "" @@ -686,34 +936,41 @@ msgid "" "be quoted using :func:`urllib.parse.urlencode`. For example, to send " "``name=Guy Steele, Jr.``::" msgstr "" +"Nótese que para operaciones POST de tipo *percent-encoded*, las cadenas de " +"consulta tienen que estar entrecomilladas usando :func:`urllib.parse." +"urlencode`. Por ejemplo, para enviar ``name=Guy Steele, Jr.``::" #: ../Doc/faq/library.rst:705 msgid ":ref:`urllib-howto` for extensive examples." -msgstr "" +msgstr ":ref:`urllib-howto` para ejemplos más detallados." #: ../Doc/faq/library.rst:709 msgid "What module should I use to help with generating HTML?" -msgstr "" +msgstr "¿Qué modulo debería usar para generación de HTML?" #: ../Doc/faq/library.rst:713 msgid "" "You can find a collection of useful links on the `Web Programming wiki page " "`_." msgstr "" +"Puede encontrar una colección de enlaces útiles en la `página wiki de " +"programación web `_." #: ../Doc/faq/library.rst:718 msgid "How do I send mail from a Python script?" -msgstr "" +msgstr "¿Cómo envío correo desde un script Python?" #: ../Doc/faq/library.rst:720 msgid "Use the standard library module :mod:`smtplib`." -msgstr "" +msgstr "Use el módulo :mod:`smtplib` de la biblioteca estándar." #: ../Doc/faq/library.rst:722 msgid "" "Here's a very simple interactive mail sender that uses it. This method will " "work on any host that supports an SMTP listener. ::" msgstr "" +"Aquí hay un remitente simple interactivo que lo usa. Este método trabajará " +"en cualquier máquina que soporte un *listener SMTP*. ::" #: ../Doc/faq/library.rst:742 msgid "" @@ -722,16 +979,22 @@ msgid "" "usr/sbin/sendmail``. The sendmail manual page will help you out. Here's " "some sample code::" msgstr "" +"Una alternativa sólo para UNIX es usar *sendmail*. La ubicación del programa " +"*sendmail* varía entre sistemas; algunas veces está en ``/usr/lib/" +"sendmail``, otras veces en ``/usr/sbin/sendmail``. El manual de *sendmail* " +"le ayudará. Aquí hay un ejemplo de código::" #: ../Doc/faq/library.rst:762 msgid "How do I avoid blocking in the connect() method of a socket?" -msgstr "" +msgstr "¿Cómo evito el bloqueo en el método *connect()* de un *socket*?" #: ../Doc/faq/library.rst:764 msgid "" "The :mod:`select` module is commonly used to help with asynchronous I/O on " "sockets." msgstr "" +"El módulo :mod:`select` es mayoritariamente usado para ayudar con entrada/" +"salida de sockets." #: ../Doc/faq/library.rst:767 msgid "" @@ -742,6 +1005,13 @@ msgid "" "progress, but hasn't finished yet. Different OSes will return different " "values, so you're going to have to check what's returned on your system." msgstr "" +"Para prevenir el bloqueo en la conexión TCP, puede establecer el socket en " +"modo no bloqueante. Luego cuando ejecute ``connect()``, conectará " +"inmediatamente (improbable) u obtendrá una excepción que contiene el número " +"de error como ``.errno``. ``errno.EINPROGRESS`` indica que la conexión está " +"en curso, pero aún no ha terminado. Diferentes sistemas operativos " +"devolverán diferentes valores, así que debe comprobar cuál es el retornado " +"en su sistema." #: ../Doc/faq/library.rst:774 msgid "" @@ -750,6 +1020,11 @@ msgid "" "again later -- ``0`` or ``errno.EISCONN`` indicate that you're connected -- " "or you can pass this socket to select to check if it's writable." msgstr "" +"Puede usar el método ``connect_ex()`` para evitar crear una excepción. " +"Devolverá simplemente el número de error. Para sondear, puede llamar más " +"tarde a ``connect_ex()`` de nuevo -- ``0`` o ``errno.EISCONN`` indican que " +"está conectado -- o puede pasar este socket a *select* para comprobar si se " +"puede escribir en él." #: ../Doc/faq/library.rst:780 msgid "" @@ -757,18 +1032,22 @@ msgid "" "of writing non-blocking networking code. The third-party `Twisted `_ library is a popular and feature-rich alternative." msgstr "" +"El módulo :mod:`asyncore` ofrece una enfoque de tipo *framework* al problema " +"de escribir código de red no bloqueante. La biblioteca de terceros `Twisted " +"`_ es una alternativa popular y ofrece " +"muchas capacidades." #: ../Doc/faq/library.rst:787 msgid "Databases" -msgstr "" +msgstr "Bases de datos" #: ../Doc/faq/library.rst:790 msgid "Are there any interfaces to database packages in Python?" -msgstr "" +msgstr "¿Hay paquetes para interfaces a bases de datos en Python?" #: ../Doc/faq/library.rst:792 msgid "Yes." -msgstr "" +msgstr "Sí." #: ../Doc/faq/library.rst:794 msgid "" @@ -777,6 +1056,10 @@ msgid "" "`sqlite3` module, which provides a lightweight disk-based relational " "database." msgstr "" +"Interfaces a *hashes* basados en disco tales como :mod:`DBM ` y :" +"mod:`GDBM ` están también incluidas en Python estándar. También hay " +"un módulo :mod:`sqlite3`, que proporciona una base de datos relacional " +"ligera basada en disco." #: ../Doc/faq/library.rst:799 msgid "" @@ -784,10 +1067,13 @@ msgid "" "`DatabaseProgramming wiki page `_ for details." msgstr "" +"Está disponible el soporte para la mayoría de bases de datos relacionales. " +"Vea la `página wiki de Programación de Bases de datos `_ para más detalles." #: ../Doc/faq/library.rst:805 msgid "How do you implement persistent objects in Python?" -msgstr "" +msgstr "¿Cómo implementar objetos persistentes en Python?" #: ../Doc/faq/library.rst:807 msgid "" @@ -796,57 +1082,73 @@ msgid "" "mod:`shelve` library module uses pickle and (g)dbm to create persistent " "mappings containing arbitrary Python objects." msgstr "" +"El módulo de biblioteca :mod:`pickle` soluciona esto de una forma muy " +"general (aunque todavía no puede almacenar cosas como ficheros abiertos, " +"sockets o ventanas), y el módulo de biblioteca :mod:`shelve` usa *pickle* y " +"*(g)dbm* para crear mapeos persistentes que contienen objetos arbitrarios " +"Python." #: ../Doc/faq/library.rst:814 msgid "Mathematics and Numerics" -msgstr "" +msgstr "Matemáticas y Numérica" #: ../Doc/faq/library.rst:817 msgid "How do I generate random numbers in Python?" -msgstr "" +msgstr "¿Cómo genero números aleatorios en Python?" #: ../Doc/faq/library.rst:819 msgid "" "The standard module :mod:`random` implements a random number generator. " "Usage is simple::" msgstr "" +"El módulo estándar :mod:`random` implementa un generador de números " +"aleatorios. El uso es simple::" #: ../Doc/faq/library.rst:825 msgid "This returns a random floating point number in the range [0, 1)." -msgstr "" +msgstr "Esto retorna un número flotante aleatorio en el rango [0, 1)." #: ../Doc/faq/library.rst:827 msgid "" "There are also many other specialized generators in this module, such as:" msgstr "" +"Hay también muchos otros generadores especializados en este módulo, tales " +"como:" #: ../Doc/faq/library.rst:829 msgid "``randrange(a, b)`` chooses an integer in the range [a, b)." -msgstr "" +msgstr "``randrange(a, b)`` selecciona un entero en el rango [a, b)." #: ../Doc/faq/library.rst:830 msgid "``uniform(a, b)`` chooses a floating point number in the range [a, b)." -msgstr "" +msgstr "``uniform(a, b)`` selecciona un número flotante en el rango [a, b)." #: ../Doc/faq/library.rst:831 msgid "" "``normalvariate(mean, sdev)`` samples the normal (Gaussian) distribution." msgstr "" +"``normalvariate(mean, sdev)`` muestrea una distribución normal (*Gausiana*)." #: ../Doc/faq/library.rst:833 msgid "Some higher-level functions operate on sequences directly, such as:" msgstr "" +"Algunas funciones de alto nivel operan directamente sobre secuencias, tales " +"como:" #: ../Doc/faq/library.rst:835 msgid "``choice(S)`` chooses random element from a given sequence" -msgstr "" +msgstr "``choice(S)`` selecciona un elemento aleatorio de una secuencia dada" #: ../Doc/faq/library.rst:836 msgid "``shuffle(L)`` shuffles a list in-place, i.e. permutes it randomly" msgstr "" +"``shuffle(L)`` reorganiza una lista in-situ, es decir, la permuta " +"aleatoriamente" #: ../Doc/faq/library.rst:838 msgid "" "There's also a ``Random`` class you can instantiate to create independent " "multiple random number generators." msgstr "" +"También hay una clase ``Random`` que usted puede instanciar para crear " +"múltiples generadores independientes de valores aleatorios."