From 0923eb40beef4a444a73f2cca7e7ef53af7d61ca Mon Sep 17 00:00:00 2001 From: "Carlos A. Crespo" Date: Thu, 26 Feb 2026 19:18:41 -0300 Subject: [PATCH 1/7] Migration 3.14 (#3436) :) --- .github/workflows/main.yml | 4 +- Makefile | 2 +- about.po | 40 +- bugs.po | 84 +- c-api/allocation.po | 268 +- c-api/apiabiversion.po | 383 +- c-api/arg.po | 466 +- c-api/bool.po | 25 +- c-api/buffer.po | 281 +- c-api/bytearray.po | 29 +- c-api/bytes.po | 32 +- c-api/capsule.po | 80 +- c-api/code.po | 227 +- c-api/complex.po | 48 +- c-api/contextvars.po | 79 +- c-api/conversion.po | 12 +- c-api/dict.po | 65 +- c-api/exceptions.po | 1337 ++-- c-api/extension-modules.po | 361 + c-api/float.po | 42 +- c-api/frame.po | 45 +- c-api/function.po | 189 +- c-api/gcsupport.po | 186 +- c-api/hash.po | 34 +- c-api/import.po | 220 +- c-api/init.po | 3209 +++++---- c-api/init_config.po | 4456 ++++++++---- c-api/intro.po | 415 +- c-api/iter.po | 163 +- c-api/lifecycle.po | 362 + c-api/long.po | 607 +- c-api/marshal.po | 67 +- c-api/memory.po | 506 +- c-api/module.po | 873 ++- c-api/monitoring.po | 98 +- c-api/object.po | 1245 ++-- c-api/perfmaps.po | 51 +- c-api/refcounting.po | 181 +- c-api/reflection.po | 81 +- c-api/sequence.po | 38 +- c-api/slice.po | 209 +- c-api/stable.po | 86 +- c-api/structures.po | 509 +- c-api/sys.po | 356 +- c-api/time.po | 21 +- c-api/tuple.po | 172 +- c-api/type.po | 1110 ++- c-api/typeobj.po | 2313 +++--- c-api/unicode.po | 3311 +++++---- c-api/veryhigh.po | 210 +- c-api/weakref.po | 37 +- copyright.po | 6 +- cpython | 2 +- deprecations/c-api-pending-removal-in-3.14.po | 373 +- deprecations/c-api-pending-removal-in-3.15.po | 315 +- deprecations/c-api-pending-removal-in-3.16.po | 29 + deprecations/c-api-pending-removal-in-3.18.po | 144 + .../c-api-pending-removal-in-future.po | 95 +- deprecations/index.po | 2027 ++++-- deprecations/pending-removal-in-3.13.po | 12 +- deprecations/pending-removal-in-3.14.po | 155 +- deprecations/pending-removal-in-3.15.po | 147 +- deprecations/pending-removal-in-3.16.po | 183 +- deprecations/pending-removal-in-3.17.po | 83 + deprecations/pending-removal-in-3.19.po | 36 + deprecations/pending-removal-in-future.po | 250 +- extending/building.po | 136 +- extending/embedding.po | 72 +- extending/extending.po | 654 +- extending/index.po | 60 +- extending/newtypes.po | 306 +- extending/newtypes_tutorial.po | 852 ++- extending/windows.po | 79 +- faq/design.po | 12 +- faq/extending.po | 201 +- faq/general.po | 52 +- faq/programming.po | 216 +- glossary.po | 1284 ++-- howto/a-conceptual-overview-of-asyncio.po | 817 +++ howto/annotations.po | 133 +- howto/argparse-optparse.po | 139 + howto/argparse.po | 389 +- howto/cporting.po | 22 +- howto/curses.po | 9 +- howto/descriptor.po | 306 +- howto/enum.po | 822 ++- howto/free-threading-extensions.po | 391 +- howto/free-threading-python.po | 146 +- howto/functional.po | 19 +- howto/gdb_helpers.po | 15 +- howto/index.po | 74 +- howto/ipaddress.po | 6 +- howto/isolating-extensions.po | 218 +- howto/logging-cookbook.po | 935 ++- howto/logging.po | 17 +- howto/mro.po | 6 +- howto/perf_profiling.po | 72 +- howto/regex.po | 369 +- howto/remote_debugging.po | 976 +++ howto/sockets.po | 8 +- howto/sorting.po | 239 +- howto/unicode.po | 19 +- howto/urllib2.po | 205 +- library/__future__.po | 206 +- library/__main__.po | 49 +- library/_thread.po | 76 +- library/abc.po | 22 +- library/aifc.po | 680 +- library/annotationlib.po | 985 +++ library/archiving.po | 21 +- library/argparse.po | 2462 ++++--- library/array.po | 87 +- library/ast.po | 818 ++- library/asynchat.po | 610 +- library/asyncio-dev.po | 114 +- library/asyncio-eventloop.po | 1041 +-- library/asyncio-future.po | 120 +- library/asyncio-graph.po | 204 + library/asyncio-llapi-index.po | 7 +- library/asyncio-platforms.po | 35 +- library/asyncio-policy.po | 671 +- library/asyncio-protocol.po | 16 +- library/asyncio-queue.po | 75 +- library/asyncio-runner.po | 108 +- library/asyncio-stream.po | 229 +- library/asyncio-subprocess.po | 241 +- library/asyncio-sync.po | 194 +- library/asyncio-task.po | 572 +- library/asyncio.po | 62 +- library/asyncore.po | 995 ++- library/audioop.po | 845 ++- library/audit_events.po | 18 +- library/base64.po | 212 +- library/bdb.po | 207 +- library/bisect.po | 84 +- library/builtins.po | 30 +- library/calendar.po | 285 +- library/cgi.po | 2048 +++--- library/cgitb.po | 308 +- library/chunk.po | 490 +- library/cmath.po | 524 +- library/cmdline.po | 118 +- library/cmdlinelibs.po | 35 + library/code.po | 68 +- library/codecs.po | 1266 ++-- library/collections.abc.po | 245 +- library/collections.po | 241 +- library/compileall.po | 137 +- library/compression.po | 56 + library/compression.zstd.po | 1157 +++ library/concurrent.futures.po | 453 +- library/concurrent.interpreters.po | 527 ++ library/concurrent.po | 21 +- library/configparser.po | 504 +- library/constants.po | 90 +- library/contextlib.po | 137 +- library/contextvars.po | 189 +- library/crypt.po | 512 +- library/csv.po | 214 +- library/ctypes.po | 1988 ++++-- library/curses.po | 1012 +-- library/dataclasses.po | 358 +- library/datetime.po | 1403 ++-- library/dbm.po | 17 +- library/decimal.po | 783 +- library/difflib.po | 24 +- library/dis.po | 1178 +-- library/distutils.po | 185 +- library/doctest.po | 1008 +-- library/email.compat32-message.po | 43 +- library/email.contentmanager.po | 42 +- library/email.errors.po | 151 +- library/email.examples.po | 12 +- library/email.header.po | 77 +- library/email.parser.po | 20 +- library/email.policy.po | 10 +- library/email.utils.po | 72 +- library/ensurepip.po | 93 +- library/enum.po | 519 +- library/errno.po | 155 +- library/exceptions.po | 445 +- library/faulthandler.po | 161 +- library/fcntl.po | 290 +- library/filecmp.po | 8 +- library/fnmatch.po | 57 +- library/fractions.po | 119 +- library/frameworks.po | 58 +- library/ftplib.po | 16 +- library/functions.po | 957 +-- library/functools.po | 330 +- library/gc.po | 275 +- library/getopt.po | 247 +- library/getpass.po | 46 +- library/graphlib.po | 55 +- library/grp.po | 14 +- library/gzip.po | 105 +- library/hashlib.po | 372 +- library/heapq.po | 249 +- library/hmac.po | 65 +- library/html.parser.po | 139 +- library/html.po | 21 +- library/http.client.po | 14 +- library/http.cookiejar.po | 21 +- library/http.cookies.po | 104 +- library/http.server.po | 456 +- library/idle.po | 654 +- library/imaplib.po | 353 +- library/imghdr.po | 295 +- library/imp.po | 1212 ++-- library/importlib.metadata.po | 567 +- library/importlib.po | 808 ++- library/inspect.po | 1067 +-- library/io.po | 794 +- library/ipaddress.po | 337 +- library/itertools.po | 656 +- library/json.po | 791 +- library/linecache.po | 25 +- library/locale.po | 456 +- library/logging.config.po | 115 +- library/logging.handlers.po | 481 +- library/logging.po | 549 +- library/mailbox.po | 591 +- library/mailcap.po | 342 +- library/marshal.po | 254 +- library/math.po | 1632 +++-- library/mimetypes.po | 232 +- library/mmap.po | 76 +- library/msilib.po | 1586 ++-- library/multiprocessing.po | 1438 ++-- library/netrc.po | 52 +- library/nis.po | 169 +- library/nntplib.po | 1556 ++-- library/operator.po | 383 +- library/optparse.po | 1236 ++-- library/os.path.po | 194 +- library/os.po | 2716 +++---- library/ossaudiodev.po | 1430 ++-- library/pathlib.po | 1383 ++-- library/pdb.po | 513 +- library/pickle.po | 488 +- library/pickletools.po | 31 +- library/pipes.po | 248 +- library/pkgutil.po | 178 +- library/platform.po | 151 +- library/plistlib.po | 69 +- library/poplib.po | 17 +- library/posix.po | 6 +- library/pprint.po | 9 +- library/profile.po | 332 +- library/pty.po | 6 +- library/pwd.po | 14 +- library/pydoc.po | 32 +- library/pyexpat.po | 300 +- library/python.po | 24 +- library/random.po | 104 +- library/re.po | 940 +-- library/readline.po | 188 +- library/removed.po | 31 + library/resource.po | 67 +- library/secrets.po | 10 +- library/security_warnings.po | 12 +- library/select.po | 306 +- library/selectors.po | 77 +- library/shutil.po | 477 +- library/signal.po | 152 +- library/site.po | 162 +- library/smtpd.po | 1075 ++- library/smtplib.po | 48 +- library/sndhdr.po | 376 +- library/socket.po | 1203 ++-- library/socketserver.po | 243 +- library/spwd.po | 335 +- library/sqlite3.po | 1018 +-- library/ssl.po | 1122 +-- library/stat.po | 6 +- library/statistics.po | 9 +- library/stdtypes.po | 4441 +++++++----- library/string.po | 667 +- library/string.templatelib.po | 331 + library/struct.po | 214 +- library/subprocess.po | 337 +- library/sunau.po | 722 +- library/superseded.po | 42 +- library/symtable.po | 138 +- library/sys.monitoring.po | 375 +- library/sys.po | 1317 ++-- library/sys_path_init.po | 122 +- library/sysconfig.po | 136 +- library/syslog.po | 12 +- library/tarfile.po | 949 ++- library/telnetlib.po | 725 +- library/termios.po | 6 +- library/test.po | 649 +- library/threading.po | 967 ++- library/time.po | 750 +- library/tk.po | 7 +- library/token.po | 720 +- library/tokenize.po | 78 +- library/tomllib.po | 105 +- library/traceback.po | 455 +- library/tty.po | 6 +- library/turtle.po | 1397 ++-- library/types.po | 291 +- library/typing.po | 3109 ++++---- library/unicodedata.po | 243 +- library/unittest.mock.po | 1038 +-- library/unittest.po | 1284 ++-- library/unix.po | 21 +- library/urllib.parse.po | 329 +- library/urllib.request.po | 1242 ++-- library/uu.po | 229 +- library/uuid.po | 405 +- library/venv.po | 361 +- library/warnings.po | 389 +- library/webbrowser.po | 211 +- library/winsound.po | 33 +- library/wsgiref.po | 264 +- library/xdrlib.po | 781 +- library/xml.dom.minidom.po | 132 +- library/xml.dom.pulldom.po | 73 +- library/xml.etree.elementtree.po | 581 +- library/xml.po | 409 +- library/xml.sax.handler.po | 111 +- library/xml.sax.po | 66 +- library/xmlrpc.client.po | 41 +- library/xmlrpc.server.po | 17 +- library/zipfile.po | 496 +- library/zipimport.po | 33 +- library/zlib.po | 35 +- library/zoneinfo.po | 29 +- license.po | 323 +- reference/compound_stmts.po | 1215 ++-- reference/datamodel.po | 2514 ++++--- reference/executionmodel.po | 157 +- reference/expressions.po | 1336 ++-- reference/grammar.po | 818 ++- reference/import.po | 857 ++- reference/introduction.po | 336 +- reference/lexical_analysis.po | 3139 +++++--- reference/simple_stmts.po | 564 +- tutorial/appendix.po | 20 +- tutorial/classes.po | 11 +- tutorial/controlflow.po | 452 +- tutorial/datastructures.po | 129 +- tutorial/errors.po | 213 +- tutorial/index.po | 29 +- tutorial/inputoutput.po | 240 +- tutorial/interactive.po | 16 +- tutorial/interpreter.po | 10 +- tutorial/introduction.po | 295 +- tutorial/modules.po | 261 +- tutorial/stdlib.po | 6 +- tutorial/stdlib2.po | 10 +- using/android.po | 72 +- using/cmdline.po | 663 +- using/configure.po | 939 ++- using/editors.po | 37 +- using/ios.po | 352 +- using/mac.po | 336 +- using/unix.po | 144 +- using/windows.po | 5603 +++++++++------ whatsnew/2.0.po | 216 +- whatsnew/2.3.po | 37 +- whatsnew/2.6.po | 900 +-- whatsnew/2.7.po | 101 +- whatsnew/3.0.po | 194 +- whatsnew/3.1.po | 428 +- whatsnew/3.10.po | 907 +-- whatsnew/3.11.po | 30 +- whatsnew/3.12.po | 2133 +++--- whatsnew/3.13.po | 2458 ++++--- whatsnew/3.14.po | 6361 +++++++++++++++++ whatsnew/3.2.po | 31 +- whatsnew/3.3.po | 2952 ++++---- whatsnew/3.4.po | 764 +- whatsnew/3.5.po | 975 +-- whatsnew/3.6.po | 269 +- whatsnew/3.7.po | 772 +- whatsnew/3.8.po | 346 +- whatsnew/3.9.po | 268 +- 380 files changed, 108742 insertions(+), 70080 deletions(-) create mode 100644 c-api/extension-modules.po create mode 100644 c-api/lifecycle.po create mode 100644 deprecations/c-api-pending-removal-in-3.16.po create mode 100644 deprecations/c-api-pending-removal-in-3.18.po create mode 100644 deprecations/pending-removal-in-3.17.po create mode 100644 deprecations/pending-removal-in-3.19.po create mode 100644 howto/a-conceptual-overview-of-asyncio.po create mode 100644 howto/argparse-optparse.po create mode 100644 howto/remote_debugging.po create mode 100644 library/annotationlib.po create mode 100644 library/asyncio-graph.po create mode 100644 library/cmdlinelibs.po create mode 100644 library/compression.po create mode 100644 library/compression.zstd.po create mode 100644 library/concurrent.interpreters.po create mode 100644 library/removed.po create mode 100644 library/string.templatelib.po create mode 100644 whatsnew/3.14.po diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e34309dd9..835eeed937 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,10 +23,10 @@ jobs: fetch-depth: 2 # Instalación de dependencias - - name: Preparar Python v3.13 + - name: Preparar Python v3.14 uses: actions/setup-python@v6 with: - python-version: "3.13" + python-version: "3.14" cache: "pip" - name: Configura dpkg/apt para ejecutarse de manera eficiente uses: abbbi/github-actions-tune@v1 diff --git a/Makefile b/Makefile index 75f0f9dd50..6c2eb79e19 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # Configuration CPYTHON_PATH := cpython # Current commit for this upstream repo is setted by the submodule -BRANCH := 3.13 +BRANCH := 3.14 LANGUAGE_TEAM := python-docs-es LANGUAGE := es diff --git a/about.po b/about.po index eef91cadc0..185258bea9 100644 --- a/about.po +++ b/about.po @@ -10,32 +10,34 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-25 19:47+0200\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2023-11-26 19:02+0100\n" "Last-Translator: Marcos Medrano \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.10.3\n" -"X-Generator: Poedit 3.4.1\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/about.rst:3 -msgid "About these documents" +#, fuzzy +msgid "About this documentation" msgstr "Acerca de estos documentos" #: ../Doc/about.rst:6 +#, fuzzy msgid "" -"These documents are generated from `reStructuredText`_ sources by `Sphinx`_, " -"a document processor specifically written for the Python documentation." +"Python's documentation is generated from `reStructuredText`_ sources using " +"`Sphinx`_, a documentation generator originally created for Python and now " +"maintained as an independent project." msgstr "" "Estos documentos son generados por `reStructuredText`_ desarrollado por " "`Sphinx`_, un procesador de documentos específicamente escrito para la " "documentación de Python." -#: ../Doc/about.rst:15 +#: ../Doc/about.rst:16 msgid "" "Development of the documentation and its toolchain is an entirely volunteer " "effort, just like Python itself. If you want to contribute, please take a " @@ -47,19 +49,20 @@ msgstr "" "favor revisa la página :ref:`reporting-bugs` para más información de cómo " "hacerlo. Los nuevos voluntarios son siempre bienvenidos!" -#: ../Doc/about.rst:20 +#: ../Doc/about.rst:21 msgid "Many thanks go to:" msgstr "Agradecemos a:" -#: ../Doc/about.rst:22 +#: ../Doc/about.rst:23 +#, fuzzy msgid "" "Fred L. Drake, Jr., the creator of the original Python documentation toolset " -"and writer of much of the content;" +"and author of much of the content;" msgstr "" "Fred L. Drake, Jr., el creador original de la documentación del conjunto de " "herramientas de Python y escritor de gran parte del contenido;" -#: ../Doc/about.rst:24 +#: ../Doc/about.rst:25 msgid "" "the `Docutils `_ project for creating " "reStructuredText and the Docutils suite;" @@ -67,7 +70,7 @@ msgstr "" "el proyecto `Docutils `_ para creación de " "reStructuredText y la suite Docutils;" -#: ../Doc/about.rst:26 +#: ../Doc/about.rst:27 msgid "" "Fredrik Lundh for his Alternative Python Reference project from which Sphinx " "got many good ideas." @@ -75,11 +78,12 @@ msgstr "" "Fredrik Lundh por su proyecto Referencia Alternativa de Python del que " "Sphinx obtuvo muchas buenas ideas." -#: ../Doc/about.rst:31 -msgid "Contributors to the Python Documentation" +#: ../Doc/about.rst:32 +#, fuzzy +msgid "Contributors to the Python documentation" msgstr "Contribuidores de la documentación de Python" -#: ../Doc/about.rst:33 +#: ../Doc/about.rst:34 msgid "" "Many people have contributed to the Python language, the Python standard " "library, and the Python documentation. See :source:`Misc/ACKS` in the " @@ -89,7 +93,7 @@ msgstr "" "estándar de Python, y la documentación de Python. Revisa :source:`Misc/ACKS` " "la distribución de Python para una lista parcial de contribuidores." -#: ../Doc/about.rst:37 +#: ../Doc/about.rst:38 msgid "" "It is only with the input and contributions of the Python community that " "Python has such wonderful documentation -- Thank You!" diff --git a/bugs.po b/bugs.po index 7b92c05ec9..4c664dd3c4 100644 --- a/bugs.po +++ b/bugs.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2023-11-26 21:55+0100\n" "Last-Translator: Marcos Medrano \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/bugs.rst:5 msgid "Dealing with Bugs" @@ -51,10 +51,12 @@ msgid "Documentation bugs" msgstr "Documentación de errores" #: ../Doc/bugs.rst:18 +#, fuzzy msgid "" "If you find a bug in this documentation or would like to propose an " -"improvement, please submit a bug report on the :ref:`tracker `. If you have a suggestion on how to fix it, include that as well." +"improvement, please submit a bug report on the :ref:`issue tracker `. If you have a suggestion on how to fix it, include that as " +"well." msgstr "" "Si encuentras un error en esta documentación o te gustaría proponer una " "mejora, por favor envía un informe de fallos en el :ref:`rastreador `_." msgstr "" -#: ../Doc/bugs.rst:29 -msgid "" -"If you're short on time, you can also email documentation bug reports to " -"docs@python.org (behavioral bugs can be sent to python-list@python.org). " -"'docs@' is a mailing list run by volunteers; your request will be noticed, " -"though it may take a while to be processed." -msgstr "" -"Si tienes poco tiempo, también puedes enviar un correo electrónico con el " -"informe de errores de documentación a la dirección docs@python.org (los " -"errores de comportamiento puedes enviarlos a la dirección python-list@python." -"org). 'docs@' es una lista de correo iniciada por voluntarios; tu petición " -"será notificada, aunque puede que lleve algo de tiempo el ser procesada." - -#: ../Doc/bugs.rst:37 +#: ../Doc/bugs.rst:31 msgid "`Documentation bugs`_" msgstr "`Documentación de errores`_" -#: ../Doc/bugs.rst:37 +#: ../Doc/bugs.rst:32 msgid "" "A list of documentation bugs that have been submitted to the Python issue " "tracker." @@ -101,17 +90,17 @@ msgstr "" "Una lista de errores (*bugs*) que ha sido enviada al issue tracker (sistema " "de seguimiento de incidentes) de Python." -#: ../Doc/bugs.rst:40 +#: ../Doc/bugs.rst:34 msgid "`Issue Tracking `_" msgstr "`Seguimiento de incidencias `_" -#: ../Doc/bugs.rst:40 +#: ../Doc/bugs.rst:35 msgid "" "Overview of the process involved in reporting an improvement on the tracker." msgstr "" "Resumen general del proceso necesario para reportar una mejora en el tracker." -#: ../Doc/bugs.rst:43 +#: ../Doc/bugs.rst:37 msgid "" "`Helping with Documentation `_" @@ -119,7 +108,7 @@ msgstr "" "`Ayudar con la documentación `_" -#: ../Doc/bugs.rst:43 +#: ../Doc/bugs.rst:38 msgid "" "Comprehensive guide for individuals that are interested in contributing to " "Python documentation." @@ -127,7 +116,7 @@ msgstr "" "Guía detallada para gente interesada en contribuir a la documentación de " "Python." -#: ../Doc/bugs.rst:45 +#: ../Doc/bugs.rst:40 #, fuzzy msgid "" "`Documentation Translations `_" -#: ../Doc/bugs.rst:46 +#: ../Doc/bugs.rst:41 msgid "" "A list of GitHub pages for documentation translation and their primary " "contacts." @@ -144,11 +133,11 @@ msgstr "" "Una lista de páginas de GitHub para la traducción de documentación y sus " "contactos principales." -#: ../Doc/bugs.rst:52 +#: ../Doc/bugs.rst:47 msgid "Using the Python issue tracker" msgstr "Utilizar el issue tracker de Python" -#: ../Doc/bugs.rst:54 +#: ../Doc/bugs.rst:49 msgid "" "Issue reports for Python itself should be submitted via the GitHub issues " "tracker (https://github.com/python/cpython/issues). The GitHub issues " @@ -160,7 +149,7 @@ msgstr "" "de incidencias de GitHub ofrece un formulario web que permite introducir la " "información pertinente y enviarla a los desarrolladores." -#: ../Doc/bugs.rst:59 +#: ../Doc/bugs.rst:54 msgid "" "The first step in filing a report is to determine whether the problem has " "already been reported. The advantage in doing so, aside from saving the " @@ -178,7 +167,7 @@ msgstr "" "¡te invitamos a incluirla si puedes!). Para hacerlo, busca en la base de " "datos de errores usando la zona de búsqueda al principio de esta página." -#: ../Doc/bugs.rst:66 +#: ../Doc/bugs.rst:61 msgid "" "If the problem you're reporting is not already in the list, log in to " "GitHub. If you don't already have a GitHub account, create a new account " @@ -190,7 +179,7 @@ msgstr "" "enlace \"Regístrate\". No es posible enviar un informe de error de forma " "anónima." -#: ../Doc/bugs.rst:71 +#: ../Doc/bugs.rst:66 msgid "" "Being now logged in, you can submit an issue. Click on the \"New issue\" " "button in the top bar to report a new issue." @@ -199,11 +188,11 @@ msgstr "" "en el botón \"New issue\" de la barra superior para notificar un nuevo " "informe de error." -#: ../Doc/bugs.rst:74 +#: ../Doc/bugs.rst:69 msgid "The submission form has two fields, \"Title\" and \"Comment\"." msgstr "El formulario de envío tiene dos campos: \"Title\" y \"Comment\"." -#: ../Doc/bugs.rst:76 +#: ../Doc/bugs.rst:71 msgid "" "For the \"Title\" field, enter a *very* short description of the problem; " "fewer than ten words is good." @@ -211,7 +200,7 @@ msgstr "" "En el campo \"Title\", introduzca una descripción *muy* breve del problema; " "menos de diez palabras es suficiente." -#: ../Doc/bugs.rst:79 +#: ../Doc/bugs.rst:74 msgid "" "In the \"Comment\" field, describe the problem in detail, including what you " "expected to happen and what did happen. Be sure to include whether any " @@ -223,7 +212,7 @@ msgstr "" "si cualquier módulo de extensión está involucrado, y qué plataformas de " "hardware y software estás usando (incluyendo las versiones correspondientes)." -#: ../Doc/bugs.rst:84 +#: ../Doc/bugs.rst:79 msgid "" "Each issue report will be reviewed by a developer who will determine what " "needs to be done to correct the problem. You will receive an update each " @@ -233,7 +222,7 @@ msgstr "" "es necesario hacer para corregir el problema. Recibirás una actualización " "cada vez que se tome una medida al respecto." -#: ../Doc/bugs.rst:93 +#: ../Doc/bugs.rst:86 msgid "" "`How to Report Bugs Effectively `_" @@ -241,7 +230,7 @@ msgstr "" "`Cómo informar de errores de manera efectiva `_" -#: ../Doc/bugs.rst:92 +#: ../Doc/bugs.rst:87 msgid "" "Article which goes into some detail about how to create a useful bug report. " "This describes what kind of information is useful and why it is useful." @@ -249,7 +238,7 @@ msgstr "" "Artículo que detalla cómo crear un informe de errores útil. Describe qué " "tipo de información es útil y por qué lo es." -#: ../Doc/bugs.rst:96 +#: ../Doc/bugs.rst:90 msgid "" "`Bug Writing Guidelines `_" @@ -257,7 +246,7 @@ msgstr "" "`Bug Writing Guidelines `_" -#: ../Doc/bugs.rst:96 +#: ../Doc/bugs.rst:91 msgid "" "Information about writing a good bug report. Some of this is specific to " "the Mozilla project, but describes general good practices." @@ -266,11 +255,11 @@ msgstr "" "información es específica al proyecto Mozilla, pero en general describe " "buenas prácticas." -#: ../Doc/bugs.rst:102 +#: ../Doc/bugs.rst:97 msgid "Getting started contributing to Python yourself" msgstr "Para empezar a contribuir en Python" -#: ../Doc/bugs.rst:104 +#: ../Doc/bugs.rst:99 msgid "" "Beyond just reporting bugs that you find, you are also welcome to submit " "patches to fix them. You can find more information on how to get started " @@ -284,3 +273,16 @@ msgstr "" "Guide`_. Si tienes preguntas, el `core-mentorship mailing list`_ es un " "agradable lugar para obtener respuestas a cualquiera y a todas las preguntas " "pertenecientes al proceso de corrección de problemas en Python." + +#~ msgid "" +#~ "If you're short on time, you can also email documentation bug reports to " +#~ "docs@python.org (behavioral bugs can be sent to python-list@python.org). " +#~ "'docs@' is a mailing list run by volunteers; your request will be " +#~ "noticed, though it may take a while to be processed." +#~ msgstr "" +#~ "Si tienes poco tiempo, también puedes enviar un correo electrónico con el " +#~ "informe de errores de documentación a la dirección docs@python.org (los " +#~ "errores de comportamiento puedes enviarlos a la dirección python-" +#~ "list@python.org). 'docs@' es una lista de correo iniciada por " +#~ "voluntarios; tu petición será notificada, aunque puede que lleve algo de " +#~ "tiempo el ser procesada." diff --git a/c-api/allocation.po b/c-api/allocation.po index dab388e66e..3eb42a94ec 100644 --- a/c-api/allocation.po +++ b/c-api/allocation.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 19:43+0200\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-04-09 21:56+0200\n" "Last-Translator: David Spindola\n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.13.0\n" -"X-Generator: Poedit 3.6\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/allocation.rst:6 msgid "Allocating Objects on the Heap" @@ -29,17 +28,28 @@ msgstr "Asignación de objetos en el montículo" #: ../Doc/c-api/allocation.rst:17 msgid "" "Initialize a newly allocated object *op* with its type and initial " -"reference. Returns the initialized object. If *type* indicates that the " -"object participates in the cyclic garbage detector, it is added to the " -"detector's set of observed objects. Other fields of the object are not " -"affected." +"reference. Returns the initialized object. Other fields of the object are " +"not initialized. Despite its name, this function is unrelated to the " +"object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` " +"slot). Specifically, this function does **not** call the object's :meth:`!" +"__init__` method." +msgstr "" + +#: ../Doc/c-api/allocation.rst:24 +msgid "" +"In general, consider this function to be a low-level routine. Use :c:member:" +"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!" +"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:" +"`PyObject_New`." +msgstr "" + +#: ../Doc/c-api/allocation.rst:31 +msgid "" +"This function only initializes the object's memory corresponding to the " +"initial :c:type:`PyObject` structure. It does not zero the rest." msgstr "" -"Inicializa un objeto recién asignado *op* con su tipo y referencia inicial. " -"Retorna el objeto inicializado. Si *type* indica que el objeto participa en " -"el detector de basura cíclico, se agrega al conjunto de objetos observados " -"por el detector. Otros campos del objeto no se ven afectados." -#: ../Doc/c-api/allocation.rst:26 +#: ../Doc/c-api/allocation.rst:37 msgid "" "This does everything :c:func:`PyObject_Init` does, and also initializes the " "length information for a variable-size object." @@ -47,14 +57,20 @@ msgstr "" "Esto hace todo lo que :c:func:`PyObject_Init` hace, y también inicializa la " "información de longitud para un objeto de tamaño variable." -#: ../Doc/c-api/allocation.rst:32 +#: ../Doc/c-api/allocation.rst:42 msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The caller will own the only " -"reference to the object (i.e. its reference count will be one). The size of " -"the memory allocation is determined from " -"the :c:member:`~PyTypeObject.tp_basicsize` field of the type object." +"This function only initializes some of the object's memory. It does not " +"zero the rest." +msgstr "" + +#: ../Doc/c-api/allocation.rst:48 +#, fuzzy +msgid "" +"Allocates a new Python object using the C structure type *TYPE* and the " +"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:" +"`PyObject_Malloc` to allocate memory and initializing it like :c:func:" +"`PyObject_Init`. The caller will own the only reference to the object (i.e. " +"its reference count will be one)." msgstr "" "Asigna un nuevo objeto de Python usando el tipo de estructura de C *TYPE* y " "el objeto de tipo Python *typeobj* (``PyTypeObject*``). Los campos no " @@ -63,43 +79,123 @@ msgstr "" "de referencias será uno). El tamaño de la asignación de memoria se determina " "a partir del campo :c:member:`~PyTypeObject.tp_basicsize` del objeto de tipo." -#: ../Doc/c-api/allocation.rst:43 -msgid "" -"Allocate a new Python object using the C structure type *TYPE* and the " -"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the " -"Python object header are not initialized. The allocated memory allows for " -"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given " -"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is " -"useful for implementing objects like tuples, which are able to determine " -"their size at construction time. Embedding the array of fields into the " -"same allocation decreases the number of allocations, improving the memory " -"management efficiency." -msgstr "" -"Asigna un nuevo objeto de Python utilizando el tipo de estructura de C " -"*TYPE* y el objeto de tipo Python *typeobj* (``PyTypeObject*``). Los campos " -"no definidos por el encabezado del objeto Python no se inicializan. La " -"memoria asignada permite la estructura *TYPE* más *size* (``Py_ssize_t``) " -"campos del tamaño dado por el campo :c:member:`~PyTypeObject.tp_itemsize` de " -"*typeobj*. Esto es útil para implementar objetos como las tuplas, que pueden " -"determinar su tamaño en el momento de la construcción. Integrar el arreglo " -"de campos en la misma asignación disminuye el número de asignaciones, " -"mejorando la eficiencia de la gestión de memoria." - -#: ../Doc/c-api/allocation.rst:57 -msgid "" -"Releases memory allocated to an object using :c:macro:`PyObject_New` " -"or :c:macro:`PyObject_NewVar`. This is normally called from " -"the :c:member:`~PyTypeObject.tp_dealloc` handler specified in the object's " -"type. The fields of the object should not be accessed after this call as " -"the memory is no longer a valid Python object." -msgstr "" -"Libera la memoria asignada a un objeto usando :c:macro:`PyObject_New` " -"o :c:macro:`PyObject_NewVar`. Esto normalmente se llama desde el " -"manejador :c:member:`~PyTypeObject.tp_dealloc` especificado en el tipo de " -"objeto. Los campos del objeto no deben ser accedidos después de esta " -"llamada, ya que la memoria ya no es un objeto de Python válido." - -#: ../Doc/c-api/allocation.rst:66 +#: ../Doc/c-api/allocation.rst:54 ../Doc/c-api/allocation.rst:107 +msgid "" +"Avoid calling this directly to allocate memory for an object; call the " +"type's :c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +#: ../Doc/c-api/allocation.rst:57 ../Doc/c-api/allocation.rst:110 +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:" +"`PyType_GenericAlloc` is preferred over a custom function that simply calls " +"this macro." +msgstr "" + +#: ../Doc/c-api/allocation.rst:61 +msgid "" +"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:" +"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:" +"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)." +msgstr "" + +#: ../Doc/c-api/allocation.rst:65 +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:" +"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead." +msgstr "" + +#: ../Doc/c-api/allocation.rst:68 +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: ../Doc/c-api/allocation.rst:73 ../Doc/c-api/allocation.rst:123 +msgid "" +"The returned memory is not guaranteed to have been completely zeroed before " +"it was initialized." +msgstr "" + +#: ../Doc/c-api/allocation.rst:78 ../Doc/c-api/allocation.rst:128 +msgid "" +"This macro does not construct a fully initialized object of the given type; " +"it merely allocates memory and prepares it for further initialization by :c:" +"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, " +"call *typeobj* instead. For example::" +msgstr "" + +#: ../Doc/c-api/allocation.rst:83 +msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);" +msgstr "" + +#: ../Doc/c-api/allocation.rst:87 ../Doc/c-api/allocation.rst:137 +#, fuzzy +msgid ":c:func:`PyObject_Free`" +msgstr ":c:func:`PyModule_Create`" + +#: ../Doc/c-api/allocation.rst:88 +msgid ":c:macro:`PyObject_GC_New`" +msgstr "" + +#: ../Doc/c-api/allocation.rst:89 ../Doc/c-api/allocation.rst:139 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: ../Doc/c-api/allocation.rst:90 ../Doc/c-api/allocation.rst:140 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: ../Doc/c-api/allocation.rst:95 +msgid "Like :c:macro:`PyObject_New` except:" +msgstr "" + +#: ../Doc/c-api/allocation.rst:97 +msgid "" +"It allocates enough memory for the *TYPE* structure plus *size* " +"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject." +"tp_itemsize` field of *typeobj*." +msgstr "" + +#: ../Doc/c-api/allocation.rst:100 +msgid "The memory is initialized like :c:func:`PyObject_InitVar`." +msgstr "" + +#: ../Doc/c-api/allocation.rst:102 +msgid "" +"This is useful for implementing objects like tuples, which are able to " +"determine their size at construction time. Embedding the array of fields " +"into the same allocation decreases the number of allocations, improving the " +"memory management efficiency." +msgstr "" + +#: ../Doc/c-api/allocation.rst:114 +msgid "" +"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:" +"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead." +msgstr "" + +#: ../Doc/c-api/allocation.rst:118 +msgid "" +"Memory allocated by this function must be freed with :c:func:`PyObject_Free` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: ../Doc/c-api/allocation.rst:133 +msgid "" +"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);" +msgstr "" + +#: ../Doc/c-api/allocation.rst:138 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: ../Doc/c-api/allocation.rst:145 +#, fuzzy +msgid "Same as :c:func:`PyObject_Free`." +msgstr ":c:func:`PyModule_Create`" + +#: ../Doc/c-api/allocation.rst:149 msgid "" "Object which is visible in Python as ``None``. This should only be accessed " "using the :c:macro:`Py_None` macro, which evaluates to a pointer to this " @@ -109,10 +205,58 @@ msgstr "" "utilizando el macro :c:macro:`Py_None`, que se evalúa como un puntero a este " "objeto." -#: ../Doc/c-api/allocation.rst:73 -msgid ":c:func:`PyModule_Create`" -msgstr ":c:func:`PyModule_Create`" +#: ../Doc/c-api/allocation.rst:156 +msgid ":ref:`moduleobjects`" +msgstr "" -#: ../Doc/c-api/allocation.rst:74 +#: ../Doc/c-api/allocation.rst:157 msgid "To allocate and create extension modules." msgstr "Para asignar y crear módulos de extensión." + +#~ msgid "" +#~ "Initialize a newly allocated object *op* with its type and initial " +#~ "reference. Returns the initialized object. If *type* indicates that the " +#~ "object participates in the cyclic garbage detector, it is added to the " +#~ "detector's set of observed objects. Other fields of the object are not " +#~ "affected." +#~ msgstr "" +#~ "Inicializa un objeto recién asignado *op* con su tipo y referencia " +#~ "inicial. Retorna el objeto inicializado. Si *type* indica que el objeto " +#~ "participa en el detector de basura cíclico, se agrega al conjunto de " +#~ "objetos observados por el detector. Otros campos del objeto no se ven " +#~ "afectados." + +#~ msgid "" +#~ "Allocate a new Python object using the C structure type *TYPE* and the " +#~ "Python type object *typeobj* (``PyTypeObject*``). Fields not defined by " +#~ "the Python object header are not initialized. The allocated memory " +#~ "allows for the *TYPE* structure plus *size* (``Py_ssize_t``) fields of " +#~ "the size given by the :c:member:`~PyTypeObject.tp_itemsize` field of " +#~ "*typeobj*. This is useful for implementing objects like tuples, which " +#~ "are able to determine their size at construction time. Embedding the " +#~ "array of fields into the same allocation decreases the number of " +#~ "allocations, improving the memory management efficiency." +#~ msgstr "" +#~ "Asigna un nuevo objeto de Python utilizando el tipo de estructura de C " +#~ "*TYPE* y el objeto de tipo Python *typeobj* (``PyTypeObject*``). Los " +#~ "campos no definidos por el encabezado del objeto Python no se " +#~ "inicializan. La memoria asignada permite la estructura *TYPE* más *size* " +#~ "(``Py_ssize_t``) campos del tamaño dado por el campo :c:member:" +#~ "`~PyTypeObject.tp_itemsize` de *typeobj*. Esto es útil para implementar " +#~ "objetos como las tuplas, que pueden determinar su tamaño en el momento de " +#~ "la construcción. Integrar el arreglo de campos en la misma asignación " +#~ "disminuye el número de asignaciones, mejorando la eficiencia de la " +#~ "gestión de memoria." + +#~ msgid "" +#~ "Releases memory allocated to an object using :c:macro:`PyObject_New` or :" +#~ "c:macro:`PyObject_NewVar`. This is normally called from the :c:member:" +#~ "`~PyTypeObject.tp_dealloc` handler specified in the object's type. The " +#~ "fields of the object should not be accessed after this call as the memory " +#~ "is no longer a valid Python object." +#~ msgstr "" +#~ "Libera la memoria asignada a un objeto usando :c:macro:`PyObject_New` o :" +#~ "c:macro:`PyObject_NewVar`. Esto normalmente se llama desde el manejador :" +#~ "c:member:`~PyTypeObject.tp_dealloc` especificado en el tipo de objeto. " +#~ "Los campos del objeto no deben ser accedidos después de esta llamada, ya " +#~ "que la memoria ya no es un objeto de Python válido." diff --git a/c-api/apiabiversion.po b/c-api/apiabiversion.po index c5b8f4186f..afcdd18606 100644 --- a/c-api/apiabiversion.po +++ b/c-api/apiabiversion.po @@ -10,52 +10,56 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 19:43+0200\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2024-10-31 01:00-0400\n" "Last-Translator: \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.13.0\n" -"X-Generator: Poedit 3.5\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/apiabiversion.rst:7 msgid "API and ABI Versioning" msgstr "Versiones de API y ABI" -#: ../Doc/c-api/apiabiversion.rst:9 +#: ../Doc/c-api/apiabiversion.rst:11 +msgid "Build-time version constants" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:13 +#, fuzzy msgid "" "CPython exposes its version number in the following macros. Note that these " -"correspond to the version code is **built** with, not necessarily the " -"version used at **run time**." +"correspond to the version code is **built** with. See :c:var:`Py_Version` " +"for the version used at **run time**." msgstr "" "CPython expone su número de versión en las siguientes macros. Tenga en " "cuenta que estos corresponden a la versión con la que se **construye** el " "código, no necesariamente la versión utilizada en **tiempo de ejecución**." -#: ../Doc/c-api/apiabiversion.rst:13 +#: ../Doc/c-api/apiabiversion.rst:17 msgid "" "See :ref:`stable` for a discussion of API and ABI stability across versions." msgstr "" "Consulte :ref:`stable` para obtener una discusión sobre la estabilidad de " "API y ABI en todas las versiones." -#: ../Doc/c-api/apiabiversion.rst:17 +#: ../Doc/c-api/apiabiversion.rst:21 msgid "The ``3`` in ``3.4.1a2``." msgstr "El ``3`` en ``3.4.1a2``." -#: ../Doc/c-api/apiabiversion.rst:21 +#: ../Doc/c-api/apiabiversion.rst:25 msgid "The ``4`` in ``3.4.1a2``." msgstr "El ``4`` en ``3.4.1a2``." -#: ../Doc/c-api/apiabiversion.rst:25 +#: ../Doc/c-api/apiabiversion.rst:29 msgid "The ``1`` in ``3.4.1a2``." msgstr "El ``1`` en ``3.4.1a2``." -#: ../Doc/c-api/apiabiversion.rst:29 +#: ../Doc/c-api/apiabiversion.rst:33 msgid "" "The ``a`` in ``3.4.1a2``. This can be ``0xA`` for alpha, ``0xB`` for beta, " "``0xC`` for release candidate or ``0xF`` for final." @@ -64,145 +68,322 @@ msgstr "" "para la versión beta, ``0xC`` para la versión candidata o ``0xF`` para la " "versión final." -#: ../Doc/c-api/apiabiversion.rst:35 +#: ../Doc/c-api/apiabiversion.rst:39 msgid "The ``2`` in ``3.4.1a2``. Zero for final releases." msgstr "El ``2`` en ``3.4.1a2``, cero para lanzamientos finales." -#: ../Doc/c-api/apiabiversion.rst:39 -msgid "The Python version number encoded in a single integer." +#: ../Doc/c-api/apiabiversion.rst:43 +#, fuzzy +msgid "" +"The Python version number encoded in a single integer. See :c:func:" +"`Py_PACK_FULL_VERSION` for the encoding details." msgstr "El número de versión de Python codificado en un solo entero." -#: ../Doc/c-api/apiabiversion.rst:41 +#: ../Doc/c-api/apiabiversion.rst:46 +#, fuzzy msgid "" -"The underlying version information can be found by treating it as a 32 bit " -"number in the following manner:" +"Use this for numeric comparisons, for example, ``#if PY_VERSION_HEX >= ...``." msgstr "" -"La información de la versión subyacente se puede encontrar tratándola como " -"un número de 32 bits de la siguiente manera:" +"Use esto para comparaciones numéricas, por ejemplo ``#if PY_VERSION_HEX " +">= ...``." -#: ../Doc/c-api/apiabiversion.rst:45 -msgid "Bytes" -msgstr "Bytes" +#: ../Doc/c-api/apiabiversion.rst:51 +msgid "Run-time version" +msgstr "" -#: ../Doc/c-api/apiabiversion.rst:45 -msgid "Bits (big endian order)" -msgstr "Bits (orden *big-endian*)" +#: ../Doc/c-api/apiabiversion.rst:55 +#, fuzzy +msgid "" +"The Python runtime version number encoded in a single constant integer. See :" +"c:func:`Py_PACK_FULL_VERSION` for the encoding details. This contains the " +"Python version used at run time." +msgstr "" +"El número de versión de Python en tiempo de ejecución codificado en un único " +"entero constante, con el mismo formato que la macro :c:macro:" +"`PY_VERSION_HEX`. Contiene la versión de Python utilizada en tiempo de " +"ejecución." -#: ../Doc/c-api/apiabiversion.rst:45 -msgid "Meaning" -msgstr "Significado" +#: ../Doc/c-api/apiabiversion.rst:59 +#, fuzzy +msgid "" +"Use this for numeric comparisons, for example, ``if (Py_Version >= ...)``." +msgstr "" +"Use esto para comparaciones numéricas, por ejemplo ``#if PY_VERSION_HEX " +">= ...``." + +#: ../Doc/c-api/apiabiversion.rst:65 +msgid "Bit-packing macros" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:69 +msgid "" +"Return the given version, encoded as a single 32-bit integer with the " +"following structure:" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:75 +msgid "Argument" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:73 +msgid "No. of bits" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:75 +msgid "Bit mask" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:75 +msgid "Bit shift" +msgstr "" -#: ../Doc/c-api/apiabiversion.rst:45 -msgid "Value for ``3.4.1a2``" +#: ../Doc/c-api/apiabiversion.rst:73 +msgid "Example values" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:75 ../Doc/c-api/apiabiversion.rst:93 +#, fuzzy +msgid "``3.4.1a2``" msgstr "Valor para ``3.4.1a2``" -#: ../Doc/c-api/apiabiversion.rst:47 -msgid "1" -msgstr "1" +#: ../Doc/c-api/apiabiversion.rst:75 ../Doc/c-api/apiabiversion.rst:95 +#, fuzzy +msgid "``3.10.0``" +msgstr "``0x04``" + +#: ../Doc/c-api/apiabiversion.rst:77 +msgid "*major*" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:77 ../Doc/c-api/apiabiversion.rst:79 +#: ../Doc/c-api/apiabiversion.rst:81 +msgid "8" +msgstr "" -#: ../Doc/c-api/apiabiversion.rst:47 -msgid "1-8" -msgstr "1-8" +#: ../Doc/c-api/apiabiversion.rst:77 +#, fuzzy +msgid "``0xFF000000``" +msgstr "``0x04``" -#: ../Doc/c-api/apiabiversion.rst:47 -msgid "``PY_MAJOR_VERSION``" -msgstr "``PY_MAJOR_VERSION``" +#: ../Doc/c-api/apiabiversion.rst:77 +#, fuzzy +msgid "24" +msgstr "4" -#: ../Doc/c-api/apiabiversion.rst:47 +#: ../Doc/c-api/apiabiversion.rst:77 msgid "``0x03``" msgstr "``0x03``" -#: ../Doc/c-api/apiabiversion.rst:49 -msgid "2" -msgstr "2" +#: ../Doc/c-api/apiabiversion.rst:79 +msgid "*minor*" +msgstr "" -#: ../Doc/c-api/apiabiversion.rst:49 -msgid "9-16" -msgstr "9-16" +#: ../Doc/c-api/apiabiversion.rst:79 +#, fuzzy +msgid "``0x00FF0000``" +msgstr "``0x04``" -#: ../Doc/c-api/apiabiversion.rst:49 -msgid "``PY_MINOR_VERSION``" -msgstr "``PY_MINOR_VERSION``" +#: ../Doc/c-api/apiabiversion.rst:79 +#, fuzzy +msgid "16" +msgstr "9-16" -#: ../Doc/c-api/apiabiversion.rst:49 +#: ../Doc/c-api/apiabiversion.rst:79 msgid "``0x04``" msgstr "``0x04``" -#: ../Doc/c-api/apiabiversion.rst:51 -msgid "3" -msgstr "3" +#: ../Doc/c-api/apiabiversion.rst:79 +#, fuzzy +msgid "``0x0A``" +msgstr "``0xA``" -#: ../Doc/c-api/apiabiversion.rst:51 -msgid "17-24" -msgstr "17-24" +#: ../Doc/c-api/apiabiversion.rst:81 +msgid "*micro*" +msgstr "" -#: ../Doc/c-api/apiabiversion.rst:51 -msgid "``PY_MICRO_VERSION``" -msgstr "``PY_MICRO_VERSION``" +#: ../Doc/c-api/apiabiversion.rst:81 +#, fuzzy +msgid "``0x0000FF00``" +msgstr "``0x04``" -#: ../Doc/c-api/apiabiversion.rst:51 +#: ../Doc/c-api/apiabiversion.rst:81 msgid "``0x01``" msgstr "``0x01``" -#: ../Doc/c-api/apiabiversion.rst:53 +#: ../Doc/c-api/apiabiversion.rst:81 +#, fuzzy +msgid "``0x00``" +msgstr "``0x04``" + +#: ../Doc/c-api/apiabiversion.rst:83 +#, fuzzy +msgid "*release_level*" +msgstr "``PY_RELEASE_LEVEL``" + +#: ../Doc/c-api/apiabiversion.rst:83 ../Doc/c-api/apiabiversion.rst:85 msgid "4" msgstr "4" -#: ../Doc/c-api/apiabiversion.rst:53 -msgid "25-28" -msgstr "25-28" - -#: ../Doc/c-api/apiabiversion.rst:53 -msgid "``PY_RELEASE_LEVEL``" -msgstr "``PY_RELEASE_LEVEL``" +#: ../Doc/c-api/apiabiversion.rst:83 +#, fuzzy +msgid "``0x000000F0``" +msgstr "``0x04``" -#: ../Doc/c-api/apiabiversion.rst:53 +#: ../Doc/c-api/apiabiversion.rst:83 msgid "``0xA``" msgstr "``0xA``" -#: ../Doc/c-api/apiabiversion.rst:55 -msgid "29-32" -msgstr "29-32" +#: ../Doc/c-api/apiabiversion.rst:83 +#, fuzzy +msgid "``0xF``" +msgstr "``0xA``" -#: ../Doc/c-api/apiabiversion.rst:55 -msgid "``PY_RELEASE_SERIAL``" +#: ../Doc/c-api/apiabiversion.rst:85 +#, fuzzy +msgid "*release_serial*" msgstr "``PY_RELEASE_SERIAL``" -#: ../Doc/c-api/apiabiversion.rst:55 +#: ../Doc/c-api/apiabiversion.rst:85 +#, fuzzy +msgid "``0x0000000F``" +msgstr "``0x04``" + +#: ../Doc/c-api/apiabiversion.rst:85 +msgid "0" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:85 msgid "``0x2``" msgstr "``0x2``" -#: ../Doc/c-api/apiabiversion.rst:58 +#: ../Doc/c-api/apiabiversion.rst:85 +#, fuzzy +msgid "``0x0``" +msgstr "``0x04``" + +#: ../Doc/c-api/apiabiversion.rst:88 +msgid "For example:" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:91 +msgid "Version" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:91 +msgid "``Py_PACK_FULL_VERSION`` arguments" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:91 +msgid "Encoded version" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:93 +msgid "``(3, 4, 1, 0xA, 2)``" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:93 +#, fuzzy +msgid "``0x030401a2``" +msgstr "``0x04``" + +#: ../Doc/c-api/apiabiversion.rst:95 +msgid "``(3, 10, 0, 0xF, 0)``" +msgstr "" + +#: ../Doc/c-api/apiabiversion.rst:95 +#, fuzzy +msgid "``0x030a00f0``" +msgstr "``0x03``" + +#: ../Doc/c-api/apiabiversion.rst:98 msgid "" -"Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is hexversion " -"``0x030a00f0``." +"Out-of range bits in the arguments are ignored. That is, the macro can be " +"defined as:" msgstr "" -"Así, ``3.4.1a2`` es la hexadecimal ``0x030401a2`` y ``3.10.0`` es la " -"hexadecimal ``0x030a00f0``." -#: ../Doc/c-api/apiabiversion.rst:61 -msgid "Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``." +#: ../Doc/c-api/apiabiversion.rst:101 +msgid "" +"#ifndef Py_PACK_FULL_VERSION\n" +"#define Py_PACK_FULL_VERSION(X, Y, Z, LEVEL, SERIAL) ( \\\n" +" (((X) & 0xff) << 24) | \\\n" +" (((Y) & 0xff) << 16) | \\\n" +" (((Z) & 0xff) << 8) | \\\n" +" (((LEVEL) & 0xf) << 4) | \\\n" +" (((SERIAL) & 0xf) << 0))\n" +"#endif" msgstr "" -"Use esto para comparaciones numéricas, por ejemplo ``#if PY_VERSION_HEX " -">= ...``." -#: ../Doc/c-api/apiabiversion.rst:63 -msgid "This version is also available via the symbol :c:var:`Py_Version`." +#: ../Doc/c-api/apiabiversion.rst:112 +msgid "" +"``Py_PACK_FULL_VERSION`` is primarily a macro, intended for use in ``#if`` " +"directives, but it is also available as an exported function." msgstr "" -"Esta versión también está disponible a través del símbolo :c:var:" -"`Py_Version`." -#: ../Doc/c-api/apiabiversion.rst:67 +#: ../Doc/c-api/apiabiversion.rst:119 msgid "" -"The Python runtime version number encoded in a single constant integer, with " -"the same format as the :c:macro:`PY_VERSION_HEX` macro. This contains the " -"Python version used at run time." +"Equivalent to ``Py_PACK_FULL_VERSION(major, minor, 0, 0, 0)``. The result " +"does not correspond to any Python release, but is useful in numeric " +"comparisons." msgstr "" -"El número de versión de Python en tiempo de ejecución codificado en un único " -"entero constante, con el mismo formato que la macro :c:macro:" -"`PY_VERSION_HEX`. Contiene la versión de Python utilizada en tiempo de " -"ejecución." -#: ../Doc/c-api/apiabiversion.rst:73 -msgid "All the given macros are defined in :source:`Include/patchlevel.h`." -msgstr "Todas las macros dadas se definen en :source:`Include/patchlevel.h`." +#~ msgid "" +#~ "The underlying version information can be found by treating it as a 32 " +#~ "bit number in the following manner:" +#~ msgstr "" +#~ "La información de la versión subyacente se puede encontrar tratándola " +#~ "como un número de 32 bits de la siguiente manera:" + +#~ msgid "Bytes" +#~ msgstr "Bytes" + +#~ msgid "Bits (big endian order)" +#~ msgstr "Bits (orden *big-endian*)" + +#~ msgid "Meaning" +#~ msgstr "Significado" + +#~ msgid "1" +#~ msgstr "1" + +#~ msgid "1-8" +#~ msgstr "1-8" + +#~ msgid "``PY_MAJOR_VERSION``" +#~ msgstr "``PY_MAJOR_VERSION``" + +#~ msgid "2" +#~ msgstr "2" + +#~ msgid "``PY_MINOR_VERSION``" +#~ msgstr "``PY_MINOR_VERSION``" + +#~ msgid "3" +#~ msgstr "3" + +#~ msgid "17-24" +#~ msgstr "17-24" + +#~ msgid "``PY_MICRO_VERSION``" +#~ msgstr "``PY_MICRO_VERSION``" + +#~ msgid "25-28" +#~ msgstr "25-28" + +#~ msgid "29-32" +#~ msgstr "29-32" + +#~ msgid "" +#~ "Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is " +#~ "hexversion ``0x030a00f0``." +#~ msgstr "" +#~ "Así, ``3.4.1a2`` es la hexadecimal ``0x030401a2`` y ``3.10.0`` es la " +#~ "hexadecimal ``0x030a00f0``." + +#~ msgid "This version is also available via the symbol :c:var:`Py_Version`." +#~ msgstr "" +#~ "Esta versión también está disponible a través del símbolo :c:var:" +#~ "`Py_Version`." + +#~ msgid "All the given macros are defined in :source:`Include/patchlevel.h`." +#~ msgstr "" +#~ "Todas las macros dadas se definen en :source:`Include/patchlevel.h`." diff --git a/c-api/arg.po b/c-api/arg.po index a3c968b094..5b728b4926 100644 --- a/c-api/arg.po +++ b/c-api/arg.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2021-10-30 19:57-0300\n" "Last-Translator: Cristián Maureira-Fredes \n" "Language: es\n" @@ -19,15 +19,16 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/arg.rst:6 msgid "Parsing arguments and building values" msgstr "Analizando argumentos y construyendo valores" #: ../Doc/c-api/arg.rst:8 +#, fuzzy msgid "" -"These functions are useful when creating your own extensions functions and " +"These functions are useful when creating your own extension functions and " "methods. Additional information and examples are available in :ref:" "`extending-index`." msgstr "" @@ -87,8 +88,8 @@ msgid "" msgstr "" "En Python 3.12 y versiones anteriores, la macro :c:macro:`!PY_SSIZE_T_CLEAN` " "debe estar definida antes de incluir :file:`Python.h` para usar todas las " -"variantes ``#`` de formatos (``s#``, ``y#``, etc.) explicadas a continuación. " -"Esto no es necesario en Python 3.13 y versiones posteriores." +"variantes ``#`` de formatos (``s#``, ``y#``, etc.) explicadas a " +"continuación. Esto no es necesario en Python 3.13 y versiones posteriores." #: ../Doc/c-api/arg.rst:42 msgid "" @@ -107,7 +108,9 @@ msgstr "" #: ../Doc/c-api/arg.rst:48 msgid "There are three ways strings and buffers can be converted to C:" -msgstr "Hay tres formas en que las cadenas de caracteres y los búferes pueden convertirse a C:" +msgstr "" +"Hay tres formas en que las cadenas de caracteres y los búferes pueden " +"convertirse a C:" #: ../Doc/c-api/arg.rst:50 #, fuzzy @@ -133,9 +136,9 @@ msgid "" "**You have to call** :c:func:`PyMem_Free` after you have finished processing " "the data (or in any early abort case)." msgstr "" -"Los formatos ``es``, ``es#``, ``et`` y ``et#`` asignan el búfer de resultado. " -"**Debe llamar** :c:func:`PyMem_Free` después de haber terminado de procesar " -"los datos (o en cualquier caso de aborto temprano)." +"Los formatos ``es``, ``es#``, ``et`` y ``et#`` asignan el búfer de " +"resultado. **Debe llamar** :c:func:`PyMem_Free` después de haber terminado " +"de procesar los datos (o en cualquier caso de aborto temprano)." #: ../Doc/c-api/arg.rst:63 msgid "" @@ -147,10 +150,10 @@ msgid "" msgstr "" "Otros formatos toman un :class:`str` o un :term:`objeto de tipo bytes ` de solo lectura, como :class:`bytes`, y proporcionan un " -"puntero ``const char *`` a su búfer. En este caso el búfer es \"prestado\" " -"(*borrowed*): es gestionado por el objeto Python correspondiente y comparte " -"el tiempo de vida de este objeto. No tendrá que liberar ninguna memoria " -"usted mismo." +"puntero ``const char *`` a su búfer. En este caso el búfer es " +"\"prestado\" (*borrowed*): es gestionado por el objeto Python " +"correspondiente y comparte el tiempo de vida de este objeto. No tendrá que " +"liberar ninguna memoria usted mismo." #: ../Doc/c-api/arg.rst:70 msgid "" @@ -160,10 +163,10 @@ msgid "" "read-only objects such as :class:`memoryview` of :class:`bytes`." msgstr "" "Para asegurar que el búfer subyacente pueda ser prestado de forma segura, el " -"campo :c:member:`PyBufferProcs.bf_releasebuffer` del objeto debe ser ``NULL``. " -"Esto desautoriza objetos mutables comunes como :class:`bytearray`, pero " -"también algunos objetos de solo lectura como :class:`memoryview` de :class:" -"`bytes`." +"campo :c:member:`PyBufferProcs.bf_releasebuffer` del objeto debe ser " +"``NULL``. Esto desautoriza objetos mutables comunes como :class:`bytearray`, " +"pero también algunos objetos de solo lectura como :class:`memoryview` de :" +"class:`bytes`." #: ../Doc/c-api/arg.rst:76 msgid "" @@ -175,7 +178,7 @@ msgstr "" "comprobar si el objeto de entrada es inmutable (por ejemplo, si respetaría " "una solicitud de un búfer escribible, o si otro hilo puede mutar los datos)." -#: ../Doc/c-api/arg.rst:98 +#: ../Doc/c-api/arg.rst:80 msgid "``s`` (:class:`str`) [const char \\*]" msgstr "``s`` (:class:`str`) [const char \\*]" @@ -217,7 +220,7 @@ msgstr "" "Anteriormente, :exc:`TypeError` se lanzó cuando se encontraron puntos de " "código nulos incrustados en la cadena de caracteres de Python." -#: ../Doc/c-api/arg.rst:104 +#: ../Doc/c-api/arg.rst:100 msgid "``s*`` (:class:`str` or :term:`bytes-like object`) [Py_buffer]" msgstr "``s*`` (:class:`str` o :term:`bytes-like object`) [Py_buffer]" @@ -234,7 +237,7 @@ msgstr "" "NUL embebidos. Los objetos Unicode se convierten en cadenas de caracteres C " "utilizando codificación ``'utf-8'``." -#: ../Doc/c-api/arg.rst:111 +#: ../Doc/c-api/arg.rst:106 msgid "" "``s#`` (:class:`str`, read-only :term:`bytes-like object`) [const char \\*, :" "c:type:`Py_ssize_t`]" @@ -257,7 +260,7 @@ msgstr "" "contener caracteres nulos incrustados. Los objetos Unicode se convierten en " "cadenas de caracteres C utilizando codificación ``'utf-8'``." -#: ../Doc/c-api/arg.rst:115 ../Doc/c-api/arg.rst:582 +#: ../Doc/c-api/arg.rst:113 ../Doc/c-api/arg.rst:614 msgid "``z`` (:class:`str` or ``None``) [const char \\*]" msgstr "``z`` (:class:`str` o ``None``) [const char \\*]" @@ -269,7 +272,7 @@ msgstr "" "Como ``s``, pero el objeto Python también puede ser ``None``, en cuyo caso " "el puntero C se establece en ``NULL``." -#: ../Doc/c-api/arg.rst:119 +#: ../Doc/c-api/arg.rst:117 msgid "" "``z*`` (:class:`str`, :term:`bytes-like object` or ``None``) [Py_buffer]" msgstr "" @@ -284,7 +287,7 @@ msgstr "" "el miembro de ``buf`` de la estructura :c:type:`Py_buffer` se establece en " "``NULL``." -#: ../Doc/c-api/arg.rst:123 +#: ../Doc/c-api/arg.rst:121 msgid "" "``z#`` (:class:`str`, read-only :term:`bytes-like object` or ``None``) " "[const char \\*, :c:type:`Py_ssize_t`]" @@ -300,7 +303,7 @@ msgstr "" "Como ``s#``, pero el objeto Python también puede ser ``None``, en cuyo caso " "el puntero C se establece en ``NULL``." -#: ../Doc/c-api/arg.rst:134 +#: ../Doc/c-api/arg.rst:125 msgid "``y`` (read-only :term:`bytes-like object`) [const char \\*]" msgstr "``y`` (:term:`bytes-like object` de sólo lectura) [const char \\*]" @@ -325,7 +328,7 @@ msgstr "" "Anteriormente, :exc:`TypeError` se lanzó cuando bytes nulos incrustados se " "encontraron en el buffer de bytes." -#: ../Doc/c-api/arg.rst:139 +#: ../Doc/c-api/arg.rst:136 msgid "``y*`` (:term:`bytes-like object`) [Py_buffer]" msgstr "``y*`` (:term:`bytes-like object`) [Py_buffer]" @@ -337,7 +340,7 @@ msgstr "" "Esta variante de ``s*`` no acepta objetos Unicode, solamente los objetos de " "tipo bytes. **Esta es la forma recomendada para aceptar datos binarios.**" -#: ../Doc/c-api/arg.rst:143 +#: ../Doc/c-api/arg.rst:141 msgid "" "``y#`` (read-only :term:`bytes-like object`) [const char \\*, :c:type:" "`Py_ssize_t`]" @@ -353,7 +356,7 @@ msgstr "" "Esta variante en ``s#`` no acepta objetos Unicode, solo objetos similares a " "bytes." -#: ../Doc/c-api/arg.rst:148 +#: ../Doc/c-api/arg.rst:145 msgid "``S`` (:class:`bytes`) [PyBytesObject \\*]" msgstr "``S`` (:class:`bytes`) [PyBytesObject \\*]" @@ -368,7 +371,7 @@ msgstr "" "ninguna conversión. Lanza :exc:`TypeError` si el objeto no es un objeto " "bytes. La variable C también puede ser declarado como :c:type:`PyObject*`." -#: ../Doc/c-api/arg.rst:153 +#: ../Doc/c-api/arg.rst:150 msgid "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" msgstr "``Y`` (:class:`bytearray`) [PyByteArrayObject \\*]" @@ -385,7 +388,7 @@ msgstr "" "class:`bytearray`. La variable C también puede ser declarada como :c:type:" "`PyObject*`." -#: ../Doc/c-api/arg.rst:158 +#: ../Doc/c-api/arg.rst:155 msgid "``U`` (:class:`str`) [PyObject \\*]" msgstr "``U`` (:class:`str`) [PyObject \\*]" @@ -400,7 +403,7 @@ msgstr "" "conversión. Lanza :exc:`TypeError` si el objeto no es un objeto Unicode. La " "variable C también puede ser declarada como :c:type:`PyObject*`." -#: ../Doc/c-api/arg.rst:164 +#: ../Doc/c-api/arg.rst:160 msgid "``w*`` (read-write :term:`bytes-like object`) [Py_buffer]" msgstr "``w*`` (:term:`bytes-like object` de lectura y escritura) [Py_buffer]" @@ -416,7 +419,7 @@ msgstr "" "quien llama. El búfer puede contener bytes nulos incrustados. Quien llama " "tiene que llamar :c:func:`PyBuffer_Release` cuando termina con el búfer." -#: ../Doc/c-api/arg.rst:181 +#: ../Doc/c-api/arg.rst:166 msgid "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" msgstr "``es`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer]" @@ -460,7 +463,7 @@ msgstr "" "el nuevo almacenamiento asignado. Quien llama es responsable para llamar :c:" "func:`PyMem_Free` para liberar el búfer asignado después de su uso." -#: ../Doc/c-api/arg.rst:186 +#: ../Doc/c-api/arg.rst:183 msgid "" "``et`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer]" @@ -479,7 +482,7 @@ msgstr "" "objeto de cadena de caracteres de bytes utiliza la codificación que se pasa " "como parámetro." -#: ../Doc/c-api/arg.rst:217 +#: ../Doc/c-api/arg.rst:188 msgid "" "``es#`` (:class:`str`) [const char \\*encoding, char \\*\\*buffer, :c:type:" "`Py_ssize_t` \\*buffer_length]" @@ -561,7 +564,7 @@ msgstr "" "En ambos casos, *\\*buffer_length* se establece a la longitud de los datos " "codificados sin el byte NUL final." -#: ../Doc/c-api/arg.rst:222 +#: ../Doc/c-api/arg.rst:219 msgid "" "``et#`` (:class:`str`, :class:`bytes` or :class:`bytearray`) [const char " "\\*encoding, char \\*\\*buffer, :c:type:`Py_ssize_t` \\*buffer_length]" @@ -592,46 +595,63 @@ msgstr "" msgid "Numbers" msgstr "Números" -#: ../Doc/c-api/arg.rst:234 +#: ../Doc/c-api/arg.rst:232 +msgid "" +"These formats allow representing Python numbers or single characters as C " +"numbers. Formats that require :class:`int`, :class:`float` or :class:" +"`complex` can also use the corresponding special methods :meth:`~object." +"__index__`, :meth:`~object.__float__` or :meth:`~object.__complex__` to " +"convert the Python object to the required type." +msgstr "" + +#: ../Doc/c-api/arg.rst:238 +msgid "" +"For signed integer formats, :exc:`OverflowError` is raised if the value is " +"out of range for the C type. For unsigned integer formats, no range checking " +"is done --- the most significant bits are silently truncated when the " +"receiving field is too small to receive the value." +msgstr "" + +#: ../Doc/c-api/arg.rst:244 msgid "``b`` (:class:`int`) [unsigned char]" msgstr "``b`` (:class:`int`) [unsigned char]" -#: ../Doc/c-api/arg.rst:233 +#: ../Doc/c-api/arg.rst:245 #, fuzzy msgid "" -"Convert a nonnegative Python integer to an unsigned tiny int, stored in a C :" -"c:expr:`unsigned char`." +"Convert a nonnegative Python integer to an unsigned tiny integer, stored in " +"a C :c:expr:`unsigned char`." msgstr "" "Convierte un entero de Python no negativo en un pequeño int sin signo, " "almacenado en un :c:type:`unsigned char` de C." -#: ../Doc/c-api/arg.rst:238 ../Doc/c-api/arg.rst:616 +#: ../Doc/c-api/arg.rst:248 ../Doc/c-api/arg.rst:648 msgid "``B`` (:class:`int`) [unsigned char]" msgstr "``B`` (:class:`int`) [unsigned char]" -#: ../Doc/c-api/arg.rst:237 +#: ../Doc/c-api/arg.rst:249 #, fuzzy msgid "" -"Convert a Python integer to a tiny int without overflow checking, stored in " -"a C :c:expr:`unsigned char`." +"Convert a Python integer to a tiny integer without overflow checking, stored " +"in a C :c:expr:`unsigned char`." msgstr "" "Convierte un entero de Python en un pequeño int sin comprobación de " "desbordamiento, almacenado en un :c:type:`unsigned char` de C." -#: ../Doc/c-api/arg.rst:241 ../Doc/c-api/arg.rst:610 +#: ../Doc/c-api/arg.rst:252 ../Doc/c-api/arg.rst:642 msgid "``h`` (:class:`int`) [short int]" msgstr "``h`` (:class:`int`) [short int]" -#: ../Doc/c-api/arg.rst:241 +#: ../Doc/c-api/arg.rst:253 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`short int`." msgstr "Convierte un entero de Python a un :c:type:`short int` de C." -#: ../Doc/c-api/arg.rst:245 ../Doc/c-api/arg.rst:619 +#: ../Doc/c-api/arg.rst:255 ../Doc/c-api/arg.rst:651 msgid "``H`` (:class:`int`) [unsigned short int]" msgstr "``H`` (:class:`int`) [unsigned short int]" -#: ../Doc/c-api/arg.rst:244 +#: ../Doc/c-api/arg.rst:256 #, fuzzy msgid "" "Convert a Python integer to a C :c:expr:`unsigned short int`, without " @@ -640,20 +660,20 @@ msgstr "" "Convierte un entero de Python a un :c:type:`unsigned short int` de C, sin " "verificación de desbordamiento." -#: ../Doc/c-api/arg.rst:248 ../Doc/c-api/arg.rst:604 +#: ../Doc/c-api/arg.rst:259 ../Doc/c-api/arg.rst:636 msgid "``i`` (:class:`int`) [int]" msgstr "``i`` (:class:`int`) [int]" -#: ../Doc/c-api/arg.rst:248 +#: ../Doc/c-api/arg.rst:260 #, fuzzy msgid "Convert a Python integer to a plain C :c:expr:`int`." msgstr "Convierte un entero Python a un :c:type:`int` de C plano." -#: ../Doc/c-api/arg.rst:252 ../Doc/c-api/arg.rst:622 +#: ../Doc/c-api/arg.rst:262 ../Doc/c-api/arg.rst:654 msgid "``I`` (:class:`int`) [unsigned int]" msgstr "``I`` (:class:`int`) [unsigned int]" -#: ../Doc/c-api/arg.rst:251 +#: ../Doc/c-api/arg.rst:263 #, fuzzy msgid "" "Convert a Python integer to a C :c:expr:`unsigned int`, without overflow " @@ -662,20 +682,20 @@ msgstr "" "Convierte un entero de Python a un :c:type:`unsigned int` de C, sin " "verificación de desbordamiento." -#: ../Doc/c-api/arg.rst:255 ../Doc/c-api/arg.rst:613 +#: ../Doc/c-api/arg.rst:266 ../Doc/c-api/arg.rst:645 msgid "``l`` (:class:`int`) [long int]" msgstr "``l`` (:class:`int`) [long int]" -#: ../Doc/c-api/arg.rst:255 +#: ../Doc/c-api/arg.rst:267 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`long int`." msgstr "Convierte un entero Python a un :c:type:`long int` de C." -#: ../Doc/c-api/arg.rst:259 ../Doc/c-api/arg.rst:625 +#: ../Doc/c-api/arg.rst:269 ../Doc/c-api/arg.rst:657 msgid "``k`` (:class:`int`) [unsigned long]" msgstr "``k`` (:class:`int`) [unsigned long]" -#: ../Doc/c-api/arg.rst:258 +#: ../Doc/c-api/arg.rst:270 #, fuzzy msgid "" "Convert a Python integer to a C :c:expr:`unsigned long` without overflow " @@ -684,20 +704,24 @@ msgstr "" "Convierte un entero de Python a un :c:type:`unsigned long` de C, sin " "verificación de desbordamiento." -#: ../Doc/c-api/arg.rst:262 ../Doc/c-api/arg.rst:628 +#: ../Doc/c-api/arg.rst:273 ../Doc/c-api/arg.rst:283 +msgid "Use :meth:`~object.__index__` if available." +msgstr "" + +#: ../Doc/c-api/arg.rst:276 ../Doc/c-api/arg.rst:660 msgid "``L`` (:class:`int`) [long long]" msgstr "``L`` (:class:`int`) [long long]" -#: ../Doc/c-api/arg.rst:262 +#: ../Doc/c-api/arg.rst:277 #, fuzzy msgid "Convert a Python integer to a C :c:expr:`long long`." msgstr "Convierte un entero de Python a un :c:type:`long long` de C." -#: ../Doc/c-api/arg.rst:266 ../Doc/c-api/arg.rst:631 +#: ../Doc/c-api/arg.rst:279 ../Doc/c-api/arg.rst:665 msgid "``K`` (:class:`int`) [unsigned long long]" msgstr "``K`` (:class:`int`) [unsigned long long]" -#: ../Doc/c-api/arg.rst:265 +#: ../Doc/c-api/arg.rst:280 #, fuzzy msgid "" "Convert a Python integer to a C :c:expr:`unsigned long long` without " @@ -706,20 +730,20 @@ msgstr "" "Convierte un entero de Python a un :c:type:`unsigned long long` de C, sin " "verificación de desbordamiento." -#: ../Doc/c-api/arg.rst:269 ../Doc/c-api/arg.rst:634 +#: ../Doc/c-api/arg.rst:286 ../Doc/c-api/arg.rst:668 #, fuzzy msgid "``n`` (:class:`int`) [:c:type:`Py_ssize_t`]" msgstr "``n`` (:class:`int`) [Py_ssize_t]" -#: ../Doc/c-api/arg.rst:269 +#: ../Doc/c-api/arg.rst:287 msgid "Convert a Python integer to a C :c:type:`Py_ssize_t`." msgstr "Convierte un entero de Python a un :c:type:`Py_ssize_t` de C." -#: ../Doc/c-api/arg.rst:276 +#: ../Doc/c-api/arg.rst:289 msgid "``c`` (:class:`bytes` or :class:`bytearray` of length 1) [char]" msgstr "``c`` (:class:`bytes` o :class:`bytearray` de largo 1) [char]" -#: ../Doc/c-api/arg.rst:272 +#: ../Doc/c-api/arg.rst:290 #, fuzzy msgid "" "Convert a Python byte, represented as a :class:`bytes` or :class:`bytearray` " @@ -728,15 +752,15 @@ msgstr "" "Convierte un byte de Python, representado como un objeto :class:`bytes` o :" "class:`bytearray` de longitud 1, a un :c:type:`char` de C." -#: ../Doc/c-api/arg.rst:275 +#: ../Doc/c-api/arg.rst:293 msgid "Allow :class:`bytearray` objects." msgstr "Permite objetos :class:`bytearray`." -#: ../Doc/c-api/arg.rst:280 ../Doc/c-api/arg.rst:642 +#: ../Doc/c-api/arg.rst:296 ../Doc/c-api/arg.rst:686 msgid "``C`` (:class:`str` of length 1) [int]" msgstr "``C`` (:class:`str` de largo 1) [int]" -#: ../Doc/c-api/arg.rst:279 +#: ../Doc/c-api/arg.rst:297 #, fuzzy msgid "" "Convert a Python character, represented as a :class:`str` object of length " @@ -745,45 +769,45 @@ msgstr "" "Convierte un carácter Python, representado como un objeto :class:`str` de " "longitud 1, a un tipo :c:type:`int` de C." -#: ../Doc/c-api/arg.rst:283 ../Doc/c-api/arg.rst:648 +#: ../Doc/c-api/arg.rst:300 ../Doc/c-api/arg.rst:693 msgid "``f`` (:class:`float`) [float]" msgstr "``f`` (:class:`float`) [float]" -#: ../Doc/c-api/arg.rst:283 +#: ../Doc/c-api/arg.rst:301 #, fuzzy msgid "Convert a Python floating-point number to a C :c:expr:`float`." msgstr "" "Convierte un número de punto flotante de Python a un :c:type:`float` de C." -#: ../Doc/c-api/arg.rst:286 ../Doc/c-api/arg.rst:645 +#: ../Doc/c-api/arg.rst:303 ../Doc/c-api/arg.rst:690 msgid "``d`` (:class:`float`) [double]" msgstr "``d`` (:class:`float`) [double]" -#: ../Doc/c-api/arg.rst:286 +#: ../Doc/c-api/arg.rst:304 #, fuzzy msgid "Convert a Python floating-point number to a C :c:expr:`double`." msgstr "" "Convierte un número de punto flotante de Python a un :c:type:`double` de C." -#: ../Doc/c-api/arg.rst:289 +#: ../Doc/c-api/arg.rst:306 msgid "``D`` (:class:`complex`) [Py_complex]" msgstr "``D`` (:class:`complex`) [Py_complex]" -#: ../Doc/c-api/arg.rst:289 +#: ../Doc/c-api/arg.rst:307 msgid "Convert a Python complex number to a C :c:type:`Py_complex` structure." msgstr "" "Convierte un número complejo de Python en una estructura :c:type:" "`Py_complex` de C." -#: ../Doc/c-api/arg.rst:292 +#: ../Doc/c-api/arg.rst:310 msgid "Other objects" msgstr "Otros objetos" -#: ../Doc/c-api/arg.rst:299 ../Doc/c-api/arg.rst:661 +#: ../Doc/c-api/arg.rst:312 ../Doc/c-api/arg.rst:699 msgid "``O`` (object) [PyObject \\*]" msgstr "``O`` (object) [PyObject \\*]" -#: ../Doc/c-api/arg.rst:295 +#: ../Doc/c-api/arg.rst:313 #, fuzzy msgid "" "Store a Python object (without any conversion) in a C object pointer. The C " @@ -795,11 +819,11 @@ msgstr "" "C. El programa C recibe así el objeto real que se pasó. El recuento de " "referencia del objeto no aumenta. El puntero almacenado no es ``NULL``." -#: ../Doc/c-api/arg.rst:306 +#: ../Doc/c-api/arg.rst:319 msgid "``O!`` (object) [*typeobject*, PyObject \\*]" msgstr "``O!`` (object) [*typeobject*, PyObject \\*]" -#: ../Doc/c-api/arg.rst:302 +#: ../Doc/c-api/arg.rst:320 #, fuzzy msgid "" "Store a Python object in a C object pointer. This is similar to ``O``, but " @@ -814,11 +838,12 @@ msgstr "" "`PyObject*`) en el que se almacena el puntero del objeto. Si el objeto " "Python no tiene el tipo requerido, se lanza :exc:`TypeError`." -#: ../Doc/c-api/arg.rst:331 ../Doc/c-api/arg.rst:675 -msgid "``O&`` (object) [*converter*, *anything*]" +#: ../Doc/c-api/arg.rst:328 +#, fuzzy +msgid "``O&`` (object) [*converter*, *address*]" msgstr "``O&`` (object) [*converter*, *anything*]" -#: ../Doc/c-api/arg.rst:311 +#: ../Doc/c-api/arg.rst:329 #, fuzzy msgid "" "Convert a Python object to a C variable through a *converter* function. " @@ -832,11 +857,11 @@ msgstr "" "a :c:type:`void *`. La función *converter* a su vez se llama de la siguiente " "manera::" -#: ../Doc/c-api/arg.rst:316 +#: ../Doc/c-api/arg.rst:334 msgid "status = converter(object, address);" msgstr "" -#: ../Doc/c-api/arg.rst:318 +#: ../Doc/c-api/arg.rst:336 #, fuzzy msgid "" "where *object* is the Python object to be converted and *address* is the :c:" @@ -852,13 +877,14 @@ msgstr "" "la conversión ha fallado. Cuando la conversión falla, la función *converter* " "debería lanzar una excepción y dejar el contenido de *address* sin modificar." -#: ../Doc/c-api/arg.rst:324 +#: ../Doc/c-api/arg.rst:345 +#, fuzzy msgid "" -"If the *converter* returns ``Py_CLEANUP_SUPPORTED``, it may get called a " -"second time if the argument parsing eventually fails, giving the converter a " -"chance to release any memory that it had already allocated. In this second " -"call, the *object* parameter will be ``NULL``; *address* will have the same " -"value as in the original call." +"If the *converter* returns :c:macro:`!Py_CLEANUP_SUPPORTED`, it may get " +"called a second time if the argument parsing eventually fails, giving the " +"converter a chance to release any memory that it had already allocated. In " +"this second call, the *object* parameter will be ``NULL``; *address* will " +"have the same value as in the original call." msgstr "" "Si el *converter* retorna ``Py_CLEANUP_SUPPORTED``, se puede llamar por " "segunda vez si el análisis del argumento finalmente falla, dando al " @@ -866,15 +892,22 @@ msgstr "" "asignado. En esta segunda llamada, el parámetro *object* será ``NULL``; " "*address* tendrá el mismo valor que en la llamada original." -#: ../Doc/c-api/arg.rst:330 -msgid "``Py_CLEANUP_SUPPORTED`` was added." +#: ../Doc/c-api/arg.rst:351 +msgid "" +"Examples of converters: :c:func:`PyUnicode_FSConverter` and :c:func:" +"`PyUnicode_FSDecoder`." +msgstr "" + +#: ../Doc/c-api/arg.rst:354 +#, fuzzy +msgid ":c:macro:`!Py_CLEANUP_SUPPORTED` was added." msgstr "``Py_CLEANUP_SUPPORTED`` fue agregada." -#: ../Doc/c-api/arg.rst:340 +#: ../Doc/c-api/arg.rst:357 ../Doc/c-api/arg.rst:671 msgid "``p`` (:class:`bool`) [int]" msgstr "``p`` (:class:`bool`) [int]" -#: ../Doc/c-api/arg.rst:334 +#: ../Doc/c-api/arg.rst:358 msgid "" "Tests the value passed in for truth (a boolean **p**\\ redicate) and " "converts the result to its equivalent C true/false integer value. Sets the " @@ -888,38 +921,45 @@ msgstr "" "Esto acepta cualquier valor válido de Python. Consulte :ref:`truth` para " "obtener más información sobre cómo Python prueba los valores por verdad." -#: ../Doc/c-api/arg.rst:345 ../Doc/c-api/arg.rst:678 -msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +#: ../Doc/c-api/arg.rst:366 +#, fuzzy +msgid "``(items)`` (sequence) [*matching-items*]" msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" -#: ../Doc/c-api/arg.rst:343 +#: ../Doc/c-api/arg.rst:367 +#, fuzzy msgid "" -"The object must be a Python sequence whose length is the number of format " -"units in *items*. The C arguments must correspond to the individual format " -"units in *items*. Format units for sequences may be nested." +"The object must be a Python sequence (except :class:`str`, :class:`bytes` " +"or :class:`bytearray`) whose length is the number of format units in " +"*items*. The C arguments must correspond to the individual format units in " +"*items*. Format units for sequences may be nested." msgstr "" "El objeto debe ser una secuencia de Python cuya longitud es el número de " "unidades de formato en *items*. Los argumentos C deben corresponder a las " "unidades de formato individuales en *items*. Las unidades de formato para " "secuencias pueden estar anidadas." -#: ../Doc/c-api/arg.rst:347 -#, fuzzy +#: ../Doc/c-api/arg.rst:372 +msgid "" +"If *items* contains format units which store a :ref:`borrowed buffer ` (``s``, ``s#``, ``z``, ``z#``, ``y``, or ``y#``) or a :" +"term:`borrowed reference` (``S``, ``Y``, ``U``, ``O``, or ``O!``), the " +"object must be a Python tuple. The *converter* for the ``O&`` format unit in " +"*items* must not store a borrowed buffer or a borrowed reference." +msgstr "" + +#: ../Doc/c-api/arg.rst:379 +msgid "" +":class:`str` and :class:`bytearray` objects no longer accepted as a sequence." +msgstr "" + +#: ../Doc/c-api/arg.rst:382 msgid "" -"It is possible to pass \"long\" integers (integers whose value exceeds the " -"platform's :c:macro:`LONG_MAX`) however no proper range checking is done --- " -"the most significant bits are silently truncated when the receiving field is " -"too small to receive the value (actually, the semantics are inherited from " -"downcasts in C --- your mileage may vary)." +"Non-tuple sequences are deprecated if *items* contains format units which " +"store a borrowed buffer or a borrowed reference." msgstr "" -"Es posible pasar enteros \"largos\" (enteros cuyo valor excede el de la " -"plataforma :const:`LONG_MAX`), sin embargo, no se realiza una verificación " -"de rango adecuada --- los bits más significativos se truncan silenciosamente " -"cuando el campo receptor es demasiado pequeño para recibir el valor (en " -"realidad, la semántica se hereda de las descargas en C --- su kilometraje " -"puede variar)." -#: ../Doc/c-api/arg.rst:353 +#: ../Doc/c-api/arg.rst:386 msgid "" "A few other characters have a meaning in a format string. These may not " "occur inside nested parentheses. They are:" @@ -927,11 +967,11 @@ msgstr "" "Algunos otros caracteres tienen un significado en una cadena de formato. " "Esto puede no ocurrir dentro de paréntesis anidados. Son:" -#: ../Doc/c-api/arg.rst:361 +#: ../Doc/c-api/arg.rst:389 msgid "``|``" msgstr "``|``" -#: ../Doc/c-api/arg.rst:357 +#: ../Doc/c-api/arg.rst:390 msgid "" "Indicates that the remaining arguments in the Python argument list are " "optional. The C variables corresponding to optional arguments should be " @@ -945,11 +985,11 @@ msgstr "" "argumento opcional, :c:func:`PyArg_ParseTuple` no toca el contenido de las " "variables C correspondientes." -#: ../Doc/c-api/arg.rst:370 +#: ../Doc/c-api/arg.rst:396 msgid "``$``" msgstr "``$``" -#: ../Doc/c-api/arg.rst:364 +#: ../Doc/c-api/arg.rst:397 msgid "" ":c:func:`PyArg_ParseTupleAndKeywords` only: Indicates that the remaining " "arguments in the Python argument list are keyword-only. Currently, all " @@ -962,11 +1002,11 @@ msgstr "" "argumentos opcionales, por lo que ``|`` siempre debe especificarse antes de " "``$`` en la cadena de formato." -#: ../Doc/c-api/arg.rst:375 +#: ../Doc/c-api/arg.rst:405 msgid "``:``" msgstr "``:``" -#: ../Doc/c-api/arg.rst:373 +#: ../Doc/c-api/arg.rst:406 msgid "" "The list of format units ends here; the string after the colon is used as " "the function name in error messages (the \"associated value\" of the " @@ -976,11 +1016,11 @@ msgstr "" "puntos se usa como el nombre de la función en los mensajes de error (el " "\"valor asociado\" de la excepción que :c:func:`PyArg_ParseTuple` lanza)." -#: ../Doc/c-api/arg.rst:380 +#: ../Doc/c-api/arg.rst:410 msgid "``;``" msgstr "``;``" -#: ../Doc/c-api/arg.rst:378 +#: ../Doc/c-api/arg.rst:411 msgid "" "The list of format units ends here; the string after the semicolon is used " "as the error message *instead* of the default error message. ``:`` and ``;" @@ -990,7 +1030,7 @@ msgstr "" "coma se usa como mensaje de error *en lugar de* del mensaje de error " "predeterminado. ``:`` y ``;`` se excluyen mutuamente." -#: ../Doc/c-api/arg.rst:382 +#: ../Doc/c-api/arg.rst:415 #, fuzzy msgid "" "Note that any Python object references which are provided to the caller are " @@ -1001,7 +1041,7 @@ msgstr "" "a la persona que llama son referencias *prestadas* (*borrowed*); ¡no " "disminuya su conteo de referencias!" -#: ../Doc/c-api/arg.rst:386 +#: ../Doc/c-api/arg.rst:419 msgid "" "Additional arguments passed to these functions must be addresses of " "variables whose type is determined by the format string; these are used to " @@ -1017,7 +1057,7 @@ msgstr "" "parámetros se utilizan como valores de entrada; deben coincidir con lo " "especificado para la unidad de formato correspondiente en ese caso." -#: ../Doc/c-api/arg.rst:392 +#: ../Doc/c-api/arg.rst:425 #, fuzzy msgid "" "For the conversion to succeed, the *arg* object must match the format and " @@ -1035,11 +1075,11 @@ msgstr "" "unidades de formato, las variables en las direcciones correspondientes y las " "siguientes unidades de formato quedan intactas." -#: ../Doc/c-api/arg.rst:401 +#: ../Doc/c-api/arg.rst:434 msgid "API Functions" msgstr "Funciones API" -#: ../Doc/c-api/arg.rst:405 +#: ../Doc/c-api/arg.rst:438 msgid "" "Parse the parameters of a function that takes only positional parameters " "into local variables. Returns true on success; on failure, it returns false " @@ -1049,7 +1089,7 @@ msgstr "" "en variables locales. Retorna verdadero en el éxito; en caso de fallo, " "retorna falso y lanza la excepción apropiada." -#: ../Doc/c-api/arg.rst:412 +#: ../Doc/c-api/arg.rst:445 msgid "" "Identical to :c:func:`PyArg_ParseTuple`, except that it accepts a va_list " "rather than a variable number of arguments." @@ -1057,7 +1097,7 @@ msgstr "" "Idéntico a :c:func:`PyArg_ParseTuple`, excepto que acepta una *va_list* en " "lugar de un número variable de argumentos ." -#: ../Doc/c-api/arg.rst:418 +#: ../Doc/c-api/arg.rst:451 #, fuzzy msgid "" "Parse the parameters of a function that takes both positional and keyword " @@ -1074,14 +1114,14 @@ msgstr "" "only_parameter>`. Retorna verdadero cuando hay éxito; en caso de fallo, " "retorna falso y lanza la excepción apropiada." -#: ../Doc/c-api/arg.rst:429 +#: ../Doc/c-api/arg.rst:462 msgid "" "The *keywords* parameter declaration is :c:expr:`char * const *` in C and :c:" "expr:`const char * const *` in C++. This can be overridden with the :c:macro:" "`PY_CXX_CONST` macro." msgstr "" -#: ../Doc/c-api/arg.rst:433 +#: ../Doc/c-api/arg.rst:466 msgid "" "Added support for :ref:`positional-only parameters `." @@ -1089,14 +1129,14 @@ msgstr "" "Soporte agregado para :ref:`sólo parámetros posicionales `." -#: ../Doc/c-api/arg.rst:437 +#: ../Doc/c-api/arg.rst:470 msgid "" "The *keywords* parameter has now type :c:expr:`char * const *` in C and :c:" "expr:`const char * const *` in C++, instead of :c:expr:`char **`. Added " "support for non-ASCII keyword parameter names." msgstr "" -#: ../Doc/c-api/arg.rst:446 +#: ../Doc/c-api/arg.rst:479 msgid "" "Identical to :c:func:`PyArg_ParseTupleAndKeywords`, except that it accepts a " "va_list rather than a variable number of arguments." @@ -1104,7 +1144,7 @@ msgstr "" "Idéntico a :c:func:`PyArg_ParseTupleAndKeywords`, excepto que acepta una " "*va_list* en lugar de un número variable de argumentos." -#: ../Doc/c-api/arg.rst:452 +#: ../Doc/c-api/arg.rst:485 msgid "" "Ensure that the keys in the keywords argument dictionary are strings. This " "is only needed if :c:func:`PyArg_ParseTupleAndKeywords` is not used, since " @@ -1115,7 +1155,7 @@ msgstr "" "`PyArg_ParseTupleAndKeywords` no se utiliza, ya que este último ya hace esta " "comprobación." -#: ../Doc/c-api/arg.rst:461 +#: ../Doc/c-api/arg.rst:494 #, fuzzy msgid "" "Parse the parameter of a function that takes a single positional parameter " @@ -1126,11 +1166,11 @@ msgstr "" "en variables locales. Retorna verdadero en el éxito; en caso de fallo, " "retorna falso y lanza la excepción apropiada." -#: ../Doc/c-api/arg.rst:465 +#: ../Doc/c-api/arg.rst:498 msgid "Example::" msgstr "" -#: ../Doc/c-api/arg.rst:467 +#: ../Doc/c-api/arg.rst:500 msgid "" "// Function using METH_O calling convention\n" "static PyObject*\n" @@ -1144,7 +1184,7 @@ msgid "" "}" msgstr "" -#: ../Doc/c-api/arg.rst:481 +#: ../Doc/c-api/arg.rst:514 #, fuzzy msgid "" "A simpler form of parameter retrieval which does not use a format string to " @@ -1178,7 +1218,7 @@ msgstr "" "contiene el número incorrecto de elementos; se establecerá una excepción si " "hubo una falla." -#: ../Doc/c-api/arg.rst:496 +#: ../Doc/c-api/arg.rst:529 #, fuzzy msgid "" "This is an example of the use of this function, taken from the sources for " @@ -1187,7 +1227,7 @@ msgstr "" "Este es un ejemplo del uso de esta función, tomado de las fuentes del módulo " "auxiliar :mod:`_weakref` para referencias débiles::" -#: ../Doc/c-api/arg.rst:499 +#: ../Doc/c-api/arg.rst:532 msgid "" "static PyObject *\n" "weakref_ref(PyObject *self, PyObject *args)\n" @@ -1203,7 +1243,7 @@ msgid "" "}" msgstr "" -#: ../Doc/c-api/arg.rst:512 +#: ../Doc/c-api/arg.rst:545 msgid "" "The call to :c:func:`PyArg_UnpackTuple` in this example is entirely " "equivalent to this call to :c:func:`PyArg_ParseTuple`::" @@ -1211,11 +1251,11 @@ msgstr "" "La llamada a :c:func:`PyArg_UnpackTuple` en este ejemplo es completamente " "equivalente a esta llamada a :c:func:`PyArg_ParseTuple`::" -#: ../Doc/c-api/arg.rst:515 +#: ../Doc/c-api/arg.rst:548 msgid "PyArg_ParseTuple(args, \"O|O:ref\", &object, &callback)" msgstr "" -#: ../Doc/c-api/arg.rst:519 +#: ../Doc/c-api/arg.rst:552 msgid "" "The value to be inserted, if any, before :c:expr:`char * const *` in the " "*keywords* parameter declaration of :c:func:`PyArg_ParseTupleAndKeywords` " @@ -1224,11 +1264,11 @@ msgid "" "to the desired value before including :file:`Python.h`." msgstr "" -#: ../Doc/c-api/arg.rst:533 +#: ../Doc/c-api/arg.rst:566 msgid "Building values" msgstr "Construyendo valores" -#: ../Doc/c-api/arg.rst:537 +#: ../Doc/c-api/arg.rst:570 #, fuzzy msgid "" "Create a new value based on a format string similar to those accepted by the " @@ -1241,7 +1281,7 @@ msgstr "" "valores. Retorna el valor o ``NULL`` en caso de error; se lanzará una " "excepción si se retorna ``NULL``." -#: ../Doc/c-api/arg.rst:542 +#: ../Doc/c-api/arg.rst:575 msgid "" ":c:func:`Py_BuildValue` does not always build a tuple. It builds a tuple " "only if its format string contains two or more format units. If the format " @@ -1256,7 +1296,7 @@ msgstr "" "Para forzarlo a retornar una tupla de tamaño 0 o uno, paréntesis la cadena " "de formato." -#: ../Doc/c-api/arg.rst:548 +#: ../Doc/c-api/arg.rst:581 msgid "" "When memory buffers are passed as parameters to supply data to build " "objects, as for the ``s`` and ``s#`` formats, the required data is copied. " @@ -1275,7 +1315,7 @@ msgstr "" "de llamar a :c:func:`free` para esa memoria una vez retorna :c:func:" "`Py_BuildValue`." -#: ../Doc/c-api/arg.rst:556 +#: ../Doc/c-api/arg.rst:589 msgid "" "In the following description, the quoted form is the format unit; the entry " "in (round) parentheses is the Python object type that the format unit will " @@ -1287,7 +1327,7 @@ msgstr "" "de objeto Python que retornará la unidad de formato; y la entrada entre " "corchetes [cuadrados] es el tipo de los valores C que se pasarán." -#: ../Doc/c-api/arg.rst:560 +#: ../Doc/c-api/arg.rst:593 msgid "" "The characters space, tab, colon and comma are ignored in format strings " "(but not within format units such as ``s#``). This can be used to make long " @@ -1298,11 +1338,11 @@ msgstr "" "Esto se puede usar para hacer que las cadenas de formato largo sean un poco " "más legibles." -#: ../Doc/c-api/arg.rst:566 +#: ../Doc/c-api/arg.rst:597 msgid "``s`` (:class:`str` or ``None``) [const char \\*]" msgstr "``s`` (:class:`str` o ``None``) [const char \\*]" -#: ../Doc/c-api/arg.rst:565 +#: ../Doc/c-api/arg.rst:598 msgid "" "Convert a null-terminated C string to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, ``None`` is used." @@ -1311,13 +1351,13 @@ msgstr "" "class:`str` usando la codificación ``'utf-8'``. Si el puntero de la cadena " "de caracteres C es ``NULL``, se usa ``None``." -#: ../Doc/c-api/arg.rst:571 +#: ../Doc/c-api/arg.rst:601 msgid "" "``s#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``s#`` (:class:`str` o ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../Doc/c-api/arg.rst:569 +#: ../Doc/c-api/arg.rst:602 msgid "" "Convert a C string and its length to a Python :class:`str` object using " "``'utf-8'`` encoding. If the C string pointer is ``NULL``, the length is " @@ -1328,11 +1368,11 @@ msgstr "" "cadena de caracteres de C es ``NULL``, la longitud se ignora y se retorna " "``None``." -#: ../Doc/c-api/arg.rst:575 +#: ../Doc/c-api/arg.rst:606 msgid "``y`` (:class:`bytes`) [const char \\*]" msgstr "``y`` (:class:`bytes`) [const char \\*]" -#: ../Doc/c-api/arg.rst:574 +#: ../Doc/c-api/arg.rst:607 msgid "" "This converts a C string to a Python :class:`bytes` object. If the C string " "pointer is ``NULL``, ``None`` is returned." @@ -1341,11 +1381,11 @@ msgstr "" "`bytes`. Si el puntero de la cadena de caracteres de C es ``NULL``, se " "retorna ``None``." -#: ../Doc/c-api/arg.rst:579 +#: ../Doc/c-api/arg.rst:610 msgid "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "``y#`` (:class:`bytes`) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../Doc/c-api/arg.rst:578 +#: ../Doc/c-api/arg.rst:611 msgid "" "This converts a C string and its lengths to a Python object. If the C " "string pointer is ``NULL``, ``None`` is returned." @@ -1354,25 +1394,25 @@ msgstr "" "Python. Si el puntero de la cadena de caracteres de C es ``NULL``, se " "retorna ``None``." -#: ../Doc/c-api/arg.rst:582 ../Doc/c-api/arg.rst:598 +#: ../Doc/c-api/arg.rst:615 ../Doc/c-api/arg.rst:631 msgid "Same as ``s``." msgstr "Igual que ``s``." -#: ../Doc/c-api/arg.rst:585 +#: ../Doc/c-api/arg.rst:617 msgid "" "``z#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``z#`` (:class:`str` o ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../Doc/c-api/arg.rst:585 ../Doc/c-api/arg.rst:601 +#: ../Doc/c-api/arg.rst:618 ../Doc/c-api/arg.rst:634 msgid "Same as ``s#``." msgstr "Igual que ``s#``." -#: ../Doc/c-api/arg.rst:590 +#: ../Doc/c-api/arg.rst:620 msgid "``u`` (:class:`str`) [const wchar_t \\*]" msgstr "``u`` (:class:`str`) [const wchar_t \\*]" -#: ../Doc/c-api/arg.rst:588 +#: ../Doc/c-api/arg.rst:621 #, fuzzy msgid "" "Convert a null-terminated :c:type:`wchar_t` buffer of Unicode (UTF-16 or " @@ -1383,11 +1423,11 @@ msgstr "" "objeto Python Unicode. Si el puntero del búfer Unicode es ``NULL``, se " "retorna ``None``." -#: ../Doc/c-api/arg.rst:595 +#: ../Doc/c-api/arg.rst:625 msgid "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" msgstr "``u#`` (:class:`str`) [const wchar_t \\*, :c:type:`Py_ssize_t`]" -#: ../Doc/c-api/arg.rst:593 +#: ../Doc/c-api/arg.rst:626 msgid "" "Convert a Unicode (UTF-16 or UCS-4) data buffer and its length to a Python " "Unicode object. If the Unicode buffer pointer is ``NULL``, the length is " @@ -1397,80 +1437,93 @@ msgstr "" "objeto Python Unicode. Si el puntero del búfer Unicode es ``NULL``, la " "longitud se ignora y se retorna ``None``." -#: ../Doc/c-api/arg.rst:598 +#: ../Doc/c-api/arg.rst:630 msgid "``U`` (:class:`str` or ``None``) [const char \\*]" msgstr "``U`` (:class:`str` o ``None``) [const char \\*]" -#: ../Doc/c-api/arg.rst:601 +#: ../Doc/c-api/arg.rst:633 msgid "" "``U#`` (:class:`str` or ``None``) [const char \\*, :c:type:`Py_ssize_t`]" msgstr "" "``z#`` (:class:`str` o ``None``) [const char \\*, :c:type:`Py_ssize_t`]" -#: ../Doc/c-api/arg.rst:604 +#: ../Doc/c-api/arg.rst:637 #, fuzzy msgid "Convert a plain C :c:expr:`int` to a Python integer object." msgstr "Convierte un :c:type:`int` plano de C a un objeto entero de Python." -#: ../Doc/c-api/arg.rst:607 +#: ../Doc/c-api/arg.rst:639 msgid "``b`` (:class:`int`) [char]" msgstr "``b`` (:class:`int`) [char]" -#: ../Doc/c-api/arg.rst:607 +#: ../Doc/c-api/arg.rst:640 #, fuzzy msgid "Convert a plain C :c:expr:`char` to a Python integer object." msgstr "Convierte un :c:type:`char` plano de C a un objeto entero de Python." -#: ../Doc/c-api/arg.rst:610 +#: ../Doc/c-api/arg.rst:643 #, fuzzy msgid "Convert a plain C :c:expr:`short int` to a Python integer object." msgstr "" "Convierte un :c:type:`short int` plano de C a un objeto entero de Python." -#: ../Doc/c-api/arg.rst:613 +#: ../Doc/c-api/arg.rst:646 #, fuzzy msgid "Convert a C :c:expr:`long int` to a Python integer object." msgstr "Convierta un :c:type:`long int` de C en un objeto entero de Python." -#: ../Doc/c-api/arg.rst:616 +#: ../Doc/c-api/arg.rst:649 #, fuzzy msgid "Convert a C :c:expr:`unsigned char` to a Python integer object." msgstr "Convierte un :c:type:`unsigned char` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:619 +#: ../Doc/c-api/arg.rst:652 #, fuzzy msgid "Convert a C :c:expr:`unsigned short int` to a Python integer object." msgstr "Convierte un :c:type:`unsigned short int` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:622 +#: ../Doc/c-api/arg.rst:655 #, fuzzy msgid "Convert a C :c:expr:`unsigned int` to a Python integer object." msgstr "Convierte un :c:type:`unsigned int` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:625 +#: ../Doc/c-api/arg.rst:658 #, fuzzy msgid "Convert a C :c:expr:`unsigned long` to a Python integer object." msgstr "Convierte un :c:type:`unsigned long` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:628 +#: ../Doc/c-api/arg.rst:661 #, fuzzy msgid "Convert a C :c:expr:`long long` to a Python integer object." msgstr "Convierte un :c:type:`long long` de C en un objeto entero de Python." -#: ../Doc/c-api/arg.rst:631 +#: ../Doc/c-api/arg.rst:666 #, fuzzy msgid "Convert a C :c:expr:`unsigned long long` to a Python integer object." msgstr "Convierte un :c:type:`unsigned long long` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:634 +#: ../Doc/c-api/arg.rst:669 msgid "Convert a C :c:type:`Py_ssize_t` to a Python integer." msgstr "Convierte un :c:type:`Py_ssize_t` de C a un entero de Python." -#: ../Doc/c-api/arg.rst:638 +#: ../Doc/c-api/arg.rst:672 +#, fuzzy +msgid "Convert a C :c:expr:`int` to a Python :class:`bool` object." +msgstr "Convierta un :c:type:`long int` de C en un objeto entero de Python." + +#: ../Doc/c-api/arg.rst:674 +msgid "" +"Be aware that this format requires an ``int`` argument. Unlike most other " +"contexts in C, variadic arguments are not coerced to a suitable type " +"automatically. You can convert another type (for example, a pointer or a " +"float) to a suitable ``int`` value using ``(x) ? 1 : 0`` or ``!!x``." +msgstr "" + +#: ../Doc/c-api/arg.rst:682 msgid "``c`` (:class:`bytes` of length 1) [char]" msgstr "``c`` (:class:`bytes` de largo 1) [char]" -#: ../Doc/c-api/arg.rst:637 +#: ../Doc/c-api/arg.rst:683 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a byte to a Python :class:`bytes` " @@ -1479,7 +1532,7 @@ msgstr "" "Convierte un :c:type:`int` de C representando un byte a un objeto :class:" "`bytes` de Python de largo 1." -#: ../Doc/c-api/arg.rst:641 +#: ../Doc/c-api/arg.rst:687 #, fuzzy msgid "" "Convert a C :c:expr:`int` representing a character to Python :class:`str` " @@ -1488,29 +1541,29 @@ msgstr "" "Convierte un :c:type:`int` de C representando un carácter a un objeto :class:" "`str` de Python de largo 1." -#: ../Doc/c-api/arg.rst:645 +#: ../Doc/c-api/arg.rst:691 #, fuzzy msgid "Convert a C :c:expr:`double` to a Python floating-point number." msgstr "" "Convierte un :c:type:`double` de C a un número de punto flotante de Python." -#: ../Doc/c-api/arg.rst:648 +#: ../Doc/c-api/arg.rst:694 #, fuzzy msgid "Convert a C :c:expr:`float` to a Python floating-point number." msgstr "" "Convierte un :c:type:`float` de C a un número de punto flotante de Python." -#: ../Doc/c-api/arg.rst:651 +#: ../Doc/c-api/arg.rst:696 msgid "``D`` (:class:`complex`) [Py_complex \\*]" msgstr "``D`` (:class:`complex`) [Py_complex \\*]" -#: ../Doc/c-api/arg.rst:651 +#: ../Doc/c-api/arg.rst:697 msgid "Convert a C :c:type:`Py_complex` structure to a Python complex number." msgstr "" "Convierte una estructura :c:type:`Py_complex` de C en un número complejo de " "Python." -#: ../Doc/c-api/arg.rst:654 +#: ../Doc/c-api/arg.rst:700 #, fuzzy msgid "" "Pass a Python object untouched but create a new :term:`strong reference` to " @@ -1527,19 +1580,19 @@ msgstr "" "`Py_BuildValue` retornará ``NULL`` pero no lanzará una excepción. Si aún no " "se ha producido ninguna excepción, se establece :exc:`SystemError`." -#: ../Doc/c-api/arg.rst:664 +#: ../Doc/c-api/arg.rst:709 msgid "``S`` (object) [PyObject \\*]" msgstr "``S`` (object) [PyObject \\*]" -#: ../Doc/c-api/arg.rst:664 +#: ../Doc/c-api/arg.rst:710 msgid "Same as ``O``." msgstr "Igual que ``O``." -#: ../Doc/c-api/arg.rst:669 +#: ../Doc/c-api/arg.rst:712 msgid "``N`` (object) [PyObject \\*]" msgstr "``N`` (object) [PyObject \\*]" -#: ../Doc/c-api/arg.rst:667 +#: ../Doc/c-api/arg.rst:713 #, fuzzy msgid "" "Same as ``O``, except it doesn't create a new :term:`strong reference`. " @@ -1550,7 +1603,11 @@ msgstr "" "objeto. Útil cuando el objeto se crea mediante una llamada a un constructor " "de objetos en la lista de argumentos." -#: ../Doc/c-api/arg.rst:672 +#: ../Doc/c-api/arg.rst:717 +msgid "``O&`` (object) [*converter*, *anything*]" +msgstr "``O&`` (object) [*converter*, *anything*]" + +#: ../Doc/c-api/arg.rst:718 #, fuzzy msgid "" "Convert *anything* to a Python object through a *converter* function. The " @@ -1563,7 +1620,11 @@ msgstr "" "`void*`) como argumento y debería retornar un \"nuevo\" objeto de Python, o " "``NULL`` si se produjo un error." -#: ../Doc/c-api/arg.rst:678 +#: ../Doc/c-api/arg.rst:723 +msgid "``(items)`` (:class:`tuple`) [*matching-items*]" +msgstr "``(items)`` (:class:`tuple`) [*matching-items*]" + +#: ../Doc/c-api/arg.rst:724 msgid "" "Convert a sequence of C values to a Python tuple with the same number of " "items." @@ -1571,11 +1632,11 @@ msgstr "" "Convierta una secuencia de valores C en una tupla de Python con el mismo " "número de elementos." -#: ../Doc/c-api/arg.rst:681 +#: ../Doc/c-api/arg.rst:726 msgid "``[items]`` (:class:`list`) [*matching-items*]" msgstr "``[items]`` (:class:`list`) [*matching-items*]" -#: ../Doc/c-api/arg.rst:681 +#: ../Doc/c-api/arg.rst:727 msgid "" "Convert a sequence of C values to a Python list with the same number of " "items." @@ -1583,11 +1644,12 @@ msgstr "" "Convierte una secuencia de valores C en una lista de Python con el mismo " "número de elementos." -#: ../Doc/c-api/arg.rst:686 +#: ../Doc/c-api/arg.rst:729 +#, python-brace-format msgid "``{items}`` (:class:`dict`) [*matching-items*]" msgstr "``{items}`` (:class:`dict`) [*matching-items*]" -#: ../Doc/c-api/arg.rst:684 +#: ../Doc/c-api/arg.rst:730 msgid "" "Convert a sequence of C values to a Python dictionary. Each pair of " "consecutive C values adds one item to the dictionary, serving as key and " @@ -1597,7 +1659,7 @@ msgstr "" "valores C consecutivos agrega un elemento al diccionario, que sirve como " "clave y valor, respectivamente." -#: ../Doc/c-api/arg.rst:688 +#: ../Doc/c-api/arg.rst:734 msgid "" "If there is an error in the format string, the :exc:`SystemError` exception " "is set and ``NULL`` returned." @@ -1605,10 +1667,24 @@ msgstr "" "Si hay un error en la cadena de formato, se establece la excepción :exc:" "`SystemError` y se retorna ``NULL``." -#: ../Doc/c-api/arg.rst:693 +#: ../Doc/c-api/arg.rst:739 msgid "" "Identical to :c:func:`Py_BuildValue`, except that it accepts a va_list " "rather than a variable number of arguments." msgstr "" "Idéntico a :c:func:`Py_BuildValue`, excepto que acepta una *va_list* en " "lugar de un número variable de argumentos." + +#~ msgid "" +#~ "It is possible to pass \"long\" integers (integers whose value exceeds " +#~ "the platform's :c:macro:`LONG_MAX`) however no proper range checking is " +#~ "done --- the most significant bits are silently truncated when the " +#~ "receiving field is too small to receive the value (actually, the " +#~ "semantics are inherited from downcasts in C --- your mileage may vary)." +#~ msgstr "" +#~ "Es posible pasar enteros \"largos\" (enteros cuyo valor excede el de la " +#~ "plataforma :const:`LONG_MAX`), sin embargo, no se realiza una " +#~ "verificación de rango adecuada --- los bits más significativos se truncan " +#~ "silenciosamente cuando el campo receptor es demasiado pequeño para " +#~ "recibir el valor (en realidad, la semántica se hereda de las descargas en " +#~ "C --- su kilometraje puede variar)." diff --git a/c-api/bool.po b/c-api/bool.po index ea41eda60a..de255570f1 100644 --- a/c-api/bool.po +++ b/c-api/bool.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-10-12 19:43+0200\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-05-07 20:14-0500\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.13.0\n" -"X-Generator: Poedit 3.6\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/bool.rst:6 msgid "Boolean Objects" @@ -55,27 +54,31 @@ msgstr "" "siempre finaliza con éxito." #: ../Doc/c-api/bool.rst:28 +#, fuzzy msgid "" -"The Python ``False`` object. This object has no methods and is `immortal " -"`_." +"The Python ``False`` object. This object has no methods and is :term:" +"`immortal`." msgstr "" "El objeto ``False`` de Python. Este objeto no tiene métodos y es `inmortal " "`_." #: ../Doc/c-api/bool.rst:31 -msgid ":c:data:`Py_False` is immortal." +#, fuzzy +msgid ":c:data:`Py_False` is :term:`immortal`." msgstr ":c:data:`Py_False` es inmortal." #: ../Doc/c-api/bool.rst:37 +#, fuzzy msgid "" -"The Python ``True`` object. This object has no methods and is `immortal " -"`_." +"The Python ``True`` object. This object has no methods and is :term:" +"`immortal`." msgstr "" "El objeto ``True`` de Python. Este objeto no tiene métodos y es `inmortal " "`_." #: ../Doc/c-api/bool.rst:40 -msgid ":c:data:`Py_True` is immortal." +#, fuzzy +msgid ":c:data:`Py_True` is :term:`immortal`." msgstr ":c:data:`Py_True` es inmortal." #: ../Doc/c-api/bool.rst:46 diff --git a/c-api/buffer.po b/c-api/buffer.po index 84002fdf87..93c5d21e96 100644 --- a/c-api/buffer.po +++ b/c-api/buffer.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2022-10-31 01:46-0400\n" "Last-Translator: Cristián Maureira-Fredes \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/buffer.rst:11 msgid "Buffer Protocol" @@ -53,33 +53,38 @@ msgstr "" "búfer directamente y sin copia intermedia." #: ../Doc/c-api/buffer.rst:29 +#, fuzzy msgid "" -"Python provides such a facility at the C level in the form of the :ref:" -"`buffer protocol `. This protocol has two sides:" +"Python provides such a facility at the C and Python level in the form of " +"the :ref:`buffer protocol `. This protocol has two sides:" msgstr "" "Python proporciona una instalación de este tipo en el nivel C en la forma " "de :ref:`protocolo búfer `. Este protocolo tiene dos lados:" #: ../Doc/c-api/buffer.rst:34 +#, fuzzy msgid "" "on the producer side, a type can export a \"buffer interface\" which allows " "objects of that type to expose information about their underlying buffer. " -"This interface is described in the section :ref:`buffer-structs`;" +"This interface is described in the section :ref:`buffer-structs`; for Python " +"see :ref:`python-buffer-protocol`." msgstr "" "en el lado del productor, un tipo puede exportar una \"interfaz de búfer\" " "que permite a los objetos de ese tipo exponer información sobre su búfer " "subyacente. Esta interfaz se describe en la sección :ref:`buffer-structs`;" -#: ../Doc/c-api/buffer.rst:38 +#: ../Doc/c-api/buffer.rst:39 +#, fuzzy msgid "" "on the consumer side, several means are available to obtain a pointer to the " -"raw underlying data of an object (for example a method parameter)." +"raw underlying data of an object (for example a method parameter). For " +"Python see :class:`memoryview`." msgstr "" "en el lado del consumidor, hay varios medios disponibles para obtener un " "puntero a los datos subyacentes sin procesar de un objeto (por ejemplo, un " "parámetro de método)." -#: ../Doc/c-api/buffer.rst:41 +#: ../Doc/c-api/buffer.rst:43 msgid "" "Simple objects such as :class:`bytes` and :class:`bytearray` expose their " "underlying buffer in byte-oriented form. Other forms are possible; for " @@ -91,7 +96,7 @@ msgstr "" "ejemplo, los elementos expuestos por un :class:`array.array` pueden ser " "valores de varios bytes." -#: ../Doc/c-api/buffer.rst:45 +#: ../Doc/c-api/buffer.rst:47 #, fuzzy msgid "" "An example consumer of the buffer interface is the :meth:`~io.BufferedIOBase." @@ -113,7 +118,7 @@ msgstr "" "que los objetos permitan o rechacen selectivamente la exportación de búferes " "de lectura-escritura y solo lectura." -#: ../Doc/c-api/buffer.rst:53 +#: ../Doc/c-api/buffer.rst:55 msgid "" "There are two ways for a consumer of the buffer interface to acquire a " "buffer over a target object:" @@ -121,11 +126,11 @@ msgstr "" "Hay dos formas para que un consumidor de la interfaz del búfer adquiera un " "búfer sobre un objeto de destino:" -#: ../Doc/c-api/buffer.rst:56 +#: ../Doc/c-api/buffer.rst:58 msgid "call :c:func:`PyObject_GetBuffer` with the right parameters;" msgstr "llamar :c:func:`PyObject_GetBuffer` con los parámetros correctos;" -#: ../Doc/c-api/buffer.rst:58 +#: ../Doc/c-api/buffer.rst:60 msgid "" "call :c:func:`PyArg_ParseTuple` (or one of its siblings) with one of the " "``y*``, ``w*`` or ``s*`` :ref:`format codes `." @@ -133,7 +138,7 @@ msgstr "" "llamar :c:func:`PyArg_ParseTuple` (o uno de sus hermanos) con uno de los " "``y*``, ``w*`` o ``s*`` :ref:`códigos de formato `." -#: ../Doc/c-api/buffer.rst:61 +#: ../Doc/c-api/buffer.rst:63 msgid "" "In both cases, :c:func:`PyBuffer_Release` must be called when the buffer " "isn't needed anymore. Failure to do so could lead to various issues such as " @@ -144,10 +149,16 @@ msgstr "" "pérdidas de recursos." #: ../Doc/c-api/buffer.rst:69 +msgid "" +"The buffer protocol is now accessible in Python, see :ref:`python-buffer-" +"protocol` and :class:`memoryview`." +msgstr "" + +#: ../Doc/c-api/buffer.rst:75 msgid "Buffer structure" msgstr "Estructura de búfer" -#: ../Doc/c-api/buffer.rst:71 +#: ../Doc/c-api/buffer.rst:77 msgid "" "Buffer structures (or simply \"buffers\") are useful as a way to expose the " "binary data from another object to the Python programmer. They can also be " @@ -168,7 +179,7 @@ msgstr "" "una biblioteca del sistema operativo, o podría usarse para pasar datos " "estructurados en su formato nativo en memoria ." -#: ../Doc/c-api/buffer.rst:80 +#: ../Doc/c-api/buffer.rst:86 msgid "" "Contrary to most data types exposed by the Python interpreter, buffers are " "not :c:type:`PyObject` pointers but rather simple C structures. This allows " @@ -182,7 +193,7 @@ msgstr "" "simple. Cuando se necesita un contenedor genérico alrededor de un búfer, un " "objeto :ref:`memoryview ` puede ser creado." -#: ../Doc/c-api/buffer.rst:86 +#: ../Doc/c-api/buffer.rst:92 msgid "" "For short instructions how to write an exporting object, see :ref:`Buffer " "Object Structures `. For obtaining a buffer, see :c:func:" @@ -192,7 +203,7 @@ msgstr "" "exportación, consulte :ref:`Estructuras de objetos búfer `. " "Para obtener un búfer, consulte :c:func:`PyObject_GetBuffer`." -#: ../Doc/c-api/buffer.rst:94 +#: ../Doc/c-api/buffer.rst:100 msgid "" "A pointer to the start of the logical structure described by the buffer " "fields. This can be any location within the underlying physical memory block " @@ -204,7 +215,7 @@ msgstr "" "subyacente del exportador. Por ejemplo, con negativo :c:member:`~Py_buffer." "strides` el valor puede apuntar al final del bloque de memoria." -#: ../Doc/c-api/buffer.rst:99 +#: ../Doc/c-api/buffer.rst:105 msgid "" "For :term:`contiguous` arrays, the value points to the beginning of the " "memory block." @@ -212,7 +223,7 @@ msgstr "" "Para arreglos :term:`contiguous`, el valor apunta al comienzo del bloque de " "memoria." -#: ../Doc/c-api/buffer.rst:104 +#: ../Doc/c-api/buffer.rst:110 #, fuzzy msgid "" "A new reference to the exporting object. The reference is owned by the " @@ -225,7 +236,7 @@ msgstr "" "func:`PyBuffer_Release`. El campo es el equivalente del valor de retorno de " "cualquier función estándar de C-API." -#: ../Doc/c-api/buffer.rst:111 +#: ../Doc/c-api/buffer.rst:117 msgid "" "As a special case, for *temporary* buffers that are wrapped by :c:func:" "`PyMemoryView_FromBuffer` or :c:func:`PyBuffer_FillInfo` this field is " @@ -235,7 +246,7 @@ msgstr "" "c:func:`PyMemoryView_FromBuffer` o :c:func:`PyBuffer_FillInfo` este campo es " "``NULL``. En general, los objetos de exportación NO DEBEN usar este esquema." -#: ../Doc/c-api/buffer.rst:118 +#: ../Doc/c-api/buffer.rst:124 msgid "" "``product(shape) * itemsize``. For contiguous arrays, this is the length of " "the underlying memory block. For non-contiguous arrays, it is the length " @@ -247,7 +258,7 @@ msgstr "" "que tendría la estructura lógica si se copiara en una representación " "contigua." -#: ../Doc/c-api/buffer.rst:123 +#: ../Doc/c-api/buffer.rst:129 msgid "" "Accessing ``((char *)buf)[0] up to ((char *)buf)[len-1]`` is only valid if " "the buffer has been obtained by a request that guarantees contiguity. In " @@ -259,7 +270,7 @@ msgstr "" "En la mayoría de los casos, dicha solicitud será :c:macro:`PyBUF_SIMPLE` o :" "c:macro:`PyBUF_WRITABLE`." -#: ../Doc/c-api/buffer.rst:129 +#: ../Doc/c-api/buffer.rst:135 msgid "" "An indicator of whether the buffer is read-only. This field is controlled by " "the :c:macro:`PyBUF_WRITABLE` flag." @@ -267,7 +278,7 @@ msgstr "" "Un indicador de si el búfer es de solo lectura. Este campo está controlado " "por el indicador :c:macro:`PyBUF_WRITABLE`." -#: ../Doc/c-api/buffer.rst:134 +#: ../Doc/c-api/buffer.rst:140 msgid "" "Item size in bytes of a single element. Same as the value of :func:`struct." "calcsize` called on non-``NULL`` :c:member:`~Py_buffer.format` values." @@ -276,7 +287,7 @@ msgstr "" "func:`struct.calcsize` invocado en valores no ``NULL`` :c:member:`~Py_buffer." "format`." -#: ../Doc/c-api/buffer.rst:137 +#: ../Doc/c-api/buffer.rst:143 msgid "" "Important exception: If a consumer requests a buffer without the :c:macro:" "`PyBUF_FORMAT` flag, :c:member:`~Py_buffer.format` will be set to " @@ -288,7 +299,7 @@ msgstr "" "``NULL``, pero :c:member:`~Py_buffer.itemsize` todavía tiene el valor para " "el formato original." -#: ../Doc/c-api/buffer.rst:142 +#: ../Doc/c-api/buffer.rst:148 msgid "" "If :c:member:`~Py_buffer.shape` is present, the equality ``product(shape) * " "itemsize == len`` still holds and the consumer can use :c:member:`~Py_buffer." @@ -298,7 +309,7 @@ msgstr "" "* itemsize == len`` aún se mantiene y el consumidor puede usar :c:member:" "`~Py_buffer.itemsize` para navegar el búfer." -#: ../Doc/c-api/buffer.rst:146 +#: ../Doc/c-api/buffer.rst:152 msgid "" "If :c:member:`~Py_buffer.shape` is ``NULL`` as a result of a :c:macro:" "`PyBUF_SIMPLE` or a :c:macro:`PyBUF_WRITABLE` request, the consumer must " @@ -308,7 +319,7 @@ msgstr "" "`PyBUF_SIMPLE` o un :c:macro:`PyBUF_WRITABLE`, el consumidor debe ignorar :c:" "member:`~Py_buffer.itemsize` y asume ``itemsize == 1``." -#: ../Doc/c-api/buffer.rst:152 +#: ../Doc/c-api/buffer.rst:158 #, fuzzy msgid "" "A *NULL* terminated string in :mod:`struct` module style syntax describing " @@ -319,11 +330,11 @@ msgstr "" "modulo :mod:`struct` que describe el contenido de un solo elemento. Si esto " "es ``NULL``, se supone ``\"B\"`` (bytes sin signo)." -#: ../Doc/c-api/buffer.rst:156 +#: ../Doc/c-api/buffer.rst:162 msgid "This field is controlled by the :c:macro:`PyBUF_FORMAT` flag." msgstr "Este campo está controlado por el indicador :c:macro:`PyBUF_FORMAT`." -#: ../Doc/c-api/buffer.rst:160 +#: ../Doc/c-api/buffer.rst:166 #, fuzzy msgid "" "The number of dimensions the memory represents as an n-dimensional array. If " @@ -338,7 +349,7 @@ msgstr "" "shape`, :c:member:`~Py_buffer.strides` y :c:member:`~Py_buffer.suboffsets` " "DEBE ser ``NULL``." -#: ../Doc/c-api/buffer.rst:168 +#: ../Doc/c-api/buffer.rst:174 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " "indicating the shape of the memory as an n-dimensional array. Note that " @@ -350,7 +361,7 @@ msgstr "" "cuenta que ``shape[0] * ... * shape[ndim-1] * itemsize`` DEBE ser igual a :c:" "member:`~Py_buffer.len`." -#: ../Doc/c-api/buffer.rst:173 +#: ../Doc/c-api/buffer.rst:179 msgid "" "Shape values are restricted to ``shape[n] >= 0``. The case ``shape[n] == 0`` " "requires special attention. See `complex arrays`_ for further information." @@ -359,11 +370,11 @@ msgstr "" "``shape[n] == 0`` requiere atención especial. Vea arreglos complejos " "(`complex arrays`_) para más información." -#: ../Doc/c-api/buffer.rst:177 +#: ../Doc/c-api/buffer.rst:183 msgid "The shape array is read-only for the consumer." msgstr "El arreglo de formas es de sólo lectura para el consumidor." -#: ../Doc/c-api/buffer.rst:181 +#: ../Doc/c-api/buffer.rst:187 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim` " "giving the number of bytes to skip to get to a new element in each dimension." @@ -372,7 +383,7 @@ msgstr "" "que proporciona el número de bytes que se omiten para llegar a un nuevo " "elemento en cada dimensión." -#: ../Doc/c-api/buffer.rst:185 +#: ../Doc/c-api/buffer.rst:191 msgid "" "Stride values can be any integer. For regular arrays, strides are usually " "positive, but a consumer MUST be able to handle the case ``strides[n] <= " @@ -383,11 +394,11 @@ msgstr "" "DEBE ser capaz de manejar el caso ``strides[n] <= 0``. Ver `complex arrays`_ " "para más información." -#: ../Doc/c-api/buffer.rst:189 +#: ../Doc/c-api/buffer.rst:195 msgid "The strides array is read-only for the consumer." msgstr "El arreglo *strides* es de sólo lectura para el consumidor." -#: ../Doc/c-api/buffer.rst:193 +#: ../Doc/c-api/buffer.rst:199 msgid "" "An array of :c:type:`Py_ssize_t` of length :c:member:`~Py_buffer.ndim`. If " "``suboffsets[n] >= 0``, the values stored along the nth dimension are " @@ -402,7 +413,7 @@ msgstr "" "*suboffsets* negativo indica que no debe producirse una desreferenciación " "(*striding* en un bloque de memoria contiguo)." -#: ../Doc/c-api/buffer.rst:200 +#: ../Doc/c-api/buffer.rst:206 msgid "" "If all suboffsets are negative (i.e. no de-referencing is needed), then this " "field must be ``NULL`` (the default value)." @@ -411,7 +422,7 @@ msgstr "" "desreferenciar), entonces este campo debe ser ``NULL`` (el valor " "predeterminado)." -#: ../Doc/c-api/buffer.rst:203 +#: ../Doc/c-api/buffer.rst:209 msgid "" "This type of array representation is used by the Python Imaging Library " "(PIL). See `complex arrays`_ for further information how to access elements " @@ -421,11 +432,11 @@ msgstr "" "arreglos. Consulte `complex arrays`_ para obtener más información sobre cómo " "acceder a los elementos de dicho arreglo." -#: ../Doc/c-api/buffer.rst:207 +#: ../Doc/c-api/buffer.rst:213 msgid "The suboffsets array is read-only for the consumer." msgstr "El arreglo de *suboffsets* es de sólo lectura para el consumidor." -#: ../Doc/c-api/buffer.rst:211 +#: ../Doc/c-api/buffer.rst:217 msgid "" "This is for use internally by the exporting object. For example, this might " "be re-cast as an integer by the exporter and used to store flags about " @@ -438,11 +449,11 @@ msgstr "" "liberarse cuando se libera el búfer. El consumidor NO DEBE alterar este " "valor." -#: ../Doc/c-api/buffer.rst:218 +#: ../Doc/c-api/buffer.rst:224 msgid "Constants:" msgstr "" -#: ../Doc/c-api/buffer.rst:222 +#: ../Doc/c-api/buffer.rst:228 #, fuzzy msgid "" "The maximum number of dimensions the memory represents. Exporters MUST " @@ -454,11 +465,11 @@ msgstr "" "multidimensionales DEBEN poder manejar hasta dimensiones :c:macro:" "`PyBUF_MAX_NDIM`." -#: ../Doc/c-api/buffer.rst:231 +#: ../Doc/c-api/buffer.rst:237 msgid "Buffer request types" msgstr "Tipos de solicitud búfer" -#: ../Doc/c-api/buffer.rst:233 +#: ../Doc/c-api/buffer.rst:239 msgid "" "Buffers are usually obtained by sending a buffer request to an exporting " "object via :c:func:`PyObject_GetBuffer`. Since the complexity of the logical " @@ -471,7 +482,7 @@ msgstr "" "drásticamente, el consumidor usa el argumento *flags* para especificar el " "tipo de búfer exacto que puede manejar." -#: ../Doc/c-api/buffer.rst:238 +#: ../Doc/c-api/buffer.rst:244 #, fuzzy msgid "" "All :c:type:`Py_buffer` fields are unambiguously defined by the request type." @@ -479,11 +490,11 @@ msgstr "" "Todos los campos :c:data:`Py_buffer` están definidos inequívocamente por el " "tipo de solicitud." -#: ../Doc/c-api/buffer.rst:242 +#: ../Doc/c-api/buffer.rst:248 msgid "request-independent fields" msgstr "campos independientes de solicitud" -#: ../Doc/c-api/buffer.rst:243 +#: ../Doc/c-api/buffer.rst:249 msgid "" "The following fields are not influenced by *flags* and must always be filled " "in with the correct values: :c:member:`~Py_buffer.obj`, :c:member:" @@ -495,11 +506,11 @@ msgstr "" "`~Py_buffer.buf`, :c:member:`~Py_buffer.len`, :c:member:`~Py_buffer." "itemsize`, :c:member:`~Py_buffer.ndim`." -#: ../Doc/c-api/buffer.rst:248 +#: ../Doc/c-api/buffer.rst:254 msgid "readonly, format" msgstr "formato de sólo lectura" -#: ../Doc/c-api/buffer.rst:252 +#: ../Doc/c-api/buffer.rst:258 #, fuzzy msgid "" "Controls the :c:member:`~Py_buffer.readonly` field. If set, the exporter " @@ -514,7 +525,7 @@ msgstr "" "búfer de solo lectura o de escritura, pero la elección DEBE ser coherente " "para todos los consumidores." -#: ../Doc/c-api/buffer.rst:260 +#: ../Doc/c-api/buffer.rst:266 msgid "" "Controls the :c:member:`~Py_buffer.format` field. If set, this field MUST be " "filled in correctly. Otherwise, this field MUST be ``NULL``." @@ -523,7 +534,7 @@ msgstr "" "DEBE completarse correctamente. De lo contrario, este campo DEBE ser " "``NULL``." -#: ../Doc/c-api/buffer.rst:264 +#: ../Doc/c-api/buffer.rst:270 msgid "" ":c:macro:`PyBUF_WRITABLE` can be \\|'d to any of the flags in the next " "section. Since :c:macro:`PyBUF_SIMPLE` is defined as 0, :c:macro:" @@ -535,7 +546,7 @@ msgstr "" "macro:`PyBUF_WRITABLE` puede usarse como un indicador independiente para " "solicitar un búfer de escritura simple." -#: ../Doc/c-api/buffer.rst:268 +#: ../Doc/c-api/buffer.rst:274 #, fuzzy msgid "" ":c:macro:`PyBUF_FORMAT` must be \\|'d to any of the flags except :c:macro:" @@ -546,11 +557,11 @@ msgstr "" "excepto :c:macro:`PyBUF_SIMPLE`. Este último ya implica el formato ``B`` " "(bytes sin signo)." -#: ../Doc/c-api/buffer.rst:274 +#: ../Doc/c-api/buffer.rst:280 msgid "shape, strides, suboffsets" msgstr "formas, *strides*, *suboffsets*" -#: ../Doc/c-api/buffer.rst:276 +#: ../Doc/c-api/buffer.rst:282 msgid "" "The flags that control the logical structure of the memory are listed in " "decreasing order of complexity. Note that each flag contains all bits of the " @@ -560,57 +571,57 @@ msgstr "" "orden decreciente de complejidad. Tenga en cuenta que cada bandera contiene " "todos los bits de las banderas debajo de ella." -#: ../Doc/c-api/buffer.rst:283 ../Doc/c-api/buffer.rst:307 -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:289 ../Doc/c-api/buffer.rst:313 +#: ../Doc/c-api/buffer.rst:338 msgid "Request" msgstr "Solicitud" -#: ../Doc/c-api/buffer.rst:283 ../Doc/c-api/buffer.rst:307 -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:289 ../Doc/c-api/buffer.rst:313 +#: ../Doc/c-api/buffer.rst:338 msgid "shape" msgstr "forma" -#: ../Doc/c-api/buffer.rst:283 ../Doc/c-api/buffer.rst:307 -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:289 ../Doc/c-api/buffer.rst:313 +#: ../Doc/c-api/buffer.rst:338 msgid "strides" msgstr "*strides*" -#: ../Doc/c-api/buffer.rst:283 ../Doc/c-api/buffer.rst:307 -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:289 ../Doc/c-api/buffer.rst:313 +#: ../Doc/c-api/buffer.rst:338 msgid "suboffsets" msgstr "*suboffsets*" -#: ../Doc/c-api/buffer.rst:285 ../Doc/c-api/buffer.rst:287 -#: ../Doc/c-api/buffer.rst:289 ../Doc/c-api/buffer.rst:309 -#: ../Doc/c-api/buffer.rst:311 ../Doc/c-api/buffer.rst:313 -#: ../Doc/c-api/buffer.rst:315 ../Doc/c-api/buffer.rst:334 -#: ../Doc/c-api/buffer.rst:336 ../Doc/c-api/buffer.rst:338 -#: ../Doc/c-api/buffer.rst:340 ../Doc/c-api/buffer.rst:342 -#: ../Doc/c-api/buffer.rst:344 ../Doc/c-api/buffer.rst:346 -#: ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:291 ../Doc/c-api/buffer.rst:293 +#: ../Doc/c-api/buffer.rst:295 ../Doc/c-api/buffer.rst:315 +#: ../Doc/c-api/buffer.rst:317 ../Doc/c-api/buffer.rst:319 +#: ../Doc/c-api/buffer.rst:321 ../Doc/c-api/buffer.rst:340 +#: ../Doc/c-api/buffer.rst:342 ../Doc/c-api/buffer.rst:344 +#: ../Doc/c-api/buffer.rst:346 ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:350 ../Doc/c-api/buffer.rst:352 +#: ../Doc/c-api/buffer.rst:354 msgid "yes" msgstr "sí" -#: ../Doc/c-api/buffer.rst:285 ../Doc/c-api/buffer.rst:334 -#: ../Doc/c-api/buffer.rst:336 +#: ../Doc/c-api/buffer.rst:291 ../Doc/c-api/buffer.rst:340 +#: ../Doc/c-api/buffer.rst:342 msgid "if needed" msgstr "si es necesario" -#: ../Doc/c-api/buffer.rst:287 ../Doc/c-api/buffer.rst:289 -#: ../Doc/c-api/buffer.rst:291 ../Doc/c-api/buffer.rst:309 -#: ../Doc/c-api/buffer.rst:311 ../Doc/c-api/buffer.rst:313 -#: ../Doc/c-api/buffer.rst:315 ../Doc/c-api/buffer.rst:338 -#: ../Doc/c-api/buffer.rst:340 ../Doc/c-api/buffer.rst:342 -#: ../Doc/c-api/buffer.rst:344 ../Doc/c-api/buffer.rst:346 -#: ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:293 ../Doc/c-api/buffer.rst:295 +#: ../Doc/c-api/buffer.rst:297 ../Doc/c-api/buffer.rst:315 +#: ../Doc/c-api/buffer.rst:317 ../Doc/c-api/buffer.rst:319 +#: ../Doc/c-api/buffer.rst:321 ../Doc/c-api/buffer.rst:344 +#: ../Doc/c-api/buffer.rst:346 ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:350 ../Doc/c-api/buffer.rst:352 +#: ../Doc/c-api/buffer.rst:354 msgid "NULL" msgstr "NULL" -#: ../Doc/c-api/buffer.rst:298 +#: ../Doc/c-api/buffer.rst:304 msgid "contiguity requests" msgstr "solicitudes de contigüidad" -#: ../Doc/c-api/buffer.rst:300 +#: ../Doc/c-api/buffer.rst:306 msgid "" "C or Fortran :term:`contiguity ` can be explicitly requested, " "with and without stride information. Without stride information, the buffer " @@ -621,32 +632,32 @@ msgstr "" "búfer debe ser C-contiguo." # NOTE: Sera arreglado en 3.12.1? -#: ../Doc/c-api/buffer.rst:307 ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:313 ../Doc/c-api/buffer.rst:338 msgid "contig" msgstr "contig" -#: ../Doc/c-api/buffer.rst:309 ../Doc/c-api/buffer.rst:315 -#: ../Doc/c-api/buffer.rst:346 ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:315 ../Doc/c-api/buffer.rst:321 +#: ../Doc/c-api/buffer.rst:352 ../Doc/c-api/buffer.rst:354 msgid "C" msgstr "C" -#: ../Doc/c-api/buffer.rst:311 +#: ../Doc/c-api/buffer.rst:317 msgid "F" msgstr "F" -#: ../Doc/c-api/buffer.rst:313 +#: ../Doc/c-api/buffer.rst:319 msgid "C or F" msgstr "C o F" -#: ../Doc/c-api/buffer.rst:315 +#: ../Doc/c-api/buffer.rst:321 msgid ":c:macro:`PyBUF_ND`" msgstr ":c:macro:`PyBUF_ND`" -#: ../Doc/c-api/buffer.rst:320 +#: ../Doc/c-api/buffer.rst:326 msgid "compound requests" msgstr "solicitudes compuestas" -#: ../Doc/c-api/buffer.rst:322 +#: ../Doc/c-api/buffer.rst:328 msgid "" "All possible requests are fully defined by some combination of the flags in " "the previous section. For convenience, the buffer protocol provides " @@ -657,7 +668,7 @@ msgstr "" "protocolo de memoria intermedia proporciona combinaciones de uso frecuente " "como indicadores únicos." -#: ../Doc/c-api/buffer.rst:326 +#: ../Doc/c-api/buffer.rst:332 msgid "" "In the following table *U* stands for undefined contiguity. The consumer " "would have to call :c:func:`PyBuffer_IsContiguous` to determine contiguity." @@ -666,39 +677,39 @@ msgstr "" "tendría que llamar a :c:func:`PyBuffer_IsContiguous` para determinar la " "contigüidad." -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:338 msgid "readonly" msgstr "sólo lectura" -#: ../Doc/c-api/buffer.rst:332 +#: ../Doc/c-api/buffer.rst:338 msgid "format" msgstr "formato" -#: ../Doc/c-api/buffer.rst:334 ../Doc/c-api/buffer.rst:336 -#: ../Doc/c-api/buffer.rst:338 ../Doc/c-api/buffer.rst:340 -#: ../Doc/c-api/buffer.rst:342 ../Doc/c-api/buffer.rst:344 +#: ../Doc/c-api/buffer.rst:340 ../Doc/c-api/buffer.rst:342 +#: ../Doc/c-api/buffer.rst:344 ../Doc/c-api/buffer.rst:346 +#: ../Doc/c-api/buffer.rst:348 ../Doc/c-api/buffer.rst:350 msgid "U" msgstr "U" -#: ../Doc/c-api/buffer.rst:334 ../Doc/c-api/buffer.rst:338 -#: ../Doc/c-api/buffer.rst:342 ../Doc/c-api/buffer.rst:346 +#: ../Doc/c-api/buffer.rst:340 ../Doc/c-api/buffer.rst:344 +#: ../Doc/c-api/buffer.rst:348 ../Doc/c-api/buffer.rst:352 msgid "0" msgstr "0" -#: ../Doc/c-api/buffer.rst:336 ../Doc/c-api/buffer.rst:340 -#: ../Doc/c-api/buffer.rst:344 ../Doc/c-api/buffer.rst:348 +#: ../Doc/c-api/buffer.rst:342 ../Doc/c-api/buffer.rst:346 +#: ../Doc/c-api/buffer.rst:350 ../Doc/c-api/buffer.rst:354 msgid "1 or 0" msgstr "1 o 0" -#: ../Doc/c-api/buffer.rst:353 +#: ../Doc/c-api/buffer.rst:359 msgid "Complex arrays" msgstr "Arreglos complejos" -#: ../Doc/c-api/buffer.rst:356 +#: ../Doc/c-api/buffer.rst:362 msgid "NumPy-style: shape and strides" msgstr "Estilo NumPy: forma y *strides*" -#: ../Doc/c-api/buffer.rst:358 +#: ../Doc/c-api/buffer.rst:364 msgid "" "The logical structure of NumPy-style arrays is defined by :c:member:" "`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:`~Py_buffer." @@ -708,7 +719,7 @@ msgstr "" "member:`~Py_buffer.itemsize`, :c:member:`~Py_buffer.ndim`, :c:member:" "`~Py_buffer.shape` y :c:member:`~Py_buffer.strides`." -#: ../Doc/c-api/buffer.rst:361 +#: ../Doc/c-api/buffer.rst:367 msgid "" "If ``ndim == 0``, the memory location pointed to by :c:member:`~Py_buffer." "buf` is interpreted as a scalar of size :c:member:`~Py_buffer.itemsize`. In " @@ -720,7 +731,7 @@ msgstr "" "itemsize`. En ese caso, tanto :c:member:`~Py_buffer.shape` como :c:member:" "`~Py_buffer.strides` son ``NULL``." -#: ../Doc/c-api/buffer.rst:365 +#: ../Doc/c-api/buffer.rst:371 msgid "" "If :c:member:`~Py_buffer.strides` is ``NULL``, the array is interpreted as a " "standard n-dimensional C-array. Otherwise, the consumer must access an n-" @@ -730,14 +741,14 @@ msgstr "" "un arreglo C n-dimensional estándar. De lo contrario, el consumidor debe " "acceder a un arreglo n-dimensional de la siguiente manera:" -#: ../Doc/c-api/buffer.rst:369 +#: ../Doc/c-api/buffer.rst:375 msgid "" "ptr = (char *)buf + indices[0] * strides[0] + ... + indices[n-1] * " "strides[n-1];\n" "item = *((typeof(item) *)ptr);" msgstr "" -#: ../Doc/c-api/buffer.rst:375 +#: ../Doc/c-api/buffer.rst:381 msgid "" "As noted above, :c:member:`~Py_buffer.buf` can point to any location within " "the actual memory block. An exporter can check the validity of a buffer with " @@ -747,7 +758,7 @@ msgstr "" "cualquier ubicación dentro del bloque de memoria real. Un exportador puede " "verificar la validez de un búfer con esta función:" -#: ../Doc/c-api/buffer.rst:379 +#: ../Doc/c-api/buffer.rst:385 #, python-format msgid "" "def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n" @@ -777,11 +788,11 @@ msgid "" " return 0 <= offset+imin and offset+imax+itemsize <= memlen" msgstr "" -#: ../Doc/c-api/buffer.rst:409 +#: ../Doc/c-api/buffer.rst:415 msgid "PIL-style: shape, strides and suboffsets" msgstr "Estilo PIL: forma, *strides* y *suboffsets*" -#: ../Doc/c-api/buffer.rst:411 +#: ../Doc/c-api/buffer.rst:417 msgid "" "In addition to the regular items, PIL-style arrays can contain pointers that " "must be followed in order to get to the next element in a dimension. For " @@ -800,7 +811,7 @@ msgstr "" "`~Py_buffer.buf`, apuntando a dos matrices ``char x[2][3]`` que pueden " "ubicarse en cualquier lugar de la memoria." -#: ../Doc/c-api/buffer.rst:420 +#: ../Doc/c-api/buffer.rst:426 msgid "" "Here is a function that returns a pointer to the element in an N-D array " "pointed to by an N-dimensional index when there are both non-``NULL`` " @@ -810,7 +821,7 @@ msgstr "" "la que apunta un índice N-dimensional cuando hay *strides* y *suboffsets* no " "``NULL``:" -#: ../Doc/c-api/buffer.rst:424 +#: ../Doc/c-api/buffer.rst:430 msgid "" "void *get_item_pointer(int ndim, void *buf, Py_ssize_t *strides,\n" " Py_ssize_t *suboffsets, Py_ssize_t *indices) {\n" @@ -826,11 +837,11 @@ msgid "" "}" msgstr "" -#: ../Doc/c-api/buffer.rst:439 +#: ../Doc/c-api/buffer.rst:445 msgid "Buffer-related functions" msgstr "Funciones relacionadas a búfer" -#: ../Doc/c-api/buffer.rst:443 +#: ../Doc/c-api/buffer.rst:449 msgid "" "Return ``1`` if *obj* supports the buffer interface otherwise ``0``. When " "``1`` is returned, it doesn't guarantee that :c:func:`PyObject_GetBuffer` " @@ -840,7 +851,7 @@ msgstr "" "cuando se retorna ``1``, no garantiza que :c:func:`PyObject_GetBuffer` tenga " "éxito. Esta función siempre finaliza con éxito." -#: ../Doc/c-api/buffer.rst:450 +#: ../Doc/c-api/buffer.rst:456 #, fuzzy msgid "" "Send a request to *exporter* to fill in *view* as specified by *flags*. If " @@ -852,7 +863,7 @@ msgstr "" "del tipo exacto, DEBE lanzar :c:data:`PyExc_BufferError`, establecer ``view-" ">obj`` en ``NULL`` y retornar ``-1``." -#: ../Doc/c-api/buffer.rst:455 +#: ../Doc/c-api/buffer.rst:461 msgid "" "On success, fill in *view*, set ``view->obj`` to a new reference to " "*exporter* and return 0. In the case of chained buffer providers that " @@ -865,7 +876,7 @@ msgstr "" "PUEDE referirse a este objeto en lugar de *exporter* (Ver :ref:`Estructuras " "de objetos de búfer `)." -#: ../Doc/c-api/buffer.rst:460 +#: ../Doc/c-api/buffer.rst:466 msgid "" "Successful calls to :c:func:`PyObject_GetBuffer` must be paired with calls " "to :c:func:`PyBuffer_Release`, similar to :c:func:`malloc` and :c:func:" @@ -877,7 +888,7 @@ msgstr "" "func:`free`. Por lo tanto, después de que el consumidor haya terminado con " "el búfer, :c:func:`PyBuffer_Release` debe llamarse exactamente una vez." -#: ../Doc/c-api/buffer.rst:468 +#: ../Doc/c-api/buffer.rst:474 #, fuzzy msgid "" "Release the buffer *view* and release the :term:`strong reference` (i.e. " @@ -889,7 +900,7 @@ msgstr "" ">obj``. Esta función DEBE llamarse cuando el búfer ya no se utiliza, de lo " "contrario, pueden producirse fugas de referencia." -#: ../Doc/c-api/buffer.rst:473 +#: ../Doc/c-api/buffer.rst:479 msgid "" "It is an error to call this function on a buffer that was not obtained via :" "c:func:`PyObject_GetBuffer`." @@ -897,7 +908,7 @@ msgstr "" "Es un error llamar a esta función en un búfer que no se obtuvo a través de :" "c:func:`PyObject_GetBuffer`." -#: ../Doc/c-api/buffer.rst:479 +#: ../Doc/c-api/buffer.rst:485 #, fuzzy msgid "" "Return the implied :c:member:`~Py_buffer.itemsize` from :c:member:" @@ -906,7 +917,7 @@ msgstr "" "Retorna el :c:data:`~Py_buffer.itemsize` implícito de :c:data:`~Py_buffer." "format`. En caso de error, lanza una excepción y retorna -1." -#: ../Doc/c-api/buffer.rst:487 +#: ../Doc/c-api/buffer.rst:493 msgid "" "Return ``1`` if the memory defined by the *view* is C-style (*order* is " "``'C'``) or Fortran-style (*order* is ``'F'``) :term:`contiguous` or either " @@ -918,7 +929,7 @@ msgstr "" "cualquiera (*order* es ``'A'``). Retorna ``0`` de lo contrario. Esta función " "siempre finaliza con éxito." -#: ../Doc/c-api/buffer.rst:494 +#: ../Doc/c-api/buffer.rst:500 msgid "" "Get the memory area pointed to by the *indices* inside the given *view*. " "*indices* must point to an array of ``view->ndim`` indices." @@ -926,7 +937,7 @@ msgstr "" "Obtiene el área de memoria señalada por los *indices* dentro del *view* " "dado. *indices* deben apuntar a un arreglo de índices ``view->ndim``." -#: ../Doc/c-api/buffer.rst:500 +#: ../Doc/c-api/buffer.rst:506 msgid "" "Copy contiguous *len* bytes from *buf* to *view*. *fort* can be ``'C'`` or " "``'F'`` (for C-style or Fortran-style ordering). ``0`` is returned on " @@ -936,7 +947,7 @@ msgstr "" "``'F'`` (para pedidos al estilo C o al estilo Fortran). ``0`` se retorna en " "caso de éxito, ``-1`` en caso de error." -#: ../Doc/c-api/buffer.rst:507 +#: ../Doc/c-api/buffer.rst:513 msgid "" "Copy *len* bytes from *src* to its contiguous representation in *buf*. " "*order* can be ``'C'`` or ``'F'`` or ``'A'`` (for C-style or Fortran-style " @@ -947,11 +958,11 @@ msgstr "" "Fortran o cualquiera) ``0`` se retorna en caso de éxito, ``-1`` en caso de " "error." -#: ../Doc/c-api/buffer.rst:511 +#: ../Doc/c-api/buffer.rst:517 msgid "This function fails if *len* != *src->len*." msgstr "Esta función falla si *len* != *src->len*." -#: ../Doc/c-api/buffer.rst:516 +#: ../Doc/c-api/buffer.rst:522 msgid "" "Copy data from *src* to *dest* buffer. Can convert between C-style and or " "Fortran-style buffers." @@ -959,11 +970,11 @@ msgstr "" "Copiar datos del búfer *src* al *dest*. Puede convertir entre búferes de " "estilo C o Fortran." -#: ../Doc/c-api/buffer.rst:519 +#: ../Doc/c-api/buffer.rst:525 msgid "``0`` is returned on success, ``-1`` on error." msgstr "Se retorna ``0`` en caso de éxito, ``-1`` en caso de error." -#: ../Doc/c-api/buffer.rst:523 +#: ../Doc/c-api/buffer.rst:529 msgid "" "Fill the *strides* array with byte-strides of a :term:`contiguous` (C-style " "if *order* is ``'C'`` or Fortran-style if *order* is ``'F'``) array of the " @@ -973,7 +984,7 @@ msgstr "" "(estilo C si *order* es ``'C'`` o estilo Fortran si *order* es ``'F '`` ) " "arreglo de la forma dada con el número dado de bytes por elemento." -#: ../Doc/c-api/buffer.rst:530 +#: ../Doc/c-api/buffer.rst:536 msgid "" "Handle buffer requests for an exporter that wants to expose *buf* of size " "*len* with writability set according to *readonly*. *buf* is interpreted as " @@ -983,7 +994,7 @@ msgstr "" "de tamaño *len* con capacidad de escritura establecida de acuerdo con " "*readonly*. *buf* se interpreta como una secuencia de bytes sin signo." -#: ../Doc/c-api/buffer.rst:534 +#: ../Doc/c-api/buffer.rst:540 msgid "" "The *flags* argument indicates the request type. This function always fills " "in *view* as specified by flags, unless *buf* has been designated as read-" @@ -994,7 +1005,7 @@ msgstr "" "designado como solo lectura y :c:macro:`PyBUF_WRITABLE` esté configurado en " "*flags*." -#: ../Doc/c-api/buffer.rst:538 +#: ../Doc/c-api/buffer.rst:544 #, fuzzy msgid "" "On success, set ``view->obj`` to a new reference to *exporter* and return 0. " @@ -1005,7 +1016,7 @@ msgstr "" "y retorna 0. De lo contrario, aumenta :c:data:`PyExc_BufferError`, establece " "``view->obj`` en ``NULL`` y retorna ``-1``;" -#: ../Doc/c-api/buffer.rst:542 +#: ../Doc/c-api/buffer.rst:548 msgid "" "If this function is used as part of a :ref:`getbufferproc `, " "*exporter* MUST be set to the exporting object and *flags* must be passed " @@ -1041,16 +1052,16 @@ msgstr "Protocolo búfer" msgid "PyBufferProcs (C type)" msgstr "Protocolo búfer" -#: ../Doc/c-api/buffer.rst:295 +#: ../Doc/c-api/buffer.rst:301 #, fuzzy msgid "contiguous" msgstr "contig" -#: ../Doc/c-api/buffer.rst:295 +#: ../Doc/c-api/buffer.rst:301 #, fuzzy msgid "C-contiguous" msgstr "contig" -#: ../Doc/c-api/buffer.rst:295 +#: ../Doc/c-api/buffer.rst:301 msgid "Fortran contiguous" msgstr "" diff --git a/c-api/bytearray.po b/c-api/bytearray.po index a04bbe978a..21ebfd72e8 100644 --- a/c-api/bytearray.po +++ b/c-api/bytearray.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-04-09 09:25+0200\n" "Last-Translator: David Spindola\n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.6\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/bytearray.rst:6 msgid "Byte Array Objects" @@ -69,8 +68,8 @@ msgstr "Funciones API directas" #: ../Doc/c-api/bytearray.rst:42 msgid "" -"Return a new bytearray object from any object, *o*, that implements " -"the :ref:`buffer protocol `." +"Return a new bytearray object from any object, *o*, that implements the :ref:" +"`buffer protocol `." msgstr "" "Retorna un nuevo objeto de arreglo de bytes de cualquier objeto, *o*, que " "implementa el :ref:`buffer protocol `." @@ -108,24 +107,32 @@ msgstr "" "nulo adicional agregado." #: ../Doc/c-api/bytearray.rst:76 -msgid "Resize the internal buffer of *bytearray* to *len*." +#, fuzzy +msgid "" +"Resize the internal buffer of *bytearray* to *len*. Failure is a ``-1`` " +"return with an exception set." msgstr "Cambia el tamaño del búfer interno de *bytearray* a *len*." #: ../Doc/c-api/bytearray.rst:79 +msgid "" +"A negative *len* will now result in an exception being set and -1 returned." +msgstr "" + +#: ../Doc/c-api/bytearray.rst:84 msgid "Macros" msgstr "Macros" -#: ../Doc/c-api/bytearray.rst:81 +#: ../Doc/c-api/bytearray.rst:86 msgid "These macros trade safety for speed and they don't check pointers." msgstr "" "Estos macros intercambian seguridad por velocidad y no comprueban punteros." -#: ../Doc/c-api/bytearray.rst:85 +#: ../Doc/c-api/bytearray.rst:90 msgid "Similar to :c:func:`PyByteArray_AsString`, but without error checking." msgstr "" "Similar a :c:func:`PyByteArray_AsString`, pero sin comprobación de errores." -#: ../Doc/c-api/bytearray.rst:90 +#: ../Doc/c-api/bytearray.rst:95 msgid "Similar to :c:func:`PyByteArray_Size`, but without error checking." msgstr "" "Similar a :c:func:`PyByteArray_Size`, pero sin comprobación de errores." diff --git a/c-api/bytes.po b/c-api/bytes.po index 6af47b82a9..e8c25a4e98 100644 --- a/c-api/bytes.po +++ b/c-api/bytes.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-10-13 01:23-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.7\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/bytes.rst:6 msgid "Bytes Objects" @@ -399,6 +398,29 @@ msgstr "" "reference` a *newpart* (es decir, disminuye su recuento de referencias)." #: ../Doc/c-api/bytes.rst:194 +msgid "Similar to ``sep.join(iterable)`` in Python." +msgstr "" + +#: ../Doc/c-api/bytes.rst:196 +msgid "" +"*sep* must be Python :class:`bytes` object. (Note that :c:func:" +"`PyUnicode_Join` accepts ``NULL`` separator and treats it as a space, " +"whereas :c:func:`PyBytes_Join` doesn't accept ``NULL`` separator.)" +msgstr "" + +#: ../Doc/c-api/bytes.rst:201 +msgid "" +"*iterable* must be an iterable object yielding objects that implement the :" +"ref:`buffer protocol `." +msgstr "" + +#: ../Doc/c-api/bytes.rst:204 +msgid "" +"On success, return a new :class:`bytes` object. On error, set an exception " +"and return ``NULL``." +msgstr "" + +#: ../Doc/c-api/bytes.rst:212 msgid "" "Resize a bytes object. *newsize* will be the new length of the bytes object. " "You can think of it as creating a new bytes object and destroying the old " diff --git a/c-api/capsule.po b/c-api/capsule.po index 97a0afb310..a21c559e1c 100644 --- a/c-api/capsule.po +++ b/c-api/capsule.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-04-11 20:18+0100\n" "Last-Translator: David Spindola\n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.6\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/capsule.rst:6 msgid "Capsules" @@ -43,12 +42,11 @@ msgid "" "loaded modules." msgstr "" "Este subtipo de :c:type:`PyObject` representa un valor opaco, útil para los " -"módulos de extensión C que necesitan pasar un valor opaco (como un " -"puntero :c:expr:`void*`) a través del código Python a otro código C . A " -"menudo se usa para hacer que un puntero de función C definido en un módulo " -"esté disponible para otros módulos, por lo que el mecanismo de importación " -"regular se puede usar para acceder a las API C definidas en módulos cargados " -"dinámicamente." +"módulos de extensión C que necesitan pasar un valor opaco (como un puntero :" +"c:expr:`void*`) a través del código Python a otro código C . A menudo se usa " +"para hacer que un puntero de función C definido en un módulo esté disponible " +"para otros módulos, por lo que el mecanismo de importación regular se puede " +"usar para acceder a las API C definidas en módulos cargados dinámicamente." #: ../Doc/c-api/capsule.rst:27 msgid "The type of a destructor callback for a capsule. Defined as::" @@ -147,8 +145,8 @@ msgstr "" #: ../Doc/c-api/capsule.rst:76 msgid "" "It is legal for a capsule to have a ``NULL`` destructor. This makes a " -"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " -"or :c:func:`PyErr_Occurred` to disambiguate." +"``NULL`` return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :" +"c:func:`PyErr_Occurred` to disambiguate." msgstr "" "Es legal que una cápsula tenga un destructor ``NULL``. Esto hace que un " "código de retorno ``NULL`` sea algo ambiguo; use :c:func:`PyCapsule_IsValid` " @@ -165,12 +163,12 @@ msgstr "" #: ../Doc/c-api/capsule.rst:86 msgid "" "It is legal for a capsule to have a ``NULL`` context. This makes a ``NULL`` " -"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " -"or :c:func:`PyErr_Occurred` to disambiguate." +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." msgstr "" "Es legal que una cápsula tenga un contexto ``NULL``. Esto hace que un código " -"de retorno ``NULL`` sea algo ambiguo; use :c:func:`PyCapsule_IsValid` " -"o :c:func:`PyErr_Occurred` para desambiguar." +"de retorno ``NULL`` sea algo ambiguo; use :c:func:`PyCapsule_IsValid` o :c:" +"func:`PyErr_Occurred` para desambiguar." #: ../Doc/c-api/capsule.rst:93 msgid "" @@ -183,12 +181,12 @@ msgstr "" #: ../Doc/c-api/capsule.rst:96 msgid "" "It is legal for a capsule to have a ``NULL`` name. This makes a ``NULL`` " -"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` " -"or :c:func:`PyErr_Occurred` to disambiguate." +"return code somewhat ambiguous; use :c:func:`PyCapsule_IsValid` or :c:func:" +"`PyErr_Occurred` to disambiguate." msgstr "" "Es legal que una cápsula tenga un nombre ``NULL``. Esto hace que un código " -"de retorno ``NULL`` sea algo ambiguo; use :c:func:`PyCapsule_IsValid` " -"o :c:func:`PyErr_Occurred` para desambiguar." +"de retorno ``NULL`` sea algo ambiguo; use :c:func:`PyCapsule_IsValid` o :c:" +"func:`PyErr_Occurred` para desambiguar." #: ../Doc/c-api/capsule.rst:103 msgid "" @@ -204,17 +202,31 @@ msgstr "" #: ../Doc/c-api/capsule.rst:108 msgid "" +"This function splits *name* on the ``.`` character, and imports the first " +"element. It then processes further elements using attribute lookups." +msgstr "" + +#: ../Doc/c-api/capsule.rst:111 +msgid "" "Return the capsule's internal *pointer* on success. On failure, set an " "exception and return ``NULL``." msgstr "" "Retorna el puntero *pointer* interno de la cápsula en caso de éxito. En caso " "de falla, establece una excepción y retorna ``NULL``." -#: ../Doc/c-api/capsule.rst:111 +#: ../Doc/c-api/capsule.rst:116 +msgid "" +"If *name* points to an attribute of some submodule or subpackage, this " +"submodule or subpackage must be previously imported using other means (for " +"example, by using :c:func:`PyImport_ImportModule`) for the attribute lookups " +"to succeed." +msgstr "" + +#: ../Doc/c-api/capsule.rst:121 msgid "*no_block* has no effect anymore." msgstr "*no_block* ya no tiene efecto." -#: ../Doc/c-api/capsule.rst:117 +#: ../Doc/c-api/capsule.rst:127 msgid "" "Determines whether or not *capsule* is a valid capsule. A valid capsule is " "non-``NULL``, passes :c:func:`PyCapsule_CheckExact`, has a non-``NULL`` " @@ -224,11 +236,11 @@ msgid "" msgstr "" "Determina si *capsule* es o no una cápsula válida. Una cápsula válida no es " "``NULL``, pasa :c:func:`PyCapsule_CheckExact`, tiene un puntero no ``NULL`` " -"almacenado y su nombre interno coincide con el parámetro *name*. " -"(Consulte :c:func:`PyCapsule_GetPointer` para obtener información sobre cómo " -"se comparan los nombres de las cápsulas)." +"almacenado y su nombre interno coincide con el parámetro *name*. (Consulte :" +"c:func:`PyCapsule_GetPointer` para obtener información sobre cómo se " +"comparan los nombres de las cápsulas)." -#: ../Doc/c-api/capsule.rst:123 +#: ../Doc/c-api/capsule.rst:133 msgid "" "In other words, if :c:func:`PyCapsule_IsValid` returns a true value, calls " "to any of the accessors (any function starting with ``PyCapsule_Get``) are " @@ -238,7 +250,7 @@ msgstr "" "verdadero, se garantiza que las llamadas a cualquiera de las funciones de " "acceso (cualquier función que comience con ``PyCapsule_Get``) tendrán éxito." -#: ../Doc/c-api/capsule.rst:127 +#: ../Doc/c-api/capsule.rst:137 msgid "" "Return a nonzero value if the object is valid and matches the name passed " "in. Return ``0`` otherwise. This function will not fail." @@ -246,23 +258,23 @@ msgstr "" "Retorna un valor distinto de cero si el objeto es válido y coincide con el " "nombre pasado. Retorna ``0`` de lo contrario. Esta función no fallará." -#: ../Doc/c-api/capsule.rst:133 +#: ../Doc/c-api/capsule.rst:143 msgid "Set the context pointer inside *capsule* to *context*." msgstr "Establece el puntero de contexto dentro de *capsule* a *context*." -#: ../Doc/c-api/capsule.rst:135 ../Doc/c-api/capsule.rst:142 -#: ../Doc/c-api/capsule.rst:151 ../Doc/c-api/capsule.rst:159 +#: ../Doc/c-api/capsule.rst:145 ../Doc/c-api/capsule.rst:152 +#: ../Doc/c-api/capsule.rst:161 ../Doc/c-api/capsule.rst:169 msgid "" "Return ``0`` on success. Return nonzero and set an exception on failure." msgstr "" "Retorna ``0`` en caso de éxito. Retorna distinto de cero y establece una " "excepción en caso de error." -#: ../Doc/c-api/capsule.rst:140 +#: ../Doc/c-api/capsule.rst:150 msgid "Set the destructor inside *capsule* to *destructor*." msgstr "Establece el destructor dentro de *capsule* en *destructor*." -#: ../Doc/c-api/capsule.rst:147 +#: ../Doc/c-api/capsule.rst:157 msgid "" "Set the name inside *capsule* to *name*. If non-``NULL``, the name must " "outlive the capsule. If the previous *name* stored in the capsule was not " @@ -272,7 +284,7 @@ msgstr "" "nombre debe sobrevivir a la cápsula. Si el *name* anterior almacenado en la " "cápsula no era ``NULL``, no se intenta liberarlo." -#: ../Doc/c-api/capsule.rst:156 +#: ../Doc/c-api/capsule.rst:166 msgid "" "Set the void pointer inside *capsule* to *pointer*. The pointer may not be " "``NULL``." diff --git a/c-api/code.po b/c-api/code.po index 4abd7357a9..3325aae5ca 100644 --- a/c-api/code.po +++ b/c-api/code.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2022-10-30 17:20-0300\n" "Last-Translator: Sofía Denner \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/code.rst:8 msgid "Code Objects" @@ -63,34 +63,38 @@ msgstr "" #: ../Doc/c-api/code.rst:35 #, fuzzy -msgid "Return the number of free variables in a code object." +msgid "" +"Return the number of :term:`free (closure) variables ` in " +"a code object." msgstr "Retorna el número de variables libres en *co*." -#: ../Doc/c-api/code.rst:39 +#: ../Doc/c-api/code.rst:40 #, fuzzy -msgid "Return the position of the first free variable in a code object." +msgid "" +"Return the position of the first :term:`free (closure) variable ` in a code object." msgstr "Retorna el número de variables libres en *co*." -#: ../Doc/c-api/code.rst:43 +#: ../Doc/c-api/code.rst:45 msgid "" "Renamed from ``PyCode_GetFirstFree`` as part of :ref:`unstable-c-api`. The " "old name is deprecated, but will remain available until the signature " "changes again." msgstr "" -#: ../Doc/c-api/code.rst:49 +#: ../Doc/c-api/code.rst:51 msgid "" "Return a new code object. If you need a dummy code object to create a " "frame, use :c:func:`PyCode_NewEmpty` instead." msgstr "" -#: ../Doc/c-api/code.rst:52 +#: ../Doc/c-api/code.rst:54 msgid "" "Since the definition of the bytecode changes often, calling :c:func:" "`PyUnstable_Code_New` directly can bind you to a precise Python version." msgstr "" -#: ../Doc/c-api/code.rst:55 +#: ../Doc/c-api/code.rst:57 #, fuzzy msgid "" "The many arguments of this function are inter-dependent in complex ways, " @@ -106,18 +110,18 @@ msgstr "" "estos valores probablemente resulten en ejecuciones incorrectas o fallas en " "la VM." -#: ../Doc/c-api/code.rst:59 +#: ../Doc/c-api/code.rst:61 #, fuzzy msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "Se agregó el parámetro ``exceptiontable``." -#: ../Doc/c-api/code.rst:66 +#: ../Doc/c-api/code.rst:68 msgid "" "Renamed from ``PyCode_New`` as part of :ref:`unstable-c-api`. The old name " "is deprecated, but will remain available until the signature changes again." msgstr "" -#: ../Doc/c-api/code.rst:72 +#: ../Doc/c-api/code.rst:74 #, fuzzy msgid "" "Similar to :c:func:`PyUnstable_Code_New`, but with an extra " @@ -128,22 +132,22 @@ msgstr "" "para argumentos solo posicionales. Las mismas advertencias que aplican a " "``PyCode_New`` también aplican a esta función." -#: ../Doc/c-api/code.rst:77 +#: ../Doc/c-api/code.rst:79 msgid "as ``PyCode_NewWithPosOnlyArgs``" msgstr "" -#: ../Doc/c-api/code.rst:79 +#: ../Doc/c-api/code.rst:81 #, fuzzy msgid "Added ``qualname`` and ``exceptiontable`` parameters." msgstr "Se agregó el parámetro ``exceptiontable``." -#: ../Doc/c-api/code.rst:84 +#: ../Doc/c-api/code.rst:86 msgid "" "Renamed to ``PyUnstable_Code_NewWithPosOnlyArgs``. The old name is " "deprecated, but will remain available until the signature changes again." msgstr "" -#: ../Doc/c-api/code.rst:90 +#: ../Doc/c-api/code.rst:92 msgid "" "Return a new empty code object with the specified filename, function name, " "and first line number. The resulting code object will raise an ``Exception`` " @@ -153,7 +157,7 @@ msgstr "" "especificado, el nombre de la función y el número de la primera línea. Si el " "objeto código resultante es ejecutado, lanzará una ``Exception``." -#: ../Doc/c-api/code.rst:96 +#: ../Doc/c-api/code.rst:98 msgid "" "Return the line number of the instruction that occurs on or before " "``byte_offset`` and ends after it. If you just need the line number of a " @@ -163,7 +167,7 @@ msgstr "" "``byte_offset`` y finaliza después. Si solo necesita el número de línea de " "un marco, use :c:func:`PyFrame_GetLineNumber` en su lugar." -#: ../Doc/c-api/code.rst:99 +#: ../Doc/c-api/code.rst:101 #, fuzzy msgid "" "For efficiently iterating over the line numbers in a code object, use :pep:" @@ -173,7 +177,7 @@ msgstr "" "código, use `la API descrita en PEP 626 `_." -#: ../Doc/c-api/code.rst:104 +#: ../Doc/c-api/code.rst:106 msgid "" "Sets the passed ``int`` pointers to the source code line and column numbers " "for the instruction at ``byte_offset``. Sets the value to ``0`` when " @@ -184,11 +188,11 @@ msgstr "" "en ``0`` cuando la información no está disponible para algún elemento en " "particular." -#: ../Doc/c-api/code.rst:108 +#: ../Doc/c-api/code.rst:110 msgid "Returns ``1`` if the function succeeds and 0 otherwise." msgstr "Retorna ``1`` si la función fue exitosa y ``0`` de lo contrario." -#: ../Doc/c-api/code.rst:114 +#: ../Doc/c-api/code.rst:116 msgid "" "Equivalent to the Python code ``getattr(co, 'co_code')``. Returns a strong " "reference to a :c:type:`PyBytesObject` representing the bytecode in a code " @@ -199,7 +203,7 @@ msgstr "" "un objecto código. En caso de error se retorna ``NULL`` y se lanza una " "excepción." -#: ../Doc/c-api/code.rst:119 +#: ../Doc/c-api/code.rst:121 msgid "" "This ``PyBytesObject`` may be created on-demand by the interpreter and does " "not necessarily represent the bytecode actually executed by CPython. The " @@ -210,7 +214,7 @@ msgstr "" "CPython. Los casos de uso principales para esta función son depuradores y " "perfiladores." -#: ../Doc/c-api/code.rst:127 +#: ../Doc/c-api/code.rst:129 msgid "" "Equivalent to the Python code ``getattr(co, 'co_varnames')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " @@ -221,7 +225,7 @@ msgstr "" "las variables locales. En caso de error, retorna ``NULL`` y lanza una " "excepción." -#: ../Doc/c-api/code.rst:136 +#: ../Doc/c-api/code.rst:138 msgid "" "Equivalent to the Python code ``getattr(co, 'co_cellvars')``. Returns a new " "reference to a :c:type:`PyTupleObject` containing the names of the local " @@ -233,18 +237,20 @@ msgstr "" "las variables locales referenciadas por funciones anidadas. En caso de " "error, retorna ``NULL`` y lanza una excepción." -#: ../Doc/c-api/code.rst:145 +#: ../Doc/c-api/code.rst:147 +#, fuzzy msgid "" "Equivalent to the Python code ``getattr(co, 'co_freevars')``. Returns a new " -"reference to a :c:type:`PyTupleObject` containing the names of the free " -"variables. On error, ``NULL`` is returned and an exception is raised." +"reference to a :c:type:`PyTupleObject` containing the names of the :term:" +"`free (closure) variables `. On error, ``NULL`` is " +"returned and an exception is raised." msgstr "" "Equivalente al código Python ``getattr(co, 'co_freevars')``. Retorna una " "nueva referencia a un :c:type:`PyTupleObject` que contiene los nombres de " "las variables libres. En caso de error, retorna ``NULL`` y lanza una " "excepción." -#: ../Doc/c-api/code.rst:153 +#: ../Doc/c-api/code.rst:156 msgid "" "Register *callback* as a code object watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyCode_ClearWatcher`. In case " @@ -252,7 +258,7 @@ msgid "" "exception." msgstr "" -#: ../Doc/c-api/code.rst:162 +#: ../Doc/c-api/code.rst:165 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyCode_AddWatcher` for the current interpreter. Return ``0`` on success, or " @@ -260,25 +266,25 @@ msgid "" "never registered.)" msgstr "" -#: ../Doc/c-api/code.rst:171 +#: ../Doc/c-api/code.rst:174 msgid "" "Enumeration of possible code object watcher events: - " "``PY_CODE_EVENT_CREATE`` - ``PY_CODE_EVENT_DESTROY``" msgstr "" -#: ../Doc/c-api/code.rst:179 +#: ../Doc/c-api/code.rst:182 msgid "Type of a code object watcher callback function." msgstr "" -#: ../Doc/c-api/code.rst:181 +#: ../Doc/c-api/code.rst:184 msgid "" "If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked after " -"`co` has been fully initialized. Otherwise, the callback is invoked before " +"*co* has been fully initialized. Otherwise, the callback is invoked before " "the destruction of *co* takes place, so the prior state of *co* can be " "inspected." msgstr "" -#: ../Doc/c-api/code.rst:186 +#: ../Doc/c-api/code.rst:189 msgid "" "If *event* is ``PY_CODE_EVENT_DESTROY``, taking a reference in the callback " "to the about-to-be-destroyed code object will resurrect it and prevent it " @@ -286,7 +292,7 @@ msgid "" "later, any watcher callbacks active at that time will be called again." msgstr "" -#: ../Doc/c-api/code.rst:191 +#: ../Doc/c-api/code.rst:194 msgid "" "Users of this API should not rely on internal runtime implementation " "details. Such details may include, but are not limited to, the exact order " @@ -296,14 +302,14 @@ msgid "" "the Python code being executed." msgstr "" -#: ../Doc/c-api/code.rst:198 +#: ../Doc/c-api/code.rst:201 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " "will be printed as an unraisable exception using :c:func:" "`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: ../Doc/c-api/code.rst:202 +#: ../Doc/c-api/code.rst:205 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -312,85 +318,192 @@ msgid "" "it before returning." msgstr "" -#: ../Doc/c-api/code.rst:212 +#: ../Doc/c-api/code.rst:217 +#, fuzzy +msgid "Code Object Flags" +msgstr "Objetos código" + +#: ../Doc/c-api/code.rst:219 +msgid "" +"Code objects contain a bit-field of flags, which can be retrieved as the :" +"attr:`~codeobject.co_flags` Python attribute (for example using :c:func:" +"`PyObject_GetAttrString`), and set using a *flags* argument to :c:func:" +"`PyUnstable_Code_New` and similar functions." +msgstr "" + +#: ../Doc/c-api/code.rst:224 +msgid "" +"Flags whose names start with ``CO_FUTURE_`` correspond to features normally " +"selectable by :ref:`future statements `. These flags can be used in :" +"c:member:`PyCompilerFlags.cf_flags`. Note that many ``CO_FUTURE_`` flags are " +"mandatory in current versions of Python, and setting them has no effect." +msgstr "" + +#: ../Doc/c-api/code.rst:230 +msgid "" +"The following flags are available. For their meaning, see the linked " +"documentation of their Python equivalents." +msgstr "" + +#: ../Doc/c-api/code.rst:238 +msgid "Flag" +msgstr "" + +#: ../Doc/c-api/code.rst:239 +msgid "Meaning" +msgstr "" + +#: ../Doc/c-api/code.rst:241 +msgid ":py:data:`inspect.CO_OPTIMIZED`" +msgstr "" + +#: ../Doc/c-api/code.rst:243 +msgid ":py:data:`inspect.CO_NEWLOCALS`" +msgstr "" + +#: ../Doc/c-api/code.rst:245 +msgid ":py:data:`inspect.CO_VARARGS`" +msgstr "" + +#: ../Doc/c-api/code.rst:247 +msgid ":py:data:`inspect.CO_VARKEYWORDS`" +msgstr "" + +#: ../Doc/c-api/code.rst:249 +msgid ":py:data:`inspect.CO_NESTED`" +msgstr "" + +#: ../Doc/c-api/code.rst:251 +msgid ":py:data:`inspect.CO_GENERATOR`" +msgstr "" + +#: ../Doc/c-api/code.rst:253 +msgid ":py:data:`inspect.CO_COROUTINE`" +msgstr "" + +#: ../Doc/c-api/code.rst:255 +msgid ":py:data:`inspect.CO_ITERABLE_COROUTINE`" +msgstr "" + +#: ../Doc/c-api/code.rst:257 +msgid ":py:data:`inspect.CO_ASYNC_GENERATOR`" +msgstr "" + +#: ../Doc/c-api/code.rst:259 +msgid ":py:data:`inspect.CO_HAS_DOCSTRING`" +msgstr "" + +#: ../Doc/c-api/code.rst:261 +msgid ":py:data:`inspect.CO_METHOD`" +msgstr "" + +#: ../Doc/c-api/code.rst:264 +msgid "no effect (:py:data:`__future__.division`)" +msgstr "" + +#: ../Doc/c-api/code.rst:266 +msgid "no effect (:py:data:`__future__.absolute_import`)" +msgstr "" + +#: ../Doc/c-api/code.rst:268 +msgid "no effect (:py:data:`__future__.with_statement`)" +msgstr "" + +#: ../Doc/c-api/code.rst:270 +msgid "no effect (:py:data:`__future__.print_function`)" +msgstr "" + +#: ../Doc/c-api/code.rst:272 +msgid "no effect (:py:data:`__future__.unicode_literals`)" +msgstr "" + +#: ../Doc/c-api/code.rst:274 +msgid "no effect (:py:data:`__future__.generator_stop`)" +msgstr "" + +#: ../Doc/c-api/code.rst:276 +msgid ":py:data:`__future__.annotations`" +msgstr "" + +#: ../Doc/c-api/code.rst:280 msgid "Extra information" msgstr "" -#: ../Doc/c-api/code.rst:214 +#: ../Doc/c-api/code.rst:282 msgid "" "To support low-level extensions to frame evaluation, such as external just-" "in-time compilers, it is possible to attach arbitrary extra data to code " "objects." msgstr "" -#: ../Doc/c-api/code.rst:218 +#: ../Doc/c-api/code.rst:286 msgid "" "These functions are part of the unstable C API tier: this functionality is a " "CPython implementation detail, and the API may change without deprecation " "warnings." msgstr "" -#: ../Doc/c-api/code.rst:224 +#: ../Doc/c-api/code.rst:292 msgid "Return a new an opaque index value used to adding data to code objects." msgstr "" -#: ../Doc/c-api/code.rst:226 +#: ../Doc/c-api/code.rst:294 msgid "" "You generally call this function once (per interpreter) and use the result " "with ``PyCode_GetExtra`` and ``PyCode_SetExtra`` to manipulate data on " "individual code objects." msgstr "" -#: ../Doc/c-api/code.rst:230 +#: ../Doc/c-api/code.rst:298 msgid "" "If *free* is not ``NULL``: when a code object is deallocated, *free* will be " "called on non-``NULL`` data stored under the new index. Use :c:func:" "`Py_DecRef` when storing :c:type:`PyObject`." msgstr "" -#: ../Doc/c-api/code.rst:236 +#: ../Doc/c-api/code.rst:304 msgid "as ``_PyEval_RequestCodeExtraIndex``" msgstr "" -#: ../Doc/c-api/code.rst:240 +#: ../Doc/c-api/code.rst:308 msgid "" "Renamed to ``PyUnstable_Eval_RequestCodeExtraIndex``. The old private name " "is deprecated, but will be available until the API changes." msgstr "" -#: ../Doc/c-api/code.rst:246 +#: ../Doc/c-api/code.rst:314 msgid "" "Set *extra* to the extra data stored under the given index. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: ../Doc/c-api/code.rst:249 +#: ../Doc/c-api/code.rst:317 msgid "" "If no data was set under the index, set *extra* to ``NULL`` and return 0 " "without setting an exception." msgstr "" -#: ../Doc/c-api/code.rst:254 +#: ../Doc/c-api/code.rst:322 msgid "as ``_PyCode_GetExtra``" msgstr "" -#: ../Doc/c-api/code.rst:258 +#: ../Doc/c-api/code.rst:326 msgid "" "Renamed to ``PyUnstable_Code_GetExtra``. The old private name is deprecated, " "but will be available until the API changes." msgstr "" -#: ../Doc/c-api/code.rst:264 +#: ../Doc/c-api/code.rst:332 msgid "" "Set the extra data stored under the given index to *extra*. Return 0 on " "success. Set an exception and return -1 on failure." msgstr "" -#: ../Doc/c-api/code.rst:269 +#: ../Doc/c-api/code.rst:337 msgid "as ``_PyCode_SetExtra``" msgstr "" -#: ../Doc/c-api/code.rst:273 +#: ../Doc/c-api/code.rst:341 msgid "" "Renamed to ``PyUnstable_Code_SetExtra``. The old private name is deprecated, " "but will be available until the API changes." @@ -410,22 +523,22 @@ msgstr "" msgid "code object" msgstr "Objetos código" -#: ../Doc/c-api/code.rst:62 +#: ../Doc/c-api/code.rst:64 msgid "PyCode_New (C function)" msgstr "" -#: ../Doc/c-api/code.rst:75 +#: ../Doc/c-api/code.rst:77 msgid "PyCode_NewWithPosOnlyArgs (C function)" msgstr "" -#: ../Doc/c-api/code.rst:234 +#: ../Doc/c-api/code.rst:302 msgid "_PyEval_RequestCodeExtraIndex (C function)" msgstr "" -#: ../Doc/c-api/code.rst:252 +#: ../Doc/c-api/code.rst:320 msgid "_PyCode_GetExtra (C function)" msgstr "" -#: ../Doc/c-api/code.rst:267 +#: ../Doc/c-api/code.rst:335 msgid "_PyCode_SetExtra (C function)" msgstr "" diff --git a/c-api/complex.po b/c-api/complex.po index 5dc96c0222..1121869ce9 100644 --- a/c-api/complex.po +++ b/c-api/complex.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-10-07 00:11-0600\n" "Last-Translator: Rodrigo Tobar \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.7\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/complex.rst:6 msgid "Complex Number Objects" @@ -70,6 +69,7 @@ msgid "The structure is defined as::" msgstr "La estructura se define como::" #: ../Doc/c-api/complex.rst:35 +#, python-brace-format msgid "" "typedef struct {\n" " double real;\n" @@ -145,18 +145,22 @@ msgstr "" "Si *num* es nulo y *exp* no es un número real positivo, este método retorna " "cero y establece :c:data:`errno` a :c:macro:`!EDOM`." -#: ../Doc/c-api/complex.rst:84 +#: ../Doc/c-api/complex.rst:82 +msgid "Set :c:data:`errno` to :c:macro:`!ERANGE` on overflows." +msgstr "" + +#: ../Doc/c-api/complex.rst:86 msgid "Complex Numbers as Python Objects" msgstr "Números complejos como objetos de Python" -#: ../Doc/c-api/complex.rst:89 +#: ../Doc/c-api/complex.rst:91 msgid "" "This subtype of :c:type:`PyObject` represents a Python complex number object." msgstr "" "Este subtipo de :c:type:`PyObject` representa un objeto de número complejo " "de Python." -#: ../Doc/c-api/complex.rst:94 +#: ../Doc/c-api/complex.rst:96 msgid "" "This instance of :c:type:`PyTypeObject` represents the Python complex number " "type. It is the same object as :class:`complex` in the Python layer." @@ -165,7 +169,7 @@ msgstr "" "complejo de Python. Es el mismo objeto que :class:`complex` en la capa de " "Python." -#: ../Doc/c-api/complex.rst:100 +#: ../Doc/c-api/complex.rst:102 msgid "" "Return true if its argument is a :c:type:`PyComplexObject` or a subtype of :" "c:type:`PyComplexObject`. This function always succeeds." @@ -174,7 +178,7 @@ msgstr "" "subtipo de :c:type:`PyComplexObject`. Esta función siempre finaliza con " "éxito." -#: ../Doc/c-api/complex.rst:106 +#: ../Doc/c-api/complex.rst:108 msgid "" "Return true if its argument is a :c:type:`PyComplexObject`, but not a " "subtype of :c:type:`PyComplexObject`. This function always succeeds." @@ -183,7 +187,7 @@ msgstr "" "un subtipo de :c:type:`PyComplexObject`. Esta función siempre finaliza con " "éxito." -#: ../Doc/c-api/complex.rst:112 +#: ../Doc/c-api/complex.rst:114 msgid "" "Create a new Python complex number object from a C :c:type:`Py_complex` " "value. Return ``NULL`` with an exception set on error." @@ -192,7 +196,7 @@ msgstr "" "type:`Py_complex`. Retorna ``NULL`` con una excepción establecida en caso de " "error." -#: ../Doc/c-api/complex.rst:118 +#: ../Doc/c-api/complex.rst:120 msgid "" "Return a new :c:type:`PyComplexObject` object from *real* and *imag*. Return " "``NULL`` with an exception set on error." @@ -200,11 +204,11 @@ msgstr "" "Retorna un nuevo objeto :c:type:`PyComplexObject` de *real* e *imag*. " "Retorna ``NULL`` con una excepción establecida en caso de error." -#: ../Doc/c-api/complex.rst:124 +#: ../Doc/c-api/complex.rst:126 msgid "Return the real part of *op* as a C :c:expr:`double`." msgstr "Retorna la parte real de *op* como :c:expr:`double` en C." -#: ../Doc/c-api/complex.rst:126 +#: ../Doc/c-api/complex.rst:128 msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -217,7 +221,7 @@ msgstr "" "está definido, entonces recurre a :c:func:`PyFloat_AsDouble` y retorna su " "resultado." -#: ../Doc/c-api/complex.rst:132 ../Doc/c-api/complex.rst:148 +#: ../Doc/c-api/complex.rst:134 ../Doc/c-api/complex.rst:150 msgid "" "Upon failure, this method returns ``-1.0`` with an exception set, so one " "should call :c:func:`PyErr_Occurred` to check for errors." @@ -226,15 +230,15 @@ msgstr "" "establecida, por lo que se debe llamar :c:func:`PyErr_Occurred` para " "verificar si hay errores." -#: ../Doc/c-api/complex.rst:135 ../Doc/c-api/complex.rst:151 +#: ../Doc/c-api/complex.rst:137 ../Doc/c-api/complex.rst:153 msgid "Use :meth:`~object.__complex__` if available." msgstr "Use :meth:`~object.__complex__` si está disponible." -#: ../Doc/c-api/complex.rst:140 +#: ../Doc/c-api/complex.rst:142 msgid "Return the imaginary part of *op* as a C :c:expr:`double`." msgstr "Retorna la parte imaginaria de *op* como un :c:expr:`double` de C." -#: ../Doc/c-api/complex.rst:142 +#: ../Doc/c-api/complex.rst:144 msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -248,11 +252,11 @@ msgstr "" "está definido, entonces recurre a :c:func:`PyFloat_AsDouble` y retorna " "``0.0`` en caso de éxito." -#: ../Doc/c-api/complex.rst:156 +#: ../Doc/c-api/complex.rst:158 msgid "Return the :c:type:`Py_complex` value of the complex number *op*." msgstr "Retorna el valor :c:type:`Py_complex` del número complejo *op*." -#: ../Doc/c-api/complex.rst:158 +#: ../Doc/c-api/complex.rst:160 msgid "" "If *op* is not a Python complex number object but has a :meth:`~object." "__complex__` method, this method will first be called to convert *op* to a " @@ -266,7 +270,7 @@ msgstr "" "está definido, entonces recurre a :meth:`~object.__float__`. Si :meth:`!" "__float__` no está definido, entonces recurre a :meth:`~object.__index__`." -#: ../Doc/c-api/complex.rst:164 +#: ../Doc/c-api/complex.rst:166 msgid "" "Upon failure, this method returns :c:type:`Py_complex` with :c:member:" "`~Py_complex.real` set to ``-1.0`` and with an exception set, so one should " @@ -277,7 +281,7 @@ msgstr "" "por lo que se debe llamar a :c:func:`PyErr_Occurred` para verificar si hay " "errores." -#: ../Doc/c-api/complex.rst:168 +#: ../Doc/c-api/complex.rst:170 msgid "Use :meth:`~object.__index__` if available." msgstr "Use :meth:`~object.__index__` si está disponible." diff --git a/c-api/contextvars.po b/c-api/contextvars.po index 1d02d39fd8..d538576821 100644 --- a/c-api/contextvars.po +++ b/c-api/contextvars.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2024-12-10 21:07-0600\n" "Last-Translator: Rodrigo Tobar \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.5\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/contextvars.rst:6 msgid "Context Variables Objects" @@ -166,11 +165,61 @@ msgstr "" "actual para el hilo actual. Retorna ``0`` en caso de éxito y ``-1`` en caso " "de error." -#: ../Doc/c-api/contextvars.rst:105 +#: ../Doc/c-api/contextvars.rst:106 +msgid "" +"Register *callback* as a context object watcher for the current interpreter. " +"Return an ID which may be passed to :c:func:`PyContext_ClearWatcher`. In " +"case of error (e.g. no more watcher IDs available), return ``-1`` and set an " +"exception." +msgstr "" + +#: ../Doc/c-api/contextvars.rst:115 +msgid "" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyContext_AddWatcher` for the current interpreter. Return ``0`` on success, " +"or ``-1`` and set an exception on error (e.g. if the given *watcher_id* was " +"never registered.)" +msgstr "" + +#: ../Doc/c-api/contextvars.rst:124 +msgid "Enumeration of possible context object watcher events:" +msgstr "" + +#: ../Doc/c-api/contextvars.rst:126 +msgid "" +"``Py_CONTEXT_SWITCHED``: The :term:`current context` has switched to a " +"different context. The object passed to the watch callback is the now-" +"current :class:`contextvars.Context` object, or None if no context is " +"current." +msgstr "" + +#: ../Doc/c-api/contextvars.rst:135 +msgid "" +"Context object watcher callback function. The object passed to the callback " +"is event-specific; see :c:type:`PyContextEvent` for details." +msgstr "" + +#: ../Doc/c-api/contextvars.rst:138 +msgid "" +"If the callback returns with an exception set, it must return ``-1``; this " +"exception will be printed as an unraisable exception using :c:func:" +"`PyErr_FormatUnraisable`. Otherwise it should return ``0``." +msgstr "" + +#: ../Doc/c-api/contextvars.rst:142 +msgid "" +"There may already be a pending exception set on entry to the callback. In " +"this case, the callback should return ``0`` with the same exception still " +"set. This means the callback may not call any other API that can set an " +"exception unless it saves and clears the exception state first, and restores " +"it before returning." +msgstr "" + +#: ../Doc/c-api/contextvars.rst:151 msgid "Context variable functions:" msgstr "Funciones variables de contexto:" -#: ../Doc/c-api/contextvars.rst:109 +#: ../Doc/c-api/contextvars.rst:155 msgid "" "Create a new ``ContextVar`` object. The *name* parameter is used for " "introspection and debug purposes. The *def* parameter specifies a default " @@ -183,7 +232,7 @@ msgstr "" "especificar un valor predeterminado. Si se ha producido un error, esta " "función retorna ``NULL``." -#: ../Doc/c-api/contextvars.rst:116 +#: ../Doc/c-api/contextvars.rst:162 msgid "" "Get the value of a context variable. Returns ``-1`` if an error has " "occurred during lookup, and ``0`` if no error occurred, whether or not a " @@ -193,7 +242,7 @@ msgstr "" "un error durante la búsqueda y ``0`` si no se produjo ningún error, se haya " "encontrado o no un valor." -#: ../Doc/c-api/contextvars.rst:120 +#: ../Doc/c-api/contextvars.rst:166 msgid "" "If the context variable was found, *value* will be a pointer to it. If the " "context variable was *not* found, *value* will point to:" @@ -201,23 +250,23 @@ msgstr "" "Si se encontró la variable de contexto, *value* será un puntero a ella. Si " "la variable de contexto *not* se encontró, *value* apuntará a:" -#: ../Doc/c-api/contextvars.rst:123 +#: ../Doc/c-api/contextvars.rst:169 msgid "*default_value*, if not ``NULL``;" msgstr "*default_value*, si no es ``NULL``;" -#: ../Doc/c-api/contextvars.rst:124 +#: ../Doc/c-api/contextvars.rst:170 msgid "the default value of *var*, if not ``NULL``;" msgstr "el valor predeterminado de *var*, si no es ``NULL``;" -#: ../Doc/c-api/contextvars.rst:125 +#: ../Doc/c-api/contextvars.rst:171 msgid "``NULL``" msgstr "``NULL``" -#: ../Doc/c-api/contextvars.rst:127 +#: ../Doc/c-api/contextvars.rst:173 msgid "Except for ``NULL``, the function returns a new reference." msgstr "A excepción de ``NULL``, la función retorna una nueva referencia." -#: ../Doc/c-api/contextvars.rst:131 +#: ../Doc/c-api/contextvars.rst:177 msgid "" "Set the value of *var* to *value* in the current context. Returns a new " "token object for this change, or ``NULL`` if an error has occurred." @@ -225,7 +274,7 @@ msgstr "" "Establece el valor de *var* en *value* en el contexto actual. Retorna un " "nuevo objeto token para este cambio, o ``NULL`` si se ha producido un error." -#: ../Doc/c-api/contextvars.rst:136 +#: ../Doc/c-api/contextvars.rst:182 msgid "" "Reset the state of the *var* context variable to that it was in before :c:" "func:`PyContextVar_Set` that returned the *token* was called. This function " diff --git a/c-api/conversion.po b/c-api/conversion.po index 76376b95c2..66910c9292 100644 --- a/c-api/conversion.po +++ b/c-api/conversion.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-05-09 19:20+0200\n" "Last-Translator: Carlos Mena Pérez <@carlosm00>\n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.5\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/conversion.rst:6 msgid "String conversion and formatting" @@ -229,10 +228,11 @@ msgstr "" "retorna ``-1.0``." #: ../Doc/c-api/conversion.rst:106 +#, fuzzy msgid "" "If ``s`` represents a value that is too large to store in a float (for " "example, ``\"1e500\"`` is such a string on many platforms) then if " -"``overflow_exception`` is ``NULL`` return ``Py_HUGE_VAL`` (with an " +"``overflow_exception`` is ``NULL`` return ``Py_INFINITY`` (with an " "appropriate sign) and don't set any exception. Otherwise, " "``overflow_exception`` must point to a Python exception object; raise that " "exception and return ``-1.0``. In both cases, set ``*endptr`` to point to " diff --git a/c-api/dict.po b/c-api/dict.po index 83848fca31..8856309e07 100644 --- a/c-api/dict.po +++ b/c-api/dict.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2021-08-01 20:34+0200\n" "Last-Translator: Cristián Maureira-Fredes \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/dict.rst:6 msgid "Dictionary Objects" @@ -194,9 +194,10 @@ msgstr "" "de errores, utilice :c:func:`PyDict_GetItemWithError ()` en su lugar." #: ../Doc/c-api/dict.rst:129 +#, fuzzy msgid "" -"Calling this API without :term:`GIL` held had been allowed for historical " -"reason. It is no longer allowed." +"Calling this API without an :term:`attached thread state` had been allowed " +"for historical reason. It is no longer allowed." msgstr "" "Llamar a esta API sin retener el :term:`GIL` había sido permitido por " "motivos históricos.Ya no está permitido." @@ -238,9 +239,8 @@ msgstr "" #: ../Doc/c-api/dict.rst:159 #, fuzzy msgid "" -"Similar than :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:" -"expr:`const char*` UTF-8 encoded bytes string, rather than a :c:expr:" -"`PyObject*`." +"Similar to :c:func:`PyDict_GetItemRef`, but *key* is specified as a :c:expr:" +"`const char*` UTF-8 encoded bytes string, rather than a :c:expr:`PyObject*`." msgstr "" "Esto es lo mismo que :c:func:`PyDict_GetItem`, pero *key* se especifica como " "un :c:type:`const char*`, en lugar de un :c:type:`PyObject*`." @@ -301,8 +301,8 @@ msgstr "" #: ../Doc/c-api/dict.rst:209 msgid "" -"This is similar to :meth:`dict.pop`, but without the default value and not " -"raising :exc:`KeyError` if the key missing." +"Similar to :meth:`dict.pop`, but without the default value and not raising :" +"exc:`KeyError` if the key missing." msgstr "" #: ../Doc/c-api/dict.rst:217 @@ -375,6 +375,7 @@ msgid "For example::" msgstr "Por ejemplo::" #: ../Doc/c-api/dict.rst:263 +#, python-brace-format msgid "" "PyObject *key, *value;\n" "Py_ssize_t pos = 0;\n" @@ -424,6 +425,7 @@ msgid "" msgstr "" #: ../Doc/c-api/dict.rst:298 +#, python-brace-format msgid "" "Py_BEGIN_CRITICAL_SECTION(self->dict);\n" "while (PyDict_Next(self->dict, &pos, &key, &value)) {\n" @@ -432,7 +434,18 @@ msgid "" "Py_END_CRITICAL_SECTION();" msgstr "" -#: ../Doc/c-api/dict.rst:307 +#: ../Doc/c-api/dict.rst:306 +msgid "" +"On the free-threaded build, this function can be used safely inside a " +"critical section. However, the references returned for *pkey* and *pvalue* " +"are :term:`borrowed ` and are only valid while the " +"critical section is held. If you need to use these objects outside the " +"critical section or when the critical section can be suspended, create a :" +"term:`strong reference ` (for example, using :c:func:" +"`Py_NewRef`)." +msgstr "" + +#: ../Doc/c-api/dict.rst:316 msgid "" "Iterate over mapping object *b* adding key-value pairs to dictionary *a*. " "*b* may be a dictionary, or any object supporting :c:func:`PyMapping_Keys` " @@ -449,7 +462,7 @@ msgstr "" "si no hay una clave coincidente en *a*. Retorna ``0`` en caso de éxito o " "``-1`` si se lanza una excepción." -#: ../Doc/c-api/dict.rst:317 +#: ../Doc/c-api/dict.rst:326 msgid "" "This is the same as ``PyDict_Merge(a, b, 1)`` in C, and is similar to ``a." "update(b)`` in Python except that :c:func:`PyDict_Update` doesn't fall back " @@ -463,7 +476,7 @@ msgstr "" "argumento no tiene el atributo \"claves\". Retorna ``0`` en caso de éxito o " "``-1`` si se produjo una excepción." -#: ../Doc/c-api/dict.rst:326 +#: ../Doc/c-api/dict.rst:335 msgid "" "Update or merge into dictionary *a*, from the key-value pairs in *seq2*. " "*seq2* must be an iterable object producing iterable objects of length 2, " @@ -478,7 +491,7 @@ msgstr "" "Retorna ``0`` en caso de éxito o ``-1`` si se produjo una excepción. El " "equivalente en Python (excepto el valor de retorno) ::" -#: ../Doc/c-api/dict.rst:333 +#: ../Doc/c-api/dict.rst:342 msgid "" "def PyDict_MergeFromSeq2(a, seq2, override):\n" " for key, value in seq2:\n" @@ -486,7 +499,7 @@ msgid "" " a[key] = value" msgstr "" -#: ../Doc/c-api/dict.rst:340 +#: ../Doc/c-api/dict.rst:349 msgid "" "Register *callback* as a dictionary watcher. Return a non-negative integer " "id which must be passed to future calls to :c:func:`PyDict_Watch`. In case " @@ -494,21 +507,21 @@ msgid "" "exception." msgstr "" -#: ../Doc/c-api/dict.rst:349 +#: ../Doc/c-api/dict.rst:358 msgid "" "Clear watcher identified by *watcher_id* previously returned from :c:func:" "`PyDict_AddWatcher`. Return ``0`` on success, ``-1`` on error (e.g. if the " "given *watcher_id* was never registered.)" msgstr "" -#: ../Doc/c-api/dict.rst:357 +#: ../Doc/c-api/dict.rst:366 msgid "" "Mark dictionary *dict* as watched. The callback granted *watcher_id* by :c:" "func:`PyDict_AddWatcher` will be called when *dict* is modified or " "deallocated. Return ``0`` on success or ``-1`` on error." msgstr "" -#: ../Doc/c-api/dict.rst:365 +#: ../Doc/c-api/dict.rst:374 msgid "" "Mark dictionary *dict* as no longer watched. The callback granted " "*watcher_id* by :c:func:`PyDict_AddWatcher` will no longer be called when " @@ -516,7 +529,7 @@ msgid "" "watched by this watcher. Return ``0`` on success or ``-1`` on error." msgstr "" -#: ../Doc/c-api/dict.rst:374 +#: ../Doc/c-api/dict.rst:383 msgid "" "Enumeration of possible dictionary watcher events: ``PyDict_EVENT_ADDED``, " "``PyDict_EVENT_MODIFIED``, ``PyDict_EVENT_DELETED``, " @@ -524,11 +537,11 @@ msgid "" "``PyDict_EVENT_DEALLOCATED``." msgstr "" -#: ../Doc/c-api/dict.rst:382 +#: ../Doc/c-api/dict.rst:391 msgid "Type of a dict watcher callback function." msgstr "" -#: ../Doc/c-api/dict.rst:384 +#: ../Doc/c-api/dict.rst:393 msgid "" "If *event* is ``PyDict_EVENT_CLEARED`` or ``PyDict_EVENT_DEALLOCATED``, both " "*key* and *new_value* will be ``NULL``. If *event* is ``PyDict_EVENT_ADDED`` " @@ -537,7 +550,7 @@ msgid "" "dictionary and *new_value* will be ``NULL``." msgstr "" -#: ../Doc/c-api/dict.rst:390 +#: ../Doc/c-api/dict.rst:399 msgid "" "``PyDict_EVENT_CLONED`` occurs when *dict* was previously empty and another " "dict is merged into it. To maintain efficiency of this operation, per-key " @@ -545,14 +558,14 @@ msgid "" "``PyDict_EVENT_CLONED`` is issued, and *key* will be the source dictionary." msgstr "" -#: ../Doc/c-api/dict.rst:396 +#: ../Doc/c-api/dict.rst:405 msgid "" "The callback may inspect but must not modify *dict*; doing so could have " "unpredictable effects, including infinite recursion. Do not trigger Python " "code execution in the callback, as it could modify the dict as a side effect." msgstr "" -#: ../Doc/c-api/dict.rst:400 +#: ../Doc/c-api/dict.rst:409 msgid "" "If *event* is ``PyDict_EVENT_DEALLOCATED``, taking a new reference in the " "callback to the about-to-be-destroyed dictionary will resurrect it and " @@ -561,20 +574,20 @@ msgid "" "again." msgstr "" -#: ../Doc/c-api/dict.rst:406 +#: ../Doc/c-api/dict.rst:415 msgid "" "Callbacks occur before the notified modification to *dict* takes place, so " "the prior state of *dict* can be inspected." msgstr "" -#: ../Doc/c-api/dict.rst:409 +#: ../Doc/c-api/dict.rst:418 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " "will be printed as an unraisable exception using :c:func:" "`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" -#: ../Doc/c-api/dict.rst:413 +#: ../Doc/c-api/dict.rst:422 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " diff --git a/c-api/exceptions.po b/c-api/exceptions.po index 140dbcb82f..6ab2feb2c5 100644 --- a/c-api/exceptions.po +++ b/c-api/exceptions.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2022-10-30 23:02-0300\n" "Last-Translator: Marco Richetta \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/exceptions.rst:8 msgid "Exception Handling" @@ -380,8 +380,8 @@ msgstr "" #: ../Doc/c-api/exceptions.rst:234 ../Doc/c-api/exceptions.rst:242 #: ../Doc/c-api/exceptions.rst:253 ../Doc/c-api/exceptions.rst:263 #: ../Doc/c-api/exceptions.rst:271 ../Doc/c-api/exceptions.rst:281 -msgid ":ref:`Availability `: Windows." -msgstr ":ref:`Disponibilidad `: Windows." +msgid "Availability" +msgstr "" #: ../Doc/c-api/exceptions.rst:239 msgid "" @@ -631,8 +631,8 @@ msgstr "" "por lo que no necesita usar :c:func:`Py_DECREF`." #: ../Doc/c-api/exceptions.rst:416 -msgid "The caller must hold the GIL." -msgstr "La persona que llama debe retener el GIL." +msgid "The caller must have an :term:`attached thread state`." +msgstr "" #: ../Doc/c-api/exceptions.rst:420 msgid "" @@ -691,6 +691,7 @@ msgid "For example::" msgstr "" #: ../Doc/c-api/exceptions.rst:451 +#, python-brace-format msgid "" "{\n" " PyObject *exc = PyErr_GetRaisedException();\n" @@ -746,6 +747,7 @@ msgstr "" "error temporalmente, por ejemplo:" #: ../Doc/c-api/exceptions.rst:495 +#, python-brace-format msgid "" "{\n" " PyObject *type, *value, *traceback;\n" @@ -830,6 +832,7 @@ msgstr "" "se necesita el siguiente fragmento adicional:" #: ../Doc/c-api/exceptions.rst:550 +#, python-brace-format msgid "" "if (tb != NULL) {\n" " PyException_SetTraceback(val, tb);\n" @@ -1021,9 +1024,10 @@ msgstr "" "equivalente a ``PyErr_SetInterruptEx(SIGINT)``." #: ../Doc/c-api/exceptions.rst:677 ../Doc/c-api/exceptions.rst:704 +#, fuzzy msgid "" -"This function is async-signal-safe. It can be called without the :term:" -"`GIL` and from a C signal handler." +"This function is async-signal-safe. It can be called without an :term:" +"`attached thread state` and from a C signal handler." msgstr "" "Esta función es segura para señales asíncronas. Se puede llamar sin el :term:" "`GIL` y desde un manejador de señales de C." @@ -1141,11 +1145,21 @@ msgstr "" "es ``NULL``, se utilizará como la cadena de documentación para la clase de " "excepción." -#: ../Doc/c-api/exceptions.rst:753 +#: ../Doc/c-api/exceptions.rst:754 +msgid "" +"Return non-zero if *ob* is an exception class, zero otherwise. This function " +"always succeeds." +msgstr "" + +#: ../Doc/c-api/exceptions.rst:759 +msgid "Return :c:member:`~PyTypeObject.tp_name` of the exception class *ob*." +msgstr "" + +#: ../Doc/c-api/exceptions.rst:763 msgid "Exception Objects" msgstr "Objetos excepción" -#: ../Doc/c-api/exceptions.rst:757 +#: ../Doc/c-api/exceptions.rst:767 #, fuzzy msgid "" "Return the traceback associated with the exception as a new reference, as " @@ -1156,7 +1170,7 @@ msgstr "" "accesible desde Python a través de :attr:`__traceback__`. Si no hay un " "rastreo asociado, esto retorna ``NULL``." -#: ../Doc/c-api/exceptions.rst:765 +#: ../Doc/c-api/exceptions.rst:775 msgid "" "Set the traceback associated with the exception to *tb*. Use ``Py_None`` to " "clear it." @@ -1164,7 +1178,7 @@ msgstr "" "Establezca el rastreo asociado con la excepción a *tb*. Use ``Py_None`` para " "borrarlo." -#: ../Doc/c-api/exceptions.rst:771 +#: ../Doc/c-api/exceptions.rst:781 #, fuzzy msgid "" "Return the context (another exception instance during whose handling *ex* " @@ -1177,7 +1191,7 @@ msgstr "" "Python a través de :attr:`__context__`. Si no hay un contexto asociado, esto " "retorna ``NULL``." -#: ../Doc/c-api/exceptions.rst:779 +#: ../Doc/c-api/exceptions.rst:789 msgid "" "Set the context associated with the exception to *ctx*. Use ``NULL`` to " "clear it. There is no type check to make sure that *ctx* is an exception " @@ -1187,7 +1201,7 @@ msgstr "" "borrarlo. No hay verificación de tipo para asegurarse de que *ctx* es una " "instancia de excepción. Esto roba una referencia a *ctx*." -#: ../Doc/c-api/exceptions.rst:786 +#: ../Doc/c-api/exceptions.rst:796 #, fuzzy msgid "" "Return the cause (either an exception instance, or ``None``, set by " @@ -1199,7 +1213,7 @@ msgstr "" "establecida por ``raise ... from ...``) asociada con la excepción como una " "nueva referencia, como accesible desde Python a través de :attr:`__causa__`." -#: ../Doc/c-api/exceptions.rst:794 +#: ../Doc/c-api/exceptions.rst:804 #, fuzzy msgid "" "Set the cause associated with the exception to *cause*. Use ``NULL`` to " @@ -1210,7 +1224,7 @@ msgstr "" "borrarlo. No hay verificación de tipo para asegurarse de que *cause* sea una " "instancia de excepción o :const:`None`. Esto roba una referencia a *cause*." -#: ../Doc/c-api/exceptions.rst:798 +#: ../Doc/c-api/exceptions.rst:808 #, fuzzy msgid "" "The :attr:`~BaseException.__suppress_context__` attribute is implicitly set " @@ -1219,15 +1233,15 @@ msgstr "" ":attr:`__suppress_context__` es implícitamente establecido en ``True`` por " "esta función." -#: ../Doc/c-api/exceptions.rst:804 +#: ../Doc/c-api/exceptions.rst:814 msgid "Return :attr:`~BaseException.args` of exception *ex*." msgstr "" -#: ../Doc/c-api/exceptions.rst:809 +#: ../Doc/c-api/exceptions.rst:819 msgid "Set :attr:`~BaseException.args` of exception *ex* to *args*." msgstr "" -#: ../Doc/c-api/exceptions.rst:813 +#: ../Doc/c-api/exceptions.rst:823 msgid "" "Implement part of the interpreter's implementation of :keyword:`!except*`. " "*orig* is the original exception that was caught, and *excs* is the list of " @@ -1239,11 +1253,11 @@ msgid "" "if there is nothing to reraise." msgstr "" -#: ../Doc/c-api/exceptions.rst:827 +#: ../Doc/c-api/exceptions.rst:837 msgid "Unicode Exception Objects" msgstr "Objetos unicode de excepción" -#: ../Doc/c-api/exceptions.rst:829 +#: ../Doc/c-api/exceptions.rst:839 msgid "" "The following functions are used to create and modify Unicode exceptions " "from C." @@ -1251,7 +1265,7 @@ msgstr "" "Las siguientes funciones se utilizan para crear y modificar excepciones " "Unicode de C." -#: ../Doc/c-api/exceptions.rst:833 +#: ../Doc/c-api/exceptions.rst:843 msgid "" "Create a :class:`UnicodeDecodeError` object with the attributes *encoding*, " "*object*, *length*, *start*, *end* and *reason*. *encoding* and *reason* are " @@ -1261,15 +1275,15 @@ msgstr "" "*object*, *length*, *start*, *end* y *reason*. *encoding* y *reason* son " "cadenas codificadas UTF-8." -#: ../Doc/c-api/exceptions.rst:840 +#: ../Doc/c-api/exceptions.rst:850 msgid "Return the *encoding* attribute of the given exception object." msgstr "Retorna el atributo *encoding* del objeto de excepción dado." -#: ../Doc/c-api/exceptions.rst:846 +#: ../Doc/c-api/exceptions.rst:856 msgid "Return the *object* attribute of the given exception object." msgstr "Retorna el atributo *object* del objeto de excepción dado." -#: ../Doc/c-api/exceptions.rst:852 +#: ../Doc/c-api/exceptions.rst:862 msgid "" "Get the *start* attribute of the given exception object and place it into " "*\\*start*. *start* must not be ``NULL``. Return ``0`` on success, ``-1`` " @@ -1279,15 +1293,33 @@ msgstr "" "*\\*start*. *start* no debe ser ``NULL``. retorna ``0`` en caso de éxito, " "``-1`` en caso de error." -#: ../Doc/c-api/exceptions.rst:860 +#: ../Doc/c-api/exceptions.rst:866 +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting " +"*start* is ``0``. Otherwise, it is clipped to ``[0, len(object) - 1]``." +msgstr "" + +#: ../Doc/c-api/exceptions.rst:869 +#, fuzzy +msgid ":attr:`UnicodeError.start`" +msgstr ":exc:`UnicodeError`" + +#: ../Doc/c-api/exceptions.rst:875 +#, fuzzy msgid "" -"Set the *start* attribute of the given exception object to *start*. Return " +"Set the *start* attribute of the given exception object to *start*. Return " "``0`` on success, ``-1`` on failure." msgstr "" "Establece el atributo *start* del objeto de excepción dado en *start*. " "Retorna ``0`` en caso de éxito, ``-1`` en caso de error." -#: ../Doc/c-api/exceptions.rst:867 +#: ../Doc/c-api/exceptions.rst:880 +msgid "" +"While passing a negative *start* does not raise an exception, the " +"corresponding getters will not consider it as a relative offset." +msgstr "" + +#: ../Doc/c-api/exceptions.rst:888 msgid "" "Get the *end* attribute of the given exception object and place it into " "*\\*end*. *end* must not be ``NULL``. Return ``0`` on success, ``-1`` on " @@ -1297,7 +1329,13 @@ msgstr "" "*\\*end*. *end* no debe ser ``NULL``. retorna ``0`` en caso de éxito, ``-1`` " "en caso de error." -#: ../Doc/c-api/exceptions.rst:875 +#: ../Doc/c-api/exceptions.rst:892 +msgid "" +"If the :attr:`UnicodeError.object` is an empty sequence, the resulting *end* " +"is ``0``. Otherwise, it is clipped to ``[1, len(object)]``." +msgstr "" + +#: ../Doc/c-api/exceptions.rst:899 msgid "" "Set the *end* attribute of the given exception object to *end*. Return " "``0`` on success, ``-1`` on failure." @@ -1305,11 +1343,16 @@ msgstr "" "Establece el atributo *end* del objeto de excepción dado en *end*. Retorna " "``0`` en caso de éxito, ``-1`` en caso de error." -#: ../Doc/c-api/exceptions.rst:882 +#: ../Doc/c-api/exceptions.rst:902 +#, fuzzy +msgid ":attr:`UnicodeError.end`" +msgstr ":exc:`UnicodeError`" + +#: ../Doc/c-api/exceptions.rst:908 msgid "Return the *reason* attribute of the given exception object." msgstr "Retorna el atributo *reason* del objeto de excepción dado." -#: ../Doc/c-api/exceptions.rst:888 +#: ../Doc/c-api/exceptions.rst:914 msgid "" "Set the *reason* attribute of the given exception object to *reason*. " "Return ``0`` on success, ``-1`` on failure." @@ -1317,11 +1360,11 @@ msgstr "" "Establece el atributo *reason* del objeto de excepción dado en *reason*. " "Retorna ``0`` en caso de éxito, ``-1`` en caso de error." -#: ../Doc/c-api/exceptions.rst:895 +#: ../Doc/c-api/exceptions.rst:921 msgid "Recursion Control" msgstr "Control de recursión" -#: ../Doc/c-api/exceptions.rst:897 +#: ../Doc/c-api/exceptions.rst:923 msgid "" "These two functions provide a way to perform safe recursive calls at the C " "level, both in the core and in extension modules. They are needed if the " @@ -1337,26 +1380,16 @@ msgstr "" "son necesarios para las implementaciones de *tp_call* porque :ref:`call " "protocol ` se encarga del manejo de la recursividad." -#: ../Doc/c-api/exceptions.rst:906 +#: ../Doc/c-api/exceptions.rst:932 msgid "Marks a point where a recursive C-level call is about to be performed." msgstr "" "Marca un punto donde una llamada recursiva de nivel C está a punto de " "realizarse." -#: ../Doc/c-api/exceptions.rst:908 +#: ../Doc/c-api/exceptions.rst:934 #, fuzzy msgid "" -"If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS " -"stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, it " -"sets a :exc:`MemoryError` and returns a nonzero value." -msgstr "" -"Si :const:`USE_STACKCHECK` está definido, esta función verifica si la pila " -"del SO se desbordó usando :c:func:`PyOS_CheckStack`. En este caso, establece " -"un :exc:`MemoryError` y retorna un valor distinto de cero." - -#: ../Doc/c-api/exceptions.rst:912 -msgid "" -"The function then checks if the recursion limit is reached. If this is the " +"The function then checks if the stack limit is reached. If this is the " "case, a :exc:`RecursionError` is set and a nonzero value is returned. " "Otherwise, zero is returned." msgstr "" @@ -1364,7 +1397,7 @@ msgstr "" "caso, se establece a :exc:`RecursionError` y se retorna un valor distinto de " "cero. De lo contrario, se retorna cero." -#: ../Doc/c-api/exceptions.rst:916 +#: ../Doc/c-api/exceptions.rst:938 msgid "" "*where* should be a UTF-8 encoded string such as ``\" in instance check\"`` " "to be concatenated to the :exc:`RecursionError` message caused by the " @@ -1374,14 +1407,14 @@ msgstr "" "la comprobación de instancia\"`` para concatenarse con el mensaje :exc:" "`RecursionError` causado por el límite de profundidad de recursión." -#: ../Doc/c-api/exceptions.rst:920 ../Doc/c-api/exceptions.rst:928 +#: ../Doc/c-api/exceptions.rst:942 ../Doc/c-api/exceptions.rst:950 #, fuzzy msgid "" "This function is now also available in the :ref:`limited API `." msgstr "Esta función ahora también está disponible en la API limitada." -#: ../Doc/c-api/exceptions.rst:925 +#: ../Doc/c-api/exceptions.rst:947 msgid "" "Ends a :c:func:`Py_EnterRecursiveCall`. Must be called once for each " "*successful* invocation of :c:func:`Py_EnterRecursiveCall`." @@ -1389,7 +1422,7 @@ msgstr "" "Termina una :c:func:`Py_EnterRecursiveCall`. Se debe llamar una vez por cada " "invocación *exitosa* de :c:func:`Py_EnterRecursiveCall`." -#: ../Doc/c-api/exceptions.rst:931 +#: ../Doc/c-api/exceptions.rst:953 msgid "" "Properly implementing :c:member:`~PyTypeObject.tp_repr` for container types " "requires special recursion handling. In addition to protecting the stack, :" @@ -1404,7 +1437,7 @@ msgstr "" "esta funcionalidad. Efectivamente, estos son los C equivalentes a :func:" "`reprlib.recursive_repr`." -#: ../Doc/c-api/exceptions.rst:939 +#: ../Doc/c-api/exceptions.rst:961 msgid "" "Called at the beginning of the :c:member:`~PyTypeObject.tp_repr` " "implementation to detect cycles." @@ -1412,7 +1445,8 @@ msgstr "" "Llamado al comienzo de la implementación :c:member:`~PyTypeObject.tp_repr` " "para detectar ciclos." -#: ../Doc/c-api/exceptions.rst:942 +#: ../Doc/c-api/exceptions.rst:964 +#, python-brace-format msgid "" "If the object has already been processed, the function returns a positive " "integer. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1425,7 +1459,7 @@ msgstr "" "objetos :class:`dict` retornan ``{...}`` y los objetos :class:`list` " "retornan ``[...]``." -#: ../Doc/c-api/exceptions.rst:948 +#: ../Doc/c-api/exceptions.rst:970 msgid "" "The function will return a negative integer if the recursion limit is " "reached. In that case the :c:member:`~PyTypeObject.tp_repr` implementation " @@ -1435,7 +1469,7 @@ msgstr "" "recursión. En ese caso, la implementación :c:member:`~PyTypeObject.tp_repr` " "normalmente debería retornar ``NULL``." -#: ../Doc/c-api/exceptions.rst:952 +#: ../Doc/c-api/exceptions.rst:974 msgid "" "Otherwise, the function returns zero and the :c:member:`~PyTypeObject." "tp_repr` implementation can continue normally." @@ -1443,7 +1477,7 @@ msgstr "" "De lo contrario, la función retorna cero y la implementación :c:member:" "`~PyTypeObject.tp_repr` puede continuar normalmente." -#: ../Doc/c-api/exceptions.rst:957 +#: ../Doc/c-api/exceptions.rst:979 msgid "" "Ends a :c:func:`Py_ReprEnter`. Must be called once for each invocation of :" "c:func:`Py_ReprEnter` that returns zero." @@ -1451,477 +1485,268 @@ msgstr "" "Termina a :c:func:`Py_ReprEnter`. Se debe llamar una vez por cada invocación " "de :c:func:`Py_ReprEnter` que retorna cero." -#: ../Doc/c-api/exceptions.rst:964 -msgid "Standard Exceptions" -msgstr "Excepciones estándar" +#: ../Doc/c-api/exceptions.rst:986 +#, fuzzy +msgid "Exception and warning types" +msgstr "Manejo de excepciones" -#: ../Doc/c-api/exceptions.rst:966 +#: ../Doc/c-api/exceptions.rst:988 +#, fuzzy msgid "" -"All standard Python exceptions are available as global variables whose names " -"are ``PyExc_`` followed by the Python exception name. These have the type :" -"c:expr:`PyObject*`; they are all class objects. For completeness, here are " -"all the variables:" +"All standard Python exceptions and warning categories are available as " +"global variables whose names are ``PyExc_`` followed by the Python exception " +"name. These have the type :c:expr:`PyObject*`; they are all class objects." msgstr "" -"Todas las excepciones estándar de Python están disponibles como variables " -"globales cuyos nombres son ``PyExc_`` seguidos del nombre de excepción de " -"Python. Estos tienen el tipo :c:expr:`PyObject*`; todos son objetos de " -"clase. Para completar, aquí están todas las variables:" +"Todas las categorías de advertencia estándar de Python están disponibles " +"como variables globales cuyos nombres son ``PyExc_`` seguidos del nombre de " +"excepción de Python. Estos tienen el tipo :c:expr:`PyObject*`; todos son " +"objetos de clase. Para completar, aquí están todas las variables:" -#: ../Doc/c-api/exceptions.rst:1028 ../Doc/c-api/exceptions.rst:1163 -#: ../Doc/c-api/exceptions.rst:1208 -msgid "C Name" -msgstr "Nombre en C" +#: ../Doc/c-api/exceptions.rst:992 +msgid "For completeness, here are all the variables:" +msgstr "" -#: ../Doc/c-api/exceptions.rst:1028 ../Doc/c-api/exceptions.rst:1208 -msgid "Python Name" -msgstr "Nombre en Python" +#: ../Doc/c-api/exceptions.rst:995 +#, fuzzy +msgid "Exception types" +msgstr "Objetos excepción" -#: ../Doc/c-api/exceptions.rst:1028 ../Doc/c-api/exceptions.rst:1163 -#: ../Doc/c-api/exceptions.rst:1208 -msgid "Notes" -msgstr "Notas" +#: ../Doc/c-api/exceptions.rst:1002 ../Doc/c-api/exceptions.rst:1148 +#: ../Doc/c-api/exceptions.rst:1178 +#, fuzzy +msgid "C name" +msgstr "Nombre en C" -#: ../Doc/c-api/exceptions.rst:1030 -msgid ":c:data:`PyExc_BaseException`" -msgstr ":c:data:`PyExc_BaseException`" +#: ../Doc/c-api/exceptions.rst:1003 ../Doc/c-api/exceptions.rst:1149 +#: ../Doc/c-api/exceptions.rst:1179 +#, fuzzy +msgid "Python name" +msgstr "Nombre en Python" -#: ../Doc/c-api/exceptions.rst:1030 +#: ../Doc/c-api/exceptions.rst:1005 msgid ":exc:`BaseException`" msgstr ":exc:`BaseException`" -#: ../Doc/c-api/exceptions.rst:1030 ../Doc/c-api/exceptions.rst:1032 -#: ../Doc/c-api/exceptions.rst:1034 ../Doc/c-api/exceptions.rst:1080 -#: ../Doc/c-api/exceptions.rst:1092 -msgid "[1]_" -msgstr "[1]_" - -#: ../Doc/c-api/exceptions.rst:1032 -msgid ":c:data:`PyExc_Exception`" -msgstr ":c:data:`PyExc_Exception`" +#: ../Doc/c-api/exceptions.rst:1007 +#, fuzzy +msgid ":exc:`BaseExceptionGroup`" +msgstr ":exc:`BaseException`" -#: ../Doc/c-api/exceptions.rst:1032 +#: ../Doc/c-api/exceptions.rst:1009 msgid ":exc:`Exception`" msgstr ":exc:`Exception`" -#: ../Doc/c-api/exceptions.rst:1034 -msgid ":c:data:`PyExc_ArithmeticError`" -msgstr ":c:data:`PyExc_ArithmeticError`" - -#: ../Doc/c-api/exceptions.rst:1034 +#: ../Doc/c-api/exceptions.rst:1011 msgid ":exc:`ArithmeticError`" msgstr ":exc:`ArithmeticError`" -#: ../Doc/c-api/exceptions.rst:1036 -msgid ":c:data:`PyExc_AssertionError`" -msgstr ":c:data:`PyExc_AssertionError`" - -#: ../Doc/c-api/exceptions.rst:1036 +#: ../Doc/c-api/exceptions.rst:1013 msgid ":exc:`AssertionError`" msgstr ":exc:`AssertionError`" -#: ../Doc/c-api/exceptions.rst:1038 -msgid ":c:data:`PyExc_AttributeError`" -msgstr ":c:data:`PyExc_AttributeError`" - -#: ../Doc/c-api/exceptions.rst:1038 +#: ../Doc/c-api/exceptions.rst:1015 msgid ":exc:`AttributeError`" msgstr ":exc:`AttributeError`" -#: ../Doc/c-api/exceptions.rst:1040 -msgid ":c:data:`PyExc_BlockingIOError`" -msgstr ":c:data:`PyExc_BlockingIOError`" - -#: ../Doc/c-api/exceptions.rst:1040 +#: ../Doc/c-api/exceptions.rst:1017 msgid ":exc:`BlockingIOError`" msgstr ":exc:`BlockingIOError`" -#: ../Doc/c-api/exceptions.rst:1042 -msgid ":c:data:`PyExc_BrokenPipeError`" -msgstr ":c:data:`PyExc_BrokenPipeError`" - -#: ../Doc/c-api/exceptions.rst:1042 +#: ../Doc/c-api/exceptions.rst:1019 msgid ":exc:`BrokenPipeError`" msgstr ":exc:`BrokenPipeError`" -#: ../Doc/c-api/exceptions.rst:1044 -msgid ":c:data:`PyExc_BufferError`" -msgstr ":c:data:`PyExc_BufferError`" - -#: ../Doc/c-api/exceptions.rst:1044 +#: ../Doc/c-api/exceptions.rst:1021 msgid ":exc:`BufferError`" msgstr ":exc:`BufferError`" -#: ../Doc/c-api/exceptions.rst:1046 -msgid ":c:data:`PyExc_ChildProcessError`" -msgstr ":c:data:`PyExc_ChildProcessError`" - -#: ../Doc/c-api/exceptions.rst:1046 +#: ../Doc/c-api/exceptions.rst:1023 msgid ":exc:`ChildProcessError`" msgstr ":exc:`ChildProcessError`" -#: ../Doc/c-api/exceptions.rst:1048 -msgid ":c:data:`PyExc_ConnectionAbortedError`" -msgstr ":c:data:`PyExc_ConnectionAbortedError`" - -#: ../Doc/c-api/exceptions.rst:1048 +#: ../Doc/c-api/exceptions.rst:1025 msgid ":exc:`ConnectionAbortedError`" msgstr ":exc:`ConnectionAbortedError`" -#: ../Doc/c-api/exceptions.rst:1050 -msgid ":c:data:`PyExc_ConnectionError`" -msgstr ":c:data:`PyExc_ConnectionError`" - -#: ../Doc/c-api/exceptions.rst:1050 +#: ../Doc/c-api/exceptions.rst:1027 msgid ":exc:`ConnectionError`" msgstr ":exc:`ConnectionError`" -#: ../Doc/c-api/exceptions.rst:1052 -msgid ":c:data:`PyExc_ConnectionRefusedError`" -msgstr ":c:data:`PyExc_ConnectionRefusedError`" - -#: ../Doc/c-api/exceptions.rst:1052 +#: ../Doc/c-api/exceptions.rst:1029 msgid ":exc:`ConnectionRefusedError`" msgstr ":exc:`ConnectionRefusedError`" -#: ../Doc/c-api/exceptions.rst:1054 -msgid ":c:data:`PyExc_ConnectionResetError`" -msgstr ":c:data:`PyExc_ConnectionResetError`" - -#: ../Doc/c-api/exceptions.rst:1054 +#: ../Doc/c-api/exceptions.rst:1031 msgid ":exc:`ConnectionResetError`" msgstr ":exc:`ConnectionResetError`" -#: ../Doc/c-api/exceptions.rst:1056 -msgid ":c:data:`PyExc_EOFError`" -msgstr ":c:data:`PyExc_EOFError`" - -#: ../Doc/c-api/exceptions.rst:1056 +#: ../Doc/c-api/exceptions.rst:1033 msgid ":exc:`EOFError`" msgstr ":exc:`EOFError`" -#: ../Doc/c-api/exceptions.rst:1058 -msgid ":c:data:`PyExc_FileExistsError`" -msgstr ":c:data:`PyExc_FileExistsError`" - -#: ../Doc/c-api/exceptions.rst:1058 +#: ../Doc/c-api/exceptions.rst:1035 msgid ":exc:`FileExistsError`" msgstr ":exc:`FileExistsError`" -#: ../Doc/c-api/exceptions.rst:1060 -msgid ":c:data:`PyExc_FileNotFoundError`" -msgstr ":c:data:`PyExc_FileNotFoundError`" - -#: ../Doc/c-api/exceptions.rst:1060 +#: ../Doc/c-api/exceptions.rst:1037 msgid ":exc:`FileNotFoundError`" msgstr ":exc:`FileNotFoundError`" -#: ../Doc/c-api/exceptions.rst:1062 -msgid ":c:data:`PyExc_FloatingPointError`" -msgstr ":c:data:`PyExc_FloatingPointError`" - -#: ../Doc/c-api/exceptions.rst:1062 +#: ../Doc/c-api/exceptions.rst:1039 msgid ":exc:`FloatingPointError`" msgstr ":exc:`FloatingPointError`" -#: ../Doc/c-api/exceptions.rst:1064 -msgid ":c:data:`PyExc_GeneratorExit`" -msgstr ":c:data:`PyExc_GeneratorExit`" - -#: ../Doc/c-api/exceptions.rst:1064 +#: ../Doc/c-api/exceptions.rst:1041 msgid ":exc:`GeneratorExit`" msgstr ":exc:`GeneratorExit`" -#: ../Doc/c-api/exceptions.rst:1066 -msgid ":c:data:`PyExc_ImportError`" -msgstr ":c:data:`PyExc_ImportError`" - -#: ../Doc/c-api/exceptions.rst:1066 +#: ../Doc/c-api/exceptions.rst:1043 msgid ":exc:`ImportError`" msgstr ":exc:`ImportError`" -#: ../Doc/c-api/exceptions.rst:1068 -msgid ":c:data:`PyExc_IndentationError`" -msgstr ":c:data:`PyExc_IndentationError`" - -#: ../Doc/c-api/exceptions.rst:1068 +#: ../Doc/c-api/exceptions.rst:1045 msgid ":exc:`IndentationError`" msgstr ":exc:`IndentationError`" -#: ../Doc/c-api/exceptions.rst:1070 -msgid ":c:data:`PyExc_IndexError`" -msgstr ":c:data:`PyExc_IndexError`" - -#: ../Doc/c-api/exceptions.rst:1070 +#: ../Doc/c-api/exceptions.rst:1047 msgid ":exc:`IndexError`" msgstr ":exc:`IndexError`" -#: ../Doc/c-api/exceptions.rst:1072 -msgid ":c:data:`PyExc_InterruptedError`" -msgstr ":c:data:`PyExc_InterruptedError`" - -#: ../Doc/c-api/exceptions.rst:1072 +#: ../Doc/c-api/exceptions.rst:1049 msgid ":exc:`InterruptedError`" msgstr ":exc:`InterruptedError`" -#: ../Doc/c-api/exceptions.rst:1074 -msgid ":c:data:`PyExc_IsADirectoryError`" -msgstr ":c:data:`PyExc_IsADirectoryError`" - -#: ../Doc/c-api/exceptions.rst:1074 +#: ../Doc/c-api/exceptions.rst:1051 msgid ":exc:`IsADirectoryError`" msgstr ":exc:`IsADirectoryError`" -#: ../Doc/c-api/exceptions.rst:1076 -msgid ":c:data:`PyExc_KeyError`" -msgstr ":c:data:`PyExc_KeyError`" - -#: ../Doc/c-api/exceptions.rst:1076 +#: ../Doc/c-api/exceptions.rst:1053 msgid ":exc:`KeyError`" msgstr ":exc:`KeyError`" -#: ../Doc/c-api/exceptions.rst:1078 -msgid ":c:data:`PyExc_KeyboardInterrupt`" -msgstr ":c:data:`PyExc_KeyboardInterrupt`" - -#: ../Doc/c-api/exceptions.rst:1078 +#: ../Doc/c-api/exceptions.rst:1055 msgid ":exc:`KeyboardInterrupt`" msgstr ":exc:`KeyboardInterrupt`" -#: ../Doc/c-api/exceptions.rst:1080 -msgid ":c:data:`PyExc_LookupError`" -msgstr ":c:data:`PyExc_LookupError`" - -#: ../Doc/c-api/exceptions.rst:1080 +#: ../Doc/c-api/exceptions.rst:1057 msgid ":exc:`LookupError`" msgstr ":exc:`LookupError`" -#: ../Doc/c-api/exceptions.rst:1082 -msgid ":c:data:`PyExc_MemoryError`" -msgstr ":c:data:`PyExc_MemoryError`" - -#: ../Doc/c-api/exceptions.rst:1082 +#: ../Doc/c-api/exceptions.rst:1059 msgid ":exc:`MemoryError`" msgstr ":exc:`MemoryError`" -#: ../Doc/c-api/exceptions.rst:1084 -msgid ":c:data:`PyExc_ModuleNotFoundError`" -msgstr ":c:data:`PyExc_ModuleNotFoundError`" - -#: ../Doc/c-api/exceptions.rst:1084 +#: ../Doc/c-api/exceptions.rst:1061 msgid ":exc:`ModuleNotFoundError`" msgstr ":exc:`ModuleNotFoundError`" -#: ../Doc/c-api/exceptions.rst:1086 -msgid ":c:data:`PyExc_NameError`" -msgstr ":c:data:`PyExc_NameError`" - -#: ../Doc/c-api/exceptions.rst:1086 +#: ../Doc/c-api/exceptions.rst:1063 msgid ":exc:`NameError`" msgstr ":exc:`NameError`" -#: ../Doc/c-api/exceptions.rst:1088 -msgid ":c:data:`PyExc_NotADirectoryError`" -msgstr ":c:data:`PyExc_NotADirectoryError`" - -#: ../Doc/c-api/exceptions.rst:1088 +#: ../Doc/c-api/exceptions.rst:1065 msgid ":exc:`NotADirectoryError`" msgstr ":exc:`NotADirectoryError`" -#: ../Doc/c-api/exceptions.rst:1090 -msgid ":c:data:`PyExc_NotImplementedError`" -msgstr ":c:data:`PyExc_NotImplementedError`" - -#: ../Doc/c-api/exceptions.rst:1090 +#: ../Doc/c-api/exceptions.rst:1067 msgid ":exc:`NotImplementedError`" msgstr ":exc:`NotImplementedError`" -#: ../Doc/c-api/exceptions.rst:1092 -msgid ":c:data:`PyExc_OSError`" -msgstr ":c:data:`PyExc_OSError`" - -#: ../Doc/c-api/exceptions.rst:1092 +#: ../Doc/c-api/exceptions.rst:1069 ../Doc/c-api/exceptions.rst:1152 +#: ../Doc/c-api/exceptions.rst:1155 ../Doc/c-api/exceptions.rst:1158 msgid ":exc:`OSError`" msgstr ":exc:`OSError`" -#: ../Doc/c-api/exceptions.rst:1094 -msgid ":c:data:`PyExc_OverflowError`" -msgstr ":c:data:`PyExc_OverflowError`" - -#: ../Doc/c-api/exceptions.rst:1094 +#: ../Doc/c-api/exceptions.rst:1071 msgid ":exc:`OverflowError`" msgstr ":exc:`OverflowError`" -#: ../Doc/c-api/exceptions.rst:1096 -msgid ":c:data:`PyExc_PermissionError`" -msgstr ":c:data:`PyExc_PermissionError`" - -#: ../Doc/c-api/exceptions.rst:1096 +#: ../Doc/c-api/exceptions.rst:1073 msgid ":exc:`PermissionError`" msgstr ":exc:`PermissionError`" -#: ../Doc/c-api/exceptions.rst:1098 -msgid ":c:data:`PyExc_ProcessLookupError`" -msgstr ":c:data:`PyExc_ProcessLookupError`" - -#: ../Doc/c-api/exceptions.rst:1098 +#: ../Doc/c-api/exceptions.rst:1075 msgid ":exc:`ProcessLookupError`" msgstr ":exc:`ProcessLookupError`" -#: ../Doc/c-api/exceptions.rst:1100 -#, fuzzy -msgid ":c:data:`PyExc_PythonFinalizationError`" -msgstr ":c:data:`PyExc_ConnectionError`" - -#: ../Doc/c-api/exceptions.rst:1100 +#: ../Doc/c-api/exceptions.rst:1077 #, fuzzy msgid ":exc:`PythonFinalizationError`" msgstr ":exc:`ConnectionError`" -#: ../Doc/c-api/exceptions.rst:1102 -msgid ":c:data:`PyExc_RecursionError`" -msgstr ":c:data:`PyExc_RecursionError`" - -#: ../Doc/c-api/exceptions.rst:1102 +#: ../Doc/c-api/exceptions.rst:1079 msgid ":exc:`RecursionError`" msgstr ":exc:`RecursionError`" -#: ../Doc/c-api/exceptions.rst:1104 -msgid ":c:data:`PyExc_ReferenceError`" -msgstr ":c:data:`PyExc_ReferenceError`" - -#: ../Doc/c-api/exceptions.rst:1104 +#: ../Doc/c-api/exceptions.rst:1081 msgid ":exc:`ReferenceError`" msgstr ":exc:`ReferenceError`" -#: ../Doc/c-api/exceptions.rst:1106 -msgid ":c:data:`PyExc_RuntimeError`" -msgstr ":c:data:`PyExc_RuntimeError`" - -#: ../Doc/c-api/exceptions.rst:1106 +#: ../Doc/c-api/exceptions.rst:1083 msgid ":exc:`RuntimeError`" msgstr ":exc:`RuntimeError`" -#: ../Doc/c-api/exceptions.rst:1108 -msgid ":c:data:`PyExc_StopAsyncIteration`" -msgstr ":c:data:`PyExc_StopAsyncIteration`" - -#: ../Doc/c-api/exceptions.rst:1108 +#: ../Doc/c-api/exceptions.rst:1085 msgid ":exc:`StopAsyncIteration`" msgstr ":exc:`StopAsyncIteration`" -#: ../Doc/c-api/exceptions.rst:1110 -msgid ":c:data:`PyExc_StopIteration`" -msgstr ":c:data:`PyExc_StopIteration`" - -#: ../Doc/c-api/exceptions.rst:1110 +#: ../Doc/c-api/exceptions.rst:1087 msgid ":exc:`StopIteration`" msgstr ":exc:`StopIteration`" -#: ../Doc/c-api/exceptions.rst:1112 -msgid ":c:data:`PyExc_SyntaxError`" -msgstr ":c:data:`PyExc_SyntaxError`" - -#: ../Doc/c-api/exceptions.rst:1112 +#: ../Doc/c-api/exceptions.rst:1089 msgid ":exc:`SyntaxError`" msgstr ":exc:`SyntaxError`" -#: ../Doc/c-api/exceptions.rst:1114 -msgid ":c:data:`PyExc_SystemError`" -msgstr ":c:data:`PyExc_SystemError`" - -#: ../Doc/c-api/exceptions.rst:1114 +#: ../Doc/c-api/exceptions.rst:1091 msgid ":exc:`SystemError`" msgstr ":exc:`SystemError`" -#: ../Doc/c-api/exceptions.rst:1116 -msgid ":c:data:`PyExc_SystemExit`" -msgstr ":c:data:`PyExc_SystemExit`" - -#: ../Doc/c-api/exceptions.rst:1116 +#: ../Doc/c-api/exceptions.rst:1093 msgid ":exc:`SystemExit`" msgstr ":exc:`SystemExit`" -#: ../Doc/c-api/exceptions.rst:1118 -msgid ":c:data:`PyExc_TabError`" -msgstr ":c:data:`PyExc_TabError`" - -#: ../Doc/c-api/exceptions.rst:1118 +#: ../Doc/c-api/exceptions.rst:1095 msgid ":exc:`TabError`" msgstr ":exc:`TabError`" -#: ../Doc/c-api/exceptions.rst:1120 -msgid ":c:data:`PyExc_TimeoutError`" -msgstr ":c:data:`PyExc_TimeoutError`" - -#: ../Doc/c-api/exceptions.rst:1120 +#: ../Doc/c-api/exceptions.rst:1097 msgid ":exc:`TimeoutError`" msgstr ":exc:`TimeoutError`" -#: ../Doc/c-api/exceptions.rst:1122 -msgid ":c:data:`PyExc_TypeError`" -msgstr ":c:data:`PyExc_TypeError`" - -#: ../Doc/c-api/exceptions.rst:1122 +#: ../Doc/c-api/exceptions.rst:1099 msgid ":exc:`TypeError`" msgstr ":exc:`TypeError`" -#: ../Doc/c-api/exceptions.rst:1124 -msgid ":c:data:`PyExc_UnboundLocalError`" -msgstr ":c:data:`PyExc_UnboundLocalError`" - -#: ../Doc/c-api/exceptions.rst:1124 +#: ../Doc/c-api/exceptions.rst:1101 msgid ":exc:`UnboundLocalError`" msgstr ":exc:`UnboundLocalError`" -#: ../Doc/c-api/exceptions.rst:1126 -msgid ":c:data:`PyExc_UnicodeDecodeError`" -msgstr ":c:data:`PyExc_UnicodeDecodeError`" - -#: ../Doc/c-api/exceptions.rst:1126 +#: ../Doc/c-api/exceptions.rst:1103 msgid ":exc:`UnicodeDecodeError`" msgstr ":exc:`UnicodeDecodeError`" -#: ../Doc/c-api/exceptions.rst:1128 -msgid ":c:data:`PyExc_UnicodeEncodeError`" -msgstr ":c:data:`PyExc_UnicodeEncodeError`" - -#: ../Doc/c-api/exceptions.rst:1128 +#: ../Doc/c-api/exceptions.rst:1105 msgid ":exc:`UnicodeEncodeError`" msgstr ":exc:`UnicodeEncodeError`" -#: ../Doc/c-api/exceptions.rst:1130 -msgid ":c:data:`PyExc_UnicodeError`" -msgstr ":c:data:`PyExc_UnicodeError`" - -#: ../Doc/c-api/exceptions.rst:1130 +#: ../Doc/c-api/exceptions.rst:1107 msgid ":exc:`UnicodeError`" msgstr ":exc:`UnicodeError`" -#: ../Doc/c-api/exceptions.rst:1132 -msgid ":c:data:`PyExc_UnicodeTranslateError`" -msgstr ":c:data:`PyExc_UnicodeTranslateError`" - -#: ../Doc/c-api/exceptions.rst:1132 +#: ../Doc/c-api/exceptions.rst:1109 msgid ":exc:`UnicodeTranslateError`" msgstr ":exc:`UnicodeTranslateError`" -#: ../Doc/c-api/exceptions.rst:1134 -msgid ":c:data:`PyExc_ValueError`" -msgstr ":c:data:`PyExc_ValueError`" - -#: ../Doc/c-api/exceptions.rst:1134 +#: ../Doc/c-api/exceptions.rst:1111 msgid ":exc:`ValueError`" msgstr ":exc:`ValueError`" -#: ../Doc/c-api/exceptions.rst:1136 -msgid ":c:data:`PyExc_ZeroDivisionError`" -msgstr ":c:data:`PyExc_ZeroDivisionError`" - -#: ../Doc/c-api/exceptions.rst:1136 +#: ../Doc/c-api/exceptions.rst:1113 msgid ":exc:`ZeroDivisionError`" msgstr ":exc:`ZeroDivisionError`" -#: ../Doc/c-api/exceptions.rst:1139 +#: ../Doc/c-api/exceptions.rst:1115 msgid "" ":c:data:`PyExc_BlockingIOError`, :c:data:`PyExc_BrokenPipeError`, :c:data:" "`PyExc_ChildProcessError`, :c:data:`PyExc_ConnectionError`, :c:data:" @@ -1941,172 +1766,115 @@ msgstr "" "`PyExc_PermissionError`, :c:data:`PyExc_ProcessLookupError` y :c:data:" "`PyExc_TimeoutError` fueron introducidos luego de :pep:`3151`." -#: ../Doc/c-api/exceptions.rst:1149 +#: ../Doc/c-api/exceptions.rst:1125 msgid ":c:data:`PyExc_StopAsyncIteration` and :c:data:`PyExc_RecursionError`." msgstr ":c:data:`PyExc_StopAsyncIteration` y :c:data:`PyExc_RecursionError`." -#: ../Doc/c-api/exceptions.rst:1152 +#: ../Doc/c-api/exceptions.rst:1128 msgid ":c:data:`PyExc_ModuleNotFoundError`." msgstr ":c:data:`PyExc_ModuleNotFoundError`." -#: ../Doc/c-api/exceptions.rst:1155 -msgid "These are compatibility aliases to :c:data:`PyExc_OSError`:" -msgstr "Estos son alias de compatibilidad para :c:data:`PyExc_OSError`:" - -#: ../Doc/c-api/exceptions.rst:1165 +#: ../Doc/c-api/exceptions.rst:1131 #, fuzzy -msgid ":c:data:`!PyExc_EnvironmentError`" -msgstr ":c:data:`PyExc_EnvironmentError`" +msgid ":c:data:`PyExc_BaseExceptionGroup`." +msgstr ":c:data:`PyExc_BaseException`" -#: ../Doc/c-api/exceptions.rst:1167 -#, fuzzy -msgid ":c:data:`!PyExc_IOError`" -msgstr ":c:data:`PyExc_IOError`" +#: ../Doc/c-api/exceptions.rst:1136 +msgid "OSError aliases" +msgstr "" -#: ../Doc/c-api/exceptions.rst:1169 +#: ../Doc/c-api/exceptions.rst:1138 #, fuzzy -msgid ":c:data:`!PyExc_WindowsError`" -msgstr ":c:data:`PyExc_WindowsError`" - -#: ../Doc/c-api/exceptions.rst:1169 -msgid "[2]_" -msgstr "[2]_" +msgid "The following are a compatibility aliases to :c:data:`PyExc_OSError`." +msgstr "Estos son alias de compatibilidad para :c:data:`PyExc_OSError`:" -#: ../Doc/c-api/exceptions.rst:1172 +#: ../Doc/c-api/exceptions.rst:1140 msgid "These aliases used to be separate exception types." msgstr "Estos alias solían ser tipos de excepción separados." -#: ../Doc/c-api/exceptions.rst:1175 ../Doc/c-api/exceptions.rst:1236 +#: ../Doc/c-api/exceptions.rst:1150 +msgid "Notes" +msgstr "Notas" + +#: ../Doc/c-api/exceptions.rst:1159 +#, fuzzy +msgid "[win]_" +msgstr "[3]_" + +#: ../Doc/c-api/exceptions.rst:1161 msgid "Notes:" msgstr "Notas:" -#: ../Doc/c-api/exceptions.rst:1178 -msgid "This is a base class for other standard exceptions." -msgstr "Esta es una clase base para otras excepciones estándar." - -#: ../Doc/c-api/exceptions.rst:1181 +#: ../Doc/c-api/exceptions.rst:1164 +#, fuzzy msgid "" -"Only defined on Windows; protect code that uses this by testing that the " -"preprocessor macro ``MS_WINDOWS`` is defined." +":c:var:`!PyExc_WindowsError` is only defined on Windows; protect code that " +"uses this by testing that the preprocessor macro ``MS_WINDOWS`` is defined." msgstr "" "Solo se define en Windows; proteja el código que usa esto probando que la " "macro del preprocesador ``MS_WINDOWS`` está definida." -#: ../Doc/c-api/exceptions.rst:1187 -msgid "Standard Warning Categories" -msgstr "Categorías de advertencia estándar" - -#: ../Doc/c-api/exceptions.rst:1189 -msgid "" -"All standard Python warning categories are available as global variables " -"whose names are ``PyExc_`` followed by the Python exception name. These have " -"the type :c:expr:`PyObject*`; they are all class objects. For completeness, " -"here are all the variables:" +#: ../Doc/c-api/exceptions.rst:1171 +msgid "Warning types" msgstr "" -"Todas las categorías de advertencia estándar de Python están disponibles " -"como variables globales cuyos nombres son ``PyExc_`` seguidos del nombre de " -"excepción de Python. Estos tienen el tipo :c:expr:`PyObject*`; todos son " -"objetos de clase. Para completar, aquí están todas las variables:" - -#: ../Doc/c-api/exceptions.rst:1210 -msgid ":c:data:`PyExc_Warning`" -msgstr ":c:data:`PyExc_Warning`" -#: ../Doc/c-api/exceptions.rst:1210 +#: ../Doc/c-api/exceptions.rst:1181 msgid ":exc:`Warning`" msgstr ":exc:`Warning`" -#: ../Doc/c-api/exceptions.rst:1210 -msgid "[3]_" -msgstr "[3]_" - -#: ../Doc/c-api/exceptions.rst:1212 -msgid ":c:data:`PyExc_BytesWarning`" -msgstr ":c:data:`PyExc_BytesWarning`" - -#: ../Doc/c-api/exceptions.rst:1212 +#: ../Doc/c-api/exceptions.rst:1183 msgid ":exc:`BytesWarning`" msgstr ":exc:`BytesWarning`" -#: ../Doc/c-api/exceptions.rst:1214 -msgid ":c:data:`PyExc_DeprecationWarning`" -msgstr ":c:data:`PyExc_DeprecationWarning`" - -#: ../Doc/c-api/exceptions.rst:1214 +#: ../Doc/c-api/exceptions.rst:1185 msgid ":exc:`DeprecationWarning`" msgstr ":exc:`DeprecationWarning`" -#: ../Doc/c-api/exceptions.rst:1216 -msgid ":c:data:`PyExc_FutureWarning`" -msgstr ":c:data:`PyExc_FutureWarning`" +#: ../Doc/c-api/exceptions.rst:1187 +#, fuzzy +msgid ":exc:`EncodingWarning`" +msgstr ":exc:`UnicodeWarning`" -#: ../Doc/c-api/exceptions.rst:1216 +#: ../Doc/c-api/exceptions.rst:1189 msgid ":exc:`FutureWarning`" msgstr ":exc:`FutureWarning`" -#: ../Doc/c-api/exceptions.rst:1218 -msgid ":c:data:`PyExc_ImportWarning`" -msgstr ":c:data:`PyExc_ImportWarning`" - -#: ../Doc/c-api/exceptions.rst:1218 +#: ../Doc/c-api/exceptions.rst:1191 msgid ":exc:`ImportWarning`" msgstr ":exc:`ImportWarning`" -#: ../Doc/c-api/exceptions.rst:1220 -msgid ":c:data:`PyExc_PendingDeprecationWarning`" -msgstr ":c:data:`PyExc_PendingDeprecationWarning`" - -#: ../Doc/c-api/exceptions.rst:1220 +#: ../Doc/c-api/exceptions.rst:1193 msgid ":exc:`PendingDeprecationWarning`" msgstr ":exc:`PendingDeprecationWarning`" -#: ../Doc/c-api/exceptions.rst:1222 -msgid ":c:data:`PyExc_ResourceWarning`" -msgstr ":c:data:`PyExc_ResourceWarning`" - -#: ../Doc/c-api/exceptions.rst:1222 +#: ../Doc/c-api/exceptions.rst:1195 msgid ":exc:`ResourceWarning`" msgstr ":exc:`ResourceWarning`" -#: ../Doc/c-api/exceptions.rst:1224 -msgid ":c:data:`PyExc_RuntimeWarning`" -msgstr ":c:data:`PyExc_RuntimeWarning`" - -#: ../Doc/c-api/exceptions.rst:1224 +#: ../Doc/c-api/exceptions.rst:1197 msgid ":exc:`RuntimeWarning`" msgstr ":exc:`RuntimeWarning`" -#: ../Doc/c-api/exceptions.rst:1226 -msgid ":c:data:`PyExc_SyntaxWarning`" -msgstr ":c:data:`PyExc_SyntaxWarning`" - -#: ../Doc/c-api/exceptions.rst:1226 +#: ../Doc/c-api/exceptions.rst:1199 msgid ":exc:`SyntaxWarning`" msgstr ":exc:`SyntaxWarning`" -#: ../Doc/c-api/exceptions.rst:1228 -msgid ":c:data:`PyExc_UnicodeWarning`" -msgstr ":c:data:`PyExc_UnicodeWarning`" - -#: ../Doc/c-api/exceptions.rst:1228 +#: ../Doc/c-api/exceptions.rst:1201 msgid ":exc:`UnicodeWarning`" msgstr ":exc:`UnicodeWarning`" -#: ../Doc/c-api/exceptions.rst:1230 -msgid ":c:data:`PyExc_UserWarning`" -msgstr ":c:data:`PyExc_UserWarning`" - -#: ../Doc/c-api/exceptions.rst:1230 +#: ../Doc/c-api/exceptions.rst:1203 msgid ":exc:`UserWarning`" msgstr ":exc:`UserWarning`" -#: ../Doc/c-api/exceptions.rst:1233 +#: ../Doc/c-api/exceptions.rst:1205 msgid ":c:data:`PyExc_ResourceWarning`." msgstr ":c:data:`PyExc_ResourceWarning`." -#: ../Doc/c-api/exceptions.rst:1239 -msgid "This is a base class for other standard warning categories." -msgstr "Esta es una clase base para otras categorías de advertencia estándar." +#: ../Doc/c-api/exceptions.rst:1208 +#, fuzzy +msgid ":c:data:`PyExc_EncodingWarning`." +msgstr ":c:data:`PyExc_UnicodeWarning`" #: ../Doc/c-api/exceptions.rst:183 msgid "strerror (C function)" @@ -2131,342 +1899,449 @@ msgstr "" msgid "KeyboardInterrupt (built-in exception)" msgstr "" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_BaseException (C var)" -msgstr ":exc:`BaseException`" +#~ msgid ":ref:`Availability `: Windows." +#~ msgstr ":ref:`Disponibilidad `: Windows." -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_Exception (C var)" -msgstr ":exc:`Exception`" +#~ msgid "The caller must hold the GIL." +#~ msgstr "La persona que llama debe retener el GIL." -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ArithmeticError (C var)" -msgstr ":exc:`ArithmeticError`" +#~ msgid "" +#~ "If :c:macro:`!USE_STACKCHECK` is defined, this function checks if the OS " +#~ "stack overflowed using :c:func:`PyOS_CheckStack`. If this is the case, " +#~ "it sets a :exc:`MemoryError` and returns a nonzero value." +#~ msgstr "" +#~ "Si :const:`USE_STACKCHECK` está definido, esta función verifica si la " +#~ "pila del SO se desbordó usando :c:func:`PyOS_CheckStack`. En este caso, " +#~ "establece un :exc:`MemoryError` y retorna un valor distinto de cero." -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_AssertionError (C var)" -msgstr ":exc:`AssertionError`" +#~ msgid "Standard Exceptions" +#~ msgstr "Excepciones estándar" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_AttributeError (C var)" -msgstr ":exc:`AttributeError`" +#~ msgid "" +#~ "All standard Python exceptions are available as global variables whose " +#~ "names are ``PyExc_`` followed by the Python exception name. These have " +#~ "the type :c:expr:`PyObject*`; they are all class objects. For " +#~ "completeness, here are all the variables:" +#~ msgstr "" +#~ "Todas las excepciones estándar de Python están disponibles como variables " +#~ "globales cuyos nombres son ``PyExc_`` seguidos del nombre de excepción de " +#~ "Python. Estos tienen el tipo :c:expr:`PyObject*`; todos son objetos de " +#~ "clase. Para completar, aquí están todas las variables:" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_BlockingIOError (C var)" -msgstr ":exc:`BlockingIOError`" +#~ msgid "[1]_" +#~ msgstr "[1]_" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_BrokenPipeError (C var)" -msgstr ":exc:`BrokenPipeError`" +#~ msgid ":c:data:`PyExc_Exception`" +#~ msgstr ":c:data:`PyExc_Exception`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_BufferError (C var)" -msgstr ":exc:`BufferError`" +#~ msgid ":c:data:`PyExc_ArithmeticError`" +#~ msgstr ":c:data:`PyExc_ArithmeticError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ChildProcessError (C var)" -msgstr ":exc:`ChildProcessError`" +#~ msgid ":c:data:`PyExc_AssertionError`" +#~ msgstr ":c:data:`PyExc_AssertionError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ConnectionAbortedError (C var)" -msgstr ":exc:`ConnectionAbortedError`" +#~ msgid ":c:data:`PyExc_AttributeError`" +#~ msgstr ":c:data:`PyExc_AttributeError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ConnectionError (C var)" -msgstr ":exc:`ConnectionError`" +#~ msgid ":c:data:`PyExc_BlockingIOError`" +#~ msgstr ":c:data:`PyExc_BlockingIOError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ConnectionRefusedError (C var)" -msgstr ":exc:`ConnectionRefusedError`" +#~ msgid ":c:data:`PyExc_BrokenPipeError`" +#~ msgstr ":c:data:`PyExc_BrokenPipeError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ConnectionResetError (C var)" -msgstr ":exc:`ConnectionResetError`" +#~ msgid ":c:data:`PyExc_BufferError`" +#~ msgstr ":c:data:`PyExc_BufferError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_EOFError (C var)" -msgstr ":exc:`EOFError`" +#~ msgid ":c:data:`PyExc_ChildProcessError`" +#~ msgstr ":c:data:`PyExc_ChildProcessError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_FileExistsError (C var)" -msgstr ":exc:`FileExistsError`" +#~ msgid ":c:data:`PyExc_ConnectionAbortedError`" +#~ msgstr ":c:data:`PyExc_ConnectionAbortedError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_FileNotFoundError (C var)" -msgstr ":exc:`FileNotFoundError`" +#~ msgid ":c:data:`PyExc_ConnectionError`" +#~ msgstr ":c:data:`PyExc_ConnectionError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_FloatingPointError (C var)" -msgstr ":exc:`FloatingPointError`" +#~ msgid ":c:data:`PyExc_ConnectionRefusedError`" +#~ msgstr ":c:data:`PyExc_ConnectionRefusedError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_GeneratorExit (C var)" -msgstr ":exc:`GeneratorExit`" +#~ msgid ":c:data:`PyExc_ConnectionResetError`" +#~ msgstr ":c:data:`PyExc_ConnectionResetError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ImportError (C var)" -msgstr ":exc:`ImportError`" +#~ msgid ":c:data:`PyExc_EOFError`" +#~ msgstr ":c:data:`PyExc_EOFError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_IndentationError (C var)" -msgstr ":exc:`IndentationError`" +#~ msgid ":c:data:`PyExc_FileExistsError`" +#~ msgstr ":c:data:`PyExc_FileExistsError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_IndexError (C var)" -msgstr ":exc:`IndexError`" +#~ msgid ":c:data:`PyExc_FileNotFoundError`" +#~ msgstr ":c:data:`PyExc_FileNotFoundError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_InterruptedError (C var)" -msgstr ":exc:`InterruptedError`" +#~ msgid ":c:data:`PyExc_FloatingPointError`" +#~ msgstr ":c:data:`PyExc_FloatingPointError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_IsADirectoryError (C var)" -msgstr ":exc:`IsADirectoryError`" +#~ msgid ":c:data:`PyExc_GeneratorExit`" +#~ msgstr ":c:data:`PyExc_GeneratorExit`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_KeyError (C var)" -msgstr ":exc:`KeyError`" +#~ msgid ":c:data:`PyExc_ImportError`" +#~ msgstr ":c:data:`PyExc_ImportError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_KeyboardInterrupt (C var)" -msgstr ":exc:`KeyboardInterrupt`" +#~ msgid ":c:data:`PyExc_IndentationError`" +#~ msgstr ":c:data:`PyExc_IndentationError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_LookupError (C var)" -msgstr ":exc:`LookupError`" +#~ msgid ":c:data:`PyExc_IndexError`" +#~ msgstr ":c:data:`PyExc_IndexError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_MemoryError (C var)" -msgstr ":exc:`MemoryError`" +#~ msgid ":c:data:`PyExc_InterruptedError`" +#~ msgstr ":c:data:`PyExc_InterruptedError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ModuleNotFoundError (C var)" -msgstr ":exc:`ModuleNotFoundError`" +#~ msgid ":c:data:`PyExc_IsADirectoryError`" +#~ msgstr ":c:data:`PyExc_IsADirectoryError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_NameError (C var)" -msgstr ":exc:`NameError`" +#~ msgid ":c:data:`PyExc_KeyError`" +#~ msgstr ":c:data:`PyExc_KeyError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_NotADirectoryError (C var)" -msgstr ":exc:`NotADirectoryError`" +#~ msgid ":c:data:`PyExc_KeyboardInterrupt`" +#~ msgstr ":c:data:`PyExc_KeyboardInterrupt`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_NotImplementedError (C var)" -msgstr ":exc:`NotImplementedError`" +#~ msgid ":c:data:`PyExc_LookupError`" +#~ msgstr ":c:data:`PyExc_LookupError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_OSError (C var)" -msgstr ":exc:`OSError`" +#~ msgid ":c:data:`PyExc_MemoryError`" +#~ msgstr ":c:data:`PyExc_MemoryError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_OverflowError (C var)" -msgstr ":exc:`OverflowError`" +#~ msgid ":c:data:`PyExc_ModuleNotFoundError`" +#~ msgstr ":c:data:`PyExc_ModuleNotFoundError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_PermissionError (C var)" -msgstr ":exc:`PermissionError`" +#~ msgid ":c:data:`PyExc_NameError`" +#~ msgstr ":c:data:`PyExc_NameError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ProcessLookupError (C var)" -msgstr ":exc:`ProcessLookupError`" +#~ msgid ":c:data:`PyExc_NotADirectoryError`" +#~ msgstr ":c:data:`PyExc_NotADirectoryError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_PythonFinalizationError (C var)" -msgstr ":exc:`ConnectionError`" +#~ msgid ":c:data:`PyExc_NotImplementedError`" +#~ msgstr ":c:data:`PyExc_NotImplementedError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_RecursionError (C var)" -msgstr ":exc:`RecursionError`" +#~ msgid ":c:data:`PyExc_OSError`" +#~ msgstr ":c:data:`PyExc_OSError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ReferenceError (C var)" -msgstr ":exc:`ReferenceError`" +#~ msgid ":c:data:`PyExc_OverflowError`" +#~ msgstr ":c:data:`PyExc_OverflowError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_RuntimeError (C var)" -msgstr ":exc:`RuntimeError`" +#~ msgid ":c:data:`PyExc_PermissionError`" +#~ msgstr ":c:data:`PyExc_PermissionError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_StopAsyncIteration (C var)" -msgstr ":exc:`StopAsyncIteration`" +#~ msgid ":c:data:`PyExc_ProcessLookupError`" +#~ msgstr ":c:data:`PyExc_ProcessLookupError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_StopIteration (C var)" -msgstr ":exc:`StopIteration`" +#~ msgid ":c:data:`PyExc_PythonFinalizationError`" +#~ msgstr ":c:data:`PyExc_ConnectionError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_SyntaxError (C var)" -msgstr ":exc:`SyntaxError`" +#~ msgid ":c:data:`PyExc_RecursionError`" +#~ msgstr ":c:data:`PyExc_RecursionError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_SystemError (C var)" -msgstr ":exc:`SystemError`" +#~ msgid ":c:data:`PyExc_ReferenceError`" +#~ msgstr ":c:data:`PyExc_ReferenceError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_SystemExit (C var)" -msgstr ":exc:`SystemExit`" +#~ msgid ":c:data:`PyExc_RuntimeError`" +#~ msgstr ":c:data:`PyExc_RuntimeError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_TabError (C var)" -msgstr ":exc:`TabError`" +#~ msgid ":c:data:`PyExc_StopAsyncIteration`" +#~ msgstr ":c:data:`PyExc_StopAsyncIteration`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_TimeoutError (C var)" -msgstr ":exc:`TimeoutError`" +#~ msgid ":c:data:`PyExc_StopIteration`" +#~ msgstr ":c:data:`PyExc_StopIteration`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_TypeError (C var)" -msgstr ":exc:`TypeError`" +#~ msgid ":c:data:`PyExc_SyntaxError`" +#~ msgstr ":c:data:`PyExc_SyntaxError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_UnboundLocalError (C var)" -msgstr ":exc:`UnboundLocalError`" +#~ msgid ":c:data:`PyExc_SystemError`" +#~ msgstr ":c:data:`PyExc_SystemError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_UnicodeDecodeError (C var)" -msgstr ":exc:`UnicodeDecodeError`" +#~ msgid ":c:data:`PyExc_SystemExit`" +#~ msgstr ":c:data:`PyExc_SystemExit`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_UnicodeEncodeError (C var)" -msgstr ":exc:`UnicodeEncodeError`" +#~ msgid ":c:data:`PyExc_TabError`" +#~ msgstr ":c:data:`PyExc_TabError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_UnicodeError (C var)" -msgstr ":exc:`UnicodeError`" +#~ msgid ":c:data:`PyExc_TimeoutError`" +#~ msgstr ":c:data:`PyExc_TimeoutError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_UnicodeTranslateError (C var)" -msgstr ":exc:`UnicodeTranslateError`" +#~ msgid ":c:data:`PyExc_TypeError`" +#~ msgstr ":c:data:`PyExc_TypeError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ValueError (C var)" -msgstr ":exc:`ValueError`" +#~ msgid ":c:data:`PyExc_UnboundLocalError`" +#~ msgstr ":c:data:`PyExc_UnboundLocalError`" -#: ../Doc/c-api/exceptions.rst:971 -#, fuzzy -msgid "PyExc_ZeroDivisionError (C var)" -msgstr ":exc:`ZeroDivisionError`" +#~ msgid ":c:data:`PyExc_UnicodeDecodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeDecodeError`" -#: ../Doc/c-api/exceptions.rst:1157 -#, fuzzy -msgid "PyExc_EnvironmentError (C var)" -msgstr ":c:data:`PyExc_EnvironmentError`" +#~ msgid ":c:data:`PyExc_UnicodeEncodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeEncodeError`" -#: ../Doc/c-api/exceptions.rst:1157 -#, fuzzy -msgid "PyExc_IOError (C var)" -msgstr ":c:data:`PyExc_IOError`" +#~ msgid ":c:data:`PyExc_UnicodeError`" +#~ msgstr ":c:data:`PyExc_UnicodeError`" -#: ../Doc/c-api/exceptions.rst:1157 -#, fuzzy -msgid "PyExc_WindowsError (C var)" -msgstr ":c:data:`PyExc_WindowsError`" +#~ msgid ":c:data:`PyExc_UnicodeTranslateError`" +#~ msgstr ":c:data:`PyExc_UnicodeTranslateError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_Warning (C var)" -msgstr ":exc:`Warning`" +#~ msgid ":c:data:`PyExc_ValueError`" +#~ msgstr ":c:data:`PyExc_ValueError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_BytesWarning (C var)" -msgstr ":exc:`BytesWarning`" +#~ msgid ":c:data:`PyExc_ZeroDivisionError`" +#~ msgstr ":c:data:`PyExc_ZeroDivisionError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_DeprecationWarning (C var)" -msgstr ":exc:`DeprecationWarning`" +#~ msgid ":c:data:`!PyExc_EnvironmentError`" +#~ msgstr ":c:data:`PyExc_EnvironmentError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_FutureWarning (C var)" -msgstr ":exc:`FutureWarning`" +#~ msgid ":c:data:`!PyExc_IOError`" +#~ msgstr ":c:data:`PyExc_IOError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_ImportWarning (C var)" -msgstr ":exc:`ImportWarning`" +#~ msgid ":c:data:`!PyExc_WindowsError`" +#~ msgstr ":c:data:`PyExc_WindowsError`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_PendingDeprecationWarning (C var)" -msgstr ":exc:`PendingDeprecationWarning`" +#~ msgid "[2]_" +#~ msgstr "[2]_" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_ResourceWarning (C var)" -msgstr ":exc:`ResourceWarning`" +#~ msgid "This is a base class for other standard exceptions." +#~ msgstr "Esta es una clase base para otras excepciones estándar." -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_RuntimeWarning (C var)" -msgstr ":exc:`RuntimeWarning`" +#~ msgid "Standard Warning Categories" +#~ msgstr "Categorías de advertencia estándar" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_SyntaxWarning (C var)" -msgstr ":exc:`SyntaxWarning`" +#~ msgid ":c:data:`PyExc_Warning`" +#~ msgstr ":c:data:`PyExc_Warning`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_UnicodeWarning (C var)" -msgstr ":exc:`UnicodeWarning`" +#~ msgid ":c:data:`PyExc_BytesWarning`" +#~ msgstr ":c:data:`PyExc_BytesWarning`" -#: ../Doc/c-api/exceptions.rst:1194 -#, fuzzy -msgid "PyExc_UserWarning (C var)" -msgstr ":exc:`UserWarning`" +#~ msgid ":c:data:`PyExc_DeprecationWarning`" +#~ msgstr ":c:data:`PyExc_DeprecationWarning`" + +#~ msgid ":c:data:`PyExc_FutureWarning`" +#~ msgstr ":c:data:`PyExc_FutureWarning`" + +#~ msgid ":c:data:`PyExc_ImportWarning`" +#~ msgstr ":c:data:`PyExc_ImportWarning`" + +#~ msgid ":c:data:`PyExc_PendingDeprecationWarning`" +#~ msgstr ":c:data:`PyExc_PendingDeprecationWarning`" + +#~ msgid ":c:data:`PyExc_ResourceWarning`" +#~ msgstr ":c:data:`PyExc_ResourceWarning`" + +#~ msgid ":c:data:`PyExc_RuntimeWarning`" +#~ msgstr ":c:data:`PyExc_RuntimeWarning`" + +#~ msgid ":c:data:`PyExc_SyntaxWarning`" +#~ msgstr ":c:data:`PyExc_SyntaxWarning`" + +#~ msgid ":c:data:`PyExc_UserWarning`" +#~ msgstr ":c:data:`PyExc_UserWarning`" + +#~ msgid "This is a base class for other standard warning categories." +#~ msgstr "" +#~ "Esta es una clase base para otras categorías de advertencia estándar." + +#~ msgid "PyExc_BaseException (C var)" +#~ msgstr ":exc:`BaseException`" + +#~ msgid "PyExc_Exception (C var)" +#~ msgstr ":exc:`Exception`" + +#~ msgid "PyExc_ArithmeticError (C var)" +#~ msgstr ":exc:`ArithmeticError`" + +#~ msgid "PyExc_AssertionError (C var)" +#~ msgstr ":exc:`AssertionError`" + +#~ msgid "PyExc_AttributeError (C var)" +#~ msgstr ":exc:`AttributeError`" + +#~ msgid "PyExc_BlockingIOError (C var)" +#~ msgstr ":exc:`BlockingIOError`" + +#~ msgid "PyExc_BrokenPipeError (C var)" +#~ msgstr ":exc:`BrokenPipeError`" + +#~ msgid "PyExc_BufferError (C var)" +#~ msgstr ":exc:`BufferError`" + +#~ msgid "PyExc_ChildProcessError (C var)" +#~ msgstr ":exc:`ChildProcessError`" + +#~ msgid "PyExc_ConnectionAbortedError (C var)" +#~ msgstr ":exc:`ConnectionAbortedError`" + +#~ msgid "PyExc_ConnectionError (C var)" +#~ msgstr ":exc:`ConnectionError`" + +#~ msgid "PyExc_ConnectionRefusedError (C var)" +#~ msgstr ":exc:`ConnectionRefusedError`" + +#~ msgid "PyExc_ConnectionResetError (C var)" +#~ msgstr ":exc:`ConnectionResetError`" + +#~ msgid "PyExc_EOFError (C var)" +#~ msgstr ":exc:`EOFError`" + +#~ msgid "PyExc_FileExistsError (C var)" +#~ msgstr ":exc:`FileExistsError`" + +#~ msgid "PyExc_FileNotFoundError (C var)" +#~ msgstr ":exc:`FileNotFoundError`" + +#~ msgid "PyExc_FloatingPointError (C var)" +#~ msgstr ":exc:`FloatingPointError`" + +#~ msgid "PyExc_GeneratorExit (C var)" +#~ msgstr ":exc:`GeneratorExit`" + +#~ msgid "PyExc_ImportError (C var)" +#~ msgstr ":exc:`ImportError`" + +#~ msgid "PyExc_IndentationError (C var)" +#~ msgstr ":exc:`IndentationError`" + +#~ msgid "PyExc_IndexError (C var)" +#~ msgstr ":exc:`IndexError`" + +#~ msgid "PyExc_InterruptedError (C var)" +#~ msgstr ":exc:`InterruptedError`" + +#~ msgid "PyExc_IsADirectoryError (C var)" +#~ msgstr ":exc:`IsADirectoryError`" + +#~ msgid "PyExc_KeyError (C var)" +#~ msgstr ":exc:`KeyError`" + +#~ msgid "PyExc_KeyboardInterrupt (C var)" +#~ msgstr ":exc:`KeyboardInterrupt`" + +#~ msgid "PyExc_LookupError (C var)" +#~ msgstr ":exc:`LookupError`" + +#~ msgid "PyExc_MemoryError (C var)" +#~ msgstr ":exc:`MemoryError`" + +#~ msgid "PyExc_ModuleNotFoundError (C var)" +#~ msgstr ":exc:`ModuleNotFoundError`" + +#~ msgid "PyExc_NameError (C var)" +#~ msgstr ":exc:`NameError`" + +#~ msgid "PyExc_NotADirectoryError (C var)" +#~ msgstr ":exc:`NotADirectoryError`" + +#~ msgid "PyExc_NotImplementedError (C var)" +#~ msgstr ":exc:`NotImplementedError`" + +#~ msgid "PyExc_OSError (C var)" +#~ msgstr ":exc:`OSError`" + +#~ msgid "PyExc_OverflowError (C var)" +#~ msgstr ":exc:`OverflowError`" + +#~ msgid "PyExc_PermissionError (C var)" +#~ msgstr ":exc:`PermissionError`" + +#~ msgid "PyExc_ProcessLookupError (C var)" +#~ msgstr ":exc:`ProcessLookupError`" + +#~ msgid "PyExc_PythonFinalizationError (C var)" +#~ msgstr ":exc:`ConnectionError`" + +#~ msgid "PyExc_RecursionError (C var)" +#~ msgstr ":exc:`RecursionError`" + +#~ msgid "PyExc_ReferenceError (C var)" +#~ msgstr ":exc:`ReferenceError`" + +#~ msgid "PyExc_RuntimeError (C var)" +#~ msgstr ":exc:`RuntimeError`" + +#~ msgid "PyExc_StopAsyncIteration (C var)" +#~ msgstr ":exc:`StopAsyncIteration`" + +#~ msgid "PyExc_StopIteration (C var)" +#~ msgstr ":exc:`StopIteration`" + +#~ msgid "PyExc_SyntaxError (C var)" +#~ msgstr ":exc:`SyntaxError`" + +#~ msgid "PyExc_SystemError (C var)" +#~ msgstr ":exc:`SystemError`" + +#~ msgid "PyExc_SystemExit (C var)" +#~ msgstr ":exc:`SystemExit`" + +#~ msgid "PyExc_TabError (C var)" +#~ msgstr ":exc:`TabError`" + +#~ msgid "PyExc_TimeoutError (C var)" +#~ msgstr ":exc:`TimeoutError`" + +#~ msgid "PyExc_TypeError (C var)" +#~ msgstr ":exc:`TypeError`" + +#~ msgid "PyExc_UnboundLocalError (C var)" +#~ msgstr ":exc:`UnboundLocalError`" + +#~ msgid "PyExc_UnicodeDecodeError (C var)" +#~ msgstr ":exc:`UnicodeDecodeError`" + +#~ msgid "PyExc_UnicodeEncodeError (C var)" +#~ msgstr ":exc:`UnicodeEncodeError`" + +#~ msgid "PyExc_UnicodeError (C var)" +#~ msgstr ":exc:`UnicodeError`" + +#~ msgid "PyExc_UnicodeTranslateError (C var)" +#~ msgstr ":exc:`UnicodeTranslateError`" + +#~ msgid "PyExc_ValueError (C var)" +#~ msgstr ":exc:`ValueError`" + +#~ msgid "PyExc_ZeroDivisionError (C var)" +#~ msgstr ":exc:`ZeroDivisionError`" + +#~ msgid "PyExc_EnvironmentError (C var)" +#~ msgstr ":c:data:`PyExc_EnvironmentError`" + +#~ msgid "PyExc_IOError (C var)" +#~ msgstr ":c:data:`PyExc_IOError`" + +#~ msgid "PyExc_WindowsError (C var)" +#~ msgstr ":c:data:`PyExc_WindowsError`" + +#~ msgid "PyExc_Warning (C var)" +#~ msgstr ":exc:`Warning`" + +#~ msgid "PyExc_BytesWarning (C var)" +#~ msgstr ":exc:`BytesWarning`" + +#~ msgid "PyExc_DeprecationWarning (C var)" +#~ msgstr ":exc:`DeprecationWarning`" + +#~ msgid "PyExc_FutureWarning (C var)" +#~ msgstr ":exc:`FutureWarning`" + +#~ msgid "PyExc_ImportWarning (C var)" +#~ msgstr ":exc:`ImportWarning`" + +#~ msgid "PyExc_PendingDeprecationWarning (C var)" +#~ msgstr ":exc:`PendingDeprecationWarning`" + +#~ msgid "PyExc_ResourceWarning (C var)" +#~ msgstr ":exc:`ResourceWarning`" + +#~ msgid "PyExc_RuntimeWarning (C var)" +#~ msgstr ":exc:`RuntimeWarning`" + +#~ msgid "PyExc_SyntaxWarning (C var)" +#~ msgstr ":exc:`SyntaxWarning`" + +#~ msgid "PyExc_UnicodeWarning (C var)" +#~ msgstr ":exc:`UnicodeWarning`" + +#~ msgid "PyExc_UserWarning (C var)" +#~ msgstr ":exc:`UserWarning`" diff --git a/c-api/extension-modules.po b/c-api/extension-modules.po new file mode 100644 index 0000000000..cde4754229 --- /dev/null +++ b/c-api/extension-modules.po @@ -0,0 +1,361 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) 2001 Python Software Foundation +# This file is distributed under the same license as the Python en Español +# package. +# FIRST AUTHOR , 2026. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: Python en Español 3.14\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language: es\n" +"Language-Team: es \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Generated-By: Babel 2.18.0\n" + +#: ../Doc/c-api/extension-modules.rst:6 +msgid "Defining extension modules" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:8 +msgid "" +"A C extension for CPython is a shared library (for example, a ``.so`` file " +"on Linux, ``.pyd`` DLL on Windows), which is loadable into the Python " +"process (for example, it is compiled with compatible compiler settings), and " +"which exports an :ref:`initialization function `." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:13 +msgid "" +"To be importable by default (that is, by :py:class:`importlib.machinery." +"ExtensionFileLoader`), the shared library must be available on :py:attr:`sys." +"path`, and must be named after the module name plus an extension listed in :" +"py:attr:`importlib.machinery.EXTENSION_SUFFIXES`." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:21 +msgid "" +"Building, packaging and distributing extension modules is best done with " +"third-party tools, and is out of scope of this document. One suitable tool " +"is Setuptools, whose documentation can be found at https://setuptools.pypa." +"io/en/latest/setuptools.html." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:26 +msgid "" +"Normally, the initialization function returns a module definition " +"initialized using :c:func:`PyModuleDef_Init`. This allows splitting the " +"creation process into several phases:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:30 +msgid "" +"Before any substantial code is executed, Python can determine which " +"capabilities the module supports, and it can adjust the environment or " +"refuse loading an incompatible extension." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:33 +msgid "" +"By default, Python itself creates the module object -- that is, it does the " +"equivalent of :py:meth:`object.__new__` for classes. It also sets initial " +"attributes like :attr:`~module.__package__` and :attr:`~module.__loader__`." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:37 +msgid "" +"Afterwards, the module object is initialized using extension-specific code " +"-- the equivalent of :py:meth:`~object.__init__` on classes." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:40 +msgid "" +"This is called *multi-phase initialization* to distinguish it from the " +"legacy (but still supported) *single-phase initialization* scheme, where the " +"initialization function returns a fully constructed module. See the :ref:" +"`single-phase-initialization section below ` " +"for details." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:48 +msgid "Added support for multi-phase initialization (:pep:`489`)." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:52 +msgid "Multiple module instances" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:54 +msgid "" +"By default, extension modules are not singletons. For example, if the :py:" +"attr:`sys.modules` entry is removed and the module is re-imported, a new " +"module object is created, and typically populated with fresh method and type " +"objects. The old module is subject to normal garbage collection. This " +"mirrors the behavior of pure-Python modules." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:61 +msgid "" +"Additional module instances may be created in :ref:`sub-interpreters ` or after Python runtime reinitialization (:c:func:" +"`Py_Finalize` and :c:func:`Py_Initialize`). In these cases, sharing Python " +"objects between module instances would likely cause crashes or undefined " +"behavior." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:68 +msgid "" +"To avoid such issues, each instance of an extension module should be " +"*isolated*: changes to one instance should not implicitly affect the others, " +"and all state owned by the module, including references to Python objects, " +"should be specific to a particular module instance. See :ref:`isolating-" +"extensions-howto` for more details and a practical guide." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:74 +msgid "" +"A simpler way to avoid these issues is :ref:`raising an error on repeated " +"initialization `." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:77 +msgid "" +"All modules are expected to support :ref:`sub-interpreters `, or otherwise explicitly signal a lack of support. This is usually " +"achieved by isolation or blocking repeated initialization, as above. A " +"module may also be limited to the main interpreter using the :c:data:" +"`Py_mod_multiple_interpreters` slot." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:89 +msgid "Initialization function" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:91 +msgid "" +"The initialization function defined by an extension module has the following " +"signature:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:96 +#, python-brace-format +msgid "" +"Its name should be :samp:`PyInit_{}`, with ```` replaced by the " +"name of the module." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:99 +#, python-brace-format +msgid "" +"For modules with ASCII-only names, the function must instead be named :samp:" +"`PyInit_{}`, with ```` replaced by the name of the module. When " +"using :ref:`multi-phase-initialization`, non-ASCII module names are allowed. " +"In this case, the initialization function name is :samp:`PyInitU_{}`, " +"with ```` encoded using Python's *punycode* encoding with hyphens " +"replaced by underscores. In Python:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:106 +msgid "" +"def initfunc_name(name):\n" +" try:\n" +" suffix = b'_' + name.encode('ascii')\n" +" except UnicodeEncodeError:\n" +" suffix = b'U_' + name.encode('punycode').replace(b'-', b'_')\n" +" return b'PyInit' + suffix" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:115 +msgid "" +"It is recommended to define the initialization function using a helper macro:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:119 +msgid "Declare an extension module initialization function. This macro:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:122 +msgid "specifies the :c:expr:`PyObject*` return type," +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:123 +msgid "adds any special linkage declarations required by the platform, and" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:124 +msgid "for C++, declares the function as ``extern \"C\"``." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:126 +msgid "For example, a module called ``spam`` would be defined like this::" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:128 +#, python-brace-format +msgid "" +"static struct PyModuleDef spam_module = {\n" +" .m_base = PyModuleDef_HEAD_INIT,\n" +" .m_name = \"spam\",\n" +" ...\n" +"};\n" +"\n" +"PyMODINIT_FUNC\n" +"PyInit_spam(void)\n" +"{\n" +" return PyModuleDef_Init(&spam_module);\n" +"}" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:140 +msgid "" +"It is possible to export multiple modules from a single shared library by " +"defining multiple initialization functions. However, importing them requires " +"using symbolic links or a custom importer, because by default only the " +"function corresponding to the filename is found. See the `Multiple modules " +"in one library `__ section in :pep:`489` for details." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:147 +msgid "" +"The initialization function is typically the only non-\\ ``static`` item " +"defined in the module's C source." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:154 +msgid "Multi-phase initialization" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:156 +msgid "" +"Normally, the :ref:`initialization function ` " +"(``PyInit_modulename``) returns a :c:type:`PyModuleDef` instance with non-" +"``NULL`` :c:member:`~PyModuleDef.m_slots`. Before it is returned, the " +"``PyModuleDef`` instance must be initialized using the following function:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:165 +msgid "" +"Ensure a module definition is a properly initialized Python object that " +"correctly reports its type and a reference count." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:168 +msgid "Return *def* cast to ``PyObject*``, or ``NULL`` if an error occurred." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:170 +msgid "" +"Calling this function is required for :ref:`multi-phase-initialization`. It " +"should not be used in other contexts." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:173 +msgid "" +"Note that Python assumes that ``PyModuleDef`` structures are statically " +"allocated. This function may return either a new reference or a borrowed " +"one; this reference must not be released." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:184 +msgid "Legacy single-phase initialization" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:187 +msgid "" +"Single-phase initialization is a legacy mechanism to initialize extension " +"modules, with known drawbacks and design flaws. Extension module authors are " +"encouraged to use multi-phase initialization instead." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:191 +msgid "" +"In single-phase initialization, the :ref:`initialization function ` (``PyInit_modulename``) should create, populate and return a " +"module object. This is typically done using :c:func:`PyModule_Create` and " +"functions like :c:func:`PyModule_AddObjectRef`." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:197 +msgid "" +"Single-phase initialization differs from the :ref:`default ` in the following ways:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:200 +msgid "Single-phase modules are, or rather *contain*, “singletons”." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:202 +msgid "" +"When the module is first initialized, Python saves the contents of the " +"module's ``__dict__`` (that is, typically, the module's functions and types)." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:206 +msgid "" +"For subsequent imports, Python does not call the initialization function " +"again. Instead, it creates a new module object with a new ``__dict__``, and " +"copies the saved contents to it. For example, given a single-phase module " +"``_testsinglephase`` [#testsinglephase]_ that defines a function ``sum`` and " +"an exception class ``error``:" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:214 +msgid "" +">>> import sys\n" +">>> import _testsinglephase as one\n" +">>> del sys.modules['_testsinglephase']\n" +">>> import _testsinglephase as two\n" +">>> one is two\n" +"False\n" +">>> one.__dict__ is two.__dict__\n" +"False\n" +">>> one.sum is two.sum\n" +"True\n" +">>> one.error is two.error\n" +"True" +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:229 +msgid "" +"The exact behavior should be considered a CPython implementation detail." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:231 +msgid "" +"To work around the fact that ``PyInit_modulename`` does not take a *spec* " +"argument, some state of the import machinery is saved and applied to the " +"first suitable module created during the ``PyInit_modulename`` call. " +"Specifically, when a sub-module is imported, this mechanism prepends the " +"parent package name to the name of the module." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:237 +msgid "" +"A single-phase ``PyInit_modulename`` function should create “its” module " +"object as soon as possible, before any other module objects can be created." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:240 +msgid "Non-ASCII module names (``PyInitU_modulename``) are not supported." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:242 +msgid "" +"Single-phase modules support module lookup functions like :c:func:" +"`PyState_FindModule`." +msgstr "" + +#: ../Doc/c-api/extension-modules.rst:245 +msgid "" +"``_testsinglephase`` is an internal module used in CPython's self-test " +"suite; your installation may or may not include it." +msgstr "" diff --git a/c-api/float.po b/c-api/float.po index 42d3ff876d..3e46c6b8c5 100644 --- a/c-api/float.po +++ b/c-api/float.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2024-09-26 15:15-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/float.rst:6 #, fuzzy @@ -171,6 +171,12 @@ msgstr "" #: ../Doc/c-api/float.rst:99 msgid "" +"Note that NaNs type may not be preserved on IEEE platforms (silent NaN " +"become quiet), for example on x86 systems in 32-bit mode." +msgstr "" + +#: ../Doc/c-api/float.rst:102 +msgid "" "On non-IEEE platforms with more precision, or larger dynamic range, than " "IEEE 754 supports, not all values can be packed; on non-IEEE platforms with " "less precision, or smaller dynamic range, not all values can be unpacked. " @@ -182,11 +188,11 @@ msgstr "" "pequeño, no se pueden desempaquetar todos los valores. Lo que sucede en " "tales casos es en parte accidental (desafortunadamente)." -#: ../Doc/c-api/float.rst:107 +#: ../Doc/c-api/float.rst:110 msgid "Pack functions" msgstr "Funciones de Empaquetado" -#: ../Doc/c-api/float.rst:109 +#: ../Doc/c-api/float.rst:112 msgid "" "The pack routines write 2, 4 or 8 bytes, starting at *p*. *le* is an :c:expr:" "`int` argument, non-zero if you want the bytes string in little-endian " @@ -203,7 +209,7 @@ msgstr "" "usar para emplear el endian nativo: es igual a ``1`` en el procesador big-" "endian, o ``0`` en el procesador little-endian." -#: ../Doc/c-api/float.rst:116 +#: ../Doc/c-api/float.rst:119 msgid "" "Return value: ``0`` if all is OK, ``-1`` if error (and an exception is set, " "most likely :exc:`OverflowError`)." @@ -211,38 +217,38 @@ msgstr "" "Valor retornado: ``0`` si todo está bien, ``-1`` si hay error (y se " "establece una excepción, probablemente :exc:`OverflowError`)." -#: ../Doc/c-api/float.rst:119 +#: ../Doc/c-api/float.rst:122 msgid "There are two problems on non-IEEE platforms:" msgstr "Hay dos problemas en plataformas que no son IEEE:" -#: ../Doc/c-api/float.rst:121 +#: ../Doc/c-api/float.rst:124 msgid "What this does is undefined if *x* is a NaN or infinity." msgstr "Lo que esto hace es indefinido si *x* es un NaN o infinito." -#: ../Doc/c-api/float.rst:122 +#: ../Doc/c-api/float.rst:125 msgid "``-0.0`` and ``+0.0`` produce the same bytes string." msgstr "``-0.0`` and ``+0.0`` produce la misma cadena de bytes." -#: ../Doc/c-api/float.rst:126 +#: ../Doc/c-api/float.rst:129 msgid "Pack a C double as the IEEE 754 binary16 half-precision format." msgstr "" "Empaquete un C doble como el formato de media precisión IEEE 754 binary16." -#: ../Doc/c-api/float.rst:130 +#: ../Doc/c-api/float.rst:133 msgid "Pack a C double as the IEEE 754 binary32 single precision format." msgstr "" "Empaque un C doble como el formato de precisión simple IEEE 754 binary32." -#: ../Doc/c-api/float.rst:134 +#: ../Doc/c-api/float.rst:137 msgid "Pack a C double as the IEEE 754 binary64 double precision format." msgstr "" "Empaque un C doble como el formato de doble precisión IEEE 754 binary64." -#: ../Doc/c-api/float.rst:138 +#: ../Doc/c-api/float.rst:141 msgid "Unpack functions" msgstr "Funciones de Desempaquetado" -#: ../Doc/c-api/float.rst:140 +#: ../Doc/c-api/float.rst:143 msgid "" "The unpack routines read 2, 4 or 8 bytes, starting at *p*. *le* is an :c:" "expr:`int` argument, non-zero if the bytes string is in little-endian format " @@ -259,7 +265,7 @@ msgstr "" "nativo: es igual a ``1`` en un procesador big endian, o ``0`` en un " "procesador little-endian." -#: ../Doc/c-api/float.rst:147 +#: ../Doc/c-api/float.rst:150 msgid "" "Return value: The unpacked double. On error, this is ``-1.0`` and :c:func:" "`PyErr_Occurred` is true (and an exception is set, most likely :exc:" @@ -269,7 +275,7 @@ msgstr "" "`PyErr_Occurred` es verdadero (y se establece una excepción, probablemente :" "exc:`OverflowError`)." -#: ../Doc/c-api/float.rst:151 +#: ../Doc/c-api/float.rst:154 msgid "" "Note that on a non-IEEE platform this will refuse to unpack a bytes string " "that represents a NaN or infinity." @@ -277,17 +283,17 @@ msgstr "" "Hay que tener en cuenta que en una plataforma que no sea IEEE, esto se " "negará a desempaquetar una cadena de bytes que representa un NaN o infinito." -#: ../Doc/c-api/float.rst:156 +#: ../Doc/c-api/float.rst:159 msgid "Unpack the IEEE 754 binary16 half-precision format as a C double." msgstr "" "Descomprima el formato de media precisión IEEE 754 binary16 como un doble C." -#: ../Doc/c-api/float.rst:160 +#: ../Doc/c-api/float.rst:163 msgid "Unpack the IEEE 754 binary32 single precision format as a C double." msgstr "" "Descomprima el formato de precisión simple IEEE 754 binary32 como un doble C." -#: ../Doc/c-api/float.rst:164 +#: ../Doc/c-api/float.rst:167 msgid "Unpack the IEEE 754 binary64 double precision format as a C double." msgstr "" "Descomprima el formato de doble precisión IEEE 754 binary64 como un doble C." diff --git a/c-api/frame.po b/c-api/frame.po index 14c1f38bc7..c352946539 100644 --- a/c-api/frame.po +++ b/c-api/frame.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Python en Español 3.11\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2022-11-04 09:53-0300\n" "Last-Translator: Rodrigo Poblete \n" "Language: es\n" @@ -17,7 +17,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/frame.rst:4 msgid "Frame Objects" @@ -175,37 +175,64 @@ msgid "" msgstr "" #: ../Doc/c-api/frame.rst:134 -msgid "As part of :pep:`667`, return a proxy object for optimized scopes." +msgid "" +"As part of :pep:`667`, return an instance of :c:var:" +"`PyFrameLocalsProxy_Type`." msgstr "" #: ../Doc/c-api/frame.rst:140 msgid "Return the line number that *frame* is currently executing." msgstr "Retorna el número de línea en la que se está ejecutando el *frame*." -#: ../Doc/c-api/frame.rst:145 +#: ../Doc/c-api/frame.rst:144 +msgid "Frame Locals Proxies" +msgstr "" + +#: ../Doc/c-api/frame.rst:148 +msgid "" +"The :attr:`~frame.f_locals` attribute on a :ref:`frame object ` is an instance of a \"frame-locals proxy\". The proxy object " +"exposes a write-through view of the underlying locals dictionary for the " +"frame. This ensures that the variables exposed by ``f_locals`` are always up " +"to date with the live local variables in the frame itself." +msgstr "" + +#: ../Doc/c-api/frame.rst:154 +msgid "See :pep:`667` for more information." +msgstr "" + +#: ../Doc/c-api/frame.rst:158 +msgid "The type of frame :func:`locals` proxy objects." +msgstr "" + +#: ../Doc/c-api/frame.rst:162 +msgid "Return non-zero if *obj* is a frame :func:`locals` proxy." +msgstr "" + +#: ../Doc/c-api/frame.rst:165 msgid "Internal Frames" msgstr "" -#: ../Doc/c-api/frame.rst:147 +#: ../Doc/c-api/frame.rst:167 msgid "Unless using :pep:`523`, you will not need this." msgstr "" -#: ../Doc/c-api/frame.rst:151 +#: ../Doc/c-api/frame.rst:171 msgid "The interpreter's internal frame representation." msgstr "" -#: ../Doc/c-api/frame.rst:157 +#: ../Doc/c-api/frame.rst:177 #, fuzzy msgid "Return a :term:`strong reference` to the code object for the frame." msgstr "" "Retorna una :term:`strong reference`, o ``NULL`` si *frame* no tiene frame " "exterior." -#: ../Doc/c-api/frame.rst:164 +#: ../Doc/c-api/frame.rst:184 msgid "Return the byte offset into the last executed instruction." msgstr "" -#: ../Doc/c-api/frame.rst:171 +#: ../Doc/c-api/frame.rst:191 msgid "" "Return the currently executing line number, or -1 if there is no line number." msgstr "" diff --git a/c-api/function.po b/c-api/function.po index be33ef241d..8fe11af4df 100644 --- a/c-api/function.po +++ b/c-api/function.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2021-12-09 10:29+0800\n" "Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/function.rst:6 msgid "Function Objects" @@ -36,22 +36,22 @@ msgstr "La estructura C utilizada para las funciones." #: ../Doc/c-api/function.rst:22 msgid "" "This is an instance of :c:type:`PyTypeObject` and represents the Python " -"function type. It is exposed to Python programmers as " -"``types.FunctionType``." +"function type. It is exposed to Python programmers as ``types." +"FunctionType``." msgstr "" "Esta es una instancia de :c:type:`PyTypeObject` y representa el tipo función " -"de Python. Está expuesto a los programadores de Python como " -"``types.FunctionType``." +"de Python. Está expuesto a los programadores de Python como ``types." +"FunctionType``." #: ../Doc/c-api/function.rst:28 msgid "" -"Return true if *o* is a function object (has " -"type :c:data:`PyFunction_Type`). The parameter must not be ``NULL``. This " -"function always succeeds." +"Return true if *o* is a function object (has type :c:data:" +"`PyFunction_Type`). The parameter must not be ``NULL``. This function " +"always succeeds." msgstr "" -"Retorna verdadero si *o* es un objeto función (tiene " -"tipo :c:data:`PyFunction_Type`). El parámetro no debe ser ``NULL``. Esta " -"función siempre finaliza con éxito." +"Retorna verdadero si *o* es un objeto función (tiene tipo :c:data:" +"`PyFunction_Type`). El parámetro no debe ser ``NULL``. Esta función siempre " +"finaliza con éxito." #: ../Doc/c-api/function.rst:34 msgid "" @@ -65,31 +65,30 @@ msgstr "" #: ../Doc/c-api/function.rst:37 msgid "" -"The function's docstring and name are retrieved from the code " -"object. :attr:`~function.__module__` is retrieved from *globals*. The " -"argument defaults, annotations and closure are set to " -"``NULL``. :attr:`~function.__qualname__` is set to the same value as the " -"code object's :attr:`~codeobject.co_qualname` field." +"The function's docstring and name are retrieved from the code object. :attr:" +"`~function.__module__` is retrieved from *globals*. The argument defaults, " +"annotations and closure are set to ``NULL``. :attr:`~function.__qualname__` " +"is set to the same value as the code object's :attr:`~codeobject." +"co_qualname` field." msgstr "" -"El docstring y el nombre de la función se obtienen del objeto " -"código. :attr:`~function.__module__` se obtiene de *globals*. Los argumentos " -"por defecto, anotaciones y clausura se establecen en " -"``NULL``. :attr:`~function.__qualname__` se establece en el mismo valor que " -"el campo :attr:`~codeobject.co_qualname` del objeto código." +"El docstring y el nombre de la función se obtienen del objeto código. :attr:" +"`~function.__module__` se obtiene de *globals*. Los argumentos por defecto, " +"anotaciones y clausura se establecen en ``NULL``. :attr:`~function." +"__qualname__` se establece en el mismo valor que el campo :attr:`~codeobject." +"co_qualname` del objeto código." #: ../Doc/c-api/function.rst:46 msgid "" -"As :c:func:`PyFunction_New`, but also allows setting the function " -"object's :attr:`~function.__qualname__` attribute. *qualname* should be a " -"unicode object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute " -"is set to the same value as the code " -"object's :attr:`~codeobject.co_qualname` field." +"As :c:func:`PyFunction_New`, but also allows setting the function object's :" +"attr:`~function.__qualname__` attribute. *qualname* should be a unicode " +"object or ``NULL``; if ``NULL``, the :attr:`!__qualname__` attribute is set " +"to the same value as the code object's :attr:`~codeobject.co_qualname` field." msgstr "" -"Como :c:func:`PyFunction_New`, pero también permite configurar el " -"atributo :attr:`~function.__qualname__` del objeto función. *qualname* debe " -"ser un objeto unicode o ``NULL``; si es ``NULL``, el atributo :attr:`!" -"__qualname__` se establece en el mismo valor que el " -"campo :attr:`~codeobject.co_qualname` del objeto código." +"Como :c:func:`PyFunction_New`, pero también permite configurar el atributo :" +"attr:`~function.__qualname__` del objeto función. *qualname* debe ser un " +"objeto unicode o ``NULL``; si es ``NULL``, el atributo :attr:`!__qualname__` " +"se establece en el mismo valor que el campo :attr:`~codeobject.co_qualname` " +"del objeto código." #: ../Doc/c-api/function.rst:57 msgid "Return the code object associated with the function object *op*." @@ -105,9 +104,9 @@ msgid "" "attribute of the :ref:`function object ` *op*. It can be " "*NULL*." msgstr "" -"Retorna una :term:`referencia prestada` al " -"atributo :attr:`~function.__module__` del :ref:`objeto función ` *op*. Puede ser *NULL*." +"Retorna una :term:`referencia prestada` al atributo :attr:`~function." +"__module__` del :ref:`objeto función ` *op*. Puede ser " +"*NULL*." #: ../Doc/c-api/function.rst:71 msgid "" @@ -134,8 +133,8 @@ msgstr "" "Establece los valores predeterminados del argumento para el objeto función " "*op*. *defaults* deben ser ``Py_None`` o una tupla." -#: ../Doc/c-api/function.rst:86 ../Doc/c-api/function.rst:109 -#: ../Doc/c-api/function.rst:123 +#: ../Doc/c-api/function.rst:86 ../Doc/c-api/function.rst:116 +#: ../Doc/c-api/function.rst:130 msgid "Raises :exc:`SystemError` and returns ``-1`` on failure." msgstr "Lanza :exc:`SystemError` y retorna ``-1`` en caso de error." @@ -151,7 +150,16 @@ msgstr "" "Advertencia: ¡las extensiones que usan esta API deben preservar el " "comportamiento de la función vectorcall inalterada (por defecto)!" -#: ../Doc/c-api/function.rst:100 +#: ../Doc/c-api/function.rst:101 +#, fuzzy +msgid "" +"Return the keyword-only argument default values of the function object *op*. " +"This can be a dictionary of arguments or ``NULL``." +msgstr "" +"Retorna los valores predeterminados del argumento del objeto función *op*. " +"Esto puede ser una tupla de argumentos o ``NULL``." + +#: ../Doc/c-api/function.rst:107 msgid "" "Return the closure associated with the function object *op*. This can be " "``NULL`` or a tuple of cell objects." @@ -159,7 +167,7 @@ msgstr "" "Retorna el cierre asociado con el objeto función *op*. Esto puede ser " "``NULL`` o una tupla de objetos celda." -#: ../Doc/c-api/function.rst:106 +#: ../Doc/c-api/function.rst:113 msgid "" "Set the closure associated with the function object *op*. *closure* must be " "``Py_None`` or a tuple of cell objects." @@ -167,7 +175,7 @@ msgstr "" "Establece el cierre asociado con el objeto función *op*. *cierre* debe ser " "``Py_None`` o una tupla de objetos celda." -#: ../Doc/c-api/function.rst:114 +#: ../Doc/c-api/function.rst:121 msgid "" "Return the annotations of the function object *op*. This can be a mutable " "dictionary or ``NULL``." @@ -175,7 +183,7 @@ msgstr "" "Retorna las anotaciones del objeto función *op*. Este puede ser un " "diccionario mutable o ``NULL``." -#: ../Doc/c-api/function.rst:120 +#: ../Doc/c-api/function.rst:127 msgid "" "Set the annotations for the function object *op*. *annotations* must be a " "dictionary or ``Py_None``." @@ -183,7 +191,14 @@ msgstr "" "Establece las anotaciones para el objeto función *op*. *annotations* debe " "ser un diccionario o ``Py_None``." -#: ../Doc/c-api/function.rst:128 +#: ../Doc/c-api/function.rst:141 +msgid "" +"These functions are similar to their ``PyFunction_Get*`` counterparts, but " +"do not do type checking. Passing anything other than an instance of :c:data:" +"`PyFunction_Type` is undefined behavior." +msgstr "" + +#: ../Doc/c-api/function.rst:148 msgid "" "Register *callback* as a function watcher for the current interpreter. " "Return an ID which may be passed to :c:func:`PyFunction_ClearWatcher`. In " @@ -195,47 +210,59 @@ msgstr "" "de error (por ejemplo, no hay más IDs de observador disponibles), retorna " "``-1`` y establece una excepción." -#: ../Doc/c-api/function.rst:138 +#: ../Doc/c-api/function.rst:158 msgid "" -"Clear watcher identified by *watcher_id* previously returned " -"from :c:func:`PyFunction_AddWatcher` for the current interpreter. Return " -"``0`` on success, or ``-1`` and set an exception on error (e.g. if the " -"given *watcher_id* was never registered.)" +"Clear watcher identified by *watcher_id* previously returned from :c:func:" +"`PyFunction_AddWatcher` for the current interpreter. Return ``0`` on " +"success, or ``-1`` and set an exception on error (e.g. if the given " +"*watcher_id* was never registered.)" msgstr "" -"Limpia el observador identificado por *watcher_id* previamente retornado " -"de :c:func:`PyFunction_AddWatcher` para el intérprete actual. Retorna ``0`` " -"en caso de éxito, o ``-1`` y establece una excepción en caso de error (por " +"Limpia el observador identificado por *watcher_id* previamente retornado de :" +"c:func:`PyFunction_AddWatcher` para el intérprete actual. Retorna ``0`` en " +"caso de éxito, o ``-1`` y establece una excepción en caso de error (por " "ejemplo, si el *watcher_id* dado nunca fue registrado)." -#: ../Doc/c-api/function.rst:148 -msgid "" -"Enumeration of possible function watcher events: - " -"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " -"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " -"``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +#: ../Doc/c-api/function.rst:168 +msgid "Enumeration of possible function watcher events:" msgstr "" -"Enumeración de posibles eventos de observador de función: - " -"``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " -"``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " -"``PyFunction_EVENT_MODIFY_KWDEFAULTS``" -#: ../Doc/c-api/function.rst:160 +#: ../Doc/c-api/function.rst:170 +msgid "``PyFunction_EVENT_CREATE``" +msgstr "" + +#: ../Doc/c-api/function.rst:171 +msgid "``PyFunction_EVENT_DESTROY``" +msgstr "" + +#: ../Doc/c-api/function.rst:172 +msgid "``PyFunction_EVENT_MODIFY_CODE``" +msgstr "" + +#: ../Doc/c-api/function.rst:173 +msgid "``PyFunction_EVENT_MODIFY_DEFAULTS``" +msgstr "" + +#: ../Doc/c-api/function.rst:174 +msgid "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +msgstr "" + +#: ../Doc/c-api/function.rst:181 msgid "Type of a function watcher callback function." msgstr "Tipo de una función callback de observador de función." -#: ../Doc/c-api/function.rst:162 +#: ../Doc/c-api/function.rst:183 msgid "" "If *event* is ``PyFunction_EVENT_CREATE`` or ``PyFunction_EVENT_DESTROY`` " -"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold " -"a :term:`borrowed reference` to the new value that is about to be stored in " -"*func* for the attribute that is being modified." +"then *new_value* will be ``NULL``. Otherwise, *new_value* will hold a :term:" +"`borrowed reference` to the new value that is about to be stored in *func* " +"for the attribute that is being modified." msgstr "" "Si *event* es ``PyFunction_EVENT_CREATE`` o ``PyFunction_EVENT_DESTROY`` " "entonces *new_value* será ``NULL``. De lo contrario, *new_value* mantendrá " "una :term:`referencia prestada` al nuevo valor que está a punto de " "almacenarse en *func* para el atributo que se está modificando." -#: ../Doc/c-api/function.rst:167 +#: ../Doc/c-api/function.rst:188 msgid "" "The callback may inspect but must not modify *func*; doing so could have " "unpredictable effects, including infinite recursion." @@ -243,10 +270,11 @@ msgstr "" "El callback puede inspeccionar pero no debe modificar *func*; hacerlo podría " "tener efectos impredecibles, incluyendo recursión infinita." -#: ../Doc/c-api/function.rst:170 +#: ../Doc/c-api/function.rst:191 +#, fuzzy msgid "" "If *event* is ``PyFunction_EVENT_CREATE``, then the callback is invoked " -"after `func` has been fully initialized. Otherwise, the callback is invoked " +"after *func* has been fully initialized. Otherwise, the callback is invoked " "before the modification to *func* takes place, so the prior state of *func* " "can be inspected. The runtime is permitted to optimize away the creation of " "function objects when possible. In such cases no event will be emitted. " @@ -264,7 +292,7 @@ msgstr "" "ejecución dependiendo de las decisiones de optimización, no cambia la " "semántica del código Python que se está ejecutando." -#: ../Doc/c-api/function.rst:179 +#: ../Doc/c-api/function.rst:200 msgid "" "If *event* is ``PyFunction_EVENT_DESTROY``, Taking a reference in the " "callback to the about-to-be-destroyed function will resurrect it, preventing " @@ -277,17 +305,17 @@ msgstr "" "tarde, cualquier callback observador activo en ese momento será llamado de " "nuevo." -#: ../Doc/c-api/function.rst:184 +#: ../Doc/c-api/function.rst:205 msgid "" "If the callback sets an exception, it must return ``-1``; this exception " -"will be printed as an unraisable exception " -"using :c:func:`PyErr_WriteUnraisable`. Otherwise it should return ``0``." +"will be printed as an unraisable exception using :c:func:" +"`PyErr_WriteUnraisable`. Otherwise it should return ``0``." msgstr "" "Si el callback establece una excepción, debe retornar ``-1``; esta excepción " -"se imprimirá como una excepción no lanzable " -"usando :c:func:`PyErr_WriteUnraisable`. De lo contrario debe retornar ``0``." +"se imprimirá como una excepción no lanzable usando :c:func:" +"`PyErr_WriteUnraisable`. De lo contrario debe retornar ``0``." -#: ../Doc/c-api/function.rst:188 +#: ../Doc/c-api/function.rst:209 msgid "" "There may already be a pending exception set on entry to the callback. In " "this case, the callback should return ``0`` with the same exception still " @@ -312,3 +340,14 @@ msgstr "función" #: ../Doc/c-api/function.rst:20 msgid "MethodType (in module types)" msgstr "MethodType (en module types)" + +#~ msgid "" +#~ "Enumeration of possible function watcher events: - " +#~ "``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " +#~ "``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " +#~ "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" +#~ msgstr "" +#~ "Enumeración de posibles eventos de observador de función: - " +#~ "``PyFunction_EVENT_CREATE`` - ``PyFunction_EVENT_DESTROY`` - " +#~ "``PyFunction_EVENT_MODIFY_CODE`` - ``PyFunction_EVENT_MODIFY_DEFAULTS`` - " +#~ "``PyFunction_EVENT_MODIFY_KWDEFAULTS``" diff --git a/c-api/gcsupport.po b/c-api/gcsupport.po index 0e2615e57a..0a046f8461 100644 --- a/c-api/gcsupport.po +++ b/c-api/gcsupport.po @@ -10,17 +10,16 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-10-07 00:51-0600\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.7\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/gcsupport.rst:6 msgid "Supporting Cyclic Garbage Collection" @@ -56,7 +55,7 @@ msgstr "" "tp_traverse`. Si las instancias del tipo son mutables, también se debe " "proporcionar una implementación a :c:member:`~PyTypeObject.tp_clear`." -#: ../Doc/c-api/gcsupport.rst:24 +#: ../Doc/c-api/gcsupport.rst:21 msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`" msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`" @@ -150,7 +149,43 @@ msgstr "" "Análogo a :c:macro:`PyObject_New` pero para objetos de contenedor con el " "*flag* :c:macro:`Py_TPFLAGS_HAVE_GC` establecido." -#: ../Doc/c-api/gcsupport.rst:62 +#: ../Doc/c-api/gcsupport.rst:60 ../Doc/c-api/gcsupport.rst:84 +msgid "" +"Do not call this directly to allocate memory for an object; call the type's :" +"c:member:`~PyTypeObject.tp_alloc` slot instead." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:63 ../Doc/c-api/gcsupport.rst:87 +msgid "" +"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:" +"`PyType_GenericAlloc` is preferred over a custom function that simply calls " +"this macro." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:67 ../Doc/c-api/gcsupport.rst:91 +msgid "" +"Memory allocated by this macro must be freed with :c:func:`PyObject_GC_Del` " +"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:73 ../Doc/c-api/gcsupport.rst:97 +msgid ":c:func:`PyObject_GC_Del`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:74 +msgid ":c:macro:`PyObject_New`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:75 ../Doc/c-api/gcsupport.rst:99 +#: ../Doc/c-api/gcsupport.rst:193 +msgid ":c:func:`PyType_GenericAlloc`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:76 ../Doc/c-api/gcsupport.rst:100 +msgid ":c:member:`~PyTypeObject.tp_alloc`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:81 msgid "" "Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :" "c:macro:`Py_TPFLAGS_HAVE_GC` flag set." @@ -158,19 +193,23 @@ msgstr "" "Análogo a :c:macro:`PyObject_NewVar` pero para objetos de contenedor con el " "*flag* :c:macro:`Py_TPFLAGS_HAVE_GC` establecido." -#: ../Doc/c-api/gcsupport.rst:67 +#: ../Doc/c-api/gcsupport.rst:98 +msgid ":c:macro:`PyObject_NewVar`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:105 msgid "" "Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at " "the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). " "The allocated memory is initialized to zeros, except for the :c:type:`Python " "object header `." msgstr "" -"Análogo a :c:macro:`PyObject_GC_New` pero asigna *extra_size* bytes al " -"final del objeto (en el desplazamiento :c:member:`~PyTypeObject." -"tp_basicsize`). La memoria asignada se inicializa a ceros, excepto para el :" -"c:type:`encabezado del objeto Python `." +"Análogo a :c:macro:`PyObject_GC_New` pero asigna *extra_size* bytes al final " +"del objeto (en el desplazamiento :c:member:`~PyTypeObject.tp_basicsize`). La " +"memoria asignada se inicializa a ceros, excepto para el :c:type:`encabezado " +"del objeto Python `." -#: ../Doc/c-api/gcsupport.rst:73 +#: ../Doc/c-api/gcsupport.rst:111 msgid "" "The extra data will be deallocated with the object, but otherwise it is not " "managed by Python." @@ -178,7 +217,14 @@ msgstr "" "Los datos extras se desasignarán con el objeto, pero por lo demás no se " "gestionan por Python." -#: ../Doc/c-api/gcsupport.rst:77 +#: ../Doc/c-api/gcsupport.rst:114 +msgid "" +"Memory allocated by this function must be freed with :c:func:" +"`PyObject_GC_Del` (usually called via the object's :c:member:`~PyTypeObject." +"tp_free` slot)." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:119 msgid "" "The function is marked as unstable because the final mechanism for reserving " "extra data after an instance is not yet decided. For allocating a variable " @@ -190,7 +236,7 @@ msgstr "" "asignar un número variable de campos, se recomienda usar en su lugar :c:type:" "`PyVarObject` y :c:member:`~PyTypeObject.tp_itemsize`." -#: ../Doc/c-api/gcsupport.rst:88 +#: ../Doc/c-api/gcsupport.rst:130 msgid "" "Resize an object allocated by :c:macro:`PyObject_NewVar`. Returns the " "resized object of type ``TYPE*`` (refers to any C type) or ``NULL`` on " @@ -200,7 +246,7 @@ msgstr "" "Retorna el objeto redimensionado de tipo ``TYPE*`` (se refiere a cualquier " "tipo de C) o ``NULL`` en caso de falla." -#: ../Doc/c-api/gcsupport.rst:92 +#: ../Doc/c-api/gcsupport.rst:134 msgid "" "*op* must be of type :c:expr:`PyVarObject *` and must not be tracked by the " "collector yet. *newsize* must be of type :c:type:`Py_ssize_t`." @@ -208,7 +254,7 @@ msgstr "" "*op* debe ser de tipo :c:expr:`PyVarObject *` y aún no debe ser rastreado " "por el recolector. *newsize* debe ser de tipo :c:type:`Py_ssize_t`." -#: ../Doc/c-api/gcsupport.rst:99 +#: ../Doc/c-api/gcsupport.rst:141 msgid "" "Adds the object *op* to the set of container objects tracked by the " "collector. The collector can run at unexpected times so objects must be " @@ -223,7 +269,7 @@ msgstr "" "por :c:member:`~PyTypeObject.tp_traverse` se vuelven válidos, generalmente " "cerca del final del constructor." -#: ../Doc/c-api/gcsupport.rst:108 +#: ../Doc/c-api/gcsupport.rst:150 msgid "" "Returns non-zero if the object implements the garbage collector protocol, " "otherwise returns 0." @@ -231,7 +277,7 @@ msgstr "" "Retorna un valor distinto de cero si el objeto implementa el protocolo del " "recolector de basura; de lo contrario, retorna 0." -#: ../Doc/c-api/gcsupport.rst:111 +#: ../Doc/c-api/gcsupport.rst:153 msgid "" "The object cannot be tracked by the garbage collector if this function " "returns 0." @@ -239,7 +285,7 @@ msgstr "" "El recolector de basura no puede rastrear el objeto si esta función retorna " "0." -#: ../Doc/c-api/gcsupport.rst:116 +#: ../Doc/c-api/gcsupport.rst:158 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* is " "being currently tracked by the garbage collector and 0 otherwise." @@ -247,11 +293,11 @@ msgstr "" "Retorna 1 si el tipo de objeto de *op* implementa el protocolo GC y el " "recolector de basura está rastreando *op* y 0 en caso contrario." -#: ../Doc/c-api/gcsupport.rst:119 +#: ../Doc/c-api/gcsupport.rst:161 msgid "This is analogous to the Python function :func:`gc.is_tracked`." msgstr "Esto es análogo a la función de Python :func:`gc.is_tracked`." -#: ../Doc/c-api/gcsupport.rst:126 +#: ../Doc/c-api/gcsupport.rst:168 msgid "" "Returns 1 if the object type of *op* implements the GC protocol and *op* has " "been already finalized by the garbage collector and 0 otherwise." @@ -259,11 +305,11 @@ msgstr "" "Retorna 1 si el tipo de objeto de *op* implementa el protocolo GC y *op* ya " "ha sido finalizado por el recolector de basura y 0 en caso contrario." -#: ../Doc/c-api/gcsupport.rst:129 +#: ../Doc/c-api/gcsupport.rst:171 msgid "This is analogous to the Python function :func:`gc.is_finalized`." msgstr "Esto es análogo a la función de Python :func:`gc.is_finalized`." -#: ../Doc/c-api/gcsupport.rst:136 +#: ../Doc/c-api/gcsupport.rst:178 msgid "" "Releases memory allocated to an object using :c:macro:`PyObject_GC_New` or :" "c:macro:`PyObject_GC_NewVar`." @@ -271,7 +317,37 @@ msgstr "" "Libera memoria asignada a un objeto usando :c:macro:`PyObject_GC_New` o :c:" "macro:`PyObject_GC_NewVar`." -#: ../Doc/c-api/gcsupport.rst:142 +#: ../Doc/c-api/gcsupport.rst:181 +msgid "" +"Do not call this directly to free an object's memory; call the type's :c:" +"member:`~PyTypeObject.tp_free` slot instead." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:184 +msgid "" +"Do not use this for memory allocated by :c:macro:`PyObject_New`, :c:macro:" +"`PyObject_NewVar`, or related allocation functions; use :c:func:" +"`PyObject_Free` instead." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:190 +msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function." +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:191 +#, fuzzy +msgid ":c:macro:`PyObject_GC_New`" +msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`" + +#: ../Doc/c-api/gcsupport.rst:192 +msgid ":c:macro:`PyObject_GC_NewVar`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:194 +msgid ":c:member:`~PyTypeObject.tp_free`" +msgstr "" + +#: ../Doc/c-api/gcsupport.rst:199 msgid "" "Remove the object *op* from the set of container objects tracked by the " "collector. Note that :c:func:`PyObject_GC_Track` can be called again on " @@ -288,7 +364,7 @@ msgstr "" "cualquiera de los campos utilizados por el manejador :c:member:" "`~PyTypeObject.tp_traverse` no sea válido." -#: ../Doc/c-api/gcsupport.rst:151 +#: ../Doc/c-api/gcsupport.rst:208 msgid "" "The :c:func:`!_PyObject_GC_TRACK` and :c:func:`!_PyObject_GC_UNTRACK` macros " "have been removed from the public C API." @@ -296,7 +372,7 @@ msgstr "" "Los macros :c:func:`!_PyObject_GC_TRACK` y :c:func:`!_PyObject_GC_UNTRACK` " "se han eliminado de la API pública de C." -#: ../Doc/c-api/gcsupport.rst:154 +#: ../Doc/c-api/gcsupport.rst:211 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler accepts a function " "parameter of this type:" @@ -304,7 +380,7 @@ msgstr "" "El manejador :c:member:`~PyTypeObject.tp_traverse` acepta un parámetro de " "función de este tipo:" -#: ../Doc/c-api/gcsupport.rst:159 +#: ../Doc/c-api/gcsupport.rst:216 msgid "" "Type of the visitor function passed to the :c:member:`~PyTypeObject." "tp_traverse` handler. The function should be called with an object to " @@ -320,7 +396,7 @@ msgstr "" "funciones visitantes para implementar la detección de basura cíclica; No se " "espera que los usuarios necesiten escribir sus propias funciones visitante." -#: ../Doc/c-api/gcsupport.rst:166 +#: ../Doc/c-api/gcsupport.rst:223 msgid "" "The :c:member:`~PyTypeObject.tp_traverse` handler must have the following " "type:" @@ -328,7 +404,7 @@ msgstr "" "El manejador :c:member:`~PyTypeObject.tp_traverse` debe tener el siguiente " "tipo:" -#: ../Doc/c-api/gcsupport.rst:171 +#: ../Doc/c-api/gcsupport.rst:228 msgid "" "Traversal function for a container object. Implementations must call the " "*visit* function for each object directly contained by *self*, with the " @@ -344,7 +420,7 @@ msgstr "" "de objeto ``NULL``. Si *visit* retorna un valor distinto de cero, ese valor " "debe retornarse inmediatamente." -#: ../Doc/c-api/gcsupport.rst:178 +#: ../Doc/c-api/gcsupport.rst:235 msgid "" "To simplify writing :c:member:`~PyTypeObject.tp_traverse` handlers, a :c:" "func:`Py_VISIT` macro is provided. In order to use this macro, the :c:" @@ -356,18 +432,21 @@ msgstr "" "macro, la implementación :c:member:`~PyTypeObject.tp_traverse` debe nombrar " "sus argumentos exactamente *visit* y *arg*:" -#: ../Doc/c-api/gcsupport.rst:185 +#: ../Doc/c-api/gcsupport.rst:242 +#, fuzzy msgid "" -"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and " -"*arg*. If *visit* returns a non-zero value, then return it. Using this " -"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::" +"If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, " +"with arguments *o* and *arg*. If *visit* returns a non-zero value, then " +"return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers " +"look like::" msgstr "" "Si *o* no es ``NULL``, llama a la devolución de llamada (*callback*) " "*visit*, con argumentos *o* y *arg*. Si *visit* retorna un valor distinto de " "cero, lo retorna. Usando este macro, los manejadores :c:member:" "`~PyTypeObject.tp_traverse` tienen el siguiente aspecto:" -#: ../Doc/c-api/gcsupport.rst:190 +#: ../Doc/c-api/gcsupport.rst:247 +#, python-brace-format msgid "" "static int\n" "my_traverse(Noddy *self, visitproc visit, void *arg)\n" @@ -385,7 +464,7 @@ msgstr "" " return 0;\n" "}" -#: ../Doc/c-api/gcsupport.rst:198 +#: ../Doc/c-api/gcsupport.rst:255 msgid "" "The :c:member:`~PyTypeObject.tp_clear` handler must be of the :c:type:" "`inquiry` type, or ``NULL`` if the object is immutable." @@ -393,7 +472,7 @@ msgstr "" "El manejador :c:member:`~PyTypeObject.tp_clear` debe ser del tipo :c:type:" "`query`, o ``NULL`` si el objeto es inmutable." -#: ../Doc/c-api/gcsupport.rst:204 +#: ../Doc/c-api/gcsupport.rst:261 msgid "" "Drop references that may have created reference cycles. Immutable objects " "do not have to define this method since they can never directly create " @@ -409,11 +488,11 @@ msgstr "" "`Py_DECREF` en una referencia). El recolector de basura llamará a este " "método si detecta que este objeto está involucrado en un ciclo de referencia." -#: ../Doc/c-api/gcsupport.rst:213 +#: ../Doc/c-api/gcsupport.rst:270 msgid "Controlling the Garbage Collector State" msgstr "Controlar el estado del recolector de basura" -#: ../Doc/c-api/gcsupport.rst:215 +#: ../Doc/c-api/gcsupport.rst:272 msgid "" "The C-API provides the following functions for controlling garbage " "collection runs." @@ -421,7 +500,7 @@ msgstr "" "La C-API proporciona las siguientes funciones para controlar las ejecuciones " "de recolección de basura." -#: ../Doc/c-api/gcsupport.rst:220 +#: ../Doc/c-api/gcsupport.rst:277 msgid "" "Perform a full garbage collection, if the garbage collector is enabled. " "(Note that :func:`gc.collect` runs it unconditionally.)" @@ -430,7 +509,7 @@ msgstr "" "habilitado. (Tenga en cuenta que :func:`gc.collect` lo ejecuta " "incondicionalmente)." -#: ../Doc/c-api/gcsupport.rst:223 +#: ../Doc/c-api/gcsupport.rst:280 msgid "" "Returns the number of collected + unreachable objects which cannot be " "collected. If the garbage collector is disabled or already collecting, " @@ -443,7 +522,7 @@ msgstr "" "recolección de basura se pasan a :data:`sys.unraisablehook`. Esta función no " "genera excepciones." -#: ../Doc/c-api/gcsupport.rst:233 +#: ../Doc/c-api/gcsupport.rst:290 msgid "" "Enable the garbage collector: similar to :func:`gc.enable`. Returns the " "previous state, 0 for disabled and 1 for enabled." @@ -451,7 +530,7 @@ msgstr "" "Habilita el recolector de basura: similar a :func:`gc.enable`. Retorna el " "estado anterior, 0 para deshabilitado y 1 para habilitado." -#: ../Doc/c-api/gcsupport.rst:241 +#: ../Doc/c-api/gcsupport.rst:298 msgid "" "Disable the garbage collector: similar to :func:`gc.disable`. Returns the " "previous state, 0 for disabled and 1 for enabled." @@ -459,7 +538,7 @@ msgstr "" "Deshabilita el recolector de basura: similar a :func:`gc.disable`. Retorna " "el estado anterior, 0 para deshabilitado y 1 para habilitado." -#: ../Doc/c-api/gcsupport.rst:249 +#: ../Doc/c-api/gcsupport.rst:306 msgid "" "Query the state of the garbage collector: similar to :func:`gc.isenabled`. " "Returns the current state, 0 for disabled and 1 for enabled." @@ -467,11 +546,11 @@ msgstr "" "Consulta el estado del recolector de basura: similar a :func:`gc.isenabled`. " "Retorna el estado actual, 0 para deshabilitado y 1 para habilitado." -#: ../Doc/c-api/gcsupport.rst:256 +#: ../Doc/c-api/gcsupport.rst:313 msgid "Querying Garbage Collector State" msgstr "Consultar el estado del recolector de basura" -#: ../Doc/c-api/gcsupport.rst:258 +#: ../Doc/c-api/gcsupport.rst:315 msgid "" "The C-API provides the following interface for querying information about " "the garbage collector." @@ -479,7 +558,7 @@ msgstr "" "La C-API proporciona la siguiente interfaz para consultar información sobre " "el recolector de basura." -#: ../Doc/c-api/gcsupport.rst:263 +#: ../Doc/c-api/gcsupport.rst:320 msgid "" "Run supplied *callback* on all live GC-capable objects. *arg* is passed " "through to all invocations of *callback*." @@ -487,7 +566,7 @@ msgstr "" "Ejecuta la *callback* suministrada en todos los objetos activos con " "capacidad para GC. *arg* se pasa a todas las invocaciones de *callback*." -#: ../Doc/c-api/gcsupport.rst:267 +#: ../Doc/c-api/gcsupport.rst:324 msgid "" "If new objects are (de)allocated by the callback it is undefined if they " "will be visited." @@ -495,7 +574,7 @@ msgstr "" "Si la devolución de llamada (des)asigna nuevos objetos, no está definido si " "serán visitados." -#: ../Doc/c-api/gcsupport.rst:270 +#: ../Doc/c-api/gcsupport.rst:327 msgid "" "Garbage collection is disabled during operation. Explicitly running a " "collection in the callback may lead to undefined behaviour e.g. visiting the " @@ -506,12 +585,13 @@ msgstr "" "comportamiento indefinido, por ejemplo, visitar los mismos objetos varias " "veces o no visitarlos en absoluto." -#: ../Doc/c-api/gcsupport.rst:278 +#: ../Doc/c-api/gcsupport.rst:335 +#, fuzzy msgid "" "Type of the visitor function to be passed to :c:func:" "`PyUnstable_GC_VisitObjects`. *arg* is the same as the *arg* passed to " -"``PyUnstable_GC_VisitObjects``. Return ``0`` to continue iteration, return " -"``1`` to stop iteration. Other return values are reserved for now so " +"``PyUnstable_GC_VisitObjects``. Return ``1`` to continue iteration, return " +"``0`` to stop iteration. Other return values are reserved for now so " "behavior on returning anything else is undefined." msgstr "" "Tipo de la función de visitante que se pasará a :c:func:" diff --git a/c-api/hash.po b/c-api/hash.po index ebf9b56ae6..3db90bd0ac 100644 --- a/c-api/hash.po +++ b/c-api/hash.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Python en Español 3.13\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: es\n" @@ -18,7 +18,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/hash.rst:4 msgid "PyHash API" @@ -63,6 +63,10 @@ msgstr "" msgid "Hash function definition used by :c:func:`PyHash_GetFuncDef`." msgstr "" +#: ../Doc/c-api/hash.rst:56 +msgid "Hash function." +msgstr "" + #: ../Doc/c-api/hash.rst:60 msgid "Hash function name (UTF-8 encoded string)." msgstr "" @@ -93,12 +97,34 @@ msgstr "" msgid "The function cannot fail: it cannot return ``-1``." msgstr "" -#: ../Doc/c-api/hash.rst:94 +#: ../Doc/c-api/hash.rst:95 +msgid "" +"Compute and return the hash value of a buffer of *len* bytes starting at " +"address *ptr*. The hash is guaranteed to match that of :class:`bytes`, :" +"class:`memoryview`, and other built-in objects that implement the :ref:" +"`buffer protocol `." +msgstr "" + +#: ../Doc/c-api/hash.rst:100 +msgid "" +"Use this function to implement hashing for immutable objects whose :c:member:" +"`~PyTypeObject.tp_richcompare` function compares to another object's buffer." +msgstr "" + +#: ../Doc/c-api/hash.rst:104 +msgid "*len* must be greater than or equal to ``0``." +msgstr "" + +#: ../Doc/c-api/hash.rst:106 +msgid "This function always succeeds." +msgstr "" + +#: ../Doc/c-api/hash.rst:113 msgid "" "Generic hashing function that is meant to be put into a type object's " "``tp_hash`` slot. Its result only depends on the object's identity." msgstr "" -#: ../Doc/c-api/hash.rst:99 +#: ../Doc/c-api/hash.rst:118 msgid "In CPython, it is equivalent to :c:func:`Py_HashPointer`." msgstr "" diff --git a/c-api/import.po b/c-api/import.po index 85c5000025..0c4de1154a 100644 --- a/c-api/import.po +++ b/c-api/import.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2022-10-28 17:44+0200\n" "Last-Translator: Erick G. Islas-Osuna \n" "Language: es\n" @@ -19,7 +19,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/import.rst:6 msgid "Importing Modules" @@ -27,11 +27,11 @@ msgstr "Importando módulos" #: ../Doc/c-api/import.rst:16 msgid "" -"This is a wrapper around :c:func:`PyImport_Import()` which takes " -"a :c:expr:`const char *` as an argument instead of a :c:expr:`PyObject *`." +"This is a wrapper around :c:func:`PyImport_Import()` which takes a :c:expr:" +"`const char *` as an argument instead of a :c:expr:`PyObject *`." msgstr "" -"Esta es una envoltura alrededor de :c:func:`PyImport_Import()` que toma " -"un :c:expr:`const char *` como argumento en lugar de un :c:expr:`PyObject *`." +"Esta es una envoltura alrededor de :c:func:`PyImport_Import()` que toma un :" +"c:expr:`const char *` como argumento en lugar de un :c:expr:`PyObject *`." #: ../Doc/c-api/import.rst:21 msgid "This function is a deprecated alias of :c:func:`PyImport_ImportModule`." @@ -64,10 +64,9 @@ msgstr "" #: ../Doc/c-api/import.rst:40 ../Doc/c-api/import.rst:56 msgid "" "The return value is a new reference to the imported module or top-level " -"package, or ``NULL`` with an exception set on failure. Like " -"for :func:`__import__`, the return value when a submodule of a package was " -"requested is normally the top-level package, unless a non-empty *fromlist* " -"was given." +"package, or ``NULL`` with an exception set on failure. Like for :func:" +"`__import__`, the return value when a submodule of a package was requested " +"is normally the top-level package, unless a non-empty *fromlist* was given." msgstr "" "El valor de retorno es una nueva referencia al módulo importado o paquete de " "nivel superior, o ``NULL`` con una excepción establecida en caso de error. " @@ -77,8 +76,8 @@ msgstr "" #: ../Doc/c-api/import.rst:46 msgid "" -"Failing imports remove incomplete module objects, like " -"with :c:func:`PyImport_ImportModule`." +"Failing imports remove incomplete module objects, like with :c:func:" +"`PyImport_ImportModule`." msgstr "" "Las importaciones que fallan eliminan objetos de módulo incompletos, como " "con :c:func:`PyImport_ImportModule`." @@ -90,8 +89,8 @@ msgid "" "calls this function directly." msgstr "" "Importa un módulo. Esto se describe mejor haciendo referencia a la función " -"Python incorporada :func:`__import__`, ya que la función " -"estándar :func:`__import__` llama a esta función directamente." +"Python incorporada :func:`__import__`, ya que la función estándar :func:" +"`__import__` llama a esta función directamente." #: ../Doc/c-api/import.rst:66 msgid "" @@ -162,10 +161,10 @@ msgstr "El nombre del módulo *name* se decodifica desde UTF-8." #: ../Doc/c-api/import.rst:102 msgid "" "This function does not load or import the module; if the module wasn't " -"already loaded, you will get an empty module object. " -"Use :c:func:`PyImport_ImportModule` or one of its variants to import a " -"module. Package structures implied by a dotted name for *name* are not " -"created if not already present." +"already loaded, you will get an empty module object. Use :c:func:" +"`PyImport_ImportModule` or one of its variants to import a module. Package " +"structures implied by a dotted name for *name* are not created if not " +"already present." msgstr "" "Esta función no carga ni importa el módulo; si el módulo no estaba cargado, " "obtendrás un objeto de módulo vacío. Utiliza :c:func:`PyImport_ImportModule` " @@ -178,16 +177,16 @@ msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference` and *name* is a Python :class:`str` object." msgstr "" -"Similar a :c:func:`PyImport_AddModuleRef`, pero retorna " -"una :term:`referencia prestada` y *name* es un objeto Python :class:`str`." +"Similar a :c:func:`PyImport_AddModuleRef`, pero retorna una :term:" +"`referencia prestada` y *name* es un objeto Python :class:`str`." #: ../Doc/c-api/import.rst:121 msgid "" "Similar to :c:func:`PyImport_AddModuleRef`, but return a :term:`borrowed " "reference`." msgstr "" -"Similar a :c:func:`PyImport_AddModuleRef`, pero retorna " -"una :term:`referencia prestada`." +"Similar a :c:func:`PyImport_AddModuleRef`, pero retorna una :term:" +"`referencia prestada`." #: ../Doc/c-api/import.rst:129 msgid "" @@ -196,55 +195,57 @@ msgid "" "function :func:`compile`, load the module. Return a new reference to the " "module object, or ``NULL`` with an exception set if an error occurred. " "*name* is removed from :data:`sys.modules` in error cases, even if *name* " -"was already in :data:`sys.modules` on entry " -"to :c:func:`PyImport_ExecCodeModule`. Leaving incompletely initialized " -"modules in :data:`sys.modules` is dangerous, as imports of such modules have " -"no way to know that the module object is an unknown (and probably damaged " -"with respect to the module author's intents) state." +"was already in :data:`sys.modules` on entry to :c:func:" +"`PyImport_ExecCodeModule`. Leaving incompletely initialized modules in :" +"data:`sys.modules` is dangerous, as imports of such modules have no way to " +"know that the module object is an unknown (and probably damaged with respect " +"to the module author's intents) state." msgstr "" "Dado un nombre de módulo (posiblemente de la forma ``package.module``) y un " "objeto código leído desde un archivo de *bytecode* de Python u obtenido de " "la función incorporada :func:`compile`, carga el módulo. Retorna una nueva " "referencia al objeto módulo, o ``NULL`` con una excepción establecida si se " "produjo un error. *name* se elimina de :data:`sys.modules` en casos de " -"error, incluso si *name* ya estaba en :data:`sys.modules` en la entrada " -"a :c:func:`PyImport_ExecCodeModule`. Dejar módulos inicializados de forma " +"error, incluso si *name* ya estaba en :data:`sys.modules` en la entrada a :c:" +"func:`PyImport_ExecCodeModule`. Dejar módulos inicializados de forma " "incompleta en :data:`sys.modules` es peligroso, ya que las importaciones de " "dichos módulos no tienen forma de saber que el objeto del módulo es un " "estado desconocido (y probablemente dañado con respecto a las intenciones " "del autor del módulo)." #: ../Doc/c-api/import.rst:139 +#, fuzzy msgid "" -"The module's :attr:`__spec__` and :attr:`__loader__` will be set, if not set " -"already, with the appropriate values. The spec's loader will be set to the " -"module's ``__loader__`` (if set) and to an instance " +"The module's :attr:`~module.__spec__` and :attr:`~module.__loader__` will be " +"set, if not set already, with the appropriate values. The spec's loader " +"will be set to the module's :attr:`!__loader__` (if set) and to an instance " "of :class:`~importlib.machinery.SourceFileLoader` otherwise." msgstr "" "Los :attr:`__spec__` y :attr:`__loader__` del módulo se establecerán, si no " "se han configurado ya, con los valores apropiados. El cargador de la " "especificación se establecerá en el ``__loader__`` del módulo (si está " -"configurado) y en una instancia " -"de :class:`~importlib.machinery.SourceFileLoader` de lo contrario." +"configurado) y en una instancia de :class:`~importlib.machinery." +"SourceFileLoader` de lo contrario." #: ../Doc/c-api/import.rst:144 +#, fuzzy msgid "" -"The module's :attr:`__file__` attribute will be set to the code " -"object's :attr:`~codeobject.co_filename`. If applicable, :attr:`__cached__` " -"will also be set." +"The module's :attr:`~module.__file__` attribute will be set to the code " +"object's :attr:`~codeobject.co_filename`. If applicable, :attr:`~module." +"__cached__` will also be set." msgstr "" -"El atributo :attr:`__file__` del módulo se establecerá " -"al :attr:`~codeobject.co_filename` del objeto código. Si corresponde, " -"también se establecerá :attr:`__cached__`." +"El atributo :attr:`__file__` del módulo se establecerá al :attr:`~codeobject." +"co_filename` del objeto código. Si corresponde, también se establecerá :attr:" +"`__cached__`." #: ../Doc/c-api/import.rst:148 msgid "" -"This function will reload the module if it was already imported. " -"See :c:func:`PyImport_ReloadModule` for the intended way to reload a module." +"This function will reload the module if it was already imported. See :c:" +"func:`PyImport_ReloadModule` for the intended way to reload a module." msgstr "" -"Esta función volverá a cargar el módulo si ya se importó. " -"Consulte :c:func:`PyImport_ReloadModule` para conocer la forma prevista de " -"volver a cargar un módulo." +"Esta función volverá a cargar el módulo si ya se importó. Consulte :c:func:" +"`PyImport_ReloadModule` para conocer la forma prevista de volver a cargar un " +"módulo." #: ../Doc/c-api/import.rst:151 msgid "" @@ -256,24 +257,26 @@ msgstr "" #: ../Doc/c-api/import.rst:154 msgid "" -"See also :c:func:`PyImport_ExecCodeModuleEx` " -"and :c:func:`PyImport_ExecCodeModuleWithPathnames`." +"See also :c:func:`PyImport_ExecCodeModuleEx` and :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." msgstr "" -"Ver también :c:func:`PyImport_ExecCodeModuleEx` " -"y :c:func:`PyImport_ExecCodeModuleWithPathnames`." +"Ver también :c:func:`PyImport_ExecCodeModuleEx` y :c:func:" +"`PyImport_ExecCodeModuleWithPathnames`." #: ../Doc/c-api/import.rst:157 +#, fuzzy msgid "" -"The setting of :attr:`__cached__` and :attr:`__loader__` is deprecated. " -"See :class:`~importlib.machinery.ModuleSpec` for alternatives." +"The setting of :attr:`~module.__cached__` and :attr:`~module.__loader__` is " +"deprecated. See :class:`~importlib.machinery.ModuleSpec` for alternatives." msgstr "" "El establecimiento de :attr:`__cached__` y :attr:`__loader__` está obsoleto. " "Ver :class:`~importlib.machinery.ModuleSpec` para alternativas." #: ../Doc/c-api/import.rst:165 +#, fuzzy msgid "" -"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`__file__` attribute " -"of the module object is set to *pathname* if it is non-``NULL``." +"Like :c:func:`PyImport_ExecCodeModule`, but the :attr:`~module.__file__` " +"attribute of the module object is set to *pathname* if it is non-``NULL``." msgstr "" "Como :c:func:`PyImport_ExecCodeModule`, pero el atributo :attr:`__file__` " "del objeto del módulo se establece en *pathname* si no es ``NULL``." @@ -283,22 +286,24 @@ msgid "See also :c:func:`PyImport_ExecCodeModuleWithPathnames`." msgstr "Ver también :c:func:`PyImport_ExecCodeModuleWithPathnames`." #: ../Doc/c-api/import.rst:173 +#, fuzzy msgid "" -"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`__cached__` " +"Like :c:func:`PyImport_ExecCodeModuleEx`, but the :attr:`~module.__cached__` " "attribute of the module object is set to *cpathname* if it is non-``NULL``. " "Of the three functions, this is the preferred one to use." msgstr "" -"Como :c:func:`PyImport_ExecCodeModuleEx`, pero el " -"atributo :attr:`__cached__` del objeto módulo se establece en *cpathname* si " -"no es ``NULL``. De las tres funciones, esta es la recomendada para usar." +"Como :c:func:`PyImport_ExecCodeModuleEx`, pero el atributo :attr:" +"`__cached__` del objeto módulo se establece en *cpathname* si no es " +"``NULL``. De las tres funciones, esta es la recomendada para usar." #: ../Doc/c-api/import.rst:179 +#, fuzzy msgid "" -"Setting :attr:`__cached__` is deprecated. " -"See :class:`~importlib.machinery.ModuleSpec` for alternatives." +"Setting :attr:`~module.__cached__` is deprecated. See :class:`~importlib." +"machinery.ModuleSpec` for alternatives." msgstr "" -"El establecimiento de :attr:`__cached__` está obsoleto. " -"Ver :class:`~importlib.machinery.ModuleSpec` para alternativas." +"El establecimiento de :attr:`__cached__` está obsoleto. Ver :class:" +"`~importlib.machinery.ModuleSpec` para alternativas." #: ../Doc/c-api/import.rst:186 msgid "" @@ -352,8 +357,8 @@ msgstr "" #: ../Doc/c-api/import.rst:219 msgid "" -"Return the dictionary used for the module administration (a.k.a. " -"``sys.modules``). Note that this is a per-interpreter variable." +"Return the dictionary used for the module administration (a.k.a. ``sys." +"modules``). Note that this is a per-interpreter variable." msgstr "" "Retorna el diccionario utilizado para la administración del módulo (también " "conocido como ``sys.modules``). Tenga en cuenta que esta es una variable por " @@ -376,27 +381,26 @@ msgid "" "dict. If it wasn't yet cached, traverse :data:`sys.path_hooks` until a hook " "is found that can handle the path item. Return ``None`` if no hook could; " "this tells our caller that the :term:`path based finder` could not find a " -"finder for this path item. Cache the result " -"in :data:`sys.path_importer_cache`. Return a new reference to the finder " -"object." +"finder for this path item. Cache the result in :data:`sys." +"path_importer_cache`. Return a new reference to the finder object." msgstr "" "Retorna un objeto buscador para un elemento *path* :data:`sys.path`/:attr:`!" -"pkg.__path__`, posiblemente obteniéndolo del " -"diccionario :data:`sys.path_importer_cache`. Si aún no estaba en caché, " -"atraviesa :data:`sys.path_hooks` hasta que se encuentre un gancho (*hook*) " -"que pueda manejar el elemento de ruta. Retorna ``None`` si ningún gancho " -"(*hook*) podría; esto le dice a la persona que llama que :term:`path based " -"finder` no pudo encontrar un buscador para este elemento de ruta. Guarda en " -"el resultado (caché) en :data:`sys.path_importer_cache`. Retorna una nueva " -"referencia al objeto del buscador." +"pkg.__path__`, posiblemente obteniéndolo del diccionario :data:`sys." +"path_importer_cache`. Si aún no estaba en caché, atraviesa :data:`sys." +"path_hooks` hasta que se encuentre un gancho (*hook*) que pueda manejar el " +"elemento de ruta. Retorna ``None`` si ningún gancho (*hook*) podría; esto le " +"dice a la persona que llama que :term:`path based finder` no pudo encontrar " +"un buscador para este elemento de ruta. Guarda en el resultado (caché) en :" +"data:`sys.path_importer_cache`. Retorna una nueva referencia al objeto del " +"buscador." #: ../Doc/c-api/import.rst:243 msgid "" "Load a frozen module named *name*. Return ``1`` for success, ``0`` if the " "module is not found, and ``-1`` with an exception set if the initialization " -"failed. To access the imported module on a successful load, " -"use :c:func:`PyImport_ImportModule`. (Note the misnomer --- this function " -"would reload the module if it was already imported.)" +"failed. To access the imported module on a successful load, use :c:func:" +"`PyImport_ImportModule`. (Note the misnomer --- this function would reload " +"the module if it was already imported.)" msgstr "" "Carga un módulo congelado llamado *name*. Retorna ``1`` para el éxito, ``0`` " "si no se encuentra el módulo y ``-1`` con una excepción establecida si falla " @@ -420,8 +424,8 @@ msgstr "" msgid "" "This is the structure type definition for frozen module descriptors, as " "generated by the :program:`freeze` utility (see :file:`Tools/freeze/` in the " -"Python source distribution). Its definition, found in :file:`Include/" -"import.h`, is::" +"Python source distribution). Its definition, found in :file:`Include/import." +"h`, is::" msgstr "" "Esta es la definición del tipo de estructura para los descriptores de " "módulos congelados, según lo generado con la herramienta :program:`freeze` " @@ -429,6 +433,7 @@ msgstr "" "definición, que se encuentra en :file:`Include/import.h`, es::" #: ../Doc/c-api/import.rst:270 +#, python-brace-format msgid "" "struct _frozen {\n" " const char *name;\n" @@ -460,11 +465,11 @@ msgid "" "could play tricks with this to provide a dynamically created collection of " "frozen modules." msgstr "" -"Este puntero se inicializa para apuntar a un arreglo de " -"registros :c:struct:`_frozen`, terminado por uno cuyos registros son todos " -"``NULL`` o cero. Cuando se importa un módulo congelado, se busca en esta " -"tabla. El código de terceros podría jugar con esto para proporcionar una " -"colección de módulos congelados creada dinámicamente." +"Este puntero se inicializa para apuntar a un arreglo de registros :c:struct:" +"`_frozen`, terminado por uno cuyos registros son todos ``NULL`` o cero. " +"Cuando se importa un módulo congelado, se busca en esta tabla. El código de " +"terceros podría jugar con esto para proporcionar una colección de módulos " +"congelados creada dinámicamente." #: ../Doc/c-api/import.rst:291 msgid "" @@ -493,8 +498,8 @@ msgstr "" "incorporados. Cada una de estas estructuras proporciona el nombre y la " "función de inicialización de un módulo incorporado en el intérprete. El " "nombre es una cadena de caracteres codificada ASCII. Los programas que " -"incorporan Python pueden usar una matriz de estas estructuras junto " -"con :c:func:`PyImport_ExtendInittab` para proporcionar módulos integrados " +"incorporan Python pueden usar una matriz de estas estructuras junto con :c:" +"func:`PyImport_ExtendInittab` para proporcionar módulos integrados " "adicionales. La estructura se define en :file:`Include/import.h` como::" #: ../Doc/c-api/import.rst:309 @@ -508,12 +513,12 @@ msgstr "Función de inicialización para un módulo incorporado en el intérpret #: ../Doc/c-api/import.rst:318 msgid "" "Add a collection of modules to the table of built-in modules. The *newtab* " -"array must end with a sentinel entry which contains ``NULL`` for " -"the :c:member:`~_inittab.name` field; failure to provide the sentinel value " -"can result in a memory fault. Returns ``0`` on success or ``-1`` if " -"insufficient memory could be allocated to extend the internal table. In the " -"event of failure, no modules are added to the internal table. This must be " -"called before :c:func:`Py_Initialize`." +"array must end with a sentinel entry which contains ``NULL`` for the :c:" +"member:`~_inittab.name` field; failure to provide the sentinel value can " +"result in a memory fault. Returns ``0`` on success or ``-1`` if insufficient " +"memory could be allocated to extend the internal table. In the event of " +"failure, no modules are added to the internal table. This must be called " +"before :c:func:`Py_Initialize`." msgstr "" "Agrega una colección de módulos a la tabla de módulos integrados. El arreglo " "*newtab* debe terminar con una entrada centinela que contiene ``NULL`` para " @@ -529,9 +534,34 @@ msgid "" "or :c:func:`PyImport_ExtendInittab` must be called before each Python " "initialization." msgstr "" -"Si Python es inicializado múltiples veces, se debe " -"llamar :c:func:`PyImport_AppendInittab` o :c:func:`PyImport_ExtendInittab` " -"antes de cada inicialización de Python." +"Si Python es inicializado múltiples veces, se debe llamar :c:func:" +"`PyImport_AppendInittab` o :c:func:`PyImport_ExtendInittab` antes de cada " +"inicialización de Python." + +#: ../Doc/c-api/import.rst:332 +msgid "Import the module *mod_name* and get its attribute *attr_name*." +msgstr "" + +#: ../Doc/c-api/import.rst:334 +msgid "Names must be Python :class:`str` objects." +msgstr "" + +#: ../Doc/c-api/import.rst:336 +msgid "" +"Helper function combining :c:func:`PyImport_Import` and :c:func:" +"`PyObject_GetAttr`. For example, it can raise :exc:`ImportError` if the " +"module is not found, and :exc:`AttributeError` if the attribute doesn't " +"exist." +msgstr "" + +#: ../Doc/c-api/import.rst:345 +#, fuzzy +msgid "" +"Similar to :c:func:`PyImport_ImportModuleAttr`, but names are UTF-8 encoded " +"strings instead of Python :class:`str` objects." +msgstr "" +"Similar a :c:func:`PyImport_ImportModuleLevelObject`, pero el nombre es una " +"cadena de caracteres codificada UTF-8 en lugar de un objeto Unicode." #: ../Doc/c-api/import.rst:11 msgid "package variable" diff --git a/c-api/init.po b/c-api/init.po index 297d52deb6..5d7c6b4cf3 100644 --- a/c-api/init.po +++ b/c-api/init.po @@ -10,239 +10,289 @@ msgid "" msgstr "" "Project-Id-Version: Python 3.8\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2025-10-14 13:14+0200\n" "Last-Translator: Cristián Maureira-Fredes \n" -"Language-Team: python-doc-es\n" "Language: es\n" +"Language-Team: python-doc-es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.6\n" +"Generated-By: Babel 2.18.0\n" #: ../Doc/c-api/init.rst:8 msgid "Initialization, Finalization, and Threads" msgstr "Inicialización, finalización e hilos" #: ../Doc/c-api/init.rst:10 -msgid "See also :ref:`Python Initialization Configuration `." +#, fuzzy +msgid "" +"See :ref:`Python Initialization Configuration ` for details on " +"how to configure the interpreter prior to initialization." msgstr "" "Consulte también :ref:`Configuración de inicialización de Python `." -#: ../Doc/c-api/init.rst:15 +#: ../Doc/c-api/init.rst:16 msgid "Before Python Initialization" msgstr "Antes de la inicialización de Python" -#: ../Doc/c-api/init.rst:17 +#: ../Doc/c-api/init.rst:18 msgid "" "In an application embedding Python, the :c:func:`Py_Initialize` function " "must be called before using any other Python/C API functions; with the " "exception of a few functions and the :ref:`global configuration variables " "`." msgstr "" -"En una aplicación que incorpora Python, se debe llamar a la " -"función :c:func:`Py_Initialize` antes de usar cualquier otra función de API " -"Python/C; con la excepción de algunas funciones y :ref:`variables de " -"configuración global `." +"En una aplicación que incorpora Python, se debe llamar a la función :c:func:" +"`Py_Initialize` antes de usar cualquier otra función de API Python/C; con la " +"excepción de algunas funciones y :ref:`variables de configuración global " +"`." -#: ../Doc/c-api/init.rst:22 +#: ../Doc/c-api/init.rst:23 msgid "" "The following functions can be safely called before Python is initialized:" msgstr "" "Las siguientes funciones se pueden invocar de forma segura antes de que se " "inicializa Python:" -#: ../Doc/c-api/init.rst:24 +#: ../Doc/c-api/init.rst:25 +msgid "Functions that initialize the interpreter:" +msgstr "" + +#: ../Doc/c-api/init.rst:27 +#, fuzzy +msgid ":c:func:`Py_Initialize`" +msgstr ":c:func:`Py_IsInitialized`" + +#: ../Doc/c-api/init.rst:28 +#, fuzzy +msgid ":c:func:`Py_InitializeEx`" +msgstr ":c:func:`Py_IsInitialized`" + +#: ../Doc/c-api/init.rst:29 +#, fuzzy +msgid ":c:func:`Py_InitializeFromConfig`" +msgstr ":c:func:`Py_IsInitialized`" + +#: ../Doc/c-api/init.rst:30 +#, fuzzy +msgid ":c:func:`Py_BytesMain`" +msgstr ":c:func:`Py_GetVersion`" + +#: ../Doc/c-api/init.rst:31 +#, fuzzy +msgid ":c:func:`Py_Main`" +msgstr ":c:func:`Py_GetVersion`" + +#: ../Doc/c-api/init.rst:32 +msgid "the runtime pre-initialization functions covered in :ref:`init-config`" +msgstr "" + +#: ../Doc/c-api/init.rst:34 msgid "Configuration functions:" msgstr "Funciones de configuración:" -#: ../Doc/c-api/init.rst:26 +#: ../Doc/c-api/init.rst:36 msgid ":c:func:`PyImport_AppendInittab`" msgstr ":c:func:`PyImport_AppendInittab`" -#: ../Doc/c-api/init.rst:27 +#: ../Doc/c-api/init.rst:37 msgid ":c:func:`PyImport_ExtendInittab`" msgstr ":c:func:`PyImport_ExtendInittab`" -#: ../Doc/c-api/init.rst:28 +#: ../Doc/c-api/init.rst:38 msgid ":c:func:`!PyInitFrozenExtensions`" msgstr ":c:func:`!PyInitFrozenExtensions`" -#: ../Doc/c-api/init.rst:29 +#: ../Doc/c-api/init.rst:39 msgid ":c:func:`PyMem_SetAllocator`" msgstr ":c:func:`PyMem_SetAllocator`" -#: ../Doc/c-api/init.rst:30 +#: ../Doc/c-api/init.rst:40 msgid ":c:func:`PyMem_SetupDebugHooks`" msgstr ":c:func:`PyMem_SetupDebugHooks`" -#: ../Doc/c-api/init.rst:31 +#: ../Doc/c-api/init.rst:41 msgid ":c:func:`PyObject_SetArenaAllocator`" msgstr ":c:func:`PyObject_SetArenaAllocator`" -#: ../Doc/c-api/init.rst:32 +#: ../Doc/c-api/init.rst:42 msgid ":c:func:`Py_SetProgramName`" msgstr ":c:func:`Py_SetProgramName`" -#: ../Doc/c-api/init.rst:33 +#: ../Doc/c-api/init.rst:43 msgid ":c:func:`Py_SetPythonHome`" msgstr ":c:func:`Py_SetPythonHome`" -#: ../Doc/c-api/init.rst:34 +#: ../Doc/c-api/init.rst:44 msgid ":c:func:`PySys_ResetWarnOptions`" msgstr ":c:func:`PySys_ResetWarnOptions`" -#: ../Doc/c-api/init.rst:36 +#: ../Doc/c-api/init.rst:45 +msgid "the configuration functions covered in :ref:`init-config`" +msgstr "" + +#: ../Doc/c-api/init.rst:47 msgid "Informative functions:" msgstr "Funciones informativas:" -#: ../Doc/c-api/init.rst:38 +#: ../Doc/c-api/init.rst:49 ../Doc/c-api/init.rst:57 msgid ":c:func:`Py_IsInitialized`" msgstr ":c:func:`Py_IsInitialized`" -#: ../Doc/c-api/init.rst:39 +#: ../Doc/c-api/init.rst:50 msgid ":c:func:`PyMem_GetAllocator`" msgstr ":c:func:`PyMem_GetAllocator`" -#: ../Doc/c-api/init.rst:40 +#: ../Doc/c-api/init.rst:51 msgid ":c:func:`PyObject_GetArenaAllocator`" msgstr ":c:func:`PyObject_GetArenaAllocator`" -#: ../Doc/c-api/init.rst:41 +#: ../Doc/c-api/init.rst:52 msgid ":c:func:`Py_GetBuildInfo`" msgstr ":c:func:`Py_GetBuildInfo`" -#: ../Doc/c-api/init.rst:42 +#: ../Doc/c-api/init.rst:53 msgid ":c:func:`Py_GetCompiler`" msgstr ":c:func:`Py_GetCompiler`" -#: ../Doc/c-api/init.rst:43 +#: ../Doc/c-api/init.rst:54 msgid ":c:func:`Py_GetCopyright`" msgstr ":c:func:`Py_GetCopyright`" -#: ../Doc/c-api/init.rst:44 +#: ../Doc/c-api/init.rst:55 msgid ":c:func:`Py_GetPlatform`" msgstr ":c:func:`Py_GetPlatform`" -#: ../Doc/c-api/init.rst:45 +#: ../Doc/c-api/init.rst:56 msgid ":c:func:`Py_GetVersion`" msgstr ":c:func:`Py_GetVersion`" -#: ../Doc/c-api/init.rst:47 +#: ../Doc/c-api/init.rst:59 msgid "Utilities:" msgstr "Utilidades:" -#: ../Doc/c-api/init.rst:49 +#: ../Doc/c-api/init.rst:61 msgid ":c:func:`Py_DecodeLocale`" msgstr ":c:func:`Py_DecodeLocale`" -#: ../Doc/c-api/init.rst:51 +#: ../Doc/c-api/init.rst:62 +msgid "" +"the status reporting and utility functions covered in :ref:`init-config`" +msgstr "" + +#: ../Doc/c-api/init.rst:64 msgid "Memory allocators:" msgstr "Asignadores de memoria:" -#: ../Doc/c-api/init.rst:53 +#: ../Doc/c-api/init.rst:66 msgid ":c:func:`PyMem_RawMalloc`" msgstr ":c:func:`PyMem_RawMalloc`" -#: ../Doc/c-api/init.rst:54 +#: ../Doc/c-api/init.rst:67 msgid ":c:func:`PyMem_RawRealloc`" msgstr ":c:func:`PyMem_RawRealloc`" -#: ../Doc/c-api/init.rst:55 +#: ../Doc/c-api/init.rst:68 msgid ":c:func:`PyMem_RawCalloc`" msgstr ":c:func:`PyMem_RawCalloc`" -#: ../Doc/c-api/init.rst:56 +#: ../Doc/c-api/init.rst:69 msgid ":c:func:`PyMem_RawFree`" msgstr ":c:func:`PyMem_RawFree`" -#: ../Doc/c-api/init.rst:58 +#: ../Doc/c-api/init.rst:71 msgid "Synchronization:" msgstr "Sincronización:" -#: ../Doc/c-api/init.rst:60 +#: ../Doc/c-api/init.rst:73 msgid ":c:func:`PyMutex_Lock`" msgstr ":c:func:`PyMutex_Lock`" -#: ../Doc/c-api/init.rst:61 +#: ../Doc/c-api/init.rst:74 msgid ":c:func:`PyMutex_Unlock`" msgstr ":c:func:`PyMutex_Unlock`" -#: ../Doc/c-api/init.rst:65 +#: ../Doc/c-api/init.rst:78 +#, fuzzy msgid "" -"The following functions **should not be called** " -"before :c:func:`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`Py_GetProgramName` " -"and :c:func:`PyEval_InitThreads`." +"Despite their apparent similarity to some of the functions listed above, the " +"following functions **should not be called** before the interpreter has been " +"initialized: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" +"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" +"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" +"`Py_GetProgramName`, :c:func:`PyEval_InitThreads`, and :c:func:`Py_RunMain`." msgstr "" -"Las siguientes funciones **no deben llamarse** antes " -"de :c:func:`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:`Py_GetProgramName` " -"y :c:func:`PyEval_InitThreads`." +"Las siguientes funciones **no deben llamarse** antes de :c:func:" +"`Py_Initialize`: :c:func:`Py_EncodeLocale`, :c:func:`Py_GetPath`, :c:func:" +"`Py_GetPrefix`, :c:func:`Py_GetExecPrefix`, :c:func:" +"`Py_GetProgramFullPath`, :c:func:`Py_GetPythonHome`, :c:func:" +"`Py_GetProgramName` y :c:func:`PyEval_InitThreads`." -#: ../Doc/c-api/init.rst:75 +#: ../Doc/c-api/init.rst:90 msgid "Global configuration variables" msgstr "Variables de configuración global" -#: ../Doc/c-api/init.rst:77 +#: ../Doc/c-api/init.rst:92 msgid "" "Python has variables for the global configuration to control different " -"features and options. By default, these flags are controlled " -"by :ref:`command line options `." +"features and options. By default, these flags are controlled by :ref:" +"`command line options `." msgstr "" "Python tiene variables para la configuración global para controlar " "diferentes características y opciones. De forma predeterminada, estos " "indicadores están controlados por :ref:`opciones de línea de comando `." -#: ../Doc/c-api/init.rst:81 +#: ../Doc/c-api/init.rst:96 msgid "" "When a flag is set by an option, the value of the flag is the number of " -"times that the option was set. For example, ``-b`` " -"sets :c:data:`Py_BytesWarningFlag` to 1 and ``-bb`` " -"sets :c:data:`Py_BytesWarningFlag` to 2." +"times that the option was set. For example, ``-b`` sets :c:data:" +"`Py_BytesWarningFlag` to 1 and ``-bb`` sets :c:data:`Py_BytesWarningFlag` to " +"2." msgstr "" "Cuando una opción establece un indicador, el valor del indicador es la " -"cantidad de veces que se configuró la opción. Por ejemplo, ``-b`` " -"establece :c:data:`Py_BytesWarningFlag` en 1 y ``-bb`` " -"establece :c:data:`Py_BytesWarningFlag` en 2." +"cantidad de veces que se configuró la opción. Por ejemplo, ``-b`` establece :" +"c:data:`Py_BytesWarningFlag` en 1 y ``-bb`` establece :c:data:" +"`Py_BytesWarningFlag` en 2." -#: ../Doc/c-api/init.rst:87 +#: ../Doc/c-api/init.rst:102 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.bytes_warning` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"bytes_warning` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.bytes_warning` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:91 +#: ../Doc/c-api/init.rst:106 msgid "" -"Issue a warning when comparing :class:`bytes` or :class:`bytearray` " -"with :class:`str` or :class:`bytes` with :class:`int`. Issue an error if " -"greater or equal to ``2``." +"Issue a warning when comparing :class:`bytes` or :class:`bytearray` with :" +"class:`str` or :class:`bytes` with :class:`int`. Issue an error if greater " +"or equal to ``2``." msgstr "" -"Emite una advertencia al comparar :class:`bytes` o :class:`bytearray` " -"con :class:`str` o :class:`bytes` con :class:`int`. Emite un error si es " -"mayor o igual a ``2``." +"Emite una advertencia al comparar :class:`bytes` o :class:`bytearray` con :" +"class:`str` o :class:`bytes` con :class:`int`. Emite un error si es mayor o " +"igual a ``2``." -#: ../Doc/c-api/init.rst:95 +#: ../Doc/c-api/init.rst:110 msgid "Set by the :option:`-b` option." msgstr "Establecido por la opción :option:`-b`." -#: ../Doc/c-api/init.rst:101 +#: ../Doc/c-api/init.rst:116 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.parser_debug` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"parser_debug` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.parser_debug` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:105 +#: ../Doc/c-api/init.rst:120 msgid "" "Turn on parser debugging output (for expert only, depending on compilation " "options)." @@ -250,25 +300,25 @@ msgstr "" "Activa la salida de depuración del analizador (solo para expertos, según las " "opciones de compilación)." -#: ../Doc/c-api/init.rst:108 +#: ../Doc/c-api/init.rst:123 msgid "" "Set by the :option:`-d` option and the :envvar:`PYTHONDEBUG` environment " "variable." msgstr "" -"Establecido por la opción :option:`-d` y la variable de " -"entorno :envvar:`PYTHONDEBUG`." +"Establecido por la opción :option:`-d` y la variable de entorno :envvar:" +"`PYTHONDEBUG`." -#: ../Doc/c-api/init.rst:115 +#: ../Doc/c-api/init.rst:130 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.write_bytecode` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"write_bytecode` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.write_bytecode` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:119 +#: ../Doc/c-api/init.rst:134 msgid "" "If set to non-zero, Python won't try to write ``.pyc`` files on the import " "of source modules." @@ -276,51 +326,50 @@ msgstr "" "Si se establece en un valor distinto de cero, Python no intentará escribir " "archivos ``.pyc`` en la importación de módulos fuente." -#: ../Doc/c-api/init.rst:122 +#: ../Doc/c-api/init.rst:137 msgid "" "Set by the :option:`-B` option and the :envvar:`PYTHONDONTWRITEBYTECODE` " "environment variable." msgstr "" -"Establecido por la opción :option:`-B` y la variable de " -"entorno :envvar:`PYTHONDONTWRITEBYTECODE`." +"Establecido por la opción :option:`-B` y la variable de entorno :envvar:" +"`PYTHONDONTWRITEBYTECODE`." -#: ../Doc/c-api/init.rst:129 +#: ../Doc/c-api/init.rst:144 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.pathconfig_warnings` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"pathconfig_warnings` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.pathconfig_warnings` en su " "lugar, consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:133 +#: ../Doc/c-api/init.rst:148 msgid "" -"Suppress error messages when calculating the module search path " -"in :c:func:`Py_GetPath`." +"Suppress error messages when calculating the module search path in :c:func:" +"`Py_GetPath`." msgstr "" -"Suprime los mensajes de error al calcular la ruta de búsqueda del módulo " -"en :c:func:`Py_GetPath`." +"Suprime los mensajes de error al calcular la ruta de búsqueda del módulo en :" +"c:func:`Py_GetPath`." -#: ../Doc/c-api/init.rst:136 +#: ../Doc/c-api/init.rst:151 msgid "Private flag used by ``_freeze_module`` and ``frozenmain`` programs." msgstr "" "Indicador privado utilizado por los programas ``_freeze_module`` y " "``frozenmain``." -#: ../Doc/c-api/init.rst:142 +#: ../Doc/c-api/init.rst:157 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.hash_seed` " -"and :c:member:`PyConfig.use_hash_seed` should be used instead, " +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"hash_seed` and :c:member:`PyConfig.use_hash_seed` should be used instead, " "see :ref:`Python Initialization Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se deben " -"utilizar las configuraciones :c:member:`PyConfig.hash_seed` " -"y :c:member:`PyConfig.use_hash_seed` en su lugar, consulte :ref:`Python " -"Initialization Configuration `." +"utilizar las configuraciones :c:member:`PyConfig.hash_seed` y :c:member:" +"`PyConfig.use_hash_seed` en su lugar, consulte :ref:`Python Initialization " +"Configuration `." -#: ../Doc/c-api/init.rst:147 +#: ../Doc/c-api/init.rst:162 msgid "" "Set to ``1`` if the :envvar:`PYTHONHASHSEED` environment variable is set to " "a non-empty string." @@ -328,49 +377,47 @@ msgstr "" "Se establece en ``1`` si la variable de entorno :envvar:`PYTHONHASHSEED` se " "establece en una cadena de caracteres no vacía." -#: ../Doc/c-api/init.rst:150 +#: ../Doc/c-api/init.rst:165 msgid "" "If the flag is non-zero, read the :envvar:`PYTHONHASHSEED` environment " "variable to initialize the secret hash seed." msgstr "" -"Si el indicador no es cero, lee la variable de " -"entorno :envvar:`PYTHONHASHSEED` para inicializar la semilla de *hash* " -"secreta." +"Si el indicador no es cero, lee la variable de entorno :envvar:" +"`PYTHONHASHSEED` para inicializar la semilla de *hash* secreta." -#: ../Doc/c-api/init.rst:157 +#: ../Doc/c-api/init.rst:172 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.use_environment` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"use_environment` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.use_environment` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:161 +#: ../Doc/c-api/init.rst:176 msgid "" -"Ignore all :envvar:`!PYTHON*` environment variables, " -"e.g. :envvar:`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." +"Ignore all :envvar:`!PYTHON*` environment variables, e.g. :envvar:" +"`PYTHONPATH` and :envvar:`PYTHONHOME`, that might be set." msgstr "" -"Ignore todas las variables de entorno :envvar:`!PYTHON*`, por " -"ejemplo, :envvar:`PYTHONPATH` y :envvar:`PYTHONHOME`, que puedan estar " -"configuradas." +"Ignore todas las variables de entorno :envvar:`!PYTHON*`, por ejemplo, :" +"envvar:`PYTHONPATH` y :envvar:`PYTHONHOME`, que puedan estar configuradas." -#: ../Doc/c-api/init.rst:164 +#: ../Doc/c-api/init.rst:179 msgid "Set by the :option:`-E` and :option:`-I` options." msgstr "Establecido por las opciones :option:`-E` y :option:`-I`." -#: ../Doc/c-api/init.rst:170 +#: ../Doc/c-api/init.rst:185 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.inspect` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"inspect` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.inspect` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:174 +#: ../Doc/c-api/init.rst:189 msgid "" "When a script is passed as first argument or the :option:`-c` option is " "used, enter interactive mode after executing the script or the command, even " @@ -378,42 +425,42 @@ msgid "" msgstr "" "Cuando se pasa una secuencia de comandos (*script*) como primer argumento o " "se usa la opción :option:`-c`, ingresa al modo interactivo después de " -"ejecutar la secuencia de comandos o el comando, incluso " -"cuando :data:`sys.stdin` no parece ser un terminal." +"ejecutar la secuencia de comandos o el comando, incluso cuando :data:`sys." +"stdin` no parece ser un terminal." -#: ../Doc/c-api/init.rst:178 +#: ../Doc/c-api/init.rst:193 msgid "" "Set by the :option:`-i` option and the :envvar:`PYTHONINSPECT` environment " "variable." msgstr "" -"Establecido por la opción :option:`-i` y la variable de " -"entorno :envvar:`PYTHONINSPECT`." +"Establecido por la opción :option:`-i` y la variable de entorno :envvar:" +"`PYTHONINSPECT`." -#: ../Doc/c-api/init.rst:185 +#: ../Doc/c-api/init.rst:200 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.interactive` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"interactive` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.interactive` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:189 +#: ../Doc/c-api/init.rst:204 msgid "Set by the :option:`-i` option." msgstr "Establecido por la opción :option:`-i`." -#: ../Doc/c-api/init.rst:195 +#: ../Doc/c-api/init.rst:210 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.isolated` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"isolated` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.isolated` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:199 +#: ../Doc/c-api/init.rst:214 msgid "" "Run Python in isolated mode. In isolated mode :data:`sys.path` contains " "neither the script's directory nor the user's site-packages directory." @@ -422,22 +469,22 @@ msgstr "" "ni el directorio de la secuencia de comandos (*script*) ni el directorio de " "paquetes del sitio del usuario (*site-pacages*)." -#: ../Doc/c-api/init.rst:202 +#: ../Doc/c-api/init.rst:217 msgid "Set by the :option:`-I` option." msgstr "Establecido por la opción :option:`-I`." -#: ../Doc/c-api/init.rst:210 +#: ../Doc/c-api/init.rst:225 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyPreConfig.legacy_windows_fs_encoding` should be used " -"instead, see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyPreConfig." +"legacy_windows_fs_encoding` should be used instead, see :ref:`Python " +"Initialization Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyPreConfig.legacy_windows_fs_encoding` " "en su lugar, consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:214 +#: ../Doc/c-api/init.rst:229 msgid "" "If the flag is non-zero, use the ``mbcs`` encoding with ``replace`` error " "handler, instead of the UTF-8 encoding with ``surrogatepass`` error handler, " @@ -448,179 +495,179 @@ msgstr "" "``surrogatepass``, para la :term:`filesystem encoding and error handler` " "(codificación del sistema de archivos y gestor de errores)." -#: ../Doc/c-api/init.rst:218 +#: ../Doc/c-api/init.rst:233 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSFSENCODING` environment " "variable is set to a non-empty string." msgstr "" -"Establece en ``1`` si la variable de " -"entorno :envvar:`PYTHONLEGACYWINDOWSFSENCODING` está configurada en una " -"cadena de caracteres no vacía." +"Establece en ``1`` si la variable de entorno :envvar:" +"`PYTHONLEGACYWINDOWSFSENCODING` está configurada en una cadena de caracteres " +"no vacía." -#: ../Doc/c-api/init.rst:221 +#: ../Doc/c-api/init.rst:236 msgid "See :pep:`529` for more details." msgstr "Ver :pep:`529` para más detalles." -#: ../Doc/c-api/init.rst:223 ../Doc/c-api/init.rst:241 -msgid ":ref:`Availability `: Windows." -msgstr ":ref:`Disponibilidad `: Windows." +#: ../Doc/c-api/init.rst:238 ../Doc/c-api/init.rst:256 +msgid "Availability" +msgstr "" -#: ../Doc/c-api/init.rst:229 +#: ../Doc/c-api/init.rst:244 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.legacy_windows_stdio` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"legacy_windows_stdio` should be used instead, see :ref:`Python " +"Initialization Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.legacy_windows_stdio` en su " "lugar, consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:233 +#: ../Doc/c-api/init.rst:248 msgid "" -"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!" -"io._WindowsConsoleIO` for :mod:`sys` standard streams." +"If the flag is non-zero, use :class:`io.FileIO` instead of :class:`!io." +"_WindowsConsoleIO` for :mod:`sys` standard streams." msgstr "" "Si el indicador no es cero, utilice :class:`io.FileIO` en lugar de :class:`!" "io._WindowsConsoleIO` para las transmisiones estándar :mod:`sys`." -#: ../Doc/c-api/init.rst:236 +#: ../Doc/c-api/init.rst:251 msgid "" "Set to ``1`` if the :envvar:`PYTHONLEGACYWINDOWSSTDIO` environment variable " "is set to a non-empty string." msgstr "" -"Establece en ``1`` si la variable de " -"entorno :envvar:`PYTHONLEGACYWINDOWSSTDIO` está configurada en una cadena de " -"caracteres no vacía." +"Establece en ``1`` si la variable de entorno :envvar:" +"`PYTHONLEGACYWINDOWSSTDIO` está configurada en una cadena de caracteres no " +"vacía." -#: ../Doc/c-api/init.rst:239 +#: ../Doc/c-api/init.rst:254 msgid "See :pep:`528` for more details." msgstr "Ver :pep:`528` para más detalles." -#: ../Doc/c-api/init.rst:247 +#: ../Doc/c-api/init.rst:262 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.site_import` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"site_import` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.site_import` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:251 +#: ../Doc/c-api/init.rst:266 msgid "" "Disable the import of the module :mod:`site` and the site-dependent " "manipulations of :data:`sys.path` that it entails. Also disable these " -"manipulations if :mod:`site` is explicitly imported later " -"(call :func:`site.main` if you want them to be triggered)." +"manipulations if :mod:`site` is explicitly imported later (call :func:`site." +"main` if you want them to be triggered)." msgstr "" "Deshabilita la importación del módulo :mod:`site` y las manipulaciones " "dependientes del sitio de :data:`sys.path` que conlleva. También deshabilita " "estas manipulaciones si :mod:`site` se importa explícitamente más tarde " "(llama a :func:`site.main` si desea que se activen)." -#: ../Doc/c-api/init.rst:256 +#: ../Doc/c-api/init.rst:271 msgid "Set by the :option:`-S` option." msgstr "Establecido por la opción :option:`-S`." -#: ../Doc/c-api/init.rst:262 +#: ../Doc/c-api/init.rst:277 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.user_site_directory` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"user_site_directory` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.user_site_directory` en su " "lugar, consulte :ref:`Configuración de inicialización de Python `." -#: ../Doc/c-api/init.rst:266 +#: ../Doc/c-api/init.rst:281 msgid "" -"Don't add the :data:`user site-packages directory ` " -"to :data:`sys.path`." +"Don't add the :data:`user site-packages directory ` to :data:" +"`sys.path`." msgstr "" -"No agregue el :data:`directorio de paquetes de sitio del usuario " -"` (*site-packages*) a :data:`sys.path`." +"No agregue el :data:`directorio de paquetes de sitio del usuario ` (*site-packages*) a :data:`sys.path`." -#: ../Doc/c-api/init.rst:269 +#: ../Doc/c-api/init.rst:284 msgid "" -"Set by the :option:`-s` and :option:`-I` options, and " -"the :envvar:`PYTHONNOUSERSITE` environment variable." +"Set by the :option:`-s` and :option:`-I` options, and the :envvar:" +"`PYTHONNOUSERSITE` environment variable." msgstr "" "Establecido por las opciones :option:`-s` y :option:`-I`, y la variable de " "entorno :envvar:`PYTHONNOUSERSITE`." -#: ../Doc/c-api/init.rst:276 +#: ../Doc/c-api/init.rst:291 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.optimization_level` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"optimization_level` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.optimization_level` en su " "lugar, consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:280 +#: ../Doc/c-api/init.rst:295 msgid "" "Set by the :option:`-O` option and the :envvar:`PYTHONOPTIMIZE` environment " "variable." msgstr "" -"Establecido por la opción :option:`-O` y la variable de " -"entorno :envvar:`PYTHONOPTIMIZE`." +"Establecido por la opción :option:`-O` y la variable de entorno :envvar:" +"`PYTHONOPTIMIZE`." -#: ../Doc/c-api/init.rst:287 +#: ../Doc/c-api/init.rst:302 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.quiet` should be used instead, see :ref:`Python " -"Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"quiet` should be used instead, see :ref:`Python Initialization Configuration " +"`." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " -"utilizar la configuración :c:member:`PyConfig.quiet` en su lugar, " -"consulte :ref:`Python Initialization Configuration `." +"utilizar la configuración :c:member:`PyConfig.quiet` en su lugar, consulte :" +"ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:291 +#: ../Doc/c-api/init.rst:306 msgid "" "Don't display the copyright and version messages even in interactive mode." msgstr "" "No muestre los mensajes de *copyright* y de versión incluso en modo " "interactivo." -#: ../Doc/c-api/init.rst:293 +#: ../Doc/c-api/init.rst:308 msgid "Set by the :option:`-q` option." msgstr "Establecido por la opción :option:`-q`." -#: ../Doc/c-api/init.rst:301 +#: ../Doc/c-api/init.rst:316 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.buffered_stdio` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"buffered_stdio` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.buffered_stdio` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:305 +#: ../Doc/c-api/init.rst:320 msgid "Force the stdout and stderr streams to be unbuffered." msgstr "Obliga a las secuencias *stdout* y *stderr* a que no tengan búfer." -#: ../Doc/c-api/init.rst:307 +#: ../Doc/c-api/init.rst:322 msgid "" "Set by the :option:`-u` option and the :envvar:`PYTHONUNBUFFERED` " "environment variable." msgstr "" -"Establecido por la opción :option:`-u` y la variable de " -"entorno :envvar:`PYTHONUNBUFFERED`." +"Establecido por la opción :option:`-u` y la variable de entorno :envvar:" +"`PYTHONUNBUFFERED`." -#: ../Doc/c-api/init.rst:314 +#: ../Doc/c-api/init.rst:329 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.verbose` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"verbose` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene por compatibilidad con versiones anteriores: se debe " "utilizar la configuración :c:member:`PyConfig.verbose` en su lugar, " "consulte :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:318 +#: ../Doc/c-api/init.rst:333 msgid "" "Print a message each time a module is initialized, showing the place " "(filename or built-in module) from which it is loaded. If greater or equal " @@ -633,58 +680,59 @@ msgstr "" "buscar un módulo. También proporciona información sobre la limpieza del " "módulo a la salida." -#: ../Doc/c-api/init.rst:323 +#: ../Doc/c-api/init.rst:338 msgid "" "Set by the :option:`-v` option and the :envvar:`PYTHONVERBOSE` environment " "variable." msgstr "" -"Establecido por la opción :option:`-v` y la variable de " -"entorno :envvar:`PYTHONVERBOSE`." +"Establecido por la opción :option:`-v` y la variable de entorno :envvar:" +"`PYTHONVERBOSE`." -#: ../Doc/c-api/init.rst:330 +#: ../Doc/c-api/init.rst:345 msgid "Initializing and finalizing the interpreter" msgstr "Inicializando y finalizando el intérprete" -#: ../Doc/c-api/init.rst:345 +#: ../Doc/c-api/init.rst:360 msgid "" "Initialize the Python interpreter. In an application embedding Python, " -"this should be called before using any other Python/C API functions; " -"see :ref:`Before Python Initialization ` for the few " -"exceptions." +"this should be called before using any other Python/C API functions; see :" +"ref:`Before Python Initialization ` for the few exceptions." msgstr "" "Inicializa el intérprete de Python. En una aplicación que incorpora Python, " -"se debe llamar antes de usar cualquier otra función de API Python/C; " -"vea :ref:`Antes de la inicialización de Python ` para ver " -"algunas excepciones." +"se debe llamar antes de usar cualquier otra función de API Python/C; vea :" +"ref:`Antes de la inicialización de Python ` para ver algunas " +"excepciones." -#: ../Doc/c-api/init.rst:349 +#: ../Doc/c-api/init.rst:364 +#, fuzzy msgid "" "This initializes the table of loaded modules (``sys.modules``), and creates " -"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " +"the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:`sys`. It " "also initializes the module search path (``sys.path``). It does not set " -"``sys.argv``; use the new :c:type:`PyConfig` API of the :ref:`Python " -"Initialization Configuration ` for that. This is a no-op when " -"called for a second time (without calling :c:func:`Py_FinalizeEx` first). " -"There is no return value; it is a fatal error if the initialization fails." +"``sys.argv``; use the :ref:`Python Initialization Configuration ` API for that. This is a no-op when called for a second time " +"(without calling :c:func:`Py_FinalizeEx` first). There is no return value; " +"it is a fatal error if the initialization fails." msgstr "" "Esto inicializa la tabla de módulos cargados (``sys.modules``) y crea los " "módulos fundamentales :mod:`builtins`, :mod:`__main__` y :mod:`sys`. También " -"inicializa la ruta de búsqueda de módulos (``sys.path``). No establece " -"``sys.argv``; utilice la nueva API :c:type:`PyConfig` de :ref:`Python " +"inicializa la ruta de búsqueda de módulos (``sys.path``). No establece ``sys." +"argv``; utilice la nueva API :c:type:`PyConfig` de :ref:`Python " "Initialization Configuration ` para ello. Esta es una operación " -"sin efecto cuando se llama por segunda vez (sin llamar primero " -"a :c:func:`Py_FinalizeEx`). No hay ningún valor de retorno; es un error " -"fatal si falla la inicialización." +"sin efecto cuando se llama por segunda vez (sin llamar primero a :c:func:" +"`Py_FinalizeEx`). No hay ningún valor de retorno; es un error fatal si falla " +"la inicialización." -#: ../Doc/c-api/init.rst:359 ../Doc/c-api/init.rst:373 +#: ../Doc/c-api/init.rst:372 ../Doc/c-api/init.rst:386 +#, fuzzy msgid "" -"Use the :c:func:`Py_InitializeFromConfig` function to customize " -"the :ref:`Python Initialization Configuration `." +"Use :c:func:`Py_InitializeFromConfig` to customize the :ref:`Python " +"Initialization Configuration `." msgstr "" -"Utilice la función :c:func:`Py_InitializeFromConfig` para " -"personalizar :ref:`Python Initialization Configuration `." +"Utilice la función :c:func:`Py_InitializeFromConfig` para personalizar :ref:" +"`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:363 +#: ../Doc/c-api/init.rst:376 msgid "" "On Windows, changes the console mode from ``O_TEXT`` to ``O_BINARY``, which " "will also affect non-Python uses of the console using the C Runtime." @@ -693,28 +741,43 @@ msgstr "" "también afectará los usos de la consola que no sean de Python utilizando C " "*Runtime*." -#: ../Doc/c-api/init.rst:369 +#: ../Doc/c-api/init.rst:382 +#, fuzzy msgid "" "This function works like :c:func:`Py_Initialize` if *initsigs* is ``1``. If " "*initsigs* is ``0``, it skips initialization registration of signal " -"handlers, which might be useful when Python is embedded." +"handlers, which may be useful when CPython is embedded as part of a larger " +"application." msgstr "" "Esta función funciona como :c:func:`Py_Initialize` si *initsigs* es ``1``. " "Si *initsigs* es ``0``, omite el registro de inicialización de los " "manejadores de señal, lo que podría ser útil cuando Python está incrustado." -#: ../Doc/c-api/init.rst:379 +#: ../Doc/c-api/init.rst:392 +msgid "" +"Initialize Python from *config* configuration, as described in :ref:`init-" +"from-config`." +msgstr "" + +#: ../Doc/c-api/init.rst:395 +msgid "" +"See the :ref:`init-config` section for details on pre-initializing the " +"interpreter, populating the runtime configuration structure, and querying " +"the returned status structure." +msgstr "" + +#: ../Doc/c-api/init.rst:402 msgid "" "Return true (nonzero) when the Python interpreter has been initialized, " "false (zero) if not. After :c:func:`Py_FinalizeEx` is called, this returns " "false until :c:func:`Py_Initialize` is called again." msgstr "" "Retorna verdadero (distinto de cero) cuando el intérprete de Python se ha " -"inicializado, falso (cero) si no. Después de que se llama " -"a :c:func:`Py_FinalizeEx`, esto retorna falso hasta " -"que :c:func:`Py_Initialize` se llama de nuevo." +"inicializado, falso (cero) si no. Después de que se llama a :c:func:" +"`Py_FinalizeEx`, esto retorna falso hasta que :c:func:`Py_Initialize` se " +"llama de nuevo." -#: ../Doc/c-api/init.rst:386 +#: ../Doc/c-api/init.rst:409 msgid "" "Return true (non-zero) if the main Python interpreter is :term:`shutting " "down `. Return false (zero) otherwise." @@ -723,38 +786,36 @@ msgstr "" "es :term:`shutting down `. Devuelve falso (cero) en " "caso contrario." -#: ../Doc/c-api/init.rst:394 +#: ../Doc/c-api/init.rst:417 +#, fuzzy msgid "" "Undo all initializations made by :c:func:`Py_Initialize` and subsequent use " -"of Python/C API functions, and destroy all sub-interpreters " -"(see :c:func:`Py_NewInterpreter` below) that were created and not yet " -"destroyed since the last call to :c:func:`Py_Initialize`. Ideally, this " -"frees all memory allocated by the Python interpreter. This is a no-op when " -"called for a second time (without calling :c:func:`Py_Initialize` again " -"first)." +"of Python/C API functions, and destroy all sub-interpreters (see :c:func:" +"`Py_NewInterpreter` below) that were created and not yet destroyed since the " +"last call to :c:func:`Py_Initialize`. This is a no-op when called for a " +"second time (without calling :c:func:`Py_Initialize` again first)." msgstr "" "Deshaga todas las inicializaciones realizadas por :c:func:`Py_Initialize` y " "el uso posterior de las funciones de la API de Python/C, y destruya todos " "los subintérpretes (consulte :c:func:`Py_NewInterpreter` a continuación) que " -"se crearon y aún no se destruyeron desde la última llamada " -"a :c:func:`Py_Initialize`. Idealmente, esto libera toda la memoria asignada " -"por el intérprete de Python. Esta es una operación sin efecto cuando se " -"llama por segunda vez (sin llamar a :c:func:`Py_Initialize` nuevamente " -"primero)." +"se crearon y aún no se destruyeron desde la última llamada a :c:func:" +"`Py_Initialize`. Idealmente, esto libera toda la memoria asignada por el " +"intérprete de Python. Esta es una operación sin efecto cuando se llama por " +"segunda vez (sin llamar a :c:func:`Py_Initialize` nuevamente primero)." -#: ../Doc/c-api/init.rst:401 +#: ../Doc/c-api/init.rst:423 msgid "" "Since this is the reverse of :c:func:`Py_Initialize`, it should be called in " "the same thread with the same interpreter active. That means the main " -"thread and the main interpreter. This should never be called " -"while :c:func:`Py_RunMain` is running." +"thread and the main interpreter. This should never be called while :c:func:" +"`Py_RunMain` is running." msgstr "" "Dado que se trata del proceso inverso de :c:func:`Py_Initialize`, se debe " "llamar en el mismo subproceso con el mismo intérprete activo, es decir, el " "subproceso principal y el intérprete principal. Nunca se debe llamar " "mientras se esté ejecutando :c:func:`Py_RunMain`." -#: ../Doc/c-api/init.rst:406 +#: ../Doc/c-api/init.rst:428 msgid "" "Normally the return value is ``0``. If there were errors during finalization " "(flushing buffered data), ``-1`` is returned." @@ -762,7 +823,16 @@ msgstr "" "Normalmente, el valor de retorno es ``0``. Si se produjeron errores durante " "la finalización (limpieza de datos almacenados en búfer), se devuelve ``-1``." -#: ../Doc/c-api/init.rst:410 +#: ../Doc/c-api/init.rst:432 +msgid "" +"Note that Python will do a best effort at freeing all memory allocated by " +"the Python interpreter. Therefore, any C-Extension should make sure to " +"correctly clean up all of the preveiously allocated PyObjects before using " +"them in subsequent calls to :c:func:`Py_Initialize`. Otherwise it could " +"introduce vulnerabilities and incorrect behavior." +msgstr "" + +#: ../Doc/c-api/init.rst:438 msgid "" "This function is provided for a number of reasons. An embedding application " "might want to restart Python without having to restart the application " @@ -781,7 +851,8 @@ msgstr "" "querer liberar toda la memoria asignada por Python antes de salir de la " "aplicación." -#: ../Doc/c-api/init.rst:418 +#: ../Doc/c-api/init.rst:446 +#, fuzzy msgid "" "**Bugs and caveats:** The destruction of modules and objects in modules is " "done in random order; this may cause destructors (:meth:`~object.__del__` " @@ -789,11 +860,16 @@ msgid "" "modules. Dynamically loaded extension modules loaded by Python are not " "unloaded. Small amounts of memory allocated by the Python interpreter may " "not be freed (if you find a leak, please report it). Memory tied up in " -"circular references between objects is not freed. Some memory allocated by " +"circular references between objects is not freed. Interned strings will all " +"be deallocated regardless of their reference count. Some memory allocated by " "extension modules may not be freed. Some extensions may not work properly " "if their initialization routine is called more than once; this can happen if " "an application calls :c:func:`Py_Initialize` and :c:func:`Py_FinalizeEx` " -"more than once." +"more than once. :c:func:`Py_FinalizeEx` must not be called recursively from " +"within itself. Therefore, it must not be called by any code that may be run " +"as part of the interpreter shutdown process, such as :py:mod:`atexit` " +"handlers, object finalizers, or any code that may be run while flushing the " +"stdout and stderr files." msgstr "" "**Bugs and caveats:** La destrucción de módulos y objetos en módulos se " "realiza en orden aleatorio; esto puede provocar que los destructores " @@ -805,40 +881,165 @@ msgstr "" "objetos no se libera. Es posible que no se libere parte de la memoria " "asignada por los módulos de extensión. Es posible que algunas extensiones no " "funcionen correctamente si su rutina de inicialización se llama más de una " -"vez; esto puede suceder si una aplicación llama a :c:func:`Py_Initialize` " -"y :c:func:`Py_FinalizeEx` más de una vez." +"vez; esto puede suceder si una aplicación llama a :c:func:`Py_Initialize` y :" +"c:func:`Py_FinalizeEx` más de una vez." -#: ../Doc/c-api/init.rst:429 +#: ../Doc/c-api/init.rst:462 msgid "" -"Raises an :ref:`auditing event ` " -"``cpython._PySys_ClearAuditHooks`` with no arguments." +"Raises an :ref:`auditing event ` ``cpython." +"_PySys_ClearAuditHooks`` with no arguments." msgstr "" -"Genera un :ref:`evento de auditoría ` " -"``cpython._PySys_ClearAuditHooks`` sin argumentos." +"Genera un :ref:`evento de auditoría ` ``cpython." +"_PySys_ClearAuditHooks`` sin argumentos." -#: ../Doc/c-api/init.rst:435 +#: ../Doc/c-api/init.rst:469 msgid "" "This is a backwards-compatible version of :c:func:`Py_FinalizeEx` that " "disregards the return value." msgstr "" -"Esta es una versión compatible con versiones anteriores " -"de :c:func:`Py_FinalizeEx` que ignora el valor de retorno." +"Esta es una versión compatible con versiones anteriores de :c:func:" +"`Py_FinalizeEx` que ignora el valor de retorno." + +#: ../Doc/c-api/init.rst:475 +msgid "" +"Similar to :c:func:`Py_Main` but *argv* is an array of bytes strings, " +"allowing the calling application to delegate the text decoding step to the " +"CPython runtime." +msgstr "" + +#: ../Doc/c-api/init.rst:484 +msgid "" +"The main program for the standard interpreter, encapsulating a full " +"initialization/finalization cycle, as well as additional behaviour to " +"implement reading configurations settings from the environment and command " +"line, and then executing ``__main__`` in accordance with :ref:`using-on-" +"cmdline`." +msgstr "" + +#: ../Doc/c-api/init.rst:490 +msgid "" +"This is made available for programs which wish to support the full CPython " +"command line interface, rather than just embedding a Python runtime in a " +"larger application." +msgstr "" + +#: ../Doc/c-api/init.rst:494 +msgid "" +"The *argc* and *argv* parameters are similar to those which are passed to a " +"C program's :c:func:`main` function, except that the *argv* entries are " +"first converted to ``wchar_t`` using :c:func:`Py_DecodeLocale`. It is also " +"important to note that the argument list entries may be modified to point to " +"strings other than those passed in (however, the contents of the strings " +"pointed to by the argument list are not modified)." +msgstr "" + +#: ../Doc/c-api/init.rst:501 +msgid "" +"The return value is ``2`` if the argument list does not represent a valid " +"Python command line, and otherwise the same as :c:func:`Py_RunMain`." +msgstr "" + +#: ../Doc/c-api/init.rst:504 +msgid "" +"In terms of the CPython runtime configuration APIs documented in the :ref:" +"`runtime configuration ` section (and without accounting for " +"error handling), ``Py_Main`` is approximately equivalent to::" +msgstr "" + +#: ../Doc/c-api/init.rst:508 +msgid "" +"PyConfig config;\n" +"PyConfig_InitPythonConfig(&config);\n" +"PyConfig_SetArgv(&config, argc, argv);\n" +"Py_InitializeFromConfig(&config);\n" +"PyConfig_Clear(&config);\n" +"\n" +"Py_RunMain();" +msgstr "" + +#: ../Doc/c-api/init.rst:516 +msgid "" +"In normal usage, an embedding application will call this function *instead* " +"of calling :c:func:`Py_Initialize`, :c:func:`Py_InitializeEx` or :c:func:" +"`Py_InitializeFromConfig` directly, and all settings will be applied as " +"described elsewhere in this documentation. If this function is instead " +"called *after* a preceding runtime initialization API call, then exactly " +"which environmental and command line configuration settings will be updated " +"is version dependent (as it depends on which settings correctly support " +"being modified after they have already been set once when the runtime was " +"first initialized)." +msgstr "" + +#: ../Doc/c-api/init.rst:529 +msgid "Executes the main module in a fully configured CPython runtime." +msgstr "" + +#: ../Doc/c-api/init.rst:531 +msgid "" +"Executes the command (:c:member:`PyConfig.run_command`), the script (:c:" +"member:`PyConfig.run_filename`) or the module (:c:member:`PyConfig." +"run_module`) specified on the command line or in the configuration. If none " +"of these values are set, runs the interactive Python prompt (REPL) using the " +"``__main__`` module's global namespace." +msgstr "" + +#: ../Doc/c-api/init.rst:537 +msgid "" +"If :c:member:`PyConfig.inspect` is not set (the default), the return value " +"will be ``0`` if the interpreter exits normally (that is, without raising an " +"exception), the exit status of an unhandled :exc:`SystemExit`, or ``1`` for " +"any other unhandled exception." +msgstr "" + +#: ../Doc/c-api/init.rst:542 +msgid "" +"If :c:member:`PyConfig.inspect` is set (such as when the :option:`-i` option " +"is used), rather than returning when the interpreter exits, execution will " +"instead resume in an interactive Python prompt (REPL) using the ``__main__`` " +"module's global namespace. If the interpreter exited with an exception, it " +"is immediately raised in the REPL session. The function return value is then " +"determined by the way the *REPL session* terminates: ``0``, ``1``, or the " +"status of a :exc:`SystemExit`, as specified above." +msgstr "" + +#: ../Doc/c-api/init.rst:550 +msgid "" +"This function always finalizes the Python interpreter before it returns." +msgstr "" + +#: ../Doc/c-api/init.rst:552 +msgid "" +"See :ref:`Python Configuration ` for an example of a " +"customized Python that always runs in isolated mode using :c:func:" +"`Py_RunMain`." +msgstr "" + +#: ../Doc/c-api/init.rst:558 +msgid "" +"Register an :mod:`atexit` callback for the target interpreter *interp*. This " +"is similar to :c:func:`Py_AtExit`, but takes an explicit interpreter and " +"data pointer for the callback." +msgstr "" -#: ../Doc/c-api/init.rst:440 +#: ../Doc/c-api/init.rst:562 +msgid "There must be an :term:`attached thread state` for *interp*." +msgstr "" + +#: ../Doc/c-api/init.rst:567 msgid "Process-wide parameters" msgstr "Parámetros de todo el proceso" -#: ../Doc/c-api/init.rst:450 +#: ../Doc/c-api/init.rst:577 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.program_name` should be used instead, " -"see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"program_name` should be used instead, see :ref:`Python Initialization " +"Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " "lugar, se debe usar la configuración de :c:member:`PyConfig.program_name`, " "consulta :ref:`Configuración de inicialización de Python `." -#: ../Doc/c-api/init.rst:454 +#: ../Doc/c-api/init.rst:581 msgid "" "This function should be called before :c:func:`Py_Initialize` is called for " "the first time, if it is called at all. It tells the interpreter the value " @@ -862,29 +1063,29 @@ msgstr "" "contenido no cambiará mientras dure la ejecución del programa. Ningún código " "en el intérprete de Python cambiará el contenido de este almacenamiento." -#: ../Doc/c-api/init.rst:465 ../Doc/c-api/init.rst:704 -#: ../Doc/c-api/init.rst:740 ../Doc/c-api/init.rst:766 +#: ../Doc/c-api/init.rst:592 ../Doc/c-api/init.rst:840 +#: ../Doc/c-api/init.rst:876 ../Doc/c-api/init.rst:902 +#, fuzzy msgid "" -"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get " -"a :c:expr:`wchar_*` string." +"Use :c:func:`Py_DecodeLocale` to decode a bytes string to get a :c:expr:" +"`wchar_t*` string." msgstr "" "Utilice :c:func:`Py_DecodeLocale` para decodificar una cadena de bytes para " "obtener una cadena de tipo :c:expr:`wchar_*`." -#: ../Doc/c-api/init.rst:473 +#: ../Doc/c-api/init.rst:600 msgid "" "Return the program name set with :c:member:`PyConfig.program_name`, or the " "default. The returned string points into static storage; the caller should " "not modify its value." msgstr "" -"Devuelve el nombre del programa establecido " -"con :c:member:`PyConfig.program_name` o el valor predeterminado. La cadena " -"devuelta apunta a un almacenamiento estático; el llamador no debe modificar " -"su valor." +"Devuelve el nombre del programa establecido con :c:member:`PyConfig." +"program_name` o el valor predeterminado. La cadena devuelta apunta a un " +"almacenamiento estático; el llamador no debe modificar su valor." -#: ../Doc/c-api/init.rst:477 ../Doc/c-api/init.rst:499 -#: ../Doc/c-api/init.rst:543 ../Doc/c-api/init.rst:564 -#: ../Doc/c-api/init.rst:590 ../Doc/c-api/init.rst:778 +#: ../Doc/c-api/init.rst:604 ../Doc/c-api/init.rst:627 +#: ../Doc/c-api/init.rst:675 ../Doc/c-api/init.rst:699 +#: ../Doc/c-api/init.rst:726 ../Doc/c-api/init.rst:914 msgid "" "This function should not be called before :c:func:`Py_Initialize`, otherwise " "it returns ``NULL``." @@ -892,19 +1093,22 @@ msgstr "" "Esta función ya no se puede llamar antes de :c:func:`Py_Initialize()`, de " "otra forma retornará ``NULL``." -#: ../Doc/c-api/init.rst:480 ../Doc/c-api/init.rst:502 -#: ../Doc/c-api/init.rst:546 ../Doc/c-api/init.rst:567 -#: ../Doc/c-api/init.rst:595 ../Doc/c-api/init.rst:781 +#: ../Doc/c-api/init.rst:607 ../Doc/c-api/init.rst:630 +#: ../Doc/c-api/init.rst:678 ../Doc/c-api/init.rst:702 +#: ../Doc/c-api/init.rst:731 ../Doc/c-api/init.rst:917 msgid "It now returns ``NULL`` if called before :c:func:`Py_Initialize`." msgstr "" -"Todas las siguientes funciones deben llamarse después " -"de :c:func:`Py_Initialize`, de lo contrario retornará ``NULL``." +"Todas las siguientes funciones deben llamarse después de :c:func:" +"`Py_Initialize`, de lo contrario retornará ``NULL``." -#: ../Doc/c-api/init.rst:483 ../Doc/c-api/init.rst:570 -msgid "Get :data:`sys.executable` instead." -msgstr "Obtenga :data:`sys.executable` en su lugar." +#: ../Doc/c-api/init.rst:610 ../Doc/c-api/init.rst:705 +msgid "" +"Use :c:func:`PyConfig_Get(\"executable\") ` (:data:`sys." +"executable`) instead." +msgstr "" -#: ../Doc/c-api/init.rst:489 +#: ../Doc/c-api/init.rst:617 +#, fuzzy msgid "" "Return the *prefix* for installed platform-independent files. This is " "derived through a number of complicated rules from the program name set " @@ -914,8 +1118,8 @@ msgid "" "should not modify its value. This corresponds to the :makevar:`prefix` " "variable in the top-level :file:`Makefile` and the :option:`--prefix` " "argument to the :program:`configure` script at build time. The value is " -"available to Python code as ``sys.prefix``. It is only useful on Unix. See " -"also the next function." +"available to Python code as ``sys.base_prefix``. It is only useful on Unix. " +"See also the next function." msgstr "" "Devuelve el *prefix* para los archivos instalados independientes de la " "plataforma. Esto se deriva a través de una serie de reglas complicadas del " @@ -924,27 +1128,32 @@ msgstr "" "usr/local/bin/python'``, el prefijo es ``'/usr/local'``. La cadena devuelta " "apunta a un almacenamiento estático; el llamador no debe modificar su valor. " "Esto corresponde a la variable :makevar:`prefix` en el :file:`Makefile` de " -"nivel superior y al argumento :option:`--prefix` del " -"script :program:`configure` en el momento de la compilación. El valor está " -"disponible para el código Python como ``sys.prefix``. Solo es útil en Unix. " -"Consulte también la siguiente función." +"nivel superior y al argumento :option:`--prefix` del script :program:" +"`configure` en el momento de la compilación. El valor está disponible para " +"el código Python como ``sys.prefix``. Solo es útil en Unix. Consulte también " +"la siguiente función." -#: ../Doc/c-api/init.rst:505 -msgid "Get :data:`sys.prefix` instead." -msgstr "Obtenga :data:`sys.prefix` en su lugar." +#: ../Doc/c-api/init.rst:633 +msgid "" +"Use :c:func:`PyConfig_Get(\"base_prefix\") ` (:data:`sys." +"base_prefix`) instead. Use :c:func:`PyConfig_Get(\"prefix\") ` " +"(:data:`sys.prefix`) if :ref:`virtual environments ` need to be " +"handled." +msgstr "" -#: ../Doc/c-api/init.rst:511 +#: ../Doc/c-api/init.rst:642 +#, fuzzy msgid "" "Return the *exec-prefix* for installed platform-*dependent* files. This is " "derived through a number of complicated rules from the program name set " "with :c:member:`PyConfig.program_name` and some environment variables; for " "example, if the program name is ``'/usr/local/bin/python'``, the exec-prefix " "is ``'/usr/local'``. The returned string points into static storage; the " -"caller should not modify its value. This corresponds to " -"the :makevar:`exec_prefix` variable in the top-level :file:`Makefile` and " -"the ``--exec-prefix`` argument to the :program:`configure` script at build " -"time. The value is available to Python code as ``sys.exec_prefix``. It is " -"only useful on Unix." +"caller should not modify its value. This corresponds to the :makevar:" +"`exec_prefix` variable in the top-level :file:`Makefile` and the ``--exec-" +"prefix`` argument to the :program:`configure` script at build time. The " +"value is available to Python code as ``sys.base_exec_prefix``. It is only " +"useful on Unix." msgstr "" "Devuelve el *exec-prefix* para los archivos instalados de la plataforma " "*dependent*. Esto se deriva a través de una serie de reglas complicadas del " @@ -958,7 +1167,7 @@ msgstr "" "disponible para el código Python como ``sys.exec_prefix``. Solo es útil en " "Unix." -#: ../Doc/c-api/init.rst:521 +#: ../Doc/c-api/init.rst:653 msgid "" "Background: The exec-prefix differs from the prefix when platform dependent " "files (such as executables and shared libraries) are installed in a " @@ -969,11 +1178,11 @@ msgstr "" "Antecedentes: el prefijo *exec* difiere del prefijo cuando los archivos " "dependientes de la plataforma (como ejecutables y bibliotecas compartidas) " "se instalan en un árbol de directorios diferente. En una instalación típica, " -"los archivos dependientes de la plataforma pueden instalarse en el " -"subárbol :file:`/usr/local/plat` mientras que la plataforma independiente " -"puede instalarse en :file:`/usr/local`." +"los archivos dependientes de la plataforma pueden instalarse en el subárbol :" +"file:`/usr/local/plat` mientras que la plataforma independiente puede " +"instalarse en :file:`/usr/local`." -#: ../Doc/c-api/init.rst:527 +#: ../Doc/c-api/init.rst:659 msgid "" "Generally speaking, a platform is a combination of hardware and software " "families, e.g. Sparc machines running the Solaris 2.x operating system are " @@ -999,23 +1208,27 @@ msgstr "" "compilados de Python son independientes de la plataforma (¡pero no " "independientes de la versión de Python con la que fueron compilados!)." -#: ../Doc/c-api/init.rst:538 +#: ../Doc/c-api/init.rst:670 msgid "" -"System administrators will know how to configure the :program:`mount` " -"or :program:`automount` programs to share :file:`/usr/local` between " -"platforms while having :file:`/usr/local/plat` be a different filesystem for " -"each platform." +"System administrators will know how to configure the :program:`mount` or :" +"program:`automount` programs to share :file:`/usr/local` between platforms " +"while having :file:`/usr/local/plat` be a different filesystem for each " +"platform." msgstr "" -"Los administradores de sistemas sabrán cómo configurar los " -"programas :program:`mount` o :program:`automount` para compartir :file:`/usr/" -"local` entre plataformas mientras que :file:`/usr/local/plat` sea un sistema " -"de archivos diferente para cada plataforma." +"Los administradores de sistemas sabrán cómo configurar los programas :" +"program:`mount` o :program:`automount` para compartir :file:`/usr/local` " +"entre plataformas mientras que :file:`/usr/local/plat` sea un sistema de " +"archivos diferente para cada plataforma." -#: ../Doc/c-api/init.rst:549 -msgid "Get :data:`sys.exec_prefix` instead." -msgstr "Obtenga :data:`sys.exec_prefix` en su lugar." +#: ../Doc/c-api/init.rst:681 +msgid "" +"Use :c:func:`PyConfig_Get(\"base_exec_prefix\") ` (:data:`sys." +"base_exec_prefix`) instead. Use :c:func:`PyConfig_Get(\"exec_prefix\") " +"` (:data:`sys.exec_prefix`) if :ref:`virtual environments " +"` need to be handled." +msgstr "" -#: ../Doc/c-api/init.rst:558 +#: ../Doc/c-api/init.rst:693 msgid "" "Return the full program name of the Python executable; this is computed as " "a side-effect of deriving the default module search path from the program " @@ -1025,12 +1238,12 @@ msgid "" msgstr "" "Devuelve el nombre completo del programa ejecutable de Python; esto se " "calcula como un efecto secundario de derivar la ruta de búsqueda del módulo " -"predeterminado a partir del nombre del programa (establecido " -"por :c:member:`PyConfig.program_name`). La cadena devuelta apunta a un " -"almacenamiento estático; el llamador no debe modificar su valor. El valor " -"está disponible para el código Python como ``sys.executable``." +"predeterminado a partir del nombre del programa (establecido por :c:member:" +"`PyConfig.program_name`). La cadena devuelta apunta a un almacenamiento " +"estático; el llamador no debe modificar su valor. El valor está disponible " +"para el código Python como ``sys.executable``." -#: ../Doc/c-api/init.rst:580 +#: ../Doc/c-api/init.rst:716 msgid "" "Return the default module search path; this is computed from the program " "name (set by :c:member:`PyConfig.program_name`) and some environment " @@ -1043,21 +1256,23 @@ msgid "" "for loading modules." msgstr "" "Devuelve la ruta de búsqueda del módulo predeterminada; esto se calcula a " -"partir del nombre del programa (establecido " -"por :c:member:`PyConfig.program_name`) y algunas variables de entorno. La " -"cadena devuelta consta de una serie de nombres de directorio separados por " -"un carácter delimitador dependiente de la plataforma. El carácter " -"delimitador es ``':'`` en Unix y macOS, ``';'`` en Windows. La cadena " -"devuelta apunta a un almacenamiento estático; el llamador no debe modificar " -"su valor. La lista :data:`sys.path` se inicializa con este valor al iniciar " -"el intérprete; se puede modificar (y generalmente se modifica) más tarde " -"para cambiar la ruta de búsqueda para cargar módulos." - -#: ../Doc/c-api/init.rst:598 -msgid "Get :data:`sys.path` instead." -msgstr "Obtenga :data:`sys.path` en su lugar." - -#: ../Doc/c-api/init.rst:604 +"partir del nombre del programa (establecido por :c:member:`PyConfig." +"program_name`) y algunas variables de entorno. La cadena devuelta consta de " +"una serie de nombres de directorio separados por un carácter delimitador " +"dependiente de la plataforma. El carácter delimitador es ``':'`` en Unix y " +"macOS, ``';'`` en Windows. La cadena devuelta apunta a un almacenamiento " +"estático; el llamador no debe modificar su valor. La lista :data:`sys.path` " +"se inicializa con este valor al iniciar el intérprete; se puede modificar (y " +"generalmente se modifica) más tarde para cambiar la ruta de búsqueda para " +"cargar módulos." + +#: ../Doc/c-api/init.rst:734 +msgid "" +"Use :c:func:`PyConfig_Get(\"module_search_paths\") ` (:data:" +"`sys.path`) instead." +msgstr "" + +#: ../Doc/c-api/init.rst:740 msgid "" "Return the version of this Python interpreter. This is a string that looks " "something like ::" @@ -1065,17 +1280,17 @@ msgstr "" "Retorna la versión de este intérprete de Python. Esta es una cadena de " "caracteres que se parece a ::" -#: ../Doc/c-api/init.rst:607 +#: ../Doc/c-api/init.rst:743 msgid "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" msgstr "\"3.0a5+ (py3k:63103M, May 12 2008, 00:53:55) \\n[GCC 4.2.3]\"" -#: ../Doc/c-api/init.rst:611 +#: ../Doc/c-api/init.rst:747 msgid "" "The first word (up to the first space character) is the current Python " "version; the first characters are the major and minor version separated by a " "period. The returned string points into static storage; the caller should " -"not modify its value. The value is available to Python code " -"as :data:`sys.version`." +"not modify its value. The value is available to Python code as :data:`sys." +"version`." msgstr "" "La primera palabra (hasta el primer carácter de espacio) es la versión " "actual de Python; los primeros tres caracteres son la versión mayor y menor " @@ -1083,11 +1298,11 @@ msgstr "" "almacenamiento estático; la persona que llama no debe modificar su valor. El " "valor está disponible para el código Python como :data:`sys.version`." -#: ../Doc/c-api/init.rst:616 +#: ../Doc/c-api/init.rst:752 msgid "See also the :c:var:`Py_Version` constant." msgstr "Consulta también la constante :c:var:`Py_Version`." -#: ../Doc/c-api/init.rst:623 +#: ../Doc/c-api/init.rst:759 msgid "" "Return the platform identifier for the current platform. On Unix, this is " "formed from the \"official\" name of the operating system, converted to " @@ -1106,7 +1321,7 @@ msgstr "" "llama no debe modificar su valor. El valor está disponible para el código de " "Python como ``sys.platform``." -#: ../Doc/c-api/init.rst:634 +#: ../Doc/c-api/init.rst:770 msgid "" "Return the official copyright string for the current Python version, for " "example" @@ -1114,11 +1329,11 @@ msgstr "" "Retorna la cadena de caracteres de copyright oficial para la versión actual " "de Python, por ejemplo" -#: ../Doc/c-api/init.rst:636 +#: ../Doc/c-api/init.rst:772 msgid "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" msgstr "``'Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam'``" -#: ../Doc/c-api/init.rst:640 +#: ../Doc/c-api/init.rst:776 msgid "" "The returned string points into static storage; the caller should not modify " "its value. The value is available to Python code as ``sys.copyright``." @@ -1127,7 +1342,7 @@ msgstr "" "persona que llama no debe modificar su valor. El valor está disponible para " "el código de Python como ``sys.copyright``." -#: ../Doc/c-api/init.rst:646 +#: ../Doc/c-api/init.rst:782 msgid "" "Return an indication of the compiler used to build the current Python " "version, in square brackets, for example::" @@ -1135,11 +1350,11 @@ msgstr "" "Retorna una indicación del compilador utilizado para construir la versión " "actual de Python, entre corchetes, por ejemplo:" -#: ../Doc/c-api/init.rst:649 +#: ../Doc/c-api/init.rst:785 msgid "\"[GCC 2.7.2.2]\"" msgstr "\"[GCC 2.7.2.2]\"" -#: ../Doc/c-api/init.rst:653 ../Doc/c-api/init.rst:667 +#: ../Doc/c-api/init.rst:789 ../Doc/c-api/init.rst:803 msgid "" "The returned string points into static storage; the caller should not modify " "its value. The value is available to Python code as part of the variable " @@ -1149,7 +1364,7 @@ msgstr "" "persona que llama no debe modificar su valor. El valor está disponible para " "el código Python como parte de la variable ``sys.version``." -#: ../Doc/c-api/init.rst:660 +#: ../Doc/c-api/init.rst:796 msgid "" "Return information about the sequence number and build date and time of the " "current Python interpreter instance, for example ::" @@ -1157,24 +1372,23 @@ msgstr "" "Retorna información sobre el número de secuencia y la fecha y hora de " "compilación de la instancia actual de intérprete de Python, por ejemplo::" -#: ../Doc/c-api/init.rst:663 +#: ../Doc/c-api/init.rst:799 msgid "\"#67, Aug 1 1997, 22:34:28\"" msgstr "\"#67, Aug 1 1997, 22:34:28\"" -#: ../Doc/c-api/init.rst:679 +#: ../Doc/c-api/init.rst:815 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` " -"and :c:member:`PyConfig.safe_path` should be used instead, see :ref:`Python " -"Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"argv`, :c:member:`PyConfig.parse_argv` and :c:member:`PyConfig.safe_path` " +"should be used instead, see :ref:`Python Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración " -"de :c:member:`PyConfig.argv`, :c:member:`PyConfig.parse_argv` " -"y :c:member:`PyConfig.safe_path`, consulta :ref:`Configuración de " -"inicialización de Python `." +"lugar, se debe usar la configuración de :c:member:`PyConfig.argv`, :c:member:" +"`PyConfig.parse_argv` y :c:member:`PyConfig.safe_path`, consulta :ref:" +"`Configuración de inicialización de Python `." -#: ../Doc/c-api/init.rst:684 +#: ../Doc/c-api/init.rst:820 msgid "" "Set :data:`sys.argv` based on *argc* and *argv*. These parameters are " "similar to those passed to the program's :c:func:`main` function with the " @@ -1193,7 +1407,7 @@ msgstr "" "caracteres vacía. Si esta función no puede inicializar :data:`sys.argv`, una " "condición fatal se señala usando :c:func:`Py_FatalError`." -#: ../Doc/c-api/init.rst:692 +#: ../Doc/c-api/init.rst:828 msgid "" "If *updatepath* is zero, this is all the function does. If *updatepath* is " "non-zero, the function also modifies :data:`sys.path` according to the " @@ -1203,37 +1417,36 @@ msgstr "" "*updatepath* no es cero, la función también modifica :data:`sys.path` de " "acuerdo con el siguiente algoritmo:" -#: ../Doc/c-api/init.rst:696 +#: ../Doc/c-api/init.rst:832 msgid "" "If the name of an existing script is passed in ``argv[0]``, the absolute " -"path of the directory where the script is located is prepended " -"to :data:`sys.path`." +"path of the directory where the script is located is prepended to :data:`sys." +"path`." msgstr "" "Si el nombre de una secuencia de comandos (*script*) existente se pasa en " "``argv[0]``, la ruta absoluta del directorio donde se encuentra el *script* " "se antepone a :data:`sys.path`." -#: ../Doc/c-api/init.rst:699 +#: ../Doc/c-api/init.rst:835 msgid "" "Otherwise (that is, if *argc* is ``0`` or ``argv[0]`` doesn't point to an " "existing file name), an empty string is prepended to :data:`sys.path`, which " "is the same as prepending the current working directory (``\".\"``)." msgstr "" "De lo contrario (es decir, si *argc* es ``0`` o ``argv[0]`` no apunta a un " -"nombre de archivo existente), una cadena de caracteres vacía se antepone " -"a :data:`sys.path`, que es lo mismo que anteponer el directorio de trabajo " +"nombre de archivo existente), una cadena de caracteres vacía se antepone a :" +"data:`sys.path`, que es lo mismo que anteponer el directorio de trabajo " "actual (``\".\"``)." -#: ../Doc/c-api/init.rst:707 ../Doc/c-api/init.rst:743 +#: ../Doc/c-api/init.rst:843 ../Doc/c-api/init.rst:879 msgid "" "See also :c:member:`PyConfig.orig_argv` and :c:member:`PyConfig.argv` " "members of the :ref:`Python Initialization Configuration `." msgstr "" -"Consulta también los miembros de :c:member:`PyConfig.orig_argv` " -"y :c:member:`PyConfig.argv` de :ref:`Python Initialization Configuration " -"`." +"Consulta también los miembros de :c:member:`PyConfig.orig_argv` y :c:member:" +"`PyConfig.argv` de :ref:`Python Initialization Configuration `." -#: ../Doc/c-api/init.rst:711 +#: ../Doc/c-api/init.rst:847 msgid "" "It is recommended that applications embedding the Python interpreter for " "purposes other than executing a single script pass ``0`` as *updatepath*, " @@ -1244,57 +1457,56 @@ msgstr "" "*updatepath* y actualicen :data:`sys.path` por sí mismas si así lo desean. " "Consulte :cve:`2008-5983`." -#: ../Doc/c-api/init.rst:716 +#: ../Doc/c-api/init.rst:852 msgid "" "On versions before 3.1.3, you can achieve the same effect by manually " -"popping the first :data:`sys.path` element after having " -"called :c:func:`PySys_SetArgv`, for example using::" +"popping the first :data:`sys.path` element after having called :c:func:" +"`PySys_SetArgv`, for example using::" msgstr "" "En las versiones anteriores a 3.1.3, puede lograr el mismo efecto quitando " "manualmente el primer elemento (*popping*) :data:`sys.path` después de haber " "llamado :c:func:`PySys_SetArgv`, por ejemplo usando ::" -#: ../Doc/c-api/init.rst:720 +#: ../Doc/c-api/init.rst:856 msgid "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" msgstr "PyRun_SimpleString(\"import sys; sys.path.pop(0)\\n\");" -#: ../Doc/c-api/init.rst:732 +#: ../Doc/c-api/init.rst:868 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.argv` and :c:member:`PyConfig.parse_argv` should " -"be used instead, see :ref:`Python Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"argv` and :c:member:`PyConfig.parse_argv` should be used instead, see :ref:" +"`Python Initialization Configuration `." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.argv` " -"y :c:member:`PyConfig.parse_argv`, consulta :ref:`Configuración de " -"inicialización de Python `." +"lugar, se debe usar la configuración de :c:member:`PyConfig.argv` y :c:" +"member:`PyConfig.parse_argv`, consulta :ref:`Configuración de inicialización " +"de Python `." -#: ../Doc/c-api/init.rst:736 +#: ../Doc/c-api/init.rst:872 msgid "" "This function works like :c:func:`PySys_SetArgvEx` with *updatepath* set to " -"``1`` unless the :program:`python` interpreter was started with " -"the :option:`-I`." +"``1`` unless the :program:`python` interpreter was started with the :option:" +"`-I`." msgstr "" "Esta función funciona como :c:func:`PySys_SetArgvEx` con *updatepath* " "establecido en ``1`` a menos que el intérprete :program:`python` se haya " "iniciado con la opción :option:`-I`." -#: ../Doc/c-api/init.rst:746 +#: ../Doc/c-api/init.rst:882 msgid "The *updatepath* value depends on :option:`-I`." msgstr "El valor *updatepath* depende de la opción :option:`-I`." -#: ../Doc/c-api/init.rst:753 +#: ../Doc/c-api/init.rst:889 msgid "" -"This API is kept for backward compatibility: " -"setting :c:member:`PyConfig.home` should be used instead, see :ref:`Python " -"Initialization Configuration `." +"This API is kept for backward compatibility: setting :c:member:`PyConfig." +"home` should be used instead, see :ref:`Python Initialization Configuration " +"`." msgstr "" "Esta API se mantiene para la compatibilidad con versiones anteriores: en su " -"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, " -"consulta :ref:`Configuración de inicialización de Python `." +"lugar, se debe usar la configuración de :c:member:`PyConfig.home`, consulta :" +"ref:`Configuración de inicialización de Python `." -#: ../Doc/c-api/init.rst:757 +#: ../Doc/c-api/init.rst:893 msgid "" "Set the default \"home\" directory, that is, the location of the standard " "Python libraries. See :envvar:`PYTHONHOME` for the meaning of the argument " @@ -1304,7 +1516,7 @@ msgstr "" "ubicación de las bibliotecas estándar de Python. Ver :envvar:`PYTHONHOME` " "para el significado de la cadena de caracteres de argumento." -#: ../Doc/c-api/init.rst:761 +#: ../Doc/c-api/init.rst:897 msgid "" "The argument should point to a zero-terminated character string in static " "storage whose contents will not change for the duration of the program's " @@ -1316,31 +1528,34 @@ msgstr "" "ejecución del programa. Ningún código en el intérprete de Python cambiará el " "contenido de este almacenamiento." -#: ../Doc/c-api/init.rst:774 +#: ../Doc/c-api/init.rst:910 msgid "" -"Return the default \"home\", that is, the value set " -"by :c:member:`PyConfig.home`, or the value of the :envvar:`PYTHONHOME` " -"environment variable if it is set." +"Return the default \"home\", that is, the value set by :c:member:`PyConfig." +"home`, or the value of the :envvar:`PYTHONHOME` environment variable if it " +"is set." msgstr "" -"Devuelve el \"inicio\" predeterminado, es decir, el valor establecido " -"por :c:member:`PyConfig.home`, o el valor de la variable de " -"entorno :envvar:`PYTHONHOME` si está establecida." +"Devuelve el \"inicio\" predeterminado, es decir, el valor establecido por :c:" +"member:`PyConfig.home`, o el valor de la variable de entorno :envvar:" +"`PYTHONHOME` si está establecida." -#: ../Doc/c-api/init.rst:784 +#: ../Doc/c-api/init.rst:920 +#, fuzzy msgid "" -"Get :c:member:`PyConfig.home` or :envvar:`PYTHONHOME` environment variable " -"instead." +"Use :c:func:`PyConfig_Get(\"home\") ` or the :envvar:" +"`PYTHONHOME` environment variable instead." msgstr "" -"Obtenga la variable de entorno :c:member:`PyConfig.home` " -"o :envvar:`PYTHONHOME` en su lugar." +"Obtenga la variable de entorno :c:member:`PyConfig.home` o :envvar:" +"`PYTHONHOME` en su lugar." -#: ../Doc/c-api/init.rst:792 +#: ../Doc/c-api/init.rst:928 msgid "Thread State and the Global Interpreter Lock" msgstr "Estado del hilo y el bloqueo global del intérprete" -#: ../Doc/c-api/init.rst:799 +#: ../Doc/c-api/init.rst:935 +#, fuzzy msgid "" -"The Python interpreter is not fully thread-safe. In order to support multi-" +"Unless on a :term:`free-threaded ` build of :term:`CPython`, " +"the Python interpreter is not fully thread-safe. In order to support multi-" "threaded Python programs, there's a global lock, called the :term:`global " "interpreter lock` or :term:`GIL`, that must be held by the current thread " "before it can safely access Python objects. Without the lock, even the " @@ -1359,55 +1574,76 @@ msgstr "" "conteo de referencias podría terminar incrementándose solo una vez en lugar " "de dos veces." -#: ../Doc/c-api/init.rst:809 +#: ../Doc/c-api/init.rst:946 msgid "" -"Therefore, the rule exists that only the thread that has acquired " -"the :term:`GIL` may operate on Python objects or call Python/C API " -"functions. In order to emulate concurrency of execution, the interpreter " -"regularly tries to switch threads (see :func:`sys.setswitchinterval`). The " -"lock is also released around potentially blocking I/O operations like " -"reading or writing a file, so that other Python threads can run in the " -"meantime." +"Therefore, the rule exists that only the thread that has acquired the :term:" +"`GIL` may operate on Python objects or call Python/C API functions. In order " +"to emulate concurrency of execution, the interpreter regularly tries to " +"switch threads (see :func:`sys.setswitchinterval`). The lock is also " +"released around potentially blocking I/O operations like reading or writing " +"a file, so that other Python threads can run in the meantime." msgstr "" -"Por lo tanto, existe la regla de que solo el hilo que ha " -"adquirido :term:`GIL` puede operar en objetos Python o llamar a funciones " -"API Python/C. Para emular la concurrencia de ejecución, el intérprete " -"regularmente intenta cambiar los hilos (ver :func:`sys.setswitchinterval`). " -"El bloqueo también se libera para bloquear potencialmente las operaciones de " -"E/S, como leer o escribir un archivo, para que otros hilos de Python puedan " -"ejecutarse mientras tanto." +"Por lo tanto, existe la regla de que solo el hilo que ha adquirido :term:" +"`GIL` puede operar en objetos Python o llamar a funciones API Python/C. Para " +"emular la concurrencia de ejecución, el intérprete regularmente intenta " +"cambiar los hilos (ver :func:`sys.setswitchinterval`). El bloqueo también se " +"libera para bloquear potencialmente las operaciones de E/S, como leer o " +"escribir un archivo, para que otros hilos de Python puedan ejecutarse " +"mientras tanto." -#: ../Doc/c-api/init.rst:819 +#: ../Doc/c-api/init.rst:956 +#, fuzzy msgid "" "The Python interpreter keeps some thread-specific bookkeeping information " -"inside a data structure called :c:type:`PyThreadState`. There's also one " -"global variable pointing to the current :c:type:`PyThreadState`: it can be " -"retrieved using :c:func:`PyThreadState_Get`." +"inside a data structure called :c:type:`PyThreadState`, known as a :term:" +"`thread state`. Each OS thread has a thread-local pointer to a :c:type:" +"`PyThreadState`; a thread state referenced by this pointer is considered to " +"be :term:`attached `." msgstr "" "El intérprete de Python mantiene cierta información de contabilidad " -"específica de hilos dentro de una estructura de datos " -"llamada :c:type:`PyThreadState`. También hay una variable global que apunta " -"a la actual :c:type:`PyThreadState`: se puede recuperar " -"usando :c:func:`PyThreadState_Get`." +"específica de hilos dentro de una estructura de datos llamada :c:type:" +"`PyThreadState`. También hay una variable global que apunta a la actual :c:" +"type:`PyThreadState`: se puede recuperar usando :c:func:`PyThreadState_Get`." + +#: ../Doc/c-api/init.rst:961 +msgid "" +"A thread can only have one :term:`attached thread state` at a time. An " +"attached thread state is typically analogous with holding the :term:`GIL`, " +"except on :term:`free-threaded ` builds. On builds with " +"the :term:`GIL` enabled, :term:`attaching ` a thread " +"state will block until the :term:`GIL` can be acquired. However, even on " +"builds with the :term:`GIL` disabled, it is still required to have an " +"attached thread state to call most of the C API." +msgstr "" -#: ../Doc/c-api/init.rst:825 -msgid "Releasing the GIL from extension code" +#: ../Doc/c-api/init.rst:968 +msgid "" +"In general, there will always be an :term:`attached thread state` when using " +"Python's C API. Only in some specific cases (such as in a :c:macro:" +"`Py_BEGIN_ALLOW_THREADS` block) will the thread not have an attached thread " +"state. If uncertain, check if :c:func:`PyThreadState_GetUnchecked` returns " +"``NULL``." +msgstr "" + +#: ../Doc/c-api/init.rst:974 +#, fuzzy +msgid "Detaching the thread state from extension code" msgstr "Liberando el GIL del código de extensión" -#: ../Doc/c-api/init.rst:827 +#: ../Doc/c-api/init.rst:976 +#, fuzzy msgid "" -"Most extension code manipulating the :term:`GIL` has the following simple " -"structure::" +"Most extension code manipulating the :term:`thread state` has the following " +"simple structure::" msgstr "" "La mayoría del código de extensión que manipula el :term:`GIL` tiene la " "siguiente estructura simple ::" -#: ../Doc/c-api/init.rst:830 +#: ../Doc/c-api/init.rst:979 +#, fuzzy msgid "" "Save the thread state in a local variable.\n" -"Release the global interpreter lock.\n" "... Do some blocking I/O operation ...\n" -"Reacquire the global interpreter lock.\n" "Restore the thread state from the local variable." msgstr "" "Guarde el estado del subproceso en una variable local.\n" @@ -1416,11 +1652,11 @@ msgstr "" "Recupere el bloqueo del intérprete global.\n" "Restaure el estado del subproceso desde la variable local." -#: ../Doc/c-api/init.rst:836 +#: ../Doc/c-api/init.rst:983 msgid "This is so common that a pair of macros exists to simplify it::" msgstr "Esto es tan común que existen un par de macros para simplificarlo:" -#: ../Doc/c-api/init.rst:838 +#: ../Doc/c-api/init.rst:985 msgid "" "Py_BEGIN_ALLOW_THREADS\n" "... Do some blocking I/O operation ...\n" @@ -1430,7 +1666,7 @@ msgstr "" "... Hace alguna operación bloqueante en I/O ...\n" "Py_END_ALLOW_THREADS" -#: ../Doc/c-api/init.rst:846 +#: ../Doc/c-api/init.rst:993 msgid "" "The :c:macro:`Py_BEGIN_ALLOW_THREADS` macro opens a new block and declares a " "hidden local variable; the :c:macro:`Py_END_ALLOW_THREADS` macro closes the " @@ -1440,11 +1676,11 @@ msgstr "" "una variable local oculta; la macro :c:macro:`Py_END_ALLOW_THREADS` cierra " "el bloque." -#: ../Doc/c-api/init.rst:850 +#: ../Doc/c-api/init.rst:997 msgid "The block above expands to the following code::" msgstr "El bloque anterior se expande al siguiente código::" -#: ../Doc/c-api/init.rst:852 +#: ../Doc/c-api/init.rst:999 msgid "" "PyThreadState *_save;\n" "\n" @@ -1458,32 +1694,44 @@ msgstr "" "... Realizar alguna operación de bloqueo de E/S...\n" "PyEval_RestoreThread(_save);" -#: ../Doc/c-api/init.rst:862 -msgid "" -"Here is how these functions work: the global interpreter lock is used to " -"protect the pointer to the current thread state. When releasing the lock " -"and saving the thread state, the current thread state pointer must be " -"retrieved before the lock is released (since another thread could " -"immediately acquire the lock and store its own thread state in the global " -"variable). Conversely, when acquiring the lock and restoring the thread " -"state, the lock must be acquired before storing the thread state pointer." -msgstr "" -"Así es como funcionan estas funciones: el bloqueo global del intérprete se " -"usa para proteger el puntero al estado actual del hilo. Al liberar el " -"bloqueo y guardar el estado del hilo, el puntero del estado del hilo actual " -"debe recuperarse antes de que se libere el bloqueo (ya que otro hilo podría " -"adquirir inmediatamente el bloqueo y almacenar su propio estado de hilo en " -"la variable global). Por el contrario, al adquirir el bloqueo y restaurar el " -"estado del hilo, el bloqueo debe adquirirse antes de almacenar el puntero " -"del estado del hilo." - -#: ../Doc/c-api/init.rst:871 -msgid "" -"Calling system I/O functions is the most common use case for releasing the " -"GIL, but it can also be useful before calling long-running computations " -"which don't need access to Python objects, such as compression or " -"cryptographic functions operating over memory buffers. For example, the " -"standard :mod:`zlib` and :mod:`hashlib` modules release the GIL when " +#: ../Doc/c-api/init.rst:1009 +msgid "Here is how these functions work:" +msgstr "" + +#: ../Doc/c-api/init.rst:1011 +msgid "" +"The :term:`attached thread state` holds the :term:`GIL` for the entire " +"interpreter. When detaching the :term:`attached thread state`, the :term:" +"`GIL` is released, allowing other threads to attach a thread state to their " +"own thread, thus getting the :term:`GIL` and can start executing. The " +"pointer to the prior :term:`attached thread state` is stored as a local " +"variable. Upon reaching :c:macro:`Py_END_ALLOW_THREADS`, the thread state " +"that was previously :term:`attached ` is passed to :c:" +"func:`PyEval_RestoreThread`. This function will block until another releases " +"its :term:`thread state `, thus allowing the old :" +"term:`thread state ` to get re-attached and the C API " +"can be called again." +msgstr "" + +#: ../Doc/c-api/init.rst:1021 +msgid "" +"For :term:`free-threaded ` builds, the :term:`GIL` is " +"normally out of the question, but detaching the :term:`thread state " +"` is still required for blocking I/O and long " +"operations. The difference is that threads don't have to wait for the :term:" +"`GIL` to be released to attach their thread state, allowing true multi-core " +"parallelism." +msgstr "" + +#: ../Doc/c-api/init.rst:1027 +#, fuzzy +msgid "" +"Calling system I/O functions is the most common use case for detaching the :" +"term:`thread state `, but it can also be useful " +"before calling long-running computations which don't need access to Python " +"objects, such as compression or cryptographic functions operating over " +"memory buffers. For example, the standard :mod:`zlib` and :mod:`hashlib` " +"modules detach the :term:`thread state ` when " "compressing or hashing data." msgstr "" "Llamar a las funciones de E/S del sistema es el caso de uso más común para " @@ -1493,18 +1741,19 @@ msgstr "" "intermedias. Por ejemplo, los módulos estándar :mod:`zlib` y :mod:`hashlib` " "liberan el GIL al comprimir o mezclar datos." -#: ../Doc/c-api/init.rst:882 +#: ../Doc/c-api/init.rst:1038 msgid "Non-Python created threads" msgstr "Hilos creados sin Python" -#: ../Doc/c-api/init.rst:884 +#: ../Doc/c-api/init.rst:1040 +#, fuzzy msgid "" -"When threads are created using the dedicated Python APIs (such as " -"the :mod:`threading` module), a thread state is automatically associated to " -"them and the code showed above is therefore correct. However, when threads " -"are created from C (for example by a third-party library with its own thread " -"management), they don't hold the GIL, nor is there a thread state structure " -"for them." +"When threads are created using the dedicated Python APIs (such as the :mod:" +"`threading` module), a thread state is automatically associated to them and " +"the code showed above is therefore correct. However, when threads are " +"created from C (for example by a third-party library with its own thread " +"management), they don't hold the :term:`GIL`, because they don't have an :" +"term:`attached thread state`." msgstr "" "Cuando se crean hilos utilizando las API dedicadas de Python (como el " "módulo :mod:`threading`), se les asocia automáticamente un estado del hilo " @@ -1513,15 +1762,15 @@ msgstr "" "terceros con su propia administración de hilos), no contienen el GIL, ni " "existe una estructura de estado de hilos para ellos." -#: ../Doc/c-api/init.rst:891 +#: ../Doc/c-api/init.rst:1047 +#, fuzzy msgid "" "If you need to call Python code from these threads (often this will be part " "of a callback API provided by the aforementioned third-party library), you " -"must first register these threads with the interpreter by creating a thread " -"state data structure, then acquiring the GIL, and finally storing their " -"thread state pointer, before you can start using the Python/C API. When you " -"are done, you should reset the thread state pointer, release the GIL, and " -"finally free the thread state data structure." +"must first register these threads with the interpreter by creating an :term:" +"`attached thread state` before you can start using the Python/C API. When " +"you are done, you should detach the :term:`thread state `, and finally free it." msgstr "" "Si necesita llamar al código Python desde estos subprocesos (a menudo esto " "será parte de una API de devolución de llamada proporcionada por la " @@ -1533,7 +1782,7 @@ msgstr "" "liberar el GIL y finalmente liberar la estructura de datos del estado del " "hilo." -#: ../Doc/c-api/init.rst:899 +#: ../Doc/c-api/init.rst:1054 msgid "" "The :c:func:`PyGILState_Ensure` and :c:func:`PyGILState_Release` functions " "do all of the above automatically. The typical idiom for calling into " @@ -1543,7 +1792,7 @@ msgstr "" "hacen todo lo anterior automáticamente. El idioma típico para llamar a " "Python desde un hilo C es::" -#: ../Doc/c-api/init.rst:903 +#: ../Doc/c-api/init.rst:1058 msgid "" "PyGILState_STATE gstate;\n" "gstate = PyGILState_Ensure();\n" @@ -1566,25 +1815,77 @@ msgstr "" "punto. */\n" "PyGILState_Release(gstate);" -#: ../Doc/c-api/init.rst:913 +#: ../Doc/c-api/init.rst:1068 +#, fuzzy msgid "" "Note that the ``PyGILState_*`` functions assume there is only one global " "interpreter (created automatically by :c:func:`Py_Initialize`). Python " -"supports the creation of additional interpreters " -"(using :c:func:`Py_NewInterpreter`), but mixing multiple interpreters and " -"the ``PyGILState_*`` API is unsupported." +"supports the creation of additional interpreters (using :c:func:" +"`Py_NewInterpreter`), but mixing multiple interpreters and the " +"``PyGILState_*`` API is unsupported. This is because :c:func:" +"`PyGILState_Ensure` and similar functions default to :term:`attaching " +"` a :term:`thread state` for the main interpreter, " +"meaning that the thread can't safely interact with the calling " +"subinterpreter." msgstr "" "Tenga en cuenta que las funciones ``PyGILState_*`` asumen que solo hay un " "intérprete global (creado automáticamente por :c:func:`Py_Initialize`). " -"Python admite la creación de intérpretes adicionales " -"(usando :c:func:`Py_NewInterpreter`), pero la mezcla de varios intérpretes y " -"la API ``PyGILState_*`` no está soportada." +"Python admite la creación de intérpretes adicionales (usando :c:func:" +"`Py_NewInterpreter`), pero la mezcla de varios intérpretes y la API " +"``PyGILState_*`` no está soportada." -#: ../Doc/c-api/init.rst:923 +#: ../Doc/c-api/init.rst:1078 +msgid "Supporting subinterpreters in non-Python threads" +msgstr "" + +#: ../Doc/c-api/init.rst:1080 +msgid "" +"If you would like to support subinterpreters with non-Python created " +"threads, you must use the ``PyThreadState_*`` API instead of the traditional " +"``PyGILState_*`` API." +msgstr "" + +#: ../Doc/c-api/init.rst:1084 +msgid "" +"In particular, you must store the interpreter state from the calling " +"function and pass it to :c:func:`PyThreadState_New`, which will ensure that " +"the :term:`thread state` is targeting the correct interpreter::" +msgstr "" + +#: ../Doc/c-api/init.rst:1088 +#, fuzzy +msgid "" +"/* The return value of PyInterpreterState_Get() from the\n" +" function that created this thread. */\n" +"PyInterpreterState *interp = ThreadData->interp;\n" +"PyThreadState *tstate = PyThreadState_New(interp);\n" +"PyThreadState_Swap(tstate);\n" +"\n" +"/* GIL of the subinterpreter is now held.\n" +" Perform Python actions here. */\n" +"result = CallSomeFunction();\n" +"/* evaluate result or handle exception */\n" +"\n" +"/* Destroy the thread state. No Python API allowed beyond this point. */\n" +"PyThreadState_Clear(tstate);\n" +"PyThreadState_DeleteCurrent();" +msgstr "" +"PyGILState_STATE gstate;\n" +"gstate = PyGILState_Ensure();\n" +"\n" +"/* Realizar acciones de Python aquí. */\n" +"result = CallSomeFunction();\n" +"/* evaluar el resultado o manejar la excepción */\n" +"\n" +"/* Liberar el hilo. No se permite ninguna API de Python más allá de este " +"punto. */\n" +"PyGILState_Release(gstate);" + +#: ../Doc/c-api/init.rst:1106 msgid "Cautions about fork()" msgstr "Precauciones sobre ``fork()``" -#: ../Doc/c-api/init.rst:925 +#: ../Doc/c-api/init.rst:1108 msgid "" "Another important thing to note about threads is their behaviour in the face " "of the C :c:func:`fork` call. On most systems with :c:func:`fork`, after a " @@ -1593,13 +1894,13 @@ msgid "" "CPython's runtime." msgstr "" "Otra cosa importante a tener en cuenta sobre los hilos es su comportamiento " -"frente a la llamada C :c:func:`fork`. En la mayoría de los sistemas " -"con :c:func:`fork`, después de que un proceso se bifurca, solo existirá el " -"hilo que emitió el *fork*. Esto tiene un impacto concreto tanto en cómo se " -"deben manejar las cerraduras como en todo el estado almacenado en el tiempo " -"de ejecución de CPython." +"frente a la llamada C :c:func:`fork`. En la mayoría de los sistemas con :c:" +"func:`fork`, después de que un proceso se bifurca, solo existirá el hilo que " +"emitió el *fork*. Esto tiene un impacto concreto tanto en cómo se deben " +"manejar las cerraduras como en todo el estado almacenado en el tiempo de " +"ejecución de CPython." -#: ../Doc/c-api/init.rst:931 +#: ../Doc/c-api/init.rst:1114 msgid "" "The fact that only the \"current\" thread remains means any locks held by " "other threads will never be released. Python solves this for :func:`os.fork` " @@ -1609,29 +1910,28 @@ msgid "" "of additional (non-Python) locks that need to be acquired before or reset " "after a fork. OS facilities such as :c:func:`!pthread_atfork` would need to " "be used to accomplish the same thing. Additionally, when extending or " -"embedding Python, calling :c:func:`fork` directly rather than " -"through :func:`os.fork` (and returning to or calling into Python) may result " -"in a deadlock by one of Python's internal locks being held by a thread that " -"is defunct after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the " -"necessary locks, but is not always able to." +"embedding Python, calling :c:func:`fork` directly rather than through :func:" +"`os.fork` (and returning to or calling into Python) may result in a deadlock " +"by one of Python's internal locks being held by a thread that is defunct " +"after the fork. :c:func:`PyOS_AfterFork_Child` tries to reset the necessary " +"locks, but is not always able to." msgstr "" "El hecho de que solo permanezca el hilo \"actual\" significa que los " "bloqueos mantenidos por otros hilos nunca se liberarán. Python resuelve esto " "para :func:`os.fork` adquiriendo los bloqueos que usa internamente antes de " -"la bifurcación y liberándolos después. Además, restablece " -"cualquier :ref:`lock-objects` en el hijo. Al extender o incrustar Python, no " -"hay forma de informar a Python de bloqueos adicionales (que no sean de " -"Python) que deben adquirirse antes o restablecerse después de una " -"bifurcación. Se necesitarían usar recursos del sistema operativo " -"como :c:func:`!pthread_atfork` para lograr lo mismo. Además, al extender o " -"incrustar Python, llamar a :c:func:`fork` directamente en lugar de a través " -"de :func:`os.fork` (y regresar a Python o llamar a Python) puede resultar en " -"un bloqueo por uno de los bloqueos internos de Python que está retenido por " -"un hilo que está inactivo después de la " -"bifurcación. :c:func:`PyOS_AfterFork_Child` intenta restablecer los bloqueos " -"necesarios, pero no siempre puede hacerlo." - -#: ../Doc/c-api/init.rst:946 +"la bifurcación y liberándolos después. Además, restablece cualquier :ref:" +"`lock-objects` en el hijo. Al extender o incrustar Python, no hay forma de " +"informar a Python de bloqueos adicionales (que no sean de Python) que deben " +"adquirirse antes o restablecerse después de una bifurcación. Se necesitarían " +"usar recursos del sistema operativo como :c:func:`!pthread_atfork` para " +"lograr lo mismo. Además, al extender o incrustar Python, llamar a :c:func:" +"`fork` directamente en lugar de a través de :func:`os.fork` (y regresar a " +"Python o llamar a Python) puede resultar en un bloqueo por uno de los " +"bloqueos internos de Python que está retenido por un hilo que está inactivo " +"después de la bifurcación. :c:func:`PyOS_AfterFork_Child` intenta " +"restablecer los bloqueos necesarios, pero no siempre puede hacerlo." + +#: ../Doc/c-api/init.rst:1129 msgid "" "The fact that all other threads go away also means that CPython's runtime " "state there must be cleaned up properly, which :func:`os.fork` does. This " @@ -1644,21 +1944,58 @@ msgid "" "called immediately after." msgstr "" "El hecho de que todos los otros hilos desaparezcan también significa que el " -"estado de ejecución de CPython debe limpiarse correctamente, lo " -"que :func:`os.fork` lo hace. Esto significa finalizar todos los demás " -"objetos :c:type:`PyThreadState` que pertenecen al intérprete actual y todos " -"los demás objetos :c:type:`PyInterpreterState`. Debido a esto y a la " -"naturaleza especial del :ref:`intérprete \"principal\" `, :c:func:`fork` solo debería llamarse en el hilo \"principal\" de " -"ese intérprete, donde el CPython global el tiempo de ejecución se inicializó " +"estado de ejecución de CPython debe limpiarse correctamente, lo que :func:" +"`os.fork` lo hace. Esto significa finalizar todos los demás objetos :c:type:" +"`PyThreadState` que pertenecen al intérprete actual y todos los demás " +"objetos :c:type:`PyInterpreterState`. Debido a esto y a la naturaleza " +"especial del :ref:`intérprete \"principal\" `, :c:" +"func:`fork` solo debería llamarse en el hilo \"principal\" de ese " +"intérprete, donde el CPython global el tiempo de ejecución se inicializó " "originalmente. La única excepción es si :c:func:`exec` se llamará " "inmediatamente después." -#: ../Doc/c-api/init.rst:959 +#: ../Doc/c-api/init.rst:1143 +msgid "Cautions regarding runtime finalization" +msgstr "" + +#: ../Doc/c-api/init.rst:1145 +msgid "" +"In the late stage of :term:`interpreter shutdown`, after attempting to wait " +"for non-daemon threads to exit (though this can be interrupted by :class:" +"`KeyboardInterrupt`) and running the :mod:`atexit` functions, the runtime is " +"marked as *finalizing*: :c:func:`Py_IsFinalizing` and :func:`sys." +"is_finalizing` return true. At this point, only the *finalization thread* " +"that initiated finalization (typically the main thread) is allowed to " +"acquire the :term:`GIL`." +msgstr "" + +#: ../Doc/c-api/init.rst:1153 +msgid "" +"If any thread, other than the finalization thread, attempts to attach a :" +"term:`thread state` during finalization, either explicitly or implicitly, " +"the thread enters **a permanently blocked state** where it remains until the " +"program exits. In most cases this is harmless, but this can result in " +"deadlock if a later stage of finalization attempts to acquire a lock owned " +"by the blocked thread, or otherwise waits on the blocked thread." +msgstr "" + +#: ../Doc/c-api/init.rst:1160 +msgid "" +"Gross? Yes. This prevents random crashes and/or unexpectedly skipped C++ " +"finalizations further up the call stack when such threads were forcibly " +"exited here in CPython 3.13 and earlier. The CPython runtime :term:`thread " +"state` C APIs have never had any error reporting or handling expectations " +"at :term:`thread state` attachment time that would've allowed for graceful " +"exit from this situation. Changing that would require new stable C APIs and " +"rewriting the majority of C code in the CPython ecosystem to use those with " +"error handling." +msgstr "" + +#: ../Doc/c-api/init.rst:1170 msgid "High-level API" msgstr "API de alto nivel" -#: ../Doc/c-api/init.rst:961 +#: ../Doc/c-api/init.rst:1172 msgid "" "These are the most commonly used types and functions when writing C " "extension code, or when embedding the Python interpreter:" @@ -1666,7 +2003,7 @@ msgstr "" "Estos son los tipos y funciones más utilizados al escribir código de " "extensión C o al incrustar el intérprete de Python:" -#: ../Doc/c-api/init.rst:966 +#: ../Doc/c-api/init.rst:1177 msgid "" "This data structure represents the state shared by a number of cooperating " "threads. Threads belonging to the same interpreter share their module " @@ -1678,7 +2015,7 @@ msgstr "" "comparten la administración de su módulo y algunos otros elementos internos. " "No hay miembros públicos en esta estructura." -#: ../Doc/c-api/init.rst:971 +#: ../Doc/c-api/init.rst:1182 msgid "" "Threads belonging to different interpreters initially share nothing, except " "process state like available memory, open file descriptors and such. The " @@ -1691,7 +2028,13 @@ msgstr "" "compartido por todos los hilos, independientemente de a qué intérprete " "pertenezcan." -#: ../Doc/c-api/init.rst:979 +#: ../Doc/c-api/init.rst:1189 +msgid "" +":pep:`684` introduced the possibility of a :ref:`per-interpreter GIL `. See :c:func:`Py_NewInterpreterFromConfig`." +msgstr "" + +#: ../Doc/c-api/init.rst:1196 msgid "" "This data structure represents the state of a single thread. The only " "public data member is:" @@ -1699,26 +2042,26 @@ msgstr "" "Esta estructura de datos representa el estado de un único subproceso. El " "único miembro de datos público es:" -#: ../Doc/c-api/init.rst:984 +#: ../Doc/c-api/init.rst:1201 msgid "This thread's interpreter state." msgstr "Estado del intérprete de este hilo." -#: ../Doc/c-api/init.rst:995 +#: ../Doc/c-api/init.rst:1212 msgid "Deprecated function which does nothing." msgstr "Función deprecada que no hace nada." -#: ../Doc/c-api/init.rst:997 +#: ../Doc/c-api/init.rst:1214 msgid "" "In Python 3.6 and older, this function created the GIL if it didn't exist." msgstr "" "En Python 3.6 y versiones anteriores, esta función creaba el GIL si no " "existía." -#: ../Doc/c-api/init.rst:999 +#: ../Doc/c-api/init.rst:1216 msgid "The function now does nothing." msgstr "La función ahora no hace nada." -#: ../Doc/c-api/init.rst:1002 +#: ../Doc/c-api/init.rst:1219 msgid "" "This function is now called by :c:func:`Py_Initialize()`, so you don't have " "to call it yourself anymore." @@ -1726,65 +2069,56 @@ msgstr "" "Esta función ahora es llamada por :c:func:`Py_Initialize()`, por lo que ya " "no tiene que llamarla usted mismo." -#: ../Doc/c-api/init.rst:1006 +#: ../Doc/c-api/init.rst:1223 msgid "" "This function cannot be called before :c:func:`Py_Initialize()` anymore." msgstr "Esta función ya no se puede llamar antes de :c:func:`Py_Initialize()`." -#: ../Doc/c-api/init.rst:1016 +#: ../Doc/c-api/init.rst:1233 msgid "" -"Release the global interpreter lock (if it has been created) and reset the " -"thread state to ``NULL``, returning the previous thread state (which is not " -"``NULL``). If the lock has been created, the current thread must have " -"acquired it." +"Detach the :term:`attached thread state` and return it. The thread will have " +"no :term:`thread state` upon returning." msgstr "" -"Libere el bloqueo global del intérprete (si se ha creado) y restablezca el " -"estado del hilo a ``NULL``, retornando el estado del hilo anterior (que no " -"es ``NULL``). Si se ha creado el bloqueo, el hilo actual debe haberlo " -"adquirido." -#: ../Doc/c-api/init.rst:1024 +#: ../Doc/c-api/init.rst:1239 msgid "" -"Acquire the global interpreter lock (if it has been created) and set the " -"thread state to *tstate*, which must not be ``NULL``. If the lock has been " -"created, the current thread must not have acquired it, otherwise deadlock " -"ensues." +"Set the :term:`attached thread state` to *tstate*. The passed :term:`thread " +"state` **should not** be :term:`attached `, otherwise " +"deadlock ensues. *tstate* will be attached upon returning." msgstr "" -"Adquiera el bloqueo global del intérprete (si se ha creado) y establezca el " -"estado del hilo en *tstate*, que no debe ser ``NULL``. Si se ha creado el " -"bloqueo, el hilo actual no debe haberlo adquirido, de lo contrario se " -"produce un *deadlock*." -#: ../Doc/c-api/init.rst:1030 ../Doc/c-api/init.rst:1089 -#: ../Doc/c-api/init.rst:1371 +#: ../Doc/c-api/init.rst:1244 ../Doc/c-api/init.rst:1618 msgid "" -"Calling this function from a thread when the runtime is finalizing will " -"terminate the thread, even if the thread was not created by Python. You can " -"use :c:func:`Py_IsFinalizing` or :func:`sys.is_finalizing` to check if the " -"interpreter is in process of being finalized before calling this function to " -"avoid unwanted termination." +"Calling this function from a thread when the runtime is finalizing will hang " +"the thread until the program exits, even if the thread was not created by " +"Python. Refer to :ref:`cautions-regarding-runtime-finalization` for more " +"details." msgstr "" -"Si se llama a esta función desde un subproceso cuando el entorno de " -"ejecución está finalizando, se terminará el subproceso, incluso si Python no " -"lo creó. Puede usar :c:func:`Py_IsFinalizing` o :func:`sys.is_finalizing` " -"para verificar si el intérprete está en proceso de finalización antes de " -"llamar a esta función para evitar una finalización no deseada." -#: ../Doc/c-api/init.rst:1038 +#: ../Doc/c-api/init.rst:1249 ../Doc/c-api/init.rst:1320 +#: ../Doc/c-api/init.rst:1628 +msgid "" +"Hangs the current thread, rather than terminating it, if called while the " +"interpreter is finalizing." +msgstr "" + +#: ../Doc/c-api/init.rst:1255 +#, fuzzy msgid "" -"Return the current thread state. The global interpreter lock must be held. " -"When the current thread state is ``NULL``, this issues a fatal error (so " -"that the caller needn't check for ``NULL``)." +"Return the :term:`attached thread state`. If the thread has no attached " +"thread state, (such as when inside of :c:macro:`Py_BEGIN_ALLOW_THREADS` " +"block), then this issues a fatal error (so that the caller needn't check for " +"``NULL``)." msgstr "" "Retorna el estado actual del hilo. Se debe mantener el bloqueo global del " "intérprete. Cuando el estado actual del hilo es ``NULL``, esto genera un " "error fatal (por lo que la persona que llama no necesita verificar ``NULL``)." -#: ../Doc/c-api/init.rst:1042 +#: ../Doc/c-api/init.rst:1260 msgid "See also :c:func:`PyThreadState_GetUnchecked`." msgstr "Véase también :c:func:`PyThreadState_GetUnchecked`." -#: ../Doc/c-api/init.rst:1047 +#: ../Doc/c-api/init.rst:1264 msgid "" "Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a " "fatal error if it is NULL. The caller is responsible to check if the result " @@ -1794,7 +2128,7 @@ msgstr "" "fatal si es NULL. El llamador es responsable de verificar si el resultado es " "NULL." -#: ../Doc/c-api/init.rst:1051 +#: ../Doc/c-api/init.rst:1268 msgid "" "In Python 3.5 to 3.12, the function was private and known as " "``_PyThreadState_UncheckedGet()``." @@ -1802,17 +2136,25 @@ msgstr "" "En Python 3.5 a 3.12, la función era privada y se conocía como " "``_PyThreadState_UncheckedGet()``." -#: ../Doc/c-api/init.rst:1058 +#: ../Doc/c-api/init.rst:1275 msgid "" -"Swap the current thread state with the thread state given by the argument " -"*tstate*, which may be ``NULL``. The global interpreter lock must be held " -"and is not released." +"Set the :term:`attached thread state` to *tstate*, and return the :term:" +"`thread state` that was attached prior to calling." msgstr "" -"Cambia el estado del hilo actual con el estado del hilo dado por el " -"argumento *tstate*, que puede ser ``NULL``. El bloqueo global del intérprete " -"debe mantenerse y no se libera." -#: ../Doc/c-api/init.rst:1063 +#: ../Doc/c-api/init.rst:1278 +msgid "" +"This function is safe to call without an :term:`attached thread state`; it " +"will simply return ``NULL`` indicating that there was no prior thread state." +msgstr "" + +#: ../Doc/c-api/init.rst:1285 +msgid "" +"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread " +"if the runtime is finalizing." +msgstr "" + +#: ../Doc/c-api/init.rst:1289 msgid "" "The following functions use thread-local storage, and are not compatible " "with sub-interpreters:" @@ -1820,81 +2162,92 @@ msgstr "" "Las siguientes funciones utilizan almacenamiento local de hilos y no son " "compatibles con subinterpretes:" -#: ../Doc/c-api/init.rst:1068 +#: ../Doc/c-api/init.rst:1294 +#, fuzzy msgid "" "Ensure that the current thread is ready to call the Python C API regardless " -"of the current state of Python, or of the global interpreter lock. This may " -"be called as many times as desired by a thread as long as each call is " -"matched with a call to :c:func:`PyGILState_Release`. In general, other " -"thread-related APIs may be used between :c:func:`PyGILState_Ensure` " -"and :c:func:`PyGILState_Release` calls as long as the thread state is " -"restored to its previous state before the Release(). For example, normal " -"usage of the :c:macro:`Py_BEGIN_ALLOW_THREADS` " -"and :c:macro:`Py_END_ALLOW_THREADS` macros is acceptable." +"of the current state of Python, or of the :term:`attached thread state`. " +"This may be called as many times as desired by a thread as long as each call " +"is matched with a call to :c:func:`PyGILState_Release`. In general, other " +"thread-related APIs may be used between :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls as long as the thread state is restored to " +"its previous state before the Release(). For example, normal usage of the :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` and :c:macro:`Py_END_ALLOW_THREADS` macros " +"is acceptable." msgstr "" "Asegúrese de que el subproceso actual esté listo para llamar a la API de " "Python C, independientemente del estado actual de Python o del bloqueo " "global del intérprete. Esto se puede invocar tantas veces como lo desee un " -"subproceso siempre que cada llamada coincida con una llamada " -"a :c:func:`PyGILState_Release`. En general, se pueden usar otras API " -"relacionadas con subprocesos entre :c:func:`PyGILState_Ensure` " -"y :c:func:`PyGILState_Release` invoca siempre que el estado del subproceso " -"se restablezca a su estado anterior antes del *Release()*. Por ejemplo, el " -"uso normal de las macros :c:macro:`Py_BEGIN_ALLOW_THREADS` " -"y :c:macro:`Py_END_ALLOW_THREADS` es aceptable." - -#: ../Doc/c-api/init.rst:1078 -msgid "" -"The return value is an opaque \"handle\" to the thread state " -"when :c:func:`PyGILState_Ensure` was called, and must be passed " -"to :c:func:`PyGILState_Release` to ensure Python is left in the same state. " -"Even though recursive calls are allowed, these handles *cannot* be shared - " -"each unique call to :c:func:`PyGILState_Ensure` must save the handle for its " -"call to :c:func:`PyGILState_Release`." +"subproceso siempre que cada llamada coincida con una llamada a :c:func:" +"`PyGILState_Release`. En general, se pueden usar otras API relacionadas con " +"subprocesos entre :c:func:`PyGILState_Ensure` y :c:func:`PyGILState_Release` " +"invoca siempre que el estado del subproceso se restablezca a su estado " +"anterior antes del *Release()*. Por ejemplo, el uso normal de las macros :c:" +"macro:`Py_BEGIN_ALLOW_THREADS` y :c:macro:`Py_END_ALLOW_THREADS` es " +"aceptable." + +#: ../Doc/c-api/init.rst:1304 +#, fuzzy +msgid "" +"The return value is an opaque \"handle\" to the :term:`attached thread " +"state` when :c:func:`PyGILState_Ensure` was called, and must be passed to :c:" +"func:`PyGILState_Release` to ensure Python is left in the same state. Even " +"though recursive calls are allowed, these handles *cannot* be shared - each " +"unique call to :c:func:`PyGILState_Ensure` must save the handle for its call " +"to :c:func:`PyGILState_Release`." +msgstr "" +"El valor de retorno es un \"identificador\" opaco al estado del hilo cuando :" +"c:func:`PyGILState_Ensure` fue llamado, y debe pasarse a :c:func:" +"`PyGILState_Release` para asegurar que Python se deje en el mismo estado. " +"Aunque las llamadas recursivas están permitidas, estos identificadores *no* " +"pueden compartirse; cada llamada única a :c:func:`PyGILState_Ensure` debe " +"guardar el identificador para su llamada a :c:func:`PyGILState_Release`." + +#: ../Doc/c-api/init.rst:1311 +#, fuzzy +msgid "" +"When the function returns, there will be an :term:`attached thread state` " +"and the thread will be able to call arbitrary Python code. Failure is a " +"fatal error." msgstr "" -"El valor de retorno es un \"identificador\" opaco al estado del hilo " -"cuando :c:func:`PyGILState_Ensure` fue llamado, y debe pasarse " -"a :c:func:`PyGILState_Release` para asegurar que Python se deje en el mismo " -"estado. Aunque las llamadas recursivas están permitidas, estos " -"identificadores *no* pueden compartirse; cada llamada única " -"a :c:func:`PyGILState_Ensure` debe guardar el identificador para su llamada " -"a :c:func:`PyGILState_Release`." +"Cuando la función regrese, el hilo actual contendrá el GIL y podrá llamar a " +"código arbitrario de Python. El fracaso es un error fatal." -#: ../Doc/c-api/init.rst:1085 +#: ../Doc/c-api/init.rst:1315 msgid "" -"When the function returns, the current thread will hold the GIL and be able " -"to call arbitrary Python code. Failure is a fatal error." +"Calling this function when the runtime is finalizing is unsafe. Doing so " +"will either hang the thread until the program ends, or fully crash the " +"interpreter in rare cases. Refer to :ref:`cautions-regarding-runtime-" +"finalization` for more details." msgstr "" -"Cuando la función regrese, el hilo actual contendrá el GIL y podrá llamar a " -"código arbitrario de Python. El fracaso es un error fatal." -#: ../Doc/c-api/init.rst:1097 +#: ../Doc/c-api/init.rst:1326 msgid "" "Release any resources previously acquired. After this call, Python's state " -"will be the same as it was prior to the " -"corresponding :c:func:`PyGILState_Ensure` call (but generally this state " -"will be unknown to the caller, hence the use of the GILState API)." +"will be the same as it was prior to the corresponding :c:func:" +"`PyGILState_Ensure` call (but generally this state will be unknown to the " +"caller, hence the use of the GILState API)." msgstr "" "Libera cualquier recurso previamente adquirido. Después de esta llamada, el " -"estado de Python será el mismo que antes de la llamada " -"correspondiente :c:func:`PyGILState_Ensure` (pero en general este estado " -"será desconocido para la persona que llama, de ahí el uso de la API " -"``GILState``)." +"estado de Python será el mismo que antes de la llamada correspondiente :c:" +"func:`PyGILState_Ensure` (pero en general este estado será desconocido para " +"la persona que llama, de ahí el uso de la API ``GILState``)." -#: ../Doc/c-api/init.rst:1102 +#: ../Doc/c-api/init.rst:1331 msgid "" -"Every call to :c:func:`PyGILState_Ensure` must be matched by a call " -"to :c:func:`PyGILState_Release` on the same thread." +"Every call to :c:func:`PyGILState_Ensure` must be matched by a call to :c:" +"func:`PyGILState_Release` on the same thread." msgstr "" -"Cada llamada a :c:func:`PyGILState_Ensure` debe coincidir con una llamada " -"a :c:func:`PyGILState_Release` en el mismo hilo." +"Cada llamada a :c:func:`PyGILState_Ensure` debe coincidir con una llamada a :" +"c:func:`PyGILState_Release` en el mismo hilo." -#: ../Doc/c-api/init.rst:1108 +#: ../Doc/c-api/init.rst:1336 +#, fuzzy msgid "" -"Get the current thread state for this thread. May return ``NULL`` if no " -"GILState API has been used on the current thread. Note that the main thread " -"always has such a thread-state, even if no auto-thread-state call has been " -"made on the main thread. This is mainly a helper/diagnostic function." +"Get the :term:`attached thread state` for this thread. May return ``NULL`` " +"if no GILState API has been used on the current thread. Note that the main " +"thread always has such a thread-state, even if no auto-thread-state call has " +"been made on the main thread. This is mainly a helper/diagnostic function." msgstr "" "Obtenga el estado actual del hilo para este hilo. Puede retornar ``NULL`` si " "no se ha utilizado la API ``GILState`` en el hilo actual. Tenga en cuenta " @@ -1903,15 +2256,25 @@ msgstr "" "en el subproceso principal. Esta es principalmente una función auxiliar y de " "diagnóstico." -#: ../Doc/c-api/init.rst:1116 +#: ../Doc/c-api/init.rst:1342 msgid "" -"Return ``1`` if the current thread is holding the GIL and ``0`` otherwise. " -"This function can be called from any thread at any time. Only if it has had " -"its Python thread state initialized and currently is holding the GIL will it " -"return ``1``. This is mainly a helper/diagnostic function. It can be useful " -"for example in callback contexts or memory allocation functions when knowing " -"that the GIL is locked can allow the caller to perform sensitive actions or " -"otherwise behave differently." +"This function does not account for :term:`thread states ` " +"created by something other than :c:func:`PyGILState_Ensure` (such as :c:func:" +"`PyThreadState_New`). Prefer :c:func:`PyThreadState_Get` or :c:func:" +"`PyThreadState_GetUnchecked` for most cases." +msgstr "" + +#: ../Doc/c-api/init.rst:1351 +#, fuzzy +msgid "" +"Return ``1`` if the current thread is holding the :term:`GIL` and ``0`` " +"otherwise. This function can be called from any thread at any time. Only if " +"it has had its :term:`thread state ` initialized via :" +"c:func:`PyGILState_Ensure` will it return ``1``. This is mainly a helper/" +"diagnostic function. It can be useful for example in callback contexts or " +"memory allocation functions when knowing that the :term:`GIL` is locked can " +"allow the caller to perform sensitive actions or otherwise behave " +"differently." msgstr "" "Retorna ``1`` si el hilo actual mantiene el GIL y ``0`` de lo contrario. " "Esta función se puede llamar desde cualquier hilo en cualquier momento. Solo " @@ -1922,7 +2285,14 @@ msgstr "" "bloqueado puede permitir que la persona que llama realice acciones " "confidenciales o se comporte de otra manera de manera diferente." -#: ../Doc/c-api/init.rst:1128 +#: ../Doc/c-api/init.rst:1361 +msgid "" +"If the current Python process has ever created a subinterpreter, this " +"function will *always* return ``1``. Prefer :c:func:" +"`PyThreadState_GetUnchecked` for most cases." +msgstr "" + +#: ../Doc/c-api/init.rst:1368 msgid "" "The following macros are normally used without a trailing semicolon; look " "for example usage in the Python source distribution." @@ -1930,163 +2300,175 @@ msgstr "" "Las siguientes macros se usan normalmente sin punto y coma final; busque, " "por ejemplo, el uso en la distribución fuente de Python." -#: ../Doc/c-api/init.rst:1134 +#: ../Doc/c-api/init.rst:1374 msgid "" -"This macro expands to ``{ PyThreadState *_save; _save = " -"PyEval_SaveThread();``. Note that it contains an opening brace; it must be " -"matched with a following :c:macro:`Py_END_ALLOW_THREADS` macro. See above " -"for further discussion of this macro." +"This macro expands to ``{ PyThreadState *_save; _save = PyEval_SaveThread();" +"``. Note that it contains an opening brace; it must be matched with a " +"following :c:macro:`Py_END_ALLOW_THREADS` macro. See above for further " +"discussion of this macro." msgstr "" -"Esta macro se expande a ``{PyThreadState *_save; _save = " -"PyEval_SaveThread();``. Tenga en cuenta que contiene una llave de apertura; " -"debe coincidir con la siguiente macro :c:macro:`Py_END_ALLOW_THREADS`. Ver " -"arriba para una discusión más detallada de esta macro." +"Esta macro se expande a ``{PyThreadState *_save; _save = PyEval_SaveThread();" +"``. Tenga en cuenta que contiene una llave de apertura; debe coincidir con " +"la siguiente macro :c:macro:`Py_END_ALLOW_THREADS`. Ver arriba para una " +"discusión más detallada de esta macro." -#: ../Doc/c-api/init.rst:1142 +#: ../Doc/c-api/init.rst:1382 msgid "" "This macro expands to ``PyEval_RestoreThread(_save); }``. Note that it " -"contains a closing brace; it must be matched with an " -"earlier :c:macro:`Py_BEGIN_ALLOW_THREADS` macro. See above for further " -"discussion of this macro." +"contains a closing brace; it must be matched with an earlier :c:macro:" +"`Py_BEGIN_ALLOW_THREADS` macro. See above for further discussion of this " +"macro." msgstr "" "Esta macro se expande a ``PyEval_RestoreThread(_save); }``. Tenga en cuenta " -"que contiene una llave de cierre; debe coincidir con una macro " -"anterior :c:macro:`Py_BEGIN_ALLOW_THREADS`. Ver arriba para una discusión " -"más detallada de esta macro." +"que contiene una llave de cierre; debe coincidir con una macro anterior :c:" +"macro:`Py_BEGIN_ALLOW_THREADS`. Ver arriba para una discusión más detallada " +"de esta macro." -#: ../Doc/c-api/init.rst:1150 +#: ../Doc/c-api/init.rst:1390 msgid "" -"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent " -"to :c:macro:`Py_END_ALLOW_THREADS` without the closing brace." +"This macro expands to ``PyEval_RestoreThread(_save);``: it is equivalent to :" +"c:macro:`Py_END_ALLOW_THREADS` without the closing brace." msgstr "" -"Esta macro se expande a ``PyEval_RestoreThread(_save);``: es equivalente " -"a :c:macro:`Py_END_ALLOW_THREADS` sin la llave de cierre." +"Esta macro se expande a ``PyEval_RestoreThread(_save);``: es equivalente a :" +"c:macro:`Py_END_ALLOW_THREADS` sin la llave de cierre." -#: ../Doc/c-api/init.rst:1156 +#: ../Doc/c-api/init.rst:1396 msgid "" -"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent " -"to :c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " +"This macro expands to ``_save = PyEval_SaveThread();``: it is equivalent to :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` without the opening brace and variable " "declaration." msgstr "" -"Esta macro se expande a ``_save = PyEval_SaveThread();``: es equivalente " -"a :c:macro:`Py_BEGIN_ALLOW_THREADS` sin la llave de apertura y la " -"declaración de variable." +"Esta macro se expande a ``_save = PyEval_SaveThread();``: es equivalente a :" +"c:macro:`Py_BEGIN_ALLOW_THREADS` sin la llave de apertura y la declaración " +"de variable." -#: ../Doc/c-api/init.rst:1162 +#: ../Doc/c-api/init.rst:1402 msgid "Low-level API" msgstr "API de bajo nivel" -#: ../Doc/c-api/init.rst:1164 +#: ../Doc/c-api/init.rst:1404 msgid "" "All of the following functions must be called after :c:func:`Py_Initialize`." msgstr "" -"Todas las siguientes funciones deben llamarse después " -"de :c:func:`Py_Initialize`." +"Todas las siguientes funciones deben llamarse después de :c:func:" +"`Py_Initialize`." -#: ../Doc/c-api/init.rst:1166 -msgid ":c:func:`Py_Initialize()` now initializes the :term:`GIL`." +#: ../Doc/c-api/init.rst:1406 +#, fuzzy +msgid "" +":c:func:`Py_Initialize()` now initializes the :term:`GIL` and sets an :term:" +"`attached thread state`." msgstr ":c:func:`Py_Initialize()` ahora inicializa el :term:`GIL`." -#: ../Doc/c-api/init.rst:1172 +#: ../Doc/c-api/init.rst:1413 +#, fuzzy msgid "" -"Create a new interpreter state object. The global interpreter lock need not " -"be held, but may be held if it is necessary to serialize calls to this " -"function." +"Create a new interpreter state object. An :term:`attached thread state` is " +"not needed, but may optionally exist if it is necessary to serialize calls " +"to this function." msgstr "" "Crea un nuevo objeto de estado de intérprete. No es necesario retener el " "bloqueo global del intérprete, pero se puede retener si es necesario para " "serializar llamadas a esta función." -#: ../Doc/c-api/init.rst:1176 +#: ../Doc/c-api/init.rst:1417 msgid "" -"Raises an :ref:`auditing event ` " -"``cpython.PyInterpreterState_New`` with no arguments." +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_New`` with no arguments." msgstr "" -"Genera un :ref:`evento de auditoría ` " -"``python.PyInterpreterState_New`` sin argumentos." +"Genera un :ref:`evento de auditoría ` ``python." +"PyInterpreterState_New`` sin argumentos." -#: ../Doc/c-api/init.rst:1181 +#: ../Doc/c-api/init.rst:1422 +#, fuzzy msgid "" -"Reset all information in an interpreter state object. The global " -"interpreter lock must be held." +"Reset all information in an interpreter state object. There must be an :" +"term:`attached thread state` for the interpreter." msgstr "" "Restablece toda la información en un objeto de estado de intérprete. Se debe " "mantener el bloqueo global del intérprete." -#: ../Doc/c-api/init.rst:1184 +#: ../Doc/c-api/init.rst:1425 msgid "" -"Raises an :ref:`auditing event ` " -"``cpython.PyInterpreterState_Clear`` with no arguments." +"Raises an :ref:`auditing event ` ``cpython." +"PyInterpreterState_Clear`` with no arguments." msgstr "" "Lanza una :ref:`eventos de auditoría ` ``python.PyInterpreterState " "Clear`` sin argumentos." -#: ../Doc/c-api/init.rst:1189 +#: ../Doc/c-api/init.rst:1430 +#, fuzzy msgid "" -"Destroy an interpreter state object. The global interpreter lock need not " -"be held. The interpreter state must have been reset with a previous call " -"to :c:func:`PyInterpreterState_Clear`." +"Destroy an interpreter state object. There **should not** be an :term:" +"`attached thread state` for the target interpreter. The interpreter state " +"must have been reset with a previous call to :c:func:" +"`PyInterpreterState_Clear`." msgstr "" "Destruye un objeto de estado de intérprete. No es necesario mantener el " "bloqueo global del intérprete. El estado del intérprete debe haberse " "restablecido con una llamada previa a :c:func:`PyInterpreterState_Clear`." -#: ../Doc/c-api/init.rst:1196 +#: ../Doc/c-api/init.rst:1437 msgid "" "Create a new thread state object belonging to the given interpreter object. " -"The global interpreter lock need not be held, but may be held if it is " -"necessary to serialize calls to this function." +"An :term:`attached thread state` is not needed." msgstr "" -"Crea un nuevo objeto de estado de hilo que pertenece al objeto de intérprete " -"dado. No es necesario retener el bloqueo global del intérprete, pero se " -"puede retener si es necesario para serializar llamadas a esta función." -#: ../Doc/c-api/init.rst:1203 +#: ../Doc/c-api/init.rst:1442 +#, fuzzy msgid "" -"Reset all information in a thread state object. The global interpreter lock " -"must be held." +"Reset all information in a :term:`thread state` object. *tstate* must be :" +"term:`attached `" msgstr "" "Restablece toda la información en un objeto de estado de hilo. Se debe " "mantener el bloqueo global del intérprete." -#: ../Doc/c-api/init.rst:1206 +#: ../Doc/c-api/init.rst:1445 msgid "" "This function now calls the :c:member:`PyThreadState.on_delete` callback. " "Previously, that happened in :c:func:`PyThreadState_Delete`." msgstr "" -"Esta función ahora llama a la " -"retrollamada :c:member:`PyThreadState.on_delete`. Anteriormente, eso sucedía " -"en :c:func:`PyThreadState_Delete`." +"Esta función ahora llama a la retrollamada :c:member:`PyThreadState." +"on_delete`. Anteriormente, eso sucedía en :c:func:`PyThreadState_Delete`." + +#: ../Doc/c-api/init.rst:1449 +msgid "The :c:member:`PyThreadState.on_delete` callback was removed." +msgstr "" + +#: ../Doc/c-api/init.rst:1455 +#, fuzzy +msgid "" +"Destroy a :term:`thread state` object. *tstate* should not be :term:" +"`attached ` to any thread. *tstate* must have been " +"reset with a previous call to :c:func:`PyThreadState_Clear`." +msgstr "" +"Destruye un objeto de estado de intérprete. No es necesario mantener el " +"bloqueo global del intérprete. El estado del intérprete debe haberse " +"restablecido con una llamada previa a :c:func:`PyInterpreterState_Clear`." -#: ../Doc/c-api/init.rst:1213 +#: ../Doc/c-api/init.rst:1463 +#, fuzzy msgid "" -"Destroy a thread state object. The global interpreter lock need not be " -"held. The thread state must have been reset with a previous call " -"to :c:func:`PyThreadState_Clear`." +"Detach the :term:`attached thread state` (which must have been reset with a " +"previous call to :c:func:`PyThreadState_Clear`) and then destroy it." msgstr "" "Destruye un objeto de estado de hilo. No es necesario mantener el bloqueo " "global del intérprete. El estado del hilo debe haberse restablecido con una " "llamada previa a :c:func:`PyThreadState_Clear`." -#: ../Doc/c-api/init.rst:1220 +#: ../Doc/c-api/init.rst:1466 msgid "" -"Destroy the current thread state and release the global interpreter lock. " -"Like :c:func:`PyThreadState_Delete`, the global interpreter lock must be " -"held. The thread state must have been reset with a previous call " -"to :c:func:`PyThreadState_Clear`." +"No :term:`thread state` will be :term:`attached ` " +"upon returning." msgstr "" -"Destruye el estado actual del subproceso y libera el bloqueo global del " -"intérprete. Al igual que en :c:func:`PyThreadState_Delete`, el bloqueo " -"global del intérprete debe mantenerse. El estado del subproceso debe haberse " -"restablecido con una llamada anterior a :c:func:`PyThreadState_Clear`." -#: ../Doc/c-api/init.rst:1228 +#: ../Doc/c-api/init.rst:1471 msgid "Get the current frame of the Python thread state *tstate*." msgstr "Obtiene el marco actual del estado del hilo de Python *tstate*." # Como bien tradujeron con anterioridad, está más claro el decir referencia # sólida a referencia fuerte, el cual no calzaría en este contexto. -#: ../Doc/c-api/init.rst:1230 +#: ../Doc/c-api/init.rst:1473 msgid "" "Return a :term:`strong reference`. Return ``NULL`` if no frame is currently " "executing." @@ -2094,37 +2476,41 @@ msgstr "" "Retorna una :term:`strong reference` (referencia sólida). Retorna ``NULL`` " "si no se está ejecutando ningún cuadro." -#: ../Doc/c-api/init.rst:1233 +#: ../Doc/c-api/init.rst:1476 msgid "See also :c:func:`PyEval_GetFrame`." msgstr "Vea también :c:func:`PyEval_GetFrame`." -#: ../Doc/c-api/init.rst:1235 ../Doc/c-api/init.rst:1244 -#: ../Doc/c-api/init.rst:1253 -msgid "*tstate* must not be ``NULL``." -msgstr "*tstate* no debe ser ``NULL``." +#: ../Doc/c-api/init.rst:1478 ../Doc/c-api/init.rst:1487 +#: ../Doc/c-api/init.rst:1496 +msgid "" +"*tstate* must not be ``NULL``, and must be :term:`attached `." +msgstr "" -#: ../Doc/c-api/init.rst:1242 +#: ../Doc/c-api/init.rst:1485 +#, fuzzy msgid "" -"Get the unique thread state identifier of the Python thread state *tstate*." +"Get the unique :term:`thread state` identifier of the Python thread state " +"*tstate*." msgstr "" "Obtiene el identificador de estado de subproceso único del estado del hilo " "de Python *tstate*." -#: ../Doc/c-api/init.rst:1251 +#: ../Doc/c-api/init.rst:1494 msgid "Get the interpreter of the Python thread state *tstate*." msgstr "Obtiene el intérprete del estado del hilo de Python *tstate*." -#: ../Doc/c-api/init.rst:1260 +#: ../Doc/c-api/init.rst:1503 msgid "Suspend tracing and profiling in the Python thread state *tstate*." msgstr "" "Suspender el seguimiento y el perfilado en el estado del hilo de Python " "*tstate*." -#: ../Doc/c-api/init.rst:1262 +#: ../Doc/c-api/init.rst:1505 msgid "Resume them using the :c:func:`PyThreadState_LeaveTracing` function." msgstr "Reanudelos usando la función :c:func:`PyThreadState_LeaveTracing`." -#: ../Doc/c-api/init.rst:1269 +#: ../Doc/c-api/init.rst:1512 msgid "" "Resume tracing and profiling in the Python thread state *tstate* suspended " "by the :c:func:`PyThreadState_EnterTracing` function." @@ -2132,30 +2518,27 @@ msgstr "" "Reanudar el seguimiento y el perfilado en el estado del hilo de Python " "*tstate* suspendido por la función :c:func:`PyThreadState_EnterTracing`." -#: ../Doc/c-api/init.rst:1272 +#: ../Doc/c-api/init.rst:1515 msgid "" "See also :c:func:`PyEval_SetTrace` and :c:func:`PyEval_SetProfile` functions." msgstr "" -"Consulte también las funciones :c:func:`PyEval_SetTrace` " -"y :c:func:`PyEval_SetProfile`." +"Consulte también las funciones :c:func:`PyEval_SetTrace` y :c:func:" +"`PyEval_SetProfile`." -#: ../Doc/c-api/init.rst:1280 +#: ../Doc/c-api/init.rst:1523 msgid "Get the current interpreter." msgstr "Obtiene el intérprete actual." -#: ../Doc/c-api/init.rst:1282 +#: ../Doc/c-api/init.rst:1525 +#, fuzzy msgid "" -"Issue a fatal error if there no current Python thread state or no current " -"interpreter. It cannot return NULL." +"Issue a fatal error if there no :term:`attached thread state`. It cannot " +"return NULL." msgstr "" "Emite un error fatal si no hay un estado actual del hilo de Python o no hay " "un intérprete actual. No puede retornar NULL." -#: ../Doc/c-api/init.rst:1285 ../Doc/c-api/init.rst:1295 -msgid "The caller must hold the GIL." -msgstr "La persona que llama debe retener el GIL." - -#: ../Doc/c-api/init.rst:1292 +#: ../Doc/c-api/init.rst:1533 msgid "" "Return the interpreter's unique ID. If there was any error in doing so then " "``-1`` is returned and an error is set." @@ -2163,7 +2546,14 @@ msgstr "" "Retorna la identificación única del intérprete. Si hubo algún error al " "hacerlo, entonces se retorna ``-1`` y se establece un error." -#: ../Doc/c-api/init.rst:1302 +#: ../Doc/c-api/init.rst:1536 ../Doc/c-api/init.rst:2132 +#: ../Doc/c-api/init.rst:2139 ../Doc/c-api/init.rst:2158 +#: ../Doc/c-api/init.rst:2165 +#, fuzzy +msgid "The caller must have an :term:`attached thread state`." +msgstr "La persona que llama debe mantener el :term:`GIL`." + +#: ../Doc/c-api/init.rst:1543 msgid "" "Return a dictionary in which interpreter-specific data may be stored. If " "this function returns ``NULL`` then no exception has been raised and the " @@ -2174,7 +2564,7 @@ msgstr "" "excepción y la persona que llama debe suponer que no hay disponible una " "instrucción específica del intérprete." -#: ../Doc/c-api/init.rst:1306 +#: ../Doc/c-api/init.rst:1547 msgid "" "This is not a replacement for :c:func:`PyModule_GetState()`, which " "extensions should use to store interpreter-specific state information." @@ -2182,11 +2572,17 @@ msgstr "" "Esto no reemplaza a :c:func:`PyModule_GetState()`, que las extensiones deben " "usar para almacenar información de estado específica del intérprete." -#: ../Doc/c-api/init.rst:1313 +#: ../Doc/c-api/init.rst:1550 +msgid "" +"The returned dictionary is borrowed from the interpreter and is valid until " +"interpreter shutdown." +msgstr "" + +#: ../Doc/c-api/init.rst:1558 msgid "Type of a frame evaluation function." msgstr "Tipo de función de evaluación de marcos." -#: ../Doc/c-api/init.rst:1315 +#: ../Doc/c-api/init.rst:1560 msgid "" "The *throwflag* parameter is used by the ``throw()`` method of generators: " "if non-zero, handle the current exception." @@ -2194,37 +2590,39 @@ msgstr "" "El parámetro *throwflag* es usado por el método de generadores ``throw()``: " "si no es cero, maneja la excepción actual." -#: ../Doc/c-api/init.rst:1318 +#: ../Doc/c-api/init.rst:1563 msgid "The function now takes a *tstate* parameter." msgstr "La función ahora recibe un parámetro *tstate*." -#: ../Doc/c-api/init.rst:1321 +#: ../Doc/c-api/init.rst:1566 msgid "" "The *frame* parameter changed from ``PyFrameObject*`` to " "``_PyInterpreterFrame*``." msgstr "" "El parámetro *frame* cambió de ``PyFrameObject*`` a ``_PyInterpreterFrame*``." -#: ../Doc/c-api/init.rst:1326 +#: ../Doc/c-api/init.rst:1571 msgid "Get the frame evaluation function." msgstr "Obtiene la función de evaluación de marcos." -#: ../Doc/c-api/init.rst:1328 ../Doc/c-api/init.rst:1336 +#: ../Doc/c-api/init.rst:1573 ../Doc/c-api/init.rst:1581 msgid "See the :pep:`523` \"Adding a frame evaluation API to CPython\"." msgstr "" "Consulte :pep:`523` \"Adición de una API de evaluación de marcos a CPython\"." -#: ../Doc/c-api/init.rst:1334 +#: ../Doc/c-api/init.rst:1579 msgid "Set the frame evaluation function." msgstr "Configura la función de evaluación del marco." -#: ../Doc/c-api/init.rst:1343 +#: ../Doc/c-api/init.rst:1588 +#, fuzzy msgid "" "Return a dictionary in which extensions can store thread-specific state " "information. Each extension should use a unique key to use to store state " -"in the dictionary. It is okay to call this function when no current thread " -"state is available. If this function returns ``NULL``, no exception has been " -"raised and the caller should assume no current thread state is available." +"in the dictionary. It is okay to call this function when no :term:`thread " +"state` is :term:`attached `. If this function returns " +"``NULL``, no exception has been raised and the caller should assume no " +"thread state is attached." msgstr "" "Retorna un diccionario en el que las extensiones pueden almacenar " "información de estado específica del hilo. Cada extensión debe usar una " @@ -2233,16 +2631,17 @@ msgstr "" "función retorna ``NULL``, no se ha producido ninguna excepción y la persona " "que llama debe asumir que no hay disponible ningún estado del hilo actual." -#: ../Doc/c-api/init.rst:1352 +#: ../Doc/c-api/init.rst:1598 +#, fuzzy msgid "" "Asynchronously raise an exception in a thread. The *id* argument is the " "thread id of the target thread; *exc* is the exception object to be raised. " "This function does not steal any references to *exc*. To prevent naive " "misuse, you must write your own C extension to call this. Must be called " -"with the GIL held. Returns the number of thread states modified; this is " -"normally one, but will be zero if the thread id isn't found. If *exc* is " -"``NULL``, the pending exception (if any) for the thread is cleared. This " -"raises no exceptions." +"with an :term:`attached thread state`. Returns the number of thread states " +"modified; this is normally one, but will be zero if the thread id isn't " +"found. If *exc* is ``NULL``, the pending exception (if any) for the thread " +"is cleared. This raises no exceptions." msgstr "" "Generar una excepción de forma asincrónica en un subproceso. El argumento " "*id* es el identificador del subproceso de destino; *exc* es el objeto de " @@ -2254,38 +2653,36 @@ msgstr "" "``NULL``, se borra la excepción pendiente (si la hay) para el subproceso. " "Esto no genera excepciones." -#: ../Doc/c-api/init.rst:1360 +#: ../Doc/c-api/init.rst:1606 msgid "" -"The type of the *id* parameter changed from :c:expr:`long` " -"to :c:expr:`unsigned long`." +"The type of the *id* parameter changed from :c:expr:`long` to :c:expr:" +"`unsigned long`." msgstr "" "El tipo del parámetro *id* cambia de :c:expr:`long` a :c:expr:`unsigned " "long`." -#: ../Doc/c-api/init.rst:1366 +#: ../Doc/c-api/init.rst:1612 msgid "" -"Acquire the global interpreter lock and set the current thread state to " -"*tstate*, which must not be ``NULL``. The lock must have been created " -"earlier. If this thread already has the lock, deadlock ensues." +":term:`Attach ` *tstate* to the current thread, which " +"must not be ``NULL`` or already :term:`attached `." msgstr "" -"Adquiere el bloqueo global del intérprete y establece el estado actual del " -"hilo en *tstate*, que no debe ser ``NULL``. El bloqueo debe haber sido " -"creado anteriormente. Si este hilo ya tiene el bloqueo, se produce un " -"deadlock." -#: ../Doc/c-api/init.rst:1377 +#: ../Doc/c-api/init.rst:1615 msgid "" -"Updated to be consistent " -"with :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " -"and :c:func:`PyGILState_Ensure`, and terminate the current thread if called " -"while the interpreter is finalizing." +"The calling thread must not already have an :term:`attached thread state`." msgstr "" -"Actualiza para ser coherente " -"con :c:func:`PyEval_RestoreThread`, :c:func:`Py_END_ALLOW_THREADS`, " -"y :c:func:`PyGILState_Ensure`, y termina el hilo actual si se llama mientras " -"el intérprete está finalizando." -#: ../Doc/c-api/init.rst:1382 +#: ../Doc/c-api/init.rst:1623 +msgid "" +"Updated to be consistent with :c:func:`PyEval_RestoreThread`, :c:func:" +"`Py_END_ALLOW_THREADS`, and :c:func:`PyGILState_Ensure`, and terminate the " +"current thread if called while the interpreter is finalizing." +msgstr "" +"Actualiza para ser coherente con :c:func:`PyEval_RestoreThread`, :c:func:" +"`Py_END_ALLOW_THREADS`, y :c:func:`PyGILState_Ensure`, y termina el hilo " +"actual si se llama mientras el intérprete está finalizando." + +#: ../Doc/c-api/init.rst:1632 msgid "" ":c:func:`PyEval_RestoreThread` is a higher-level function which is always " "available (even when threads have not been initialized)." @@ -2293,13 +2690,12 @@ msgstr "" ":c:func:`PyEval_RestoreThread` es una función de nivel superior que siempre " "está disponible (incluso cuando los subprocesos no se han inicializado)." -#: ../Doc/c-api/init.rst:1388 +#: ../Doc/c-api/init.rst:1638 +#, fuzzy msgid "" -"Reset the current thread state to ``NULL`` and release the global " -"interpreter lock. The lock must have been created earlier and must be held " -"by the current thread. The *tstate* argument, which must not be ``NULL``, " -"is only used to check that it represents the current thread state --- if it " -"isn't, a fatal error is reported." +"Detach the :term:`attached thread state`. The *tstate* argument, which must " +"not be ``NULL``, is only used to check that it represents the :term:" +"`attached thread state` --- if it isn't, a fatal error is reported." msgstr "" "Restablece el estado actual del hilo a ``NULL`` y libera el bloqueo global " "del intérprete. El bloqueo debe haberse creado antes y debe estar retenido " @@ -2307,7 +2703,7 @@ msgstr "" "usa para verificar que representa el estado actual del hilo --- si no lo es, " "se informa un error fatal." -#: ../Doc/c-api/init.rst:1394 +#: ../Doc/c-api/init.rst:1643 msgid "" ":c:func:`PyEval_SaveThread` is a higher-level function which is always " "available (even when threads have not been initialized)." @@ -2315,11 +2711,11 @@ msgstr "" ":c:func:`PyEval_SaveThread` es una función de nivel superior que siempre " "está disponible (incluso cuando los hilos no se han inicializado)." -#: ../Doc/c-api/init.rst:1401 +#: ../Doc/c-api/init.rst:1650 msgid "Sub-interpreter support" msgstr "Soporte de subinterprete" -#: ../Doc/c-api/init.rst:1403 +#: ../Doc/c-api/init.rst:1652 msgid "" "While in most uses, you will only embed a single Python interpreter, there " "are cases where you need to create several independent interpreters in the " @@ -2331,7 +2727,7 @@ msgstr "" "independientes en el mismo proceso y tal vez incluso en el mismo hilo. Los " "subinterpretes le permiten hacer eso." -#: ../Doc/c-api/init.rst:1408 +#: ../Doc/c-api/init.rst:1657 msgid "" "The \"main\" interpreter is the first one created when the runtime " "initializes. It is usually the only Python interpreter in a process. Unlike " @@ -2350,32 +2746,32 @@ msgstr "" "del tiempo de ejecución. La función :c:func:`PyInterpreterState_Main` " "retorna un puntero a su estado." -#: ../Doc/c-api/init.rst:1415 +#: ../Doc/c-api/init.rst:1664 msgid "" -"You can switch between sub-interpreters using " -"the :c:func:`PyThreadState_Swap` function. You can create and destroy them " -"using the following functions:" +"You can switch between sub-interpreters using the :c:func:" +"`PyThreadState_Swap` function. You can create and destroy them using the " +"following functions:" msgstr "" -"Puede cambiar entre subinterpretes utilizando la " -"función :c:func:`PyThreadState_Swap`. Puede crearlos y destruirlos " -"utilizando las siguientes funciones:" +"Puede cambiar entre subinterpretes utilizando la función :c:func:" +"`PyThreadState_Swap`. Puede crearlos y destruirlos utilizando las siguientes " +"funciones:" -#: ../Doc/c-api/init.rst:1421 +#: ../Doc/c-api/init.rst:1670 msgid "" "Structure containing most parameters to configure a sub-interpreter. Its " "values are used only in :c:func:`Py_NewInterpreterFromConfig` and never " "modified by the runtime." msgstr "" "Estructura que contiene la mayoría de los parámetros para configurar un " -"subintérprete. Sus valores se utilizan únicamente " -"en :c:func:`Py_NewInterpreterFromConfig` y nunca son modificados por el " -"entorno de ejecución." +"subintérprete. Sus valores se utilizan únicamente en :c:func:" +"`Py_NewInterpreterFromConfig` y nunca son modificados por el entorno de " +"ejecución." -#: ../Doc/c-api/init.rst:1427 +#: ../Doc/c-api/init.rst:1676 msgid "Structure fields:" msgstr "Campos de estructura:" -#: ../Doc/c-api/init.rst:1431 +#: ../Doc/c-api/init.rst:1680 msgid "" "If this is ``0`` then the sub-interpreter will use its own \"object\" " "allocator state. Otherwise it will use (share) the main interpreter's." @@ -2384,20 +2780,19 @@ msgstr "" "asignador de \"objetos\". De lo contrario, utilizará (compartirá) el del " "intérprete principal." -#: ../Doc/c-api/init.rst:1435 +#: ../Doc/c-api/init.rst:1684 msgid "" -"If this is ``0`` " -"then :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` must be " -"``1`` (non-zero). If this is ``1`` then :c:member:`~PyInterpreterConfig.gil` " -"must not be :c:macro:`PyInterpreterConfig_OWN_GIL`." +"If this is ``0`` then :c:member:`~PyInterpreterConfig." +"check_multi_interp_extensions` must be ``1`` (non-zero). If this is ``1`` " +"then :c:member:`~PyInterpreterConfig.gil` must not be :c:macro:" +"`PyInterpreterConfig_OWN_GIL`." msgstr "" -"Si es ``0``, " -"entonces :c:member:`~PyInterpreterConfig.check_multi_interp_extensions` debe " -"ser ``1`` (distinto de cero). Si es ``1``, " -"entonces :c:member:`~PyInterpreterConfig.gil` no debe " -"ser :c:macro:`PyInterpreterConfig_OWN_GIL`." +"Si es ``0``, entonces :c:member:`~PyInterpreterConfig." +"check_multi_interp_extensions` debe ser ``1`` (distinto de cero). Si es " +"``1``, entonces :c:member:`~PyInterpreterConfig.gil` no debe ser :c:macro:" +"`PyInterpreterConfig_OWN_GIL`." -#: ../Doc/c-api/init.rst:1443 +#: ../Doc/c-api/init.rst:1692 msgid "" "If this is ``0`` then the runtime will not support forking the process in " "any thread where the sub-interpreter is currently active. Otherwise fork is " @@ -2407,14 +2802,14 @@ msgstr "" "en ningún subproceso en el que el subintérprete esté activo en ese momento. " "De lo contrario, la bifurcación no tendrá restricciones." -#: ../Doc/c-api/init.rst:1447 +#: ../Doc/c-api/init.rst:1696 msgid "" "Note that the :mod:`subprocess` module still works when fork is disallowed." msgstr "" "Tenga en cuenta que el módulo :mod:`subprocess` aún funciona cuando no se " "permite la bifurcación." -#: ../Doc/c-api/init.rst:1452 +#: ../Doc/c-api/init.rst:1701 msgid "" "If this is ``0`` then the runtime will not support replacing the current " "process via exec (e.g. :func:`os.execv`) in any thread where the sub-" @@ -2425,14 +2820,14 @@ msgstr "" "subproceso en el que el subintérprete esté activo en ese momento. De lo " "contrario, exec no tendrá restricciones." -#: ../Doc/c-api/init.rst:1457 +#: ../Doc/c-api/init.rst:1706 msgid "" "Note that the :mod:`subprocess` module still works when exec is disallowed." msgstr "" "Tenga en cuenta que el módulo :mod:`subprocess` aún funciona cuando la " "ejecución no está permitida." -#: ../Doc/c-api/init.rst:1462 +#: ../Doc/c-api/init.rst:1711 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " "create threads. Otherwise threads are allowed." @@ -2440,40 +2835,39 @@ msgstr "" "Si se trata de ``0``, el módulo :mod:`threading` del subintérprete no creará " "subprocesos. De lo contrario, se permiten los subprocesos." -#: ../Doc/c-api/init.rst:1468 +#: ../Doc/c-api/init.rst:1717 msgid "" "If this is ``0`` then the sub-interpreter's :mod:`threading` module won't " -"create daemon threads. Otherwise daemon threads are allowed (as long " -"as :c:member:`~PyInterpreterConfig.allow_threads` is non-zero)." +"create daemon threads. Otherwise daemon threads are allowed (as long as :c:" +"member:`~PyInterpreterConfig.allow_threads` is non-zero)." msgstr "" "Si se trata de ``0``, el módulo :mod:`threading` del subintérprete no creará " "subprocesos de demonio. De lo contrario, se permiten subprocesos de demonio " "(siempre que :c:member:`~PyInterpreterConfig.allow_threads` no sea cero)." -#: ../Doc/c-api/init.rst:1475 +#: ../Doc/c-api/init.rst:1724 msgid "" "If this is ``0`` then all extension modules may be imported, including " "legacy (single-phase init) modules, in any thread where the sub-interpreter " -"is currently active. Otherwise only multi-phase init extension modules " -"(see :pep:`489`) may be imported. (Also " -"see :c:macro:`Py_mod_multiple_interpreters`.)" +"is currently active. Otherwise only multi-phase init extension modules (see :" +"pep:`489`) may be imported. (Also see :c:macro:" +"`Py_mod_multiple_interpreters`.)" msgstr "" "Si se trata de ``0``, se podrán importar todos los módulos de extensión, " "incluidos los módulos heredados (inicio monofásico), en cualquier subproceso " "en el que el subintérprete esté activo en ese momento. De lo contrario, solo " -"se podrán importar los módulos de extensión de inicio multifásico " -"(consulte :pep:`489`). (Consulte " -"también :c:macro:`Py_mod_multiple_interpreters`)." +"se podrán importar los módulos de extensión de inicio multifásico (consulte :" +"pep:`489`). (Consulte también :c:macro:`Py_mod_multiple_interpreters`)." -#: ../Doc/c-api/init.rst:1482 +#: ../Doc/c-api/init.rst:1731 msgid "" -"This must be ``1`` (non-zero) " -"if :c:member:`~PyInterpreterConfig.use_main_obmalloc` is ``0``." +"This must be ``1`` (non-zero) if :c:member:`~PyInterpreterConfig." +"use_main_obmalloc` is ``0``." msgstr "" -"Debe ser ``1`` (distinto de cero) " -"si :c:member:`~PyInterpreterConfig.use_main_obmalloc` es ``0``." +"Debe ser ``1`` (distinto de cero) si :c:member:`~PyInterpreterConfig." +"use_main_obmalloc` es ``0``." -#: ../Doc/c-api/init.rst:1487 +#: ../Doc/c-api/init.rst:1736 msgid "" "This determines the operation of the GIL for the sub-interpreter. It may be " "one of the following:" @@ -2481,51 +2875,51 @@ msgstr "" "Esto determina el funcionamiento del GIL para el subintérprete. Puede ser " "uno de los siguientes:" -#: ../Doc/c-api/init.rst:1494 +#: ../Doc/c-api/init.rst:1743 msgid "Use the default selection (:c:macro:`PyInterpreterConfig_SHARED_GIL`)." msgstr "" -"Utilice la selección predeterminada " -"(:c:macro:`PyInterpreterConfig_SHARED_GIL`)." +"Utilice la selección predeterminada (:c:macro:" +"`PyInterpreterConfig_SHARED_GIL`)." -#: ../Doc/c-api/init.rst:1498 +#: ../Doc/c-api/init.rst:1747 msgid "Use (share) the main interpreter's GIL." msgstr "Utilice (comparta) el GIL del intérprete principal." -#: ../Doc/c-api/init.rst:1502 +#: ../Doc/c-api/init.rst:1751 msgid "Use the sub-interpreter's own GIL." msgstr "Utilice el GIL propio del subintérprete." -#: ../Doc/c-api/init.rst:1504 +#: ../Doc/c-api/init.rst:1753 msgid "" -"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` " -"then :c:member:`PyInterpreterConfig.use_main_obmalloc` must be ``0``." +"If this is :c:macro:`PyInterpreterConfig_OWN_GIL` then :c:member:" +"`PyInterpreterConfig.use_main_obmalloc` must be ``0``." msgstr "" -"Si es :c:macro:`PyInterpreterConfig_OWN_GIL`, " -"entonces :c:member:`PyInterpreterConfig.use_main_obmalloc` debe ser ``0``." +"Si es :c:macro:`PyInterpreterConfig_OWN_GIL`, entonces :c:member:" +"`PyInterpreterConfig.use_main_obmalloc` debe ser ``0``." -#: ../Doc/c-api/init.rst:1518 +#: ../Doc/c-api/init.rst:1767 msgid "" "Create a new sub-interpreter. This is an (almost) totally separate " "environment for the execution of Python code. In particular, the new " "interpreter has separate, independent versions of all imported modules, " -"including the fundamental modules :mod:`builtins`, :mod:`__main__` " -"and :mod:`sys`. The table of loaded modules (``sys.modules``) and the " -"module search path (``sys.path``) are also separate. The new environment " -"has no ``sys.argv`` variable. It has new standard I/O stream file objects " -"``sys.stdin``, ``sys.stdout`` and ``sys.stderr`` (however these refer to the " -"same underlying file descriptors)." +"including the fundamental modules :mod:`builtins`, :mod:`__main__` and :mod:" +"`sys`. The table of loaded modules (``sys.modules``) and the module search " +"path (``sys.path``) are also separate. The new environment has no ``sys." +"argv`` variable. It has new standard I/O stream file objects ``sys.stdin``, " +"``sys.stdout`` and ``sys.stderr`` (however these refer to the same " +"underlying file descriptors)." msgstr "" "Crea un nuevo subinterprete. Este es un entorno (casi) totalmente separado " "para la ejecución de código Python. En particular, el nuevo intérprete tiene " "versiones separadas e independientes de todos los módulos importados, " -"incluidos los módulos fundamentales :mod:`builtins`, :mod:`__main__` " -"y :mod:`sys`. La tabla de módulos cargados (``sys.modules``) y la ruta de " -"búsqueda del módulo (``sys.path``) también están separados. El nuevo entorno " -"no tiene variable ``sys.argv``. Tiene nuevos objetos de archivo de flujo de " -"E/S estándar ``sys.stdin``, ``sys.stdout`` y ``sys.stderr`` (sin embargo, " -"estos se refieren a los mismos descriptores de archivo subyacentes)." +"incluidos los módulos fundamentales :mod:`builtins`, :mod:`__main__` y :mod:" +"`sys`. La tabla de módulos cargados (``sys.modules``) y la ruta de búsqueda " +"del módulo (``sys.path``) también están separados. El nuevo entorno no tiene " +"variable ``sys.argv``. Tiene nuevos objetos de archivo de flujo de E/S " +"estándar ``sys.stdin``, ``sys.stdout`` y ``sys.stderr`` (sin embargo, estos " +"se refieren a los mismos descriptores de archivo subyacentes)." -#: ../Doc/c-api/init.rst:1528 +#: ../Doc/c-api/init.rst:1777 msgid "" "The given *config* controls the options with which the interpreter is " "initialized." @@ -2533,15 +2927,16 @@ msgstr "" "El *config* dado controla las opciones con las que se inicializa el " "intérprete." -#: ../Doc/c-api/init.rst:1531 +#: ../Doc/c-api/init.rst:1780 +#, fuzzy msgid "" -"Upon success, *tstate_p* will be set to the first thread state created in " -"the new sub-interpreter. This thread state is made in the current thread " -"state. Note that no actual thread is created; see the discussion of thread " -"states below. If creation of the new interpreter is unsuccessful, " -"*tstate_p* is set to ``NULL``; no exception is set since the exception state " -"is stored in the current thread state and there may not be a current thread " -"state." +"Upon success, *tstate_p* will be set to the first :term:`thread state` " +"created in the new sub-interpreter. This thread state is :term:`attached " +"`. Note that no actual thread is created; see the " +"discussion of thread states below. If creation of the new interpreter is " +"unsuccessful, *tstate_p* is set to ``NULL``; no exception is set since the " +"exception state is stored in the :term:`attached thread state`, which might " +"not exist." msgstr "" "Si la creación del nuevo intérprete es exitosa, *tstate_p* se establecerá en " "el primer estado de subproceso creado en el nuevo subintérprete. Este estado " @@ -2552,16 +2947,18 @@ msgstr "" "excepción ya que el estado de excepción se almacena en el estado de " "subproceso actual y es posible que no haya un estado de subproceso actual." -#: ../Doc/c-api/init.rst:1540 -msgid "" -"Like all other Python/C API functions, the global interpreter lock must be " -"held before calling this function and is still held when it returns. " -"Likewise a current thread state must be set on entry. On success, the " -"returned thread state will be set as current. If the sub-interpreter is " -"created with its own GIL then the GIL of the calling interpreter will be " -"released. When the function returns, the new interpreter's GIL will be held " -"by the current thread and the previously interpreter's GIL will remain " -"released here." +#: ../Doc/c-api/init.rst:1789 +#, fuzzy +msgid "" +"Like all other Python/C API functions, an :term:`attached thread state` must " +"be present before calling this function, but it might be detached upon " +"returning. On success, the returned thread state will be :term:`attached " +"`. If the sub-interpreter is created with its own :" +"term:`GIL` then the :term:`attached thread state` of the calling interpreter " +"will be detached. When the function returns, the new interpreter's :term:" +"`thread state` will be :term:`attached ` to the " +"current thread and the previous interpreter's :term:`attached thread state` " +"will remain detached." msgstr "" "Al igual que todas las demás funciones de la API de Python/C, el bloqueo del " "intérprete global debe mantenerse antes de llamar a esta función y aún se " @@ -2572,7 +2969,7 @@ msgstr "" "la función regresa, el GIL del nuevo intérprete será retenido por el " "subproceso actual y el GIL del intérprete anterior permanecerá liberado aquí." -#: ../Doc/c-api/init.rst:1551 +#: ../Doc/c-api/init.rst:1800 msgid "" "Sub-interpreters are most effective when isolated from each other, with " "certain functionality restricted::" @@ -2580,7 +2977,8 @@ msgstr "" "Los subintérpretes son más eficaces cuando están aislados unos de otros y " "con ciertas funciones restringidas:" -#: ../Doc/c-api/init.rst:1554 +#: ../Doc/c-api/init.rst:1803 +#, fuzzy, python-brace-format msgid "" "PyInterpreterConfig config = {\n" " .use_main_obmalloc = 0,\n" @@ -2591,7 +2989,11 @@ msgid "" " .check_multi_interp_extensions = 1,\n" " .gil = PyInterpreterConfig_OWN_GIL,\n" "};\n" -"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);" +"PyThreadState *tstate = NULL;\n" +"PyStatus status = Py_NewInterpreterFromConfig(&tstate, &config);\n" +"if (PyStatus_Exception(status)) {\n" +" Py_ExitStatusException(status);\n" +"}" msgstr "" "PyInterpreterConfig config = {\n" " .use_main_obmalloc = 0,\n" @@ -2604,67 +3006,66 @@ msgstr "" "};\n" "PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);" -#: ../Doc/c-api/init.rst:1565 +#: ../Doc/c-api/init.rst:1818 msgid "" "Note that the config is used only briefly and does not get modified. During " -"initialization the config's values are converted into " -"various :c:type:`PyInterpreterState` values. A read-only copy of the config " -"may be stored internally on the :c:type:`PyInterpreterState`." +"initialization the config's values are converted into various :c:type:" +"`PyInterpreterState` values. A read-only copy of the config may be stored " +"internally on the :c:type:`PyInterpreterState`." msgstr "" "Tenga en cuenta que la configuración se utiliza solo brevemente y no se " "modifica. Durante la inicialización, los valores de la configuración se " "convierten en varios valores :c:type:`PyInterpreterState`. Es posible que se " -"almacene una copia de solo lectura de la configuración internamente en " -"el :c:type:`PyInterpreterState`." +"almacene una copia de solo lectura de la configuración internamente en el :c:" +"type:`PyInterpreterState`." -#: ../Doc/c-api/init.rst:1574 +#: ../Doc/c-api/init.rst:1827 msgid "Extension modules are shared between (sub-)interpreters as follows:" msgstr "" "Los módulos de extensión se comparten entre (sub) intérpretes de la " "siguiente manera:" -#: ../Doc/c-api/init.rst:1576 -msgid "" -"For modules using multi-phase initialization, " -"e.g. :c:func:`PyModule_FromDefAndSpec`, a separate module object is created " -"and initialized for each interpreter. Only C-level static and global " -"variables are shared between these module objects." -msgstr "" -"Para módulos que usan inicialización multifase, por " -"ejemplo :c:func:`PyModule_FromDefAndSpec`, se crea e inicializa un objeto de " -"módulo separado para cada intérprete. Solo las variables estáticas y " -"globales de nivel C se comparten entre estos objetos de módulo." - -#: ../Doc/c-api/init.rst:1582 -msgid "" -"For modules using single-phase initialization, " -"e.g. :c:func:`PyModule_Create`, the first time a particular extension is " -"imported, it is initialized normally, and a (shallow) copy of its module's " -"dictionary is squirreled away. When the same extension is imported by " -"another (sub-)interpreter, a new module is initialized and filled with the " -"contents of this copy; the extension's ``init`` function is not called. " -"Objects in the module's dictionary thus end up shared across " -"(sub-)interpreters, which might cause unwanted behavior (see `Bugs and " -"caveats`_ below)." -msgstr "" -"Para módulos que utilizan inicialización monofásica, por " -"ejemplo :c:func:`PyModule_Create`, la primera vez que se importa una " -"extensión en particular, se inicializa normalmente y una copia (superficial) " -"del diccionario de su módulo se guarda. Cuando otro (sub) intérprete importa " -"la misma extensión, se inicializa un nuevo módulo y se llena con el " -"contenido de esta copia; no se llama a la función ``init`` de la extensión. " -"Los objetos en el diccionario del módulo terminan compartidos entre (sub) " +#: ../Doc/c-api/init.rst:1829 +msgid "" +"For modules using multi-phase initialization, e.g. :c:func:" +"`PyModule_FromDefAndSpec`, a separate module object is created and " +"initialized for each interpreter. Only C-level static and global variables " +"are shared between these module objects." +msgstr "" +"Para módulos que usan inicialización multifase, por ejemplo :c:func:" +"`PyModule_FromDefAndSpec`, se crea e inicializa un objeto de módulo separado " +"para cada intérprete. Solo las variables estáticas y globales de nivel C se " +"comparten entre estos objetos de módulo." + +#: ../Doc/c-api/init.rst:1835 +msgid "" +"For modules using single-phase initialization, e.g. :c:func:" +"`PyModule_Create`, the first time a particular extension is imported, it is " +"initialized normally, and a (shallow) copy of its module's dictionary is " +"squirreled away. When the same extension is imported by another " +"(sub-)interpreter, a new module is initialized and filled with the contents " +"of this copy; the extension's ``init`` function is not called. Objects in " +"the module's dictionary thus end up shared across (sub-)interpreters, which " +"might cause unwanted behavior (see `Bugs and caveats`_ below)." +msgstr "" +"Para módulos que utilizan inicialización monofásica, por ejemplo :c:func:" +"`PyModule_Create`, la primera vez que se importa una extensión en " +"particular, se inicializa normalmente y una copia (superficial) del " +"diccionario de su módulo se guarda. Cuando otro (sub) intérprete importa la " +"misma extensión, se inicializa un nuevo módulo y se llena con el contenido " +"de esta copia; no se llama a la función ``init`` de la extensión. Los " +"objetos en el diccionario del módulo terminan compartidos entre (sub) " "intérpretes, lo que puede causar un comportamiento no deseado (ver Errores y " "advertencias (`Bugs and caveats`_) a continuación)." -#: ../Doc/c-api/init.rst:1593 +#: ../Doc/c-api/init.rst:1846 msgid "" "Note that this is different from what happens when an extension is imported " -"after the interpreter has been completely re-initialized by " -"calling :c:func:`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, " -"the extension's ``initmodule`` function *is* called again. As with multi-" -"phase initialization, this means that only C-level static and global " -"variables are shared between these modules." +"after the interpreter has been completely re-initialized by calling :c:func:" +"`Py_FinalizeEx` and :c:func:`Py_Initialize`; in that case, the extension's " +"``initmodule`` function *is* called again. As with multi-phase " +"initialization, this means that only C-level static and global variables are " +"shared between these modules." msgstr "" "Tenga en cuenta que esto es diferente de lo que sucede cuando se importa una " "extensión después de que el intérprete se haya reiniciado por completo " @@ -2673,28 +3074,27 @@ msgstr "" "que con la inicialización de múltiples fases, esto significa que solo se " "comparten variables estáticas y globales de nivel C entre estos módulos." -#: ../Doc/c-api/init.rst:1613 +#: ../Doc/c-api/init.rst:1866 msgid "" -"Create a new sub-interpreter. This is essentially just a wrapper " -"around :c:func:`Py_NewInterpreterFromConfig` with a config that preserves " -"the existing behavior. The result is an unisolated sub-interpreter that " -"shares the main interpreter's GIL, allows fork/exec, allows daemon threads, " -"and allows single-phase init modules." +"Create a new sub-interpreter. This is essentially just a wrapper around :c:" +"func:`Py_NewInterpreterFromConfig` with a config that preserves the existing " +"behavior. The result is an unisolated sub-interpreter that shares the main " +"interpreter's GIL, allows fork/exec, allows daemon threads, and allows " +"single-phase init modules." msgstr "" -"Cree un nuevo subintérprete. Básicamente, se trata de un envoltorio " -"de :c:func:`Py_NewInterpreterFromConfig` con una configuración que conserva " -"el comportamiento existente. El resultado es un subintérprete no aislado que " +"Cree un nuevo subintérprete. Básicamente, se trata de un envoltorio de :c:" +"func:`Py_NewInterpreterFromConfig` con una configuración que conserva el " +"comportamiento existente. El resultado es un subintérprete no aislado que " "comparte el GIL del intérprete principal, permite fork/exec, permite " "subprocesos de demonio y permite módulos de inicialización monofásicos." -#: ../Doc/c-api/init.rst:1625 +#: ../Doc/c-api/init.rst:1878 +#, fuzzy msgid "" -"Destroy the (sub-)interpreter represented by the given thread state. The " -"given thread state must be the current thread state. See the discussion of " -"thread states below. When the call returns, the current thread state is " -"``NULL``. All thread states associated with this interpreter are " -"destroyed. The global interpreter lock used by the target interpreter must " -"be held before calling this function. No GIL is held when it returns." +"Destroy the (sub-)interpreter represented by the given :term:`thread state`. " +"The given thread state must be :term:`attached `. " +"When the call returns, there will be no :term:`attached thread state`. All " +"thread states associated with this interpreter are destroyed." msgstr "" "Destruye el (sub)intérprete representado por el estado del subproceso " "indicado. El estado del subproceso indicado debe ser el estado actual del " @@ -2705,7 +3105,7 @@ msgstr "" "destino debe mantenerse antes de llamar a esta función. No se mantiene " "ningún GIL cuando retorna." -#: ../Doc/c-api/init.rst:1633 +#: ../Doc/c-api/init.rst:1883 msgid "" ":c:func:`Py_FinalizeEx` will destroy all sub-interpreters that haven't been " "explicitly destroyed at that point." @@ -2713,11 +3113,12 @@ msgstr "" ":c:func:`Py_FinalizeEx` destruirá todos los subintérpretes que no hayan sido " "destruidos explícitamente en ese momento." -#: ../Doc/c-api/init.rst:1638 +#: ../Doc/c-api/init.rst:1890 msgid "A Per-Interpreter GIL" msgstr "Un GIL por intérprete" -#: ../Doc/c-api/init.rst:1640 +#: ../Doc/c-api/init.rst:1892 +#, fuzzy msgid "" "Using :c:func:`Py_NewInterpreterFromConfig` you can create a sub-interpreter " "that is completely isolated from other interpreters, including having its " @@ -2726,7 +3127,7 @@ msgid "" "interpreters or blocking any others. Thus a single Python process can truly " "take advantage of multiple CPU cores when running Python code. The " "isolation also encourages a different approach to concurrency than that of " -"just using threads. (See :pep:`554`.)" +"just using threads. (See :pep:`554` and :pep:`684`.)" msgstr "" "Con :c:func:`Py_NewInterpreterFromConfig` se puede crear un subintérprete " "que esté completamente aislado de otros intérpretes, incluso con su propio " @@ -2737,7 +3138,7 @@ msgstr "" "El aislamiento también fomenta un enfoque diferente de la concurrencia que " "el de simplemente usar subprocesos. (Consulte :pep:`554`)." -#: ../Doc/c-api/init.rst:1650 +#: ../Doc/c-api/init.rst:1902 msgid "" "Using an isolated interpreter requires vigilance in preserving that " "isolation. That especially means not sharing any objects or mutable state " @@ -2763,7 +3164,7 @@ msgstr "" "integrados, los números enteros pequeños y una serie de otros objetos " "integrados." -#: ../Doc/c-api/init.rst:1661 +#: ../Doc/c-api/init.rst:1913 msgid "" "If you preserve isolation then you will have access to proper multi-core " "computing without the complications that come with free-threading. Failure " @@ -2776,7 +3177,7 @@ msgstr "" "de subprocesos libres, incluidas las carreras y los fallos difíciles de " "depurar." -#: ../Doc/c-api/init.rst:1666 +#: ../Doc/c-api/init.rst:1918 msgid "" "Aside from that, one of the main challenges of using multiple isolated " "interpreters is how to communicate between them safely (not break isolation) " @@ -2793,11 +3194,11 @@ msgstr "" "aislamiento y expondría herramientas efectivas para comunicar (y compartir) " "datos entre intérpretes." -#: ../Doc/c-api/init.rst:1677 +#: ../Doc/c-api/init.rst:1929 msgid "Bugs and caveats" msgstr "Errores y advertencias" -#: ../Doc/c-api/init.rst:1679 +#: ../Doc/c-api/init.rst:1931 msgid "" "Because sub-interpreters (and the main interpreter) are part of the same " "process, the insulation between them isn't perfect --- for example, using " @@ -2820,7 +3221,7 @@ msgstr "" "subinterprete en un espacio de nombres de otro (sub) intérprete; Esto debe " "evitarse si es posible." -#: ../Doc/c-api/init.rst:1689 +#: ../Doc/c-api/init.rst:1941 msgid "" "Special care should be taken to avoid sharing user-defined functions, " "methods, instances or classes between sub-interpreters, since import " @@ -2835,16 +3236,16 @@ msgstr "" "Es igualmente importante evitar compartir objetos desde los que se pueda " "acceder a lo anterior." -#: ../Doc/c-api/init.rst:1695 +#: ../Doc/c-api/init.rst:1947 msgid "" "Also note that combining this functionality with ``PyGILState_*`` APIs is " "delicate, because these APIs assume a bijection between Python thread states " "and OS-level threads, an assumption broken by the presence of sub-" "interpreters. It is highly recommended that you don't switch sub-" -"interpreters between a pair of matching :c:func:`PyGILState_Ensure` " -"and :c:func:`PyGILState_Release` calls. Furthermore, extensions (such " -"as :mod:`ctypes`) using these APIs to allow calling of Python code from non-" -"Python created threads will probably be broken when using sub-interpreters." +"interpreters between a pair of matching :c:func:`PyGILState_Ensure` and :c:" +"func:`PyGILState_Release` calls. Furthermore, extensions (such as :mod:" +"`ctypes`) using these APIs to allow calling of Python code from non-Python " +"created threads will probably be broken when using sub-interpreters." msgstr "" "También tenga en cuenta que la combinación de esta funcionalidad con " "``PyGILState_*`` APIs es delicada, porque estas APIs suponen una biyección " @@ -2856,11 +3257,11 @@ msgstr "" "permitir la llamada de código Python desde hilos no creados por Python " "probablemente se rompan cuando se usan subinterpretes." -#: ../Doc/c-api/init.rst:1706 +#: ../Doc/c-api/init.rst:1958 msgid "Asynchronous Notifications" msgstr "Notificaciones asincrónicas" -#: ../Doc/c-api/init.rst:1708 +#: ../Doc/c-api/init.rst:1960 msgid "" "A mechanism is provided to make asynchronous notifications to the main " "interpreter thread. These notifications take the form of a function pointer " @@ -2870,7 +3271,7 @@ msgstr "" "principal del intérprete. Estas notificaciones toman la forma de un puntero " "de función y un argumento de puntero nulo." -#: ../Doc/c-api/init.rst:1715 +#: ../Doc/c-api/init.rst:1967 msgid "" "Schedule a function to be called from the main interpreter thread. On " "success, ``0`` is returned and *func* is queued for being called in the main " @@ -2881,7 +3282,7 @@ msgstr "" "ser llamado en el hilo principal. En caso de fallo, se retorna ``-1`` sin " "establecer ninguna excepción." -#: ../Doc/c-api/init.rst:1719 +#: ../Doc/c-api/init.rst:1971 msgid "" "When successfully queued, *func* will be *eventually* called from the main " "interpreter thread with the argument *arg*. It will be called " @@ -2893,56 +3294,52 @@ msgstr "" "asincrónica con respecto al código Python que se ejecuta normalmente, pero " "con ambas condiciones cumplidas:" -#: ../Doc/c-api/init.rst:1724 +#: ../Doc/c-api/init.rst:1976 msgid "on a :term:`bytecode` boundary;" msgstr "en un límite :term:`bytecode`;" -#: ../Doc/c-api/init.rst:1725 +#: ../Doc/c-api/init.rst:1977 +#, fuzzy msgid "" -"with the main thread holding the :term:`global interpreter lock` (*func* can " +"with the main thread holding an :term:`attached thread state` (*func* can " "therefore use the full C API)." msgstr "" "con el hilo principal que contiene el :term:`global interpreter lock` " "(*func*, por lo tanto, puede usar la API C completa)." -#: ../Doc/c-api/init.rst:1728 +#: ../Doc/c-api/init.rst:1980 +#, fuzzy msgid "" "*func* must return ``0`` on success, or ``-1`` on failure with an exception " "set. *func* won't be interrupted to perform another asynchronous " "notification recursively, but it can still be interrupted to switch threads " -"if the global interpreter lock is released." +"if the :term:`thread state ` is detached." msgstr "" "*func* debe retornar ``0`` en caso de éxito o ``-1`` en caso de error con " "una excepción establecida. *func* no se interrumpirá para realizar otra " "notificación asíncrona de forma recursiva, pero aún se puede interrumpir " "para cambiar hilos si se libera el bloqueo global del intérprete." -#: ../Doc/c-api/init.rst:1733 -msgid "" -"This function doesn't need a current thread state to run, and it doesn't " -"need the global interpreter lock." -msgstr "" -"Esta función no necesita un estado de hilo actual para ejecutarse y no " -"necesita el bloqueo global del intérprete." - -#: ../Doc/c-api/init.rst:1736 +#: ../Doc/c-api/init.rst:1985 +#, fuzzy msgid "" -"To call this function in a subinterpreter, the caller must hold the GIL. " -"Otherwise, the function *func* can be scheduled to be called from the wrong " -"interpreter." +"This function doesn't need an :term:`attached thread state`. However, to " +"call this function in a subinterpreter, the caller must have an :term:" +"`attached thread state`. Otherwise, the function *func* can be scheduled to " +"be called from the wrong interpreter." msgstr "" "Para llamar a esta función en un subinterprete, quien llama debe mantener el " "GIL. De lo contrario, la función *func* se puede programar para que se llame " "desde el intérprete incorrecto." -#: ../Doc/c-api/init.rst:1741 +#: ../Doc/c-api/init.rst:1990 msgid "" "This is a low-level function, only useful for very special cases. There is " "no guarantee that *func* will be called as quick as possible. If the main " "thread is busy executing a system call, *func* won't be called before the " "system call returns. This function is generally **not** suitable for " -"calling Python code from arbitrary C threads. Instead, use " -"the :ref:`PyGILState API`." +"calling Python code from arbitrary C threads. Instead, use the :ref:" +"`PyGILState API`." msgstr "" "Esta es una función de bajo nivel, solo útil para casos muy especiales. No " "hay garantía de que *func* se llame lo más rápido posible. Si el hilo " @@ -2951,7 +3348,7 @@ msgstr "" "**no** es adecuada para llamar a código Python desde hilos C arbitrarios. En " "su lugar, use :ref:`PyGILState API `." -#: ../Doc/c-api/init.rst:1750 +#: ../Doc/c-api/init.rst:1999 msgid "" "If this function is called in a subinterpreter, the function *func* is now " "scheduled to be called from the subinterpreter, rather than being called " @@ -2963,11 +3360,16 @@ msgstr "" "desde el intérprete principal. Cada subinterprete ahora tiene su propia " "lista de llamadas programadas." -#: ../Doc/c-api/init.rst:1759 +#: ../Doc/c-api/init.rst:2005 +msgid "" +"This function now always schedules *func* to be run in the main interpreter." +msgstr "" + +#: ../Doc/c-api/init.rst:2012 msgid "Profiling and Tracing" msgstr "Perfilado y Rastreo" -#: ../Doc/c-api/init.rst:1764 +#: ../Doc/c-api/init.rst:2017 msgid "" "The Python interpreter provides some low-level support for attaching " "profiling and execution tracing facilities. These are used for profiling, " @@ -2977,7 +3379,7 @@ msgstr "" "funciones de creación de perfiles y seguimiento de ejecución. Estos se " "utilizan para herramientas de análisis de perfiles, depuración y cobertura." -#: ../Doc/c-api/init.rst:1768 +#: ../Doc/c-api/init.rst:2021 msgid "" "This C interface allows the profiling or tracing code to avoid the overhead " "of calling through Python-level callable objects, making a direct C function " @@ -2994,83 +3396,87 @@ msgstr "" "función de rastreo son los mismos que se informaron a las funciones de " "rastreo a nivel de Python en versiones anteriores." -#: ../Doc/c-api/init.rst:1778 +#: ../Doc/c-api/init.rst:2031 msgid "" "The type of the trace function registered using :c:func:`PyEval_SetProfile` " "and :c:func:`PyEval_SetTrace`. The first parameter is the object passed to " "the registration function as *obj*, *frame* is the frame object to which the " -"event pertains, *what* is one of the " -"constants :c:data:`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN`, " -"or :c:data:`PyTrace_OPCODE`, and *arg* depends on the value of *what*:" -msgstr "" -"El tipo de la función de seguimiento registrada " -"mediante :c:func:`PyEval_SetProfile` y :c:func:`PyEval_SetTrace`. El primer " -"parámetro es el objeto pasado a la función de registro como *obj*, *frame* " -"es el objeto de marco al que pertenece el evento, *what* es una de las " -"constantes :c:data:`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:`PyTrace_C_RETURN` " -"o :c:data:`PyTrace_OPCODE`, y *arg* depende del valor de *what*:" - -#: ../Doc/c-api/init.rst:1787 +"event pertains, *what* is one of the constants :c:data:`PyTrace_CALL`, :c:" +"data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:`PyTrace_RETURN`, :" +"c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :c:data:" +"`PyTrace_C_RETURN`, or :c:data:`PyTrace_OPCODE`, and *arg* depends on the " +"value of *what*:" +msgstr "" +"El tipo de la función de seguimiento registrada mediante :c:func:" +"`PyEval_SetProfile` y :c:func:`PyEval_SetTrace`. El primer parámetro es el " +"objeto pasado a la función de registro como *obj*, *frame* es el objeto de " +"marco al que pertenece el evento, *what* es una de las constantes :c:data:" +"`PyTrace_CALL`, :c:data:`PyTrace_EXCEPTION`, :c:data:`PyTrace_LINE`, :c:data:" +"`PyTrace_RETURN`, :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION`, :" +"c:data:`PyTrace_C_RETURN` o :c:data:`PyTrace_OPCODE`, y *arg* depende del " +"valor de *what*:" + +#: ../Doc/c-api/init.rst:2040 msgid "Value of *what*" msgstr "Valor de *what*" -#: ../Doc/c-api/init.rst:1787 +#: ../Doc/c-api/init.rst:2040 msgid "Meaning of *arg*" msgstr "Significado de *arg*" -#: ../Doc/c-api/init.rst:1789 +#: ../Doc/c-api/init.rst:2042 msgid ":c:data:`PyTrace_CALL`" msgstr ":c:data:`PyTrace_CALL`" -#: ../Doc/c-api/init.rst:1789 ../Doc/c-api/init.rst:1794 -#: ../Doc/c-api/init.rst:1805 +#: ../Doc/c-api/init.rst:2042 ../Doc/c-api/init.rst:2047 +#: ../Doc/c-api/init.rst:2058 msgid "Always :c:data:`Py_None`." msgstr "Siempre :c:data:`Py_None`." -#: ../Doc/c-api/init.rst:1791 +#: ../Doc/c-api/init.rst:2044 msgid ":c:data:`PyTrace_EXCEPTION`" msgstr ":c:data:`PyTrace_EXCEPTION`" -#: ../Doc/c-api/init.rst:1791 +#: ../Doc/c-api/init.rst:2044 msgid "Exception information as returned by :func:`sys.exc_info`." msgstr "Información de excepción retornada por :func:`sys.exc_info`." -#: ../Doc/c-api/init.rst:1794 +#: ../Doc/c-api/init.rst:2047 msgid ":c:data:`PyTrace_LINE`" msgstr ":c:data:`PyTrace_LINE`" -#: ../Doc/c-api/init.rst:1796 +#: ../Doc/c-api/init.rst:2049 msgid ":c:data:`PyTrace_RETURN`" msgstr ":c:data:`PyTrace_RETURN`" -#: ../Doc/c-api/init.rst:1796 +#: ../Doc/c-api/init.rst:2049 msgid "" "Value being returned to the caller, or ``NULL`` if caused by an exception." msgstr "" "Valor retornado al que llama, o ``NULL`` si es causado por una excepción." -#: ../Doc/c-api/init.rst:1799 +#: ../Doc/c-api/init.rst:2052 msgid ":c:data:`PyTrace_C_CALL`" msgstr ":c:data:`PyTrace_C_CALL`" -#: ../Doc/c-api/init.rst:1799 ../Doc/c-api/init.rst:1801 -#: ../Doc/c-api/init.rst:1803 +#: ../Doc/c-api/init.rst:2052 ../Doc/c-api/init.rst:2054 +#: ../Doc/c-api/init.rst:2056 msgid "Function object being called." msgstr "Objeto función que se llaman." -#: ../Doc/c-api/init.rst:1801 +#: ../Doc/c-api/init.rst:2054 msgid ":c:data:`PyTrace_C_EXCEPTION`" msgstr ":c:data:`PyTrace_C_EXCEPTION`" -#: ../Doc/c-api/init.rst:1803 +#: ../Doc/c-api/init.rst:2056 msgid ":c:data:`PyTrace_C_RETURN`" msgstr ":c:data:`PyTrace_C_RETURN`" -#: ../Doc/c-api/init.rst:1805 +#: ../Doc/c-api/init.rst:2058 msgid ":c:data:`PyTrace_OPCODE`" msgstr ":c:data:`PyTrace_OPCODE`" -#: ../Doc/c-api/init.rst:1810 +#: ../Doc/c-api/init.rst:2063 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "a new call to a function or method is being reported, or a new entry into a " @@ -3084,7 +3490,7 @@ msgstr "" "de generador no se informa ya que no hay transferencia de control al código " "de bytes de Python en la marco correspondiente." -#: ../Doc/c-api/init.rst:1819 +#: ../Doc/c-api/init.rst:2072 msgid "" "The value of the *what* parameter to a :c:type:`Py_tracefunc` function when " "an exception has been raised. The callback function is called with this " @@ -3105,20 +3511,19 @@ msgstr "" "las funciones de rastreo reciben estos eventos; el perfilador (*profiler*) " "no los necesita." -#: ../Doc/c-api/init.rst:1830 +#: ../Doc/c-api/init.rst:2083 msgid "" "The value passed as the *what* parameter to a :c:type:`Py_tracefunc` " "function (but not a profiling function) when a line-number event is being " -"reported. It may be disabled for a frame by " -"setting :attr:`~frame.f_trace_lines` to *0* on that frame." +"reported. It may be disabled for a frame by setting :attr:`~frame." +"f_trace_lines` to *0* on that frame." msgstr "" -"El valor que se pasa como parámetro *what* a una " -"función :c:type:`Py_tracefunc` (pero no a una función de creación de " -"perfiles) cuando se informa un evento de número de línea. Se puede " -"desactivar para un marco configurando :attr:`~frame.f_trace_lines` en *0* en " -"ese marco." +"El valor que se pasa como parámetro *what* a una función :c:type:" +"`Py_tracefunc` (pero no a una función de creación de perfiles) cuando se " +"informa un evento de número de línea. Se puede desactivar para un marco " +"configurando :attr:`~frame.f_trace_lines` en *0* en ese marco." -#: ../Doc/c-api/init.rst:1838 +#: ../Doc/c-api/init.rst:2091 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a call is about to return." @@ -3126,7 +3531,7 @@ msgstr "" "El valor para el parámetro *what* para :c:type:`Py_tracefunc` funciona " "cuando una llamada está por regresar." -#: ../Doc/c-api/init.rst:1844 +#: ../Doc/c-api/init.rst:2097 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function is about to be called." @@ -3134,7 +3539,7 @@ msgstr "" "El valor del parámetro *what* para :c:type:`Py_tracefunc` funciona cuando " "una función C está a punto de ser invocada." -#: ../Doc/c-api/init.rst:1850 +#: ../Doc/c-api/init.rst:2103 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has raised an exception." @@ -3142,7 +3547,7 @@ msgstr "" "El valor del parámetro *what* para funciones :c:type:`Py_tracefunc` cuando " "una función C ha lanzado una excepción." -#: ../Doc/c-api/init.rst:1856 +#: ../Doc/c-api/init.rst:2109 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions when " "a C function has returned." @@ -3150,48 +3555,41 @@ msgstr "" "El valor del parámetro *what* para :c:type:`Py_tracefunc` funciona cuando " "una función C ha retornado." -#: ../Doc/c-api/init.rst:1862 +#: ../Doc/c-api/init.rst:2115 msgid "" "The value for the *what* parameter to :c:type:`Py_tracefunc` functions (but " "not profiling functions) when a new opcode is about to be executed. This " -"event is not emitted by default: it must be explicitly requested by " -"setting :attr:`~frame.f_trace_opcodes` to *1* on the frame." +"event is not emitted by default: it must be explicitly requested by setting :" +"attr:`~frame.f_trace_opcodes` to *1* on the frame." msgstr "" "El valor del parámetro *what* para las funciones :c:type:`Py_tracefunc` " "(pero no para las funciones de creación de perfiles) cuando está a punto de " "ejecutarse un nuevo código de operación. Este evento no se emite de forma " -"predeterminada: debe solicitarse explícitamente " -"configurando :attr:`~frame.f_trace_opcodes` en *1* en el marco." +"predeterminada: debe solicitarse explícitamente configurando :attr:`~frame." +"f_trace_opcodes` en *1* en el marco." -#: ../Doc/c-api/init.rst:1870 +#: ../Doc/c-api/init.rst:2123 msgid "" "Set the profiler function to *func*. The *obj* parameter is passed to the " "function as its first parameter, and may be any Python object, or ``NULL``. " "If the profile function needs to maintain state, using a different value for " "*obj* for each thread provides a convenient and thread-safe place to store " -"it. The profile function is called for all monitored events " -"except :c:data:`PyTrace_LINE` :c:data:`PyTrace_OPCODE` " -"and :c:data:`PyTrace_EXCEPTION`." +"it. The profile function is called for all monitored events except :c:data:" +"`PyTrace_LINE` :c:data:`PyTrace_OPCODE` and :c:data:`PyTrace_EXCEPTION`." msgstr "" "Establezca la función de perfilador en *func*. El parámetro *obj* se pasa a " "la función como su primer parámetro y puede ser cualquier objeto Python o " "``NULL``. Si la función de perfilador necesita mantener el estado, el uso de " "un valor diferente para *obj* para cada subproceso proporciona un lugar " "conveniente y seguro para subprocesos donde almacenarlo. La función de " -"perfilador se llama para todos los eventos monitoreados " -"excepto :c:data:`PyTrace_LINE`, :c:data:`PyTrace_OPCODE` " -"y :c:data:`PyTrace_EXCEPTION`." +"perfilador se llama para todos los eventos monitoreados excepto :c:data:" +"`PyTrace_LINE`, :c:data:`PyTrace_OPCODE` y :c:data:`PyTrace_EXCEPTION`." -#: ../Doc/c-api/init.rst:1877 +#: ../Doc/c-api/init.rst:2130 msgid "See also the :func:`sys.setprofile` function." msgstr "Consulte también la función :func:`sys.setprofile`." -#: ../Doc/c-api/init.rst:1879 ../Doc/c-api/init.rst:1886 -#: ../Doc/c-api/init.rst:1905 ../Doc/c-api/init.rst:1912 -msgid "The caller must hold the :term:`GIL`." -msgstr "La persona que llama debe mantener el :term:`GIL`." - -#: ../Doc/c-api/init.rst:1883 +#: ../Doc/c-api/init.rst:2136 msgid "" "Like :c:func:`PyEval_SetProfile` but sets the profile function in all " "running threads belonging to the current interpreter instead of the setting " @@ -3201,7 +3599,7 @@ msgstr "" "todos los subprocesos en ejecución que pertenecen al intérprete actual en " "lugar de configurarla solo en el subproceso actual." -#: ../Doc/c-api/init.rst:1888 +#: ../Doc/c-api/init.rst:2141 msgid "" "As :c:func:`PyEval_SetProfile`, this function ignores any exceptions raised " "while setting the profile functions in all threads." @@ -3210,30 +3608,29 @@ msgstr "" "excepción generada al configurar las funciones de perfil en todos los " "subprocesos." -#: ../Doc/c-api/init.rst:1896 -msgid "" -"Set the tracing function to *func*. This is similar " -"to :c:func:`PyEval_SetProfile`, except the tracing function does receive " -"line-number events and per-opcode events, but does not receive any event " -"related to C function objects being called. Any trace function registered " -"using :c:func:`PyEval_SetTrace` will not " -"receive :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` " -"or :c:data:`PyTrace_C_RETURN` as a value for the *what* parameter." -msgstr "" -"Establezca la función de seguimiento en *func*. Es similar " -"a :c:func:`PyEval_SetProfile`, excepto que la función de seguimiento recibe " -"eventos de número de línea y eventos por código de operación, pero no recibe " -"ningún evento relacionado con los objetos de función C que se están " -"llamando. Cualquier función de seguimiento registrada " -"con :c:func:`PyEval_SetTrace` no " -"recibirá :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` " -"o :c:data:`PyTrace_C_RETURN` como valor para el parámetro *what*." - -#: ../Doc/c-api/init.rst:1903 +#: ../Doc/c-api/init.rst:2149 +msgid "" +"Set the tracing function to *func*. This is similar to :c:func:" +"`PyEval_SetProfile`, except the tracing function does receive line-number " +"events and per-opcode events, but does not receive any event related to C " +"function objects being called. Any trace function registered using :c:func:" +"`PyEval_SetTrace` will not receive :c:data:`PyTrace_C_CALL`, :c:data:" +"`PyTrace_C_EXCEPTION` or :c:data:`PyTrace_C_RETURN` as a value for the " +"*what* parameter." +msgstr "" +"Establezca la función de seguimiento en *func*. Es similar a :c:func:" +"`PyEval_SetProfile`, excepto que la función de seguimiento recibe eventos de " +"número de línea y eventos por código de operación, pero no recibe ningún " +"evento relacionado con los objetos de función C que se están llamando. " +"Cualquier función de seguimiento registrada con :c:func:`PyEval_SetTrace` no " +"recibirá :c:data:`PyTrace_C_CALL`, :c:data:`PyTrace_C_EXCEPTION` o :c:data:" +"`PyTrace_C_RETURN` como valor para el parámetro *what*." + +#: ../Doc/c-api/init.rst:2156 msgid "See also the :func:`sys.settrace` function." msgstr "Consulte también la función :func:`sys.settrace`." -#: ../Doc/c-api/init.rst:1909 +#: ../Doc/c-api/init.rst:2162 msgid "" "Like :c:func:`PyEval_SetTrace` but sets the tracing function in all running " "threads belonging to the current interpreter instead of the setting it only " @@ -3243,7 +3640,7 @@ msgstr "" "todos los subprocesos en ejecución que pertenecen al intérprete actual en " "lugar de configurarla solo en el subproceso actual." -#: ../Doc/c-api/init.rst:1914 +#: ../Doc/c-api/init.rst:2167 msgid "" "As :c:func:`PyEval_SetTrace`, this function ignores any exceptions raised " "while setting the trace functions in all threads." @@ -3252,28 +3649,28 @@ msgstr "" "excepción generada al configurar las funciones de seguimiento en todos los " "subprocesos." -#: ../Doc/c-api/init.rst:1920 +#: ../Doc/c-api/init.rst:2173 msgid "Reference tracing" msgstr "Rastreo de referencia" -#: ../Doc/c-api/init.rst:1926 +#: ../Doc/c-api/init.rst:2179 msgid "" -"The type of the trace function registered " -"using :c:func:`PyRefTracer_SetTracer`. The first parameter is a Python " -"object that has been just created (when **event** is set " -"to :c:data:`PyRefTracer_CREATE`) or about to be destroyed (when **event** is " -"set to :c:data:`PyRefTracer_DESTROY`). The **data** argument is the opaque " -"pointer that was provided when :c:func:`PyRefTracer_SetTracer` was called." +"The type of the trace function registered using :c:func:" +"`PyRefTracer_SetTracer`. The first parameter is a Python object that has " +"been just created (when **event** is set to :c:data:`PyRefTracer_CREATE`) or " +"about to be destroyed (when **event** is set to :c:data:" +"`PyRefTracer_DESTROY`). The **data** argument is the opaque pointer that was " +"provided when :c:func:`PyRefTracer_SetTracer` was called." msgstr "" -"El tipo de la función de seguimiento registrada " -"mediante :c:func:`PyRefTracer_SetTracer`. El primer parámetro es un objeto " -"Python que se acaba de crear (cuando **event** se establece " -"en :c:data:`PyRefTracer_CREATE`) o que está a punto de destruirse (cuando " -"**event** se establece en :c:data:`PyRefTracer_DESTROY`). El argumento " -"**data** es el puntero opaco que se proporcionó cuando se llamó " -"a :c:func:`PyRefTracer_SetTracer`." +"El tipo de la función de seguimiento registrada mediante :c:func:" +"`PyRefTracer_SetTracer`. El primer parámetro es un objeto Python que se " +"acaba de crear (cuando **event** se establece en :c:data:" +"`PyRefTracer_CREATE`) o que está a punto de destruirse (cuando **event** se " +"establece en :c:data:`PyRefTracer_DESTROY`). El argumento **data** es el " +"puntero opaco que se proporcionó cuando se llamó a :c:func:" +"`PyRefTracer_SetTracer`." -#: ../Doc/c-api/init.rst:1936 +#: ../Doc/c-api/init.rst:2189 msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been created." @@ -3281,7 +3678,7 @@ msgstr "" "El valor del parámetro *event* a :c:type:`PyRefTracer` funciona cuando se ha " "creado un objeto Python." -#: ../Doc/c-api/init.rst:1941 +#: ../Doc/c-api/init.rst:2194 msgid "" "The value for the *event* parameter to :c:type:`PyRefTracer` functions when " "a Python object has been destroyed." @@ -3289,7 +3686,7 @@ msgstr "" "El valor del parámetro *event* a :c:type:`PyRefTracer` funciona cuando se ha " "destruido un objeto Python." -#: ../Doc/c-api/init.rst:1946 +#: ../Doc/c-api/init.rst:2199 msgid "" "Register a reference tracer function. The function will be called when a new " "Python has been created or when an object is going to be destroyed. If " @@ -3303,12 +3700,13 @@ msgstr "" "se llame a la función de rastreo. Devuelve ``0`` en caso de éxito. Establece " "una excepción y devuelve ``-1`` en caso de error." -#: ../Doc/c-api/init.rst:1952 +#: ../Doc/c-api/init.rst:2205 +#, fuzzy msgid "" "Not that tracer functions **must not** create Python objects inside or " "otherwise the call will be re-entrant. The tracer also **must not** clear " -"any existing exception or set an exception. The GIL will be held every time " -"the tracer function is called." +"any existing exception or set an exception. A :term:`thread state` will be " +"active every time the tracer function is called." msgstr "" "No es que las funciones de seguimiento **must not** creen objetos Python en " "su interior, de lo contrario la llamada será reentrante. El seguimiento " @@ -3316,11 +3714,13 @@ msgstr "" "excepción. El GIL se mantendrá cada vez que se llame a la función de " "seguimiento." -#: ../Doc/c-api/init.rst:1957 ../Doc/c-api/init.rst:1968 -msgid "The GIL must be held when calling this function." +#: ../Doc/c-api/init.rst:2210 ../Doc/c-api/init.rst:2221 +#, fuzzy +msgid "" +"There must be an :term:`attached thread state` when calling this function." msgstr "El GIL debe mantenerse al llamar a esta función." -#: ../Doc/c-api/init.rst:1963 +#: ../Doc/c-api/init.rst:2216 msgid "" "Get the registered reference tracer function and the value of the opaque " "data pointer that was registered when :c:func:`PyRefTracer_SetTracer` was " @@ -3328,22 +3728,22 @@ msgid "" "set the **data** pointer to NULL." msgstr "" "Obtenga la función de trazador de referencia registrada y el valor del " -"puntero de datos opacos que se registró cuando se llamó " -"a :c:func:`PyRefTracer_SetTracer`. Si no se registró ningún trazador, esta " -"función devolverá NULL y establecerá el puntero **data** en NULL." +"puntero de datos opacos que se registró cuando se llamó a :c:func:" +"`PyRefTracer_SetTracer`. Si no se registró ningún trazador, esta función " +"devolverá NULL y establecerá el puntero **data** en NULL." -#: ../Doc/c-api/init.rst:1975 +#: ../Doc/c-api/init.rst:2228 msgid "Advanced Debugger Support" msgstr "Soporte avanzado del depurador" -#: ../Doc/c-api/init.rst:1980 +#: ../Doc/c-api/init.rst:2233 msgid "" "These functions are only intended to be used by advanced debugging tools." msgstr "" "Estas funciones solo están destinadas a ser utilizadas por herramientas de " "depuración avanzadas." -#: ../Doc/c-api/init.rst:1985 +#: ../Doc/c-api/init.rst:2238 msgid "" "Return the interpreter state object at the head of the list of all such " "objects." @@ -3351,11 +3751,11 @@ msgstr "" "Retorna el objeto de estado del intérprete al principio de la lista de todos " "esos objetos." -#: ../Doc/c-api/init.rst:1990 +#: ../Doc/c-api/init.rst:2243 msgid "Return the main interpreter state object." msgstr "Retorna el objeto de estado del intérprete principal." -#: ../Doc/c-api/init.rst:1995 +#: ../Doc/c-api/init.rst:2248 msgid "" "Return the next interpreter state object after *interp* from the list of all " "such objects." @@ -3363,7 +3763,7 @@ msgstr "" "Retorna el siguiente objeto de estado de intérprete después de *interp* de " "la lista de todos esos objetos." -#: ../Doc/c-api/init.rst:2001 +#: ../Doc/c-api/init.rst:2254 msgid "" "Return the pointer to the first :c:type:`PyThreadState` object in the list " "of threads associated with the interpreter *interp*." @@ -3371,20 +3771,20 @@ msgstr "" "Retorna el puntero al primer objeto :c:type:`PyThreadState` en la lista de " "hilos asociados con el intérprete *interp*." -#: ../Doc/c-api/init.rst:2007 +#: ../Doc/c-api/init.rst:2260 msgid "" "Return the next thread state object after *tstate* from the list of all such " "objects belonging to the same :c:type:`PyInterpreterState` object." msgstr "" "Retorna el siguiente objeto de estado del hilo después de *tstate* de la " -"lista de todos los objetos que pertenecen al mismo " -"objeto :c:type:`PyInterpreterState`." +"lista de todos los objetos que pertenecen al mismo objeto :c:type:" +"`PyInterpreterState`." -#: ../Doc/c-api/init.rst:2014 +#: ../Doc/c-api/init.rst:2267 msgid "Thread Local Storage Support" msgstr "Soporte de almacenamiento local de hilo" -#: ../Doc/c-api/init.rst:2018 +#: ../Doc/c-api/init.rst:2271 msgid "" "The Python interpreter provides low-level support for thread-local storage " "(TLS) which wraps the underlying native TLS implementation to support the " @@ -3400,15 +3800,16 @@ msgstr "" "similares a las ofrecidas por pthreads y Windows: use una clave de hilo y " "funciones para asociar un valor de :c:expr:`void*` por hilo." -#: ../Doc/c-api/init.rst:2025 +#: ../Doc/c-api/init.rst:2278 +#, fuzzy msgid "" -"The GIL does *not* need to be held when calling these functions; they supply " -"their own locking." +"A :term:`thread state` does *not* need to be :term:`attached ` when calling these functions; they suppl their own locking." msgstr "" "El GIL *no* necesita ser retenido al llamar a estas funciones; proporcionan " "su propio bloqueo." -#: ../Doc/c-api/init.rst:2028 +#: ../Doc/c-api/init.rst:2281 msgid "" "Note that :file:`Python.h` does not include the declaration of the TLS APIs, " "you need to include :file:`pythread.h` to use thread-local storage." @@ -3417,40 +3818,39 @@ msgstr "" "TLS, debe incluir :file:`pythread.h` para usar el almacenamiento local de " "hilos." -#: ../Doc/c-api/init.rst:2032 +#: ../Doc/c-api/init.rst:2285 msgid "" -"None of these API functions handle memory management on behalf of " -"the :c:expr:`void*` values. You need to allocate and deallocate them " -"yourself. If the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, " -"these functions don't do refcount operations on them either." +"None of these API functions handle memory management on behalf of the :c:" +"expr:`void*` values. You need to allocate and deallocate them yourself. If " +"the :c:expr:`void*` values happen to be :c:expr:`PyObject*`, these functions " +"don't do refcount operations on them either." msgstr "" "Ninguna de estas funciones API maneja la administración de memoria en nombre " "de los valores :c:expr:`void*`. Debe asignarlos y desasignarlos usted mismo. " "Si los valores :c:expr:`void*` son :c:expr:`PyObject*`, estas funciones " "tampoco realizan operaciones de conteo de referencias en ellos." -#: ../Doc/c-api/init.rst:2040 +#: ../Doc/c-api/init.rst:2293 msgid "Thread Specific Storage (TSS) API" msgstr "" "API de almacenamiento específico de hilo (TSS, *Thread Specific Storage*)" -#: ../Doc/c-api/init.rst:2042 +#: ../Doc/c-api/init.rst:2295 msgid "" "TSS API is introduced to supersede the use of the existing TLS API within " "the CPython interpreter. This API uses a new type :c:type:`Py_tss_t` " "instead of :c:expr:`int` to represent thread keys." msgstr "" "La API de TSS se introduce para reemplazar el uso de la API TLS existente " -"dentro del intérprete de CPython. Esta API utiliza un nuevo " -"tipo :c:type:`Py_tss_t` en lugar de :c:expr:`int` para representar las " -"claves del hilo." +"dentro del intérprete de CPython. Esta API utiliza un nuevo tipo :c:type:" +"`Py_tss_t` en lugar de :c:expr:`int` para representar las claves del hilo." -#: ../Doc/c-api/init.rst:2048 +#: ../Doc/c-api/init.rst:2301 msgid "\"A New C-API for Thread-Local Storage in CPython\" (:pep:`539`)" msgstr "" "\"Una nueva C-API para *Thread-Local Storage* en CPython\" (:pep:`539`)" -#: ../Doc/c-api/init.rst:2053 +#: ../Doc/c-api/init.rst:2306 msgid "" "This data structure represents the state of a thread key, the definition of " "which may depend on the underlying TLS implementation, and it has an " @@ -3462,7 +3862,7 @@ msgstr "" "campo interno que representa el estado de inicialización de la clave. No hay " "miembros públicos en esta estructura." -#: ../Doc/c-api/init.rst:2058 +#: ../Doc/c-api/init.rst:2311 msgid "" "When :ref:`Py_LIMITED_API ` is not defined, static allocation of " "this type by :c:macro:`Py_tss_NEEDS_INIT` is allowed." @@ -3470,7 +3870,7 @@ msgstr "" "Cuando :ref:`Py_LIMITED_API ` no está definido, la asignación " "estática de este tipo por :c:macro:`Py_tss_NEEDS_INIT` está permitida." -#: ../Doc/c-api/init.rst:2064 +#: ../Doc/c-api/init.rst:2317 msgid "" "This macro expands to the initializer for :c:type:`Py_tss_t` variables. Note " "that this macro won't be defined with :ref:`Py_LIMITED_API `." @@ -3479,11 +3879,11 @@ msgstr "" "Tenga en cuenta que esta macro no se definirá con :ref:`Py_LIMITED_API " "`." -#: ../Doc/c-api/init.rst:2069 +#: ../Doc/c-api/init.rst:2322 msgid "Dynamic Allocation" msgstr "Asignación dinámica" -#: ../Doc/c-api/init.rst:2071 +#: ../Doc/c-api/init.rst:2324 msgid "" "Dynamic allocation of the :c:type:`Py_tss_t`, required in extension modules " "built with :ref:`Py_LIMITED_API `, where static allocation of this " @@ -3494,17 +3894,16 @@ msgstr "" "asignación estática de este tipo no es posible debido a que su " "implementación es opaca en el momento de la compilación." -#: ../Doc/c-api/init.rst:2078 +#: ../Doc/c-api/init.rst:2331 msgid "" -"Return a value which is the same state as a value initialized " -"with :c:macro:`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic " -"allocation failure." +"Return a value which is the same state as a value initialized with :c:macro:" +"`Py_tss_NEEDS_INIT`, or ``NULL`` in the case of dynamic allocation failure." msgstr "" -"Retorna un valor que es el mismo estado que un valor inicializado " -"con :c:macro:`Py_tss_NEEDS_INIT`, o ``NULL`` en caso de falla de asignación " +"Retorna un valor que es el mismo estado que un valor inicializado con :c:" +"macro:`Py_tss_NEEDS_INIT`, o ``NULL`` en caso de falla de asignación " "dinámica." -#: ../Doc/c-api/init.rst:2085 +#: ../Doc/c-api/init.rst:2338 msgid "" "Free the given *key* allocated by :c:func:`PyThread_tss_alloc`, after first " "calling :c:func:`PyThread_tss_delete` to ensure any associated thread locals " @@ -3515,30 +3914,30 @@ msgstr "" "los hilos locales asociados no hayan sido asignados. Esto es un no-op si el " "argumento *clave* es ``NULL``." -#: ../Doc/c-api/init.rst:2091 +#: ../Doc/c-api/init.rst:2344 msgid "" "A freed key becomes a dangling pointer. You should reset the key to ``NULL``." msgstr "" "Una clave liberada se convierte en un puntero colgante. Debería restablecer " "la clave a ``NULL``." -#: ../Doc/c-api/init.rst:2096 +#: ../Doc/c-api/init.rst:2349 msgid "Methods" msgstr "Métodos" -#: ../Doc/c-api/init.rst:2098 +#: ../Doc/c-api/init.rst:2351 msgid "" "The parameter *key* of these functions must not be ``NULL``. Moreover, the " "behaviors of :c:func:`PyThread_tss_set` and :c:func:`PyThread_tss_get` are " -"undefined if the given :c:type:`Py_tss_t` has not been initialized " -"by :c:func:`PyThread_tss_create`." +"undefined if the given :c:type:`Py_tss_t` has not been initialized by :c:" +"func:`PyThread_tss_create`." msgstr "" "El parámetro *key* de estas funciones no debe ser ``NULL``. Además, los " "comportamientos de :c:func:`PyThread_tss_set` y :c:func:`PyThread_tss_get` " "no están definidos si el :c:type:`Py_tss_t` dado no ha sido inicializado " "por :c:func:`PyThread_tss_create`." -#: ../Doc/c-api/init.rst:2106 +#: ../Doc/c-api/init.rst:2359 msgid "" "Return a non-zero value if the given :c:type:`Py_tss_t` has been initialized " "by :c:func:`PyThread_tss_create`." @@ -3546,7 +3945,7 @@ msgstr "" "Retorna un valor distinto de cero si :c:type:`Py_tss_t` ha sido inicializado " "por :c:func:`PyThread_tss_create`." -#: ../Doc/c-api/init.rst:2112 +#: ../Doc/c-api/init.rst:2365 msgid "" "Return a zero value on successful initialization of a TSS key. The behavior " "is undefined if the value pointed to by the *key* argument is not " @@ -3560,32 +3959,31 @@ msgstr "" "invocar repetidamente en la misma tecla: llamarla a una tecla ya " "inicializada es un *no-op* e inmediatamente retorna el éxito." -#: ../Doc/c-api/init.rst:2121 +#: ../Doc/c-api/init.rst:2374 msgid "" "Destroy a TSS key to forget the values associated with the key across all " "threads, and change the key's initialization state to uninitialized. A " -"destroyed key is able to be initialized again " -"by :c:func:`PyThread_tss_create`. This function can be called repeatedly on " -"the same key -- calling it on an already destroyed key is a no-op." +"destroyed key is able to be initialized again by :c:func:" +"`PyThread_tss_create`. This function can be called repeatedly on the same " +"key -- calling it on an already destroyed key is a no-op." msgstr "" "Destruye una clave TSS para olvidar los valores asociados con la clave en " "todos los hilos y cambie el estado de inicialización de la clave a no " -"inicializado. Una clave destruida se puede inicializar nuevamente " -"mediante :c:func:`PyThread_tss_create`. Esta función se puede invocar " -"repetidamente en la misma llave; llamarla en una llave ya destruida es un " -"*no-op*." +"inicializado. Una clave destruida se puede inicializar nuevamente mediante :" +"c:func:`PyThread_tss_create`. Esta función se puede invocar repetidamente en " +"la misma llave; llamarla en una llave ya destruida es un *no-op*." -#: ../Doc/c-api/init.rst:2130 +#: ../Doc/c-api/init.rst:2383 msgid "" "Return a zero value to indicate successfully associating a :c:expr:`void*` " "value with a TSS key in the current thread. Each thread has a distinct " "mapping of the key to a :c:expr:`void*` value." msgstr "" -"Retorna un valor cero para indicar la asociación exitosa de un valor " -"a :c:expr:`void*` con una clave TSS en el hilo actual. Cada hilo tiene un " -"mapeo distinto de la clave a un valor :c:expr:`void*`." +"Retorna un valor cero para indicar la asociación exitosa de un valor a :c:" +"expr:`void*` con una clave TSS en el hilo actual. Cada hilo tiene un mapeo " +"distinto de la clave a un valor :c:expr:`void*`." -#: ../Doc/c-api/init.rst:2137 +#: ../Doc/c-api/init.rst:2390 msgid "" "Return the :c:expr:`void*` value associated with a TSS key in the current " "thread. This returns ``NULL`` if no value is associated with the key in the " @@ -3595,11 +3993,11 @@ msgstr "" "actual. Esto retorna ``NULL`` si no hay ningún valor asociado con la clave " "en el hilo actual." -#: ../Doc/c-api/init.rst:2145 +#: ../Doc/c-api/init.rst:2398 msgid "Thread Local Storage (TLS) API" msgstr "API de almacenamiento local de hilos (TLS, *Thread Local Storage*)" -#: ../Doc/c-api/init.rst:2147 +#: ../Doc/c-api/init.rst:2400 msgid "" "This API is superseded by :ref:`Thread Specific Storage (TSS) API `." @@ -3608,7 +4006,7 @@ msgstr "" "(TSS, por sus significado en inglés *Thread Specific Storage*) `." -#: ../Doc/c-api/init.rst:2152 +#: ../Doc/c-api/init.rst:2405 msgid "" "This version of the API does not support platforms where the native TLS key " "is defined in a way that cannot be safely cast to ``int``. On such " @@ -3622,7 +4020,7 @@ msgstr "" "inmediatamente con un estado de falla, y las otras funciones TLS serán no " "operativas en tales plataformas." -#: ../Doc/c-api/init.rst:2157 +#: ../Doc/c-api/init.rst:2410 msgid "" "Due to the compatibility problem noted above, this version of the API should " "not be used in new code." @@ -3630,15 +4028,15 @@ msgstr "" "Debido al problema de compatibilidad mencionado anteriormente, esta versión " "de la API no debe usarse en código nuevo." -#: ../Doc/c-api/init.rst:2168 +#: ../Doc/c-api/init.rst:2421 msgid "Synchronization Primitives" msgstr "Primitivas de sincronización" -#: ../Doc/c-api/init.rst:2170 +#: ../Doc/c-api/init.rst:2423 msgid "The C-API provides a basic mutual exclusion lock." msgstr "La C-API proporciona un bloqueo de exclusión mutua básico." -#: ../Doc/c-api/init.rst:2174 +#: ../Doc/c-api/init.rst:2427 msgid "" "A mutual exclusion lock. The :c:type:`!PyMutex` should be initialized to " "zero to represent the unlocked state. For example::" @@ -3646,11 +4044,12 @@ msgstr "" "Un bloqueo de exclusión mutua. El :c:type:`!PyMutex` debe inicializarse a " "cero para representar el estado desbloqueado. Por ejemplo:" -#: ../Doc/c-api/init.rst:2177 +#: ../Doc/c-api/init.rst:2430 +#, python-brace-format msgid "PyMutex mutex = {0};" msgstr "PyMutex mutex = {0};" -#: ../Doc/c-api/init.rst:2179 +#: ../Doc/c-api/init.rst:2432 msgid "" "Instances of :c:type:`!PyMutex` should not be copied or moved. Both the " "contents and address of a :c:type:`!PyMutex` are meaningful, and it must " @@ -3660,7 +4059,7 @@ msgstr "" "contenido como la dirección de un :c:type:`!PyMutex` son significativos y " "deben permanecer en una ubicación fija y escribible en la memoria." -#: ../Doc/c-api/init.rst:2185 +#: ../Doc/c-api/init.rst:2438 msgid "" "A :c:type:`!PyMutex` currently occupies one byte, but the size should be " "considered unstable. The size may change in future Python releases without " @@ -3670,18 +4069,20 @@ msgstr "" "considerarse inestable. El tamaño puede cambiar en futuras versiones de " "Python sin un período de desuso." -#: ../Doc/c-api/init.rst:2193 +#: ../Doc/c-api/init.rst:2446 +#, fuzzy msgid "" "Lock mutex *m*. If another thread has already locked it, the calling thread " "will block until the mutex is unlocked. While blocked, the thread will " -"temporarily release the :term:`GIL` if it is held." +"temporarily detach the :term:`thread state ` if one " +"exists." msgstr "" "Bloqueo del mutex *m*. Si otro subproceso ya lo ha bloqueado, el subproceso " "que realiza la llamada se bloqueará hasta que se desbloquee el mutex. " "Mientras esté bloqueado, el subproceso liberará temporalmente el :term:`GIL` " "si está retenido." -#: ../Doc/c-api/init.rst:2201 +#: ../Doc/c-api/init.rst:2454 msgid "" "Unlock mutex *m*. The mutex must be locked --- otherwise, the function will " "issue a fatal error." @@ -3689,11 +4090,22 @@ msgstr "" "Desbloquee el mutex *m*. El mutex debe estar bloqueado; de lo contrario, la " "función emitirá un error fatal." -#: ../Doc/c-api/init.rst:2209 +#: ../Doc/c-api/init.rst:2461 +msgid "Returns non-zero if the mutex *m* is currently locked, zero otherwise." +msgstr "" + +#: ../Doc/c-api/init.rst:2465 +msgid "" +"This function is intended for use in assertions and debugging only and " +"should not be used to make concurrency control decisions, as the lock state " +"may change immediately after the check." +msgstr "" + +#: ../Doc/c-api/init.rst:2474 msgid "Python Critical Section API" msgstr "API de sección crítica de Python" -#: ../Doc/c-api/init.rst:2211 +#: ../Doc/c-api/init.rst:2476 msgid "" "The critical section API provides a deadlock avoidance layer on top of per-" "object locks for :term:`free-threaded ` CPython. They are " @@ -3706,25 +4118,36 @@ msgstr "" "interpreter lock` y no se pueden realizar operaciones en versiones de Python " "con el bloqueo del intérprete global." -#: ../Doc/c-api/init.rst:2216 +#: ../Doc/c-api/init.rst:2481 +msgid "" +"Critical sections are intended to be used for custom types implemented in C-" +"API extensions. They should generally not be used with built-in types like :" +"class:`list` and :class:`dict` because their public C-APIs already use " +"critical sections internally, with the notable exception of :c:func:" +"`PyDict_Next`, which requires critical section to be acquired externally." +msgstr "" + +#: ../Doc/c-api/init.rst:2488 msgid "" "Critical sections avoid deadlocks by implicitly suspending active critical " -"sections and releasing the locks during calls " -"to :c:func:`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is " -"called, the most recent critical section is resumed, and its locks " -"reacquired. This means the critical section API provides weaker guarantees " -"than traditional locks -- they are useful because their behavior is similar " -"to the :term:`GIL`." -msgstr "" -"Las secciones críticas evitan los bloqueos al suspender implícitamente las " -"secciones críticas activas y liberar los bloqueos durante las llamadas " -"a :c:func:`PyEval_SaveThread`. Cuando se llama " -"a :c:func:`PyEval_RestoreThread`, se reanuda la sección crítica más reciente " -"y se vuelven a adquirir sus bloqueos. Esto significa que la API de la " -"sección crítica ofrece garantías más débiles que los bloqueos tradicionales; " -"son útiles porque su comportamiento es similar al de :term:`GIL`." - -#: ../Doc/c-api/init.rst:2223 +"sections, hence, they do not provide exclusive access such as provided by " +"traditional locks like :c:type:`PyMutex`. When a critical section is " +"started, the per-object lock for the object is acquired. If the code " +"executed inside the critical section calls C-API functions then it can " +"suspend the critical section thereby releasing the per-object lock, so other " +"threads can acquire the per-object lock for the same object." +msgstr "" + +#: ../Doc/c-api/init.rst:2496 +msgid "" +"Variants that accept :c:type:`PyMutex` pointers rather than Python objects " +"are also available. Use these variants to start a critical section in a " +"situation where there is no :c:type:`PyObject` -- for example, when working " +"with a C type that does not extend or wrap :c:type:`PyObject` but still " +"needs to call into the C API in a manner that might lead to deadlocks." +msgstr "" + +#: ../Doc/c-api/init.rst:2502 msgid "" "The functions and structs used by the macros are exposed for cases where C " "macros are not available. They should only be used as in the given macro " @@ -3737,25 +4160,26 @@ msgstr "" "los tamaños y contenidos de las estructuras pueden cambiar en futuras " "versiones de Python." -#: ../Doc/c-api/init.rst:2230 +#: ../Doc/c-api/init.rst:2509 msgid "" -"Operations that need to lock two objects at once must " -"use :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical " -"sections to lock more than one object at once, because the inner critical " -"section may suspend the outer critical sections. This API does not provide " -"a way to lock more than two objects at once." +"Operations that need to lock two objects at once must use :c:macro:" +"`Py_BEGIN_CRITICAL_SECTION2`. You *cannot* use nested critical sections to " +"lock more than one object at once, because the inner critical section may " +"suspend the outer critical sections. This API does not provide a way to " +"lock more than two objects at once." msgstr "" -"Las operaciones que necesitan bloquear dos objetos a la vez deben " -"utilizar :c:macro:`Py_BEGIN_CRITICAL_SECTION2`. *cannot* utiliza secciones " -"críticas anidadas para bloquear más de un objeto a la vez, ya que la sección " -"crítica interna puede suspender las secciones críticas externas. Esta API no " +"Las operaciones que necesitan bloquear dos objetos a la vez deben utilizar :" +"c:macro:`Py_BEGIN_CRITICAL_SECTION2`. *cannot* utiliza secciones críticas " +"anidadas para bloquear más de un objeto a la vez, ya que la sección crítica " +"interna puede suspender las secciones críticas externas. Esta API no " "proporciona una manera de bloquear más de dos objetos a la vez." -#: ../Doc/c-api/init.rst:2236 +#: ../Doc/c-api/init.rst:2515 msgid "Example usage::" msgstr "Ejemplo de uso::" -#: ../Doc/c-api/init.rst:2238 +#: ../Doc/c-api/init.rst:2517 +#, python-brace-format msgid "" "static PyObject *\n" "set_field(MyObject *self, PyObject *value)\n" @@ -3775,14 +4199,15 @@ msgstr "" " Py_RETURN_NONE;\n" "}" -#: ../Doc/c-api/init.rst:2247 +#: ../Doc/c-api/init.rst:2526 +#, fuzzy msgid "" "In the above example, :c:macro:`Py_SETREF` calls :c:macro:`Py_DECREF`, which " "can call arbitrary code through an object's deallocation function. The " -"critical section API avoids potentital deadlocks due to reentrancy and lock " +"critical section API avoids potential deadlocks due to reentrancy and lock " "ordering by allowing the runtime to temporarily suspend the critical section " -"if the code triggered by the finalizer blocks and " -"calls :c:func:`PyEval_SaveThread`." +"if the code triggered by the finalizer blocks and calls :c:func:" +"`PyEval_SaveThread`." msgstr "" "En el ejemplo anterior, :c:macro:`Py_SETREF` llama a :c:macro:`Py_DECREF`, " "que puede llamar a código arbitrario a través de la función de desasignación " @@ -3791,7 +4216,7 @@ msgstr "" "suspenda temporalmente la sección crítica si el código activado por el " "finalizador se bloquea y llama a :c:func:`PyEval_SaveThread`." -#: ../Doc/c-api/init.rst:2255 +#: ../Doc/c-api/init.rst:2534 msgid "" "Acquires the per-object lock for the object *op* and begins a critical " "section." @@ -3799,12 +4224,13 @@ msgstr "" "Adquiere el bloqueo por objeto para el objeto *op* y comienza una sección " "crítica." -#: ../Doc/c-api/init.rst:2258 ../Doc/c-api/init.rst:2272 -#: ../Doc/c-api/init.rst:2287 ../Doc/c-api/init.rst:2301 +#: ../Doc/c-api/init.rst:2537 ../Doc/c-api/init.rst:2551 +#: ../Doc/c-api/init.rst:2568 ../Doc/c-api/init.rst:2583 +#: ../Doc/c-api/init.rst:2597 ../Doc/c-api/init.rst:2614 msgid "In the free-threaded build, this macro expands to::" msgstr "En la compilación de subprocesos libres, esta macro se expande a:" -#: ../Doc/c-api/init.rst:2260 +#: ../Doc/c-api/init.rst:2539 msgid "" "{\n" " PyCriticalSection _py_cs;\n" @@ -3814,15 +4240,44 @@ msgstr "" " PyCriticalSection _py_cs;\n" " PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" -#: ../Doc/c-api/init.rst:2264 ../Doc/c-api/init.rst:2293 +#: ../Doc/c-api/init.rst:2543 ../Doc/c-api/init.rst:2589 msgid "In the default build, this macro expands to ``{``." msgstr "En la compilación predeterminada, esta macro se expande a ``{``." -#: ../Doc/c-api/init.rst:2270 +#: ../Doc/c-api/init.rst:2549 +#, fuzzy +msgid "Locks the mutex *m* and begins a critical section." +msgstr "" +"Adquiere el bloqueo por objeto para el objeto *op* y comienza una sección " +"crítica." + +#: ../Doc/c-api/init.rst:2553 +#, fuzzy +msgid "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_BeginMutex(&_py_cs, m)" +msgstr "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" + +#: ../Doc/c-api/init.rst:2557 +msgid "" +"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION`, there is no cast for " +"the argument of the macro - it must be a :c:type:`PyMutex` pointer." +msgstr "" + +#: ../Doc/c-api/init.rst:2560 ../Doc/c-api/init.rst:2606 +#, fuzzy +msgid "On the default build, this macro expands to ``{``." +msgstr "En la compilación predeterminada, esta macro se expande a ``{``." + +#: ../Doc/c-api/init.rst:2566 msgid "Ends the critical section and releases the per-object lock." msgstr "Finaliza la sección crítica y libera el bloqueo por objeto." -#: ../Doc/c-api/init.rst:2274 +#: ../Doc/c-api/init.rst:2570 msgid "" " PyCriticalSection_End(&_py_cs);\n" "}" @@ -3830,11 +4285,11 @@ msgstr "" " PyCriticalSection_End(&_py_cs);\n" "}" -#: ../Doc/c-api/init.rst:2277 ../Doc/c-api/init.rst:2306 +#: ../Doc/c-api/init.rst:2573 ../Doc/c-api/init.rst:2619 msgid "In the default build, this macro expands to ``}``." msgstr "En la compilación predeterminada, esta macro se expande a ``}``." -#: ../Doc/c-api/init.rst:2283 +#: ../Doc/c-api/init.rst:2579 msgid "" "Acquires the per-objects locks for the objects *a* and *b* and begins a " "critical section. The locks are acquired in a consistent order (lowest " @@ -3844,183 +4299,349 @@ msgstr "" "sección crítica. Los bloqueos se adquieren en un orden coherente (la " "dirección más baja primero) para evitar bloqueos en el orden de bloqueo." -#: ../Doc/c-api/init.rst:2289 +#: ../Doc/c-api/init.rst:2585 +#, fuzzy msgid "" "{\n" " PyCriticalSection2 _py_cs2;\n" -" PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" +" PyCriticalSection2_Begin(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" msgstr "" "{\n" " PyCriticalSection2 _py_cs2;\n" " PyCriticalSection_Begin2(&_py_cs2, (PyObject*)(a), (PyObject*)(b))" -#: ../Doc/c-api/init.rst:2299 +#: ../Doc/c-api/init.rst:2595 +#, fuzzy +msgid "Locks the mutexes *m1* and *m2* and begins a critical section." +msgstr "" +"Adquiere el bloqueo por objeto para el objeto *op* y comienza una sección " +"crítica." + +#: ../Doc/c-api/init.rst:2599 +#, fuzzy +msgid "" +"{\n" +" PyCriticalSection2 _py_cs2;\n" +" PyCriticalSection2_BeginMutex(&_py_cs2, m1, m2)" +msgstr "" +"{\n" +" PyCriticalSection _py_cs;\n" +" PyCriticalSection_Begin(&_py_cs, (PyObject*)(op))" + +#: ../Doc/c-api/init.rst:2603 +msgid "" +"Note that unlike :c:macro:`Py_BEGIN_CRITICAL_SECTION2`, there is no cast for " +"the arguments of the macro - they must be :c:type:`PyMutex` pointers." +msgstr "" + +#: ../Doc/c-api/init.rst:2612 msgid "Ends the critical section and releases the per-object locks." msgstr "Finaliza la sección crítica y libera los bloqueos por objeto." -#: ../Doc/c-api/init.rst:2303 +#: ../Doc/c-api/init.rst:2616 +#, fuzzy msgid "" -" PyCriticalSection_End2(&_py_cs2);\n" +" PyCriticalSection2_End(&_py_cs2);\n" "}" msgstr "" " PyCriticalSection_End2(&_py_cs2);\n" "}" -#: ../Doc/c-api/init.rst:335 +#: ../Doc/c-api/init.rst:350 msgid "PyEval_InitThreads()" msgstr "PyEval_InitThreads()" -#: ../Doc/c-api/init.rst:335 +#: ../Doc/c-api/init.rst:350 msgid "modules (in module sys)" msgstr "módulos (en el módulo sys)" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:712 msgid "path (in module sys)" msgstr "path (en el módulo sys)" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 -#: ../Doc/c-api/init.rst:1011 ../Doc/c-api/init.rst:1510 -#: ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:712 +#: ../Doc/c-api/init.rst:1228 ../Doc/c-api/init.rst:1759 +#: ../Doc/c-api/init.rst:1858 msgid "module" msgstr "modulo" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 -#: ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:1759 +#: ../Doc/c-api/init.rst:1858 msgid "builtins" msgstr "elementos incorporados" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 -#: ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:1759 +#: ../Doc/c-api/init.rst:1858 msgid "__main__" msgstr "__main__" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1510 -#: ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:1759 +#: ../Doc/c-api/init.rst:1858 msgid "sys" msgstr "sys" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:712 msgid "search" msgstr "buscar" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:576 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:712 msgid "path" msgstr "path" -#: ../Doc/c-api/init.rst:335 ../Doc/c-api/init.rst:1570 -#: ../Doc/c-api/init.rst:1623 +#: ../Doc/c-api/init.rst:350 ../Doc/c-api/init.rst:1823 +#: ../Doc/c-api/init.rst:1876 msgid "Py_FinalizeEx (C function)" msgstr "Py_FinalizeEx (C function)" -#: ../Doc/c-api/init.rst:445 +#: ../Doc/c-api/init.rst:572 msgid "Py_Initialize()" msgstr "Py_Initialize()" -#: ../Doc/c-api/init.rst:445 ../Doc/c-api/init.rst:674 +#: ../Doc/c-api/init.rst:572 ../Doc/c-api/init.rst:810 msgid "main()" msgstr "main()" -#: ../Doc/c-api/init.rst:445 +#: ../Doc/c-api/init.rst:572 msgid "Py_GetPath()" msgstr "Py_GetPath()" -#: ../Doc/c-api/init.rst:555 +#: ../Doc/c-api/init.rst:690 msgid "executable (in module sys)" msgstr "ejecutable (en el módulo sys)" -#: ../Doc/c-api/init.rst:609 ../Doc/c-api/init.rst:651 -#: ../Doc/c-api/init.rst:665 +#: ../Doc/c-api/init.rst:745 ../Doc/c-api/init.rst:787 +#: ../Doc/c-api/init.rst:801 msgid "version (in module sys)" msgstr "version (in module sys)" -#: ../Doc/c-api/init.rst:621 +#: ../Doc/c-api/init.rst:757 msgid "platform (in module sys)" msgstr "platform (en el módulo sys)" -#: ../Doc/c-api/init.rst:638 +#: ../Doc/c-api/init.rst:774 msgid "copyright (in module sys)" msgstr "derechos de autor (en el módulo sys)" -#: ../Doc/c-api/init.rst:674 +#: ../Doc/c-api/init.rst:810 msgid "Py_FatalError()" msgstr "Py_FatalError()" -#: ../Doc/c-api/init.rst:674 +#: ../Doc/c-api/init.rst:810 msgid "argv (in module sys)" msgstr "argv (en el módulo sys)" -#: ../Doc/c-api/init.rst:794 +#: ../Doc/c-api/init.rst:930 msgid "global interpreter lock" msgstr "bloqueo global del intérprete" -#: ../Doc/c-api/init.rst:794 +#: ../Doc/c-api/init.rst:930 msgid "interpreter lock" msgstr "bloqueo de intérprete" -#: ../Doc/c-api/init.rst:794 +#: ../Doc/c-api/init.rst:930 msgid "lock, interpreter" msgstr "bloqueo, interprete" -#: ../Doc/c-api/init.rst:807 +#: ../Doc/c-api/init.rst:944 msgid "setswitchinterval (in module sys)" msgstr "setswitchinterval (in module sys)" -#: ../Doc/c-api/init.rst:816 +#: ../Doc/c-api/init.rst:953 msgid "PyThreadState (C type)" msgstr "PyThreadState (C type)" -#: ../Doc/c-api/init.rst:842 +#: ../Doc/c-api/init.rst:989 msgid "Py_BEGIN_ALLOW_THREADS (C macro)" msgstr "Py_BEGIN_ALLOW_THREADS (C macro)" -#: ../Doc/c-api/init.rst:842 +#: ../Doc/c-api/init.rst:989 msgid "Py_END_ALLOW_THREADS (C macro)" msgstr "Py_END_ALLOW_THREADS (C macro)" -#: ../Doc/c-api/init.rst:858 +#: ../Doc/c-api/init.rst:1005 msgid "PyEval_RestoreThread (C function)" msgstr "PyEval_RestoreThread (C function)" -#: ../Doc/c-api/init.rst:858 +#: ../Doc/c-api/init.rst:1005 msgid "PyEval_SaveThread (C function)" msgstr "PyEval_SaveThread (C function)" -#: ../Doc/c-api/init.rst:989 +#: ../Doc/c-api/init.rst:1206 msgid "PyEval_AcquireThread()" msgstr "PyEval_AcquireThread()" -#: ../Doc/c-api/init.rst:989 +#: ../Doc/c-api/init.rst:1206 msgid "PyEval_ReleaseThread()" msgstr "PyEval_ReleaseThread()" -#: ../Doc/c-api/init.rst:989 +#: ../Doc/c-api/init.rst:1206 msgid "PyEval_SaveThread()" msgstr "PyEval_SaveThread()" -#: ../Doc/c-api/init.rst:989 +#: ../Doc/c-api/init.rst:1206 msgid "PyEval_RestoreThread()" msgstr "PyEval_RestoreThread()" -#: ../Doc/c-api/init.rst:1011 +#: ../Doc/c-api/init.rst:1228 msgid "_thread" msgstr "_thread" -#: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:1759 ../Doc/c-api/init.rst:1858 msgid "stdout (in module sys)" msgstr "stdout (in module sys)" -#: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:1759 ../Doc/c-api/init.rst:1858 msgid "stderr (in module sys)" msgstr "stderr (in module sys)" -#: ../Doc/c-api/init.rst:1510 ../Doc/c-api/init.rst:1605 +#: ../Doc/c-api/init.rst:1759 ../Doc/c-api/init.rst:1858 msgid "stdin (in module sys)" msgstr "stdin (in module sys)" -#: ../Doc/c-api/init.rst:1570 +#: ../Doc/c-api/init.rst:1823 msgid "Py_Initialize (C function)" msgstr "Py_Initialize (C function)" -#: ../Doc/c-api/init.rst:1600 +#: ../Doc/c-api/init.rst:1853 msgid "close (in module os)" msgstr "cerrar (en el módulo os)" + +#~ msgid ":ref:`Availability `: Windows." +#~ msgstr ":ref:`Disponibilidad `: Windows." + +#~ msgid "Get :data:`sys.executable` instead." +#~ msgstr "Obtenga :data:`sys.executable` en su lugar." + +#~ msgid "Get :data:`sys.prefix` instead." +#~ msgstr "Obtenga :data:`sys.prefix` en su lugar." + +#~ msgid "Get :data:`sys.exec_prefix` instead." +#~ msgstr "Obtenga :data:`sys.exec_prefix` en su lugar." + +#~ msgid "Get :data:`sys.path` instead." +#~ msgstr "Obtenga :data:`sys.path` en su lugar." + +#~ msgid "" +#~ "Here is how these functions work: the global interpreter lock is used to " +#~ "protect the pointer to the current thread state. When releasing the lock " +#~ "and saving the thread state, the current thread state pointer must be " +#~ "retrieved before the lock is released (since another thread could " +#~ "immediately acquire the lock and store its own thread state in the global " +#~ "variable). Conversely, when acquiring the lock and restoring the thread " +#~ "state, the lock must be acquired before storing the thread state pointer." +#~ msgstr "" +#~ "Así es como funcionan estas funciones: el bloqueo global del intérprete " +#~ "se usa para proteger el puntero al estado actual del hilo. Al liberar el " +#~ "bloqueo y guardar el estado del hilo, el puntero del estado del hilo " +#~ "actual debe recuperarse antes de que se libere el bloqueo (ya que otro " +#~ "hilo podría adquirir inmediatamente el bloqueo y almacenar su propio " +#~ "estado de hilo en la variable global). Por el contrario, al adquirir el " +#~ "bloqueo y restaurar el estado del hilo, el bloqueo debe adquirirse antes " +#~ "de almacenar el puntero del estado del hilo." + +#~ msgid "" +#~ "Release the global interpreter lock (if it has been created) and reset " +#~ "the thread state to ``NULL``, returning the previous thread state (which " +#~ "is not ``NULL``). If the lock has been created, the current thread must " +#~ "have acquired it." +#~ msgstr "" +#~ "Libere el bloqueo global del intérprete (si se ha creado) y restablezca " +#~ "el estado del hilo a ``NULL``, retornando el estado del hilo anterior " +#~ "(que no es ``NULL``). Si se ha creado el bloqueo, el hilo actual debe " +#~ "haberlo adquirido." + +#~ msgid "" +#~ "Acquire the global interpreter lock (if it has been created) and set the " +#~ "thread state to *tstate*, which must not be ``NULL``. If the lock has " +#~ "been created, the current thread must not have acquired it, otherwise " +#~ "deadlock ensues." +#~ msgstr "" +#~ "Adquiera el bloqueo global del intérprete (si se ha creado) y establezca " +#~ "el estado del hilo en *tstate*, que no debe ser ``NULL``. Si se ha creado " +#~ "el bloqueo, el hilo actual no debe haberlo adquirido, de lo contrario se " +#~ "produce un *deadlock*." + +#~ msgid "" +#~ "Calling this function from a thread when the runtime is finalizing will " +#~ "terminate the thread, even if the thread was not created by Python. You " +#~ "can use :c:func:`Py_IsFinalizing` or :func:`sys.is_finalizing` to check " +#~ "if the interpreter is in process of being finalized before calling this " +#~ "function to avoid unwanted termination." +#~ msgstr "" +#~ "Si se llama a esta función desde un subproceso cuando el entorno de " +#~ "ejecución está finalizando, se terminará el subproceso, incluso si Python " +#~ "no lo creó. Puede usar :c:func:`Py_IsFinalizing` o :func:`sys." +#~ "is_finalizing` para verificar si el intérprete está en proceso de " +#~ "finalización antes de llamar a esta función para evitar una finalización " +#~ "no deseada." + +#~ msgid "" +#~ "Swap the current thread state with the thread state given by the argument " +#~ "*tstate*, which may be ``NULL``. The global interpreter lock must be " +#~ "held and is not released." +#~ msgstr "" +#~ "Cambia el estado del hilo actual con el estado del hilo dado por el " +#~ "argumento *tstate*, que puede ser ``NULL``. El bloqueo global del " +#~ "intérprete debe mantenerse y no se libera." + +#~ msgid "" +#~ "Create a new thread state object belonging to the given interpreter " +#~ "object. The global interpreter lock need not be held, but may be held if " +#~ "it is necessary to serialize calls to this function." +#~ msgstr "" +#~ "Crea un nuevo objeto de estado de hilo que pertenece al objeto de " +#~ "intérprete dado. No es necesario retener el bloqueo global del " +#~ "intérprete, pero se puede retener si es necesario para serializar " +#~ "llamadas a esta función." + +#~ msgid "" +#~ "Destroy the current thread state and release the global interpreter lock. " +#~ "Like :c:func:`PyThreadState_Delete`, the global interpreter lock must be " +#~ "held. The thread state must have been reset with a previous call to :c:" +#~ "func:`PyThreadState_Clear`." +#~ msgstr "" +#~ "Destruye el estado actual del subproceso y libera el bloqueo global del " +#~ "intérprete. Al igual que en :c:func:`PyThreadState_Delete`, el bloqueo " +#~ "global del intérprete debe mantenerse. El estado del subproceso debe " +#~ "haberse restablecido con una llamada anterior a :c:func:" +#~ "`PyThreadState_Clear`." + +#~ msgid "*tstate* must not be ``NULL``." +#~ msgstr "*tstate* no debe ser ``NULL``." + +#~ msgid "The caller must hold the GIL." +#~ msgstr "La persona que llama debe retener el GIL." + +#~ msgid "" +#~ "Acquire the global interpreter lock and set the current thread state to " +#~ "*tstate*, which must not be ``NULL``. The lock must have been created " +#~ "earlier. If this thread already has the lock, deadlock ensues." +#~ msgstr "" +#~ "Adquiere el bloqueo global del intérprete y establece el estado actual " +#~ "del hilo en *tstate*, que no debe ser ``NULL``. El bloqueo debe haber " +#~ "sido creado anteriormente. Si este hilo ya tiene el bloqueo, se produce " +#~ "un deadlock." + +#~ msgid "" +#~ "This function doesn't need a current thread state to run, and it doesn't " +#~ "need the global interpreter lock." +#~ msgstr "" +#~ "Esta función no necesita un estado de hilo actual para ejecutarse y no " +#~ "necesita el bloqueo global del intérprete." + +#~ msgid "" +#~ "Critical sections avoid deadlocks by implicitly suspending active " +#~ "critical sections and releasing the locks during calls to :c:func:" +#~ "`PyEval_SaveThread`. When :c:func:`PyEval_RestoreThread` is called, the " +#~ "most recent critical section is resumed, and its locks reacquired. This " +#~ "means the critical section API provides weaker guarantees than " +#~ "traditional locks -- they are useful because their behavior is similar to " +#~ "the :term:`GIL`." +#~ msgstr "" +#~ "Las secciones críticas evitan los bloqueos al suspender implícitamente " +#~ "las secciones críticas activas y liberar los bloqueos durante las " +#~ "llamadas a :c:func:`PyEval_SaveThread`. Cuando se llama a :c:func:" +#~ "`PyEval_RestoreThread`, se reanuda la sección crítica más reciente y se " +#~ "vuelven a adquirir sus bloqueos. Esto significa que la API de la sección " +#~ "crítica ofrece garantías más débiles que los bloqueos tradicionales; son " +#~ "útiles porque su comportamiento es similar al de :term:`GIL`." diff --git a/c-api/init_config.po b/c-api/init_config.po index 3ac022b9ed..91a9c2a3f8 100644 --- a/c-api/init_config.po +++ b/c-api/init_config.po @@ -8,77 +8,1247 @@ msgid "" msgstr "" "Project-Id-Version: Python en Español 3.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-21 16:38-0300\n" +"POT-Creation-Date: 2026-02-26 18:44-0300\n" "PO-Revision-Date: 2026-02-13 23:38-0300\n" "Last-Translator: Carlos A. Crespo \n" -"Language-Team: \n" "Language: es\n" +"Language-Team: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" -"Generated-By: Babel 2.16.0\n" -"X-Generator: Poedit 3.0.1\n" +"Generated-By: Babel 2.18.0\n" + +#: ../Doc/c-api/init_config.rst:7 +msgid "Python Initialization Configuration" +msgstr "Configuración de inicialización de Python" + +#: ../Doc/c-api/init_config.rst:13 +#, fuzzy +msgid "PyInitConfig C API" +msgstr "PyConfig" + +#: ../Doc/c-api/init_config.rst:17 +msgid "Python can be initialized with :c:func:`Py_InitializeFromInitConfig`." +msgstr "" + +#: ../Doc/c-api/init_config.rst:19 ../Doc/c-api/init_config.rst:650 +msgid "" +"The :c:func:`Py_RunMain` function can be used to write a customized Python " +"program." +msgstr "" +"La función :c:func:`Py_RunMain` se puede utilizar para escribir un programa " +"Python personalizado." + +#: ../Doc/c-api/init_config.rst:22 ../Doc/c-api/init_config.rst:653 +msgid "" +"See also :ref:`Initialization, Finalization, and Threads `." +msgstr "" +"Consulte también :ref:`Inicialización, finalización y subprocesos " +"`." + +#: ../Doc/c-api/init_config.rst:25 +#, fuzzy +msgid ":pep:`741` \"Python Configuration C API\"." +msgstr ":pep:`587` \"Configuración de inicialización de Python\"." + +#: ../Doc/c-api/init_config.rst:29 ../Doc/c-api/init_config.rst:660 +msgid "Example" +msgstr "Ejemplo" + +#: ../Doc/c-api/init_config.rst:31 +msgid "" +"Example of customized Python always running with the :ref:`Python " +"Development Mode